AirenSoft / OvenPlayer

OvenPlayer is JavaScript-based LLHLS and WebRTC Player for OvenMediaEngine.
https://airensoft.com/ome.html
MIT License
508 stars 126 forks source link

Safari LL-HLS playback starts 15-20 seconds behind #356

Closed bchah closed 8 months ago

bchah commented 1 year ago

When starting an LL-HLS stream in Safari browser, it starts about 15 seconds behind the live stream, almost as if it uses classic HLS by default. If you click the 'Live Streaming' button in OvenPlayer it catches up to regular LL-HLS latency but I expect this should be the default behaviour. @SangwonOh is this something you have observed with Safari?

SangwonOh commented 1 year ago

@bchah Hi!. hls.js shows low latency, but default safari player does not.

About the live catch up feature, Live catch up when playback starts was default feature. But removed (7b66a2f04d0dde28ad3861b07f46bba8b4e7424d). This is because there was a bit of a stall when I forced the sync to match and played it for the first time. Therefore, I decided this is the application feature and removed it from the default player function.

Here is the code to match the sink. player.seek(Number.MAX_SAFE_INTEGER); https://github.com/AirenSoft/OvenPlayer/issues/329

By the way the stalling happen because we seek to MAX_SAFE_INTEGER. If we can seek at the right time (within 1-2 seconds of live time), we can also prevent the stalling.

getroot commented 1 year ago

@bchah In my experience, on iOS 16.3.1 it starts playing from the latest possible position, but after I updated to 16.5 yesterday it starts with a big buffer like you said. Looks like Safari changed its policy. :-(

SangwonOh commented 8 months ago

We are closing the issue due to a long period of inactivity. If further discussion is needed, please reopen the issue.