1

Media source API is working fine when I downloaded all files from https://html5-demos.appspot.com/static/media-source.html . However, when I replaced the name of file in line 137, chrome dev tools gave Uncaught InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable

I have made no other change to the file and uploaded it on dropbox. @line 137 ` - var FILE = 'test.webm'; + var FILE = 'b8756219.webm';

Chrome Version 31.0.1650.63 Ubuntu 13.10 Both are webm files but one of them is giving errors. What am I missing? `

cnvzmxcvmcx
  • 1,061
  • 2
  • 15
  • 32
  • 2
    The error you're getting is from trying to append a chunk to a closed source buffer. `mediaSource.addEventListener('sourceclose', function(e) {console.log("SOURCE CLOSED");}, false);` will let you know when this happens. The question is why was it closed early? Check out [this answer](http://stackoverflow.com/a/14048349/2601193) to get a better error message. It's likely something wrong with your .webm file. Media-source is less forgiving of incorrect timestamp offsets and such in a video file. – Adam Hart Mar 27 '14 at 17:48
  • @AdamHart Thanks, I followed the instruction in the link you gave and found the error: "Media segment did not begin with keyframe" – cnvzmxcvmcx Mar 28 '14 at 12:14
  • You can *try* using this [mse webm remuxer](https://github.com/acolwell/mse-tools) to fix the video, though I've had mixed results on sample .webm files I've used. – Adam Hart Mar 28 '14 at 17:05

0 Answers0