fregante / iphone-inline-video

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

HLS Live Streaming video not working #4

Open wieshka opened 8 years ago

wieshka commented 8 years ago

Tried with HLS Live video feed: got, I guess I-Frame as still image & audio playback on background. Any plans to have HLS support for this?

fregante commented 8 years ago

The way it can display videos is by seeking frame by frame, but that doesn't work on streaming videos. When you have time to post a demo I'll see if there's any alternative way to have the

Edit: Alternatives

http://jsmpeg.com/ https://github.com/mbebenita/Broadway https://github.com/brion/ogv.js/

wieshka commented 8 years ago

Update: the video I tested with had broken seeking capabilities which caused obviously playback issues. Now, with seek supported video, it simply has low FPS, few frames per second.

Hopefully I will be able to provide demo videos soon.

fregante commented 8 years ago

I should probably outline that the fps of the video is limited by the fps of the page. That means that if you're running expensive calculations or other animations, the framerate could drop below 60fps or even the 25/30fps necessary for the video.

This applies to all situations. I can only update the video as often as the browser calls requestAnimationFrame

olegIvani4 commented 8 years ago

Hi, I have tested your player with this HLS live stream: http://vevoplaylist-live.hls.adaptive.level3.net/vevo/ch1/appleman.m3u8

Have same issues as @wieshka. Audio stream is playing perfect, but video has very bad fps (about 1/2fps). requestAnimationFrame calls ~60 times per second. I also tried to limit it to 25fps by rewriting requestAnimationFrame method but it didn't help.

window.requestAnimationFrame = function( callback ){
    window.setTimeout(callback, 1000 / 25);
};

I also noticed that player continues updating frames for few seconds after I press pause button.

fregante commented 8 years ago

I haven't had time to test this and something tells me that there isn't much I can do.

requestAnimationFrame calls ~60 times per second.

To avoid sync issues with videos' framerates, I use the highest available framerate and let the browser figure out if the video needs updating after I set the currentTime

I also noticed that player continues updating frames for few seconds after I press pause button.

Can you try the latest version? If that doesn't fix it, would you mind opening a new issue with more details and perhaps a link to the page with the issue?

neuman commented 7 years ago

Anyone make any progress on this? I need it to get http://www.sprawly.co working properly methinks.

olegIvani4 commented 7 years ago

in IOS 10 you can just add playsinline parameter to

neuman commented 7 years ago

Sure, but for everything else?

On Thu, Aug 25, 2016, 1:41 PM Oleg notifications@github.com wrote:

in IOS 10 you can just add playsinline parameter to tag and it will not switch to full-screen anymore

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bfred-it/iphone-inline-video/issues/4#issuecomment-242532766, or mute the thread https://github.com/notifications/unsubscribe-auth/AA1dO2Bu8SPMz8CwY1dEj1hKSR6GkAqdks5qjf4FgaJpZM4H9-yi .

fregante commented 7 years ago

No progress, unfortunately. Live video doesn't quite lend itself to this workaround