[Webkit-unassigned] [Bug 28335] HTML5 media elements do not fire waiting events correctly

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 19 14:28:34 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=28335





--- Comment #15 from Eric Carlson <eric.carlson at apple.com>  2009-08-19 14:28:33 PDT ---
> +++ b/LayoutTests/http/tests/media/video-throttled-load.cgi

A couple of points about the cgi: 1) it would be nice optionally be able
to specify the MIME type so it can be used with other file types, 2) should
add a header to prevent the file from being cached in case the same file is
used with more than one test, 3) it would also be nice to be able to 
optionally specify the throttle rate to test different scenarios, 4) the select
for the last chunk is likely to pause too long, 5) might be nice to assume that
the throttle rate is in KBPS.

Something like this maybe (untested):

#!/usr/bin/perl -w

use CGI;
use File::stat;

my $query = new CGI;

my $name = $query->param('name');
my $filesize = stat($name)->size;

# get throttling rate, assume KBPS
my $kbPerSec = $query->param('throttle');
if (!$kbPerSec) {
    $kbPerSec = $filesize / 1024;
}
$kbPerSec *= 1024;

# get MIME type, use video/mp4 if not specified
my $type = $query->param('type');
if (!$type) {
    $type = "video/mp4";
}

# print http header
print "Content-type: " . $type . "\n";
print "Content-Length: " . $filesize . "\n";
print "Cache-Control: no-cache\n\n";

open FILE, $name or die;
binmode FILE;
my ($buf, $data, $n);
while (($n = read FILE, $data, 1024) != 0) {

    print $data;
    if ($kbPerSec > 0) {
        select(undef, undef, undef, $n / $kbPerSec);
    }
}
close(FILE);

> +++ b/WebCore/manual-tests/video-waiting-seeking.html

I know that this test is in the style of many of the older media test, but I
greatly prefer
new tests to have a more "trational" style, eg. include <html> & <body>
element, put the 
code in the <head>, trigger the test start on an event (body onload, etc).


> +        consoleWrite("Running scheduled seek");
> +        // Source is assumed to be about 188k with a uniform bitrate,
> +        // > 4 seconds in length, and served at 25kb/s.  This should make
> +        // seeking one second ahead every 200ms always leave the buffered
> +        // region.

It would be good to have the test assumptions in the markup rather than in a
comment so someone
looking at the results will see them.


> +    consoleWrite("Start Load");
> +    video.src = "http://127.0.0.1:8000/media/video-throttled-load.cgi?name=../../../media/content/test.mp4&throttle=30&anti_cache=" + (new Date()).getTime();

What is the "anti_cache" param?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list