KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
How does one force an abort event on an HTML5 video? I have an overlay, where, when I close it, the video should pause playing and then stop buffering . However, my internet connection continues to go nuts. Oh, I'm using Chrome 7.0.5 on Mac OS X 10.6. I've tried a couple of things -- none of them have worked: (For those unfamiliar with XUI, x$ is like the jQuery wrapping function) First, dispatching an abort HTML Event: var videoEl = x$('#video_el')[0]; videoEl.pause(); var evObj = document.createEvent('HTMLEvents'); evObj.initEvent('abort', false, false); videoEl.dispatchEvent(evObj); Next, changing the src and then forcing a load: var videoEl = x$('#video_el')[0]; videoEl.pause(); videoEl.src = ""; videoEl.load(); //tried with and without this step EDIT: My video element looks something like this: <video id="video_el" src="<video_url>" preload="none" controls="controls" /> Again, none of these work. Anyone ran into this problem before? Any suggestions? In summary, I am trying to force an HTML5 video element to stop buffering. Thanks!
Tags (comma-separated)
Save Edits
Cancel