Permalink
Browse files

MS been prefixed

  • Loading branch information...
1 parent 93cba51 commit cd67f2c4bb636824fc9e98e21b35bb43113c1cff @ebidel committed Aug 31, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 html5-demos.appspot.com/static/media-source.html
@@ -115,6 +115,8 @@ <h3>Appending .webm video chunks using the Media Source API</h3>
</section>
<pre><code>
+window.MediaSource = window.MediaSource || window.WebKitMediaSource;
+
var ms = new MediaSource();
var video = document.querySelector('video');
@@ -132,13 +134,14 @@ <h3>Appending .webm video chunks using the Media Source API</h3>
var FILE = 'test.webm';
var NUM_CHUNKS = 5;
var video = document.querySelector('video');
-var mediaSource = new MediaSource();
+window.MediaSource = window.MediaSource || window.WebKitMediaSource;
if (!!!window.MediaSource) {
alert('MediaSource API is not available');
- return;
}
+var mediaSource = new MediaSource();
+
document.querySelector('[data-num-chunks]').textContent = NUM_CHUNKS;
video.src = window.URL.createObjectURL(mediaSource);

0 comments on commit cd67f2c

Please sign in to comment.