Skip to content
Browse files

Start playing video after first chunk is appended

  • Loading branch information...
1 parent 3028475 commit 652a588c1ccea117228e2cd662ab0cda902a7bfc @ebidel committed Aug 14, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 html5-demos.appspot.com/static/media-source.html
View
6 html5-demos.appspot.com/static/media-source.html
@@ -192,11 +192,11 @@
sourceBuffer.append(new Uint8Array(e.target.result));
logger.log('appending chunk:' + i);
if (i == NUM_CHUNKS - 1) {
- if (video.paused) {
- video.play(); // insure video starts playing.
- }
mediaSource.endOfStream();
} else {
+ if (video.paused) {
+ video.play(); // Start playing after 1st chunk is appended.
+ }
readChunk_(++i);
}
};

0 comments on commit 652a588

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