Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Commit

Permalink
Added extra tests for subtitle and poster image support
Browse files Browse the repository at this point in the history
  • Loading branch information
NielsLeenheer committed May 15, 2010
1 parent 29d7a87 commit 8169a87
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions index.html
Expand Up @@ -722,7 +722,7 @@ <h2>Updated version coming soon!</h2>
function testVideo (results) { this.initialize(results) }
testVideo.prototype = {
name: 'Video',
count: 5,
count: 7,

initialize: function(results) {
this.element = document.createElement('video');
Expand Down Expand Up @@ -753,10 +753,28 @@ <h2>Updated version coming soon!</h2>
},

t2: function() {
this.section.setItem({
title: 'Subtitle support',
url: 'http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#timed-tracks',
passed: 'track' in document.createElement('track'),
value: 5
});
},

t3: function() {
this.section.setItem({
title: 'Poster image support',
url: 'http://www.w3.org/TR/html5/video.html#video',
passed: 'poster' in this.element,
value: 2
});
},

t4: function() {
this.section.setExplaination('The following tests go beyond the requirements of the HTML5 specification and are not counted towards the total score. If a browser supports more than one video codec two bonus points are awarded for each additional codec.')
},

t3: function() {
t5: function() {
var item = {
title: 'MPEG-4 support',
passed: !!this.element.canPlayType && this.canPlayType('video/mp4; codecs="mp4v.20.8"')
Expand All @@ -768,7 +786,7 @@ <h2>Updated version coming soon!</h2>
this.section.setItem(item);
},

t4: function() {
t6: function() {
var item = {
title: 'H.264 support',
passed: !!this.element.canPlayType && this.canPlayType('video/mp4; codecs="avc1.42E01E"')
Expand All @@ -780,7 +798,7 @@ <h2>Updated version coming soon!</h2>
this.section.setItem(item);
},

t5: function() {
t7: function() {
var item = {
title: 'Ogg Theora support',
passed: !!this.element.canPlayType && this.canPlayType('video/ogg; codecs="theora"')
Expand Down

0 comments on commit 8169a87

Please sign in to comment.