Eyevinn / webrtc-player

WebRTC (recvonly) player
MIT License
87 stars 18 forks source link

WHEP start playing video after 3s ~ 6s when clicking play button. #55

Closed leoforwork001 closed 1 year ago

leoforwork001 commented 1 year ago

Hi~ I am developing cloudflare webRTC now. I get the playback url from cloudflare WHEP output, and I try to use this player with WHEP type, the video playing with low-lantency and well, however the player need 3 to 6 seconds to initial the video.

is it possible have solution for the situation?

thx!

birme commented 1 year ago

Thank you for the report! Is this delay consistent for all browsers or a specific browser?

leoforwork001 commented 1 year ago

we test case is :

iOS: safari, chrome.

android: chrome, native web browser.

MacOS/Windows: safari, chrome.

and the result, yes all browsers in testing case has delay initial problem.

thx for your reply, hope you can save my days >_<

birme commented 1 year ago

I am suspecting that the ICE candidate negotiation takes some time for you. Are you using the online version or your own implementation based on this component? Can you provide the console log from the browser developer console?

leoforwork001 commented 1 year ago

I used the demo online version (https://webrtc.player.eyevinn.technology/).

there are capture logs:

[case 1]https://upload.cc/i1/2023/08/10/3ZhfjP.png [case 2]https://upload.cc/i1/2023/08/10/CLjXWf.png

hope that can hope you. thx!~

birme commented 1 year ago

Thanks, I think the explanation is that the traffic might go through our relay that is running on our AWS lab env in Sweden. That's because the online demo version is configured with that relay as an ICE candidate. I would try running the player locally (without any specific ICE servers specified) with the cloudflare stream and see if you get the same startup time.