Skip to content
Browse files

updated @addyosmani 's track element detection to reflect partial sup…

…port by IE10
  • Loading branch information...
1 parent 7d87471 commit 2c8ddada33ca552eb3792616dfb9c38ab2a40246 @aFarkas aFarkas committed Aug 26, 2012
Showing with 9 additions and 2 deletions.
  1. +9 −2 feature-detects/elem-track.js
11 feature-detects/elem-track.js
@@ -1,4 +1,11 @@
-// Track element
+// Track element + Timed Text Track API
+// While IE10 has implemented the track element, IE10 does not expose the underlying APIs to create timed text tracks by JS (really sad)
// By Addy Osmani
-Modernizr.addTest('track', (typeof (document.createElement('video').addTextTrack) === 'function'));
+ texttrackapi: (typeof (document.createElement('video').addTextTrack) === 'function'),
+ //a more strict test for track including UI support: document.createElement('track').kind === 'subtitles'
+ track: ('kind' in document.createElement('track'))

1 comment on commit 2c8ddad


Sweet! (btw, might want to add an extra space after // and before a just for comment consistency)

Please sign in to comment.
Something went wrong with that request. Please try again.