fregante / iphone-inline-video

📱 Make videos playable inline on the iPhone (prevents automatic fullscreen)
https://npm.im/iphone-inline-video
MIT License
2.06k stars 298 forks source link

added getvideosrc function #55

Closed iambumblehead closed 7 years ago

iambumblehead commented 8 years ago

added getVideoSrc function, which checks for the <source> element if video.src or video.currentSource are falsey --allows one to use this script with video that uses the <source> element.

https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Using_HTML5_audio_and_video

fregante commented 8 years ago

Thank you! But it's not that simple, it needs to find the first compatible <source>, it's probably best to leave it to the browser. I've been thinking that if it can't find a src it has to wait to initialize it. I