Reputation: 86
For my goals I'm using html5 and tag < video> to add a media content to page. I've found how to control video by JavaScript(stop, play, load). But is there any ways to modify processing video stream.
I'm trying to find a solutions how to add my sequence of bytes into downloaded stream: e.g modify header of file before playing.
Thanks
Upvotes: 5
Views: 2825
Reputation: 8026
There's no API for modifying the video stream bytes in the video
element.
You can:
video
element on canvas
video
element (in Gecko)XMLHttpRequest
extensions to read the bytes of the video file in JavaScript, modify the data, construct a data:
URL from the data and load the data:
URL into the video
element.Upvotes: 4
Reputation: 16924
A <video>
element can be manipulated visually similarly to a <canvas>
element. Take a look at this article at the Mozilla Hacks blog for a few good examples of what you can do with HTML5 video: http://hacks.mozilla.org/2009/06/pop-art-video/
But as far as modifying the actual video data stream, there isn't really a way to do that on the client side.
Upvotes: 0