This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 20064 - Technique used to determine support for mp4 or webm in track test is faulty
Summary: Technique used to determine support for mp4 or webm in track test is faulty
Status: NEW
Alias: None
Product: HTML WG
Classification: Unclassified
Component: testsuite (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-23 15:35 UTC by Antoine Quint
Modified: 2012-11-23 15:35 UTC (History)
2 users (show)

See Also:


Attachments

Description Antoine Quint 2012-11-23 15:35:12 UTC
See the test at http://w3c-test.org/html/tests/submission/Opera/media/interfaces/TextTrack/activeCues.html. It contains the following code to determine the <video> src to be used on line 101:

video.src = '../../resources/media/sunflower.' + (video.canPlayType('video/webm') ? 'webm' : 'mp4');

This isn't a very robust approach as .canPlayType('video/webm') returns "maybe" on a WebKit nightly when webm is not actually supported, but the string "maybe" evaluates to "true" as a JS condition, and thus the WebM file is used. The test should be rewritten such that it either:

1. uses <source> elements to let the browser pick the suitable resource
2. checks that .canPlayType() returns "probably" to assume that the tested type can be played.