mbebenita / Broadway

A JavaScript H.264 decoder.
Other
2.73k stars 427 forks source link

Is it possible to use Broadway to enable autoplay on mobile? #65

Closed mcranston18 closed 9 years ago

mcranston18 commented 9 years ago

Mobile browsers do not support the autoplay feature of HTML5 video.

<video src="myVideo.mp4" autoplay>

This will autoplay using non-mobile browsers but not on mobile browsers.

Is it possible to decode the MP4 and then autoplay it using Broadway?

soliton4 commented 9 years ago

you will have to program the auto play logic yourself broadway.js is only a decoder that gives you the video frame by frame

alastaircoote commented 9 years ago

It is entirely possible, but in my initial tests it doesn't achieve the FPS necessary (on an iPod Touch) to play a video. You'd also need to handle audio separately.

mcranston18 commented 9 years ago

@alastaircoote would you be willing to post any code you've tried in experimenting with this?

alastaircoote commented 9 years ago

@mcranston18 I'm afraid I haven't experimented much beyond using the demo page in this repo. I've played around a little more with JSMPEG - an MPEG1 decoder. File sizes are far larger, but it performs much better on mobile devices (presumably because the compression is less complex).

mcranston18 commented 9 years ago

@alastaircoote thanks for the link! I appreciate the feedback.