WebRTC player plays on mobile network but not on wifi

sulphur

Member
Hi,

I have a strange case that I can't reproduce at home on my setup but I have a user who when he is broadcasting while being connected to his home wifi I can't play his stream with WebRTC player, however, I can play the stream by fallback-ing to WSplayer from Flashphoner SDK. When this user is broadcasting on his 3g/4g network then I can play his WebRTC stream without any problems.
I tried already switching to TCP the only broadcasting since I remember having an issue like that in the past project ( i haven't used WCS then) and the solution was to move from UDP to TCP. But this time it seems to be something different. If I understand correctly WCS has a TURN integrated so the firewall shouldn't be an issue but apart from that, I don't see what could it be. Does someone have any ideas that could help me to find the problems? where to look etc.? I'm pretty sure it is some network problem just don't know how to debug it.

Thanks in advance
Piotr
 

Max

Administrator
Staff member
Good day.
I have a strange case that I can't reproduce at home on my setup but I have a user who when he is broadcasting while being connected to his home wifi I can't play his stream with WebRTC player, however, I can play the stream by fallback-ing to WSplayer from Flashphoner SDK. When this user is broadcasting on his 3g/4g network then I can play his WebRTC stream without any problems.
This seems like publisher channel or browser issue. When you playing the stream with WSPlayer, the stream is always transcoded on server (WSPlayer uses MPV codec). If you cannot play WebRTC without transcoding, this probably means irregular keyframe sending interval. So please try to add the following parameter to flashphoner.properties file
Code:
periodic_fir_request=true
And yes, switching to TCP publishing usually helps to reduce packet loss on bad networks:
Code:
session.createStream({
    name: streamName,
    display: localVideo,
    cacheLocalResources: true,
    receiveVideo: false,
    receiveAudio: false,
    transport: "TCP"
    ...
}).publish();
Please clarify the case:
- What WCS build and WebSDK build do you use?
- What device and browser is used by publisher and player? Do the publisher use the same browser from the same system when publishing via both networks?
- What technology is used for publishing: WebRTC, WebRTC through TURN server (as you mentioned it)?
- Is the issue reproducing in standard WebSDK examples: Two Way Streaming and Player?
Also, please collect a report including debug logs as described here and send using this private form.
 
Last edited:

sulphur

Member
This is a unique case for now I have only one broadcaster that is having this issue. So I will try changing the parameter in flashphoner.properties and see how it behaves with the example that will be a good place to start. Then I will get back will logs and more info. Thanks
 

sulphur

Member
ok, so i have successfully tested the periodic_fir_request=true option in flashphoner.properties file and it seems to solve the problem. I think it was indeed a keyframe problem. Now with his stream when I display it immediately after he start a broadcast it still fails but after a page refresh it runs so just need to add some retries :)

Thank you for you help
 
Top