galaxy s10 reconnect issue

hyuk

Member

This doc is not applied to Room API directly.

Try to re-Join instead or re-publish stream to the room

Code:
joinRoom();
or

Code:
publishLocalMedia(room);


As you can see from the code attached above, I rejoined the room and published the stream.
A problem occurs when the Samsung Galaxy S10 5g phone is used in wifi and forced to change to lte.
Once the problem occurs, the problem persists after pressing the refresh button.
If you completely close the mobile browser and access it from lte again, there is no problem.

The weird thing is that the iphone 11pro and galaxy s20, galaxy s10a are fine..

When I check the server log, it is as shown below.

- flashphoner.log

..... ( publish fail .. reconnect room and republish ) ( change from wifi to lte )

15:00:51,411 INFO RtcMediaClient - IceTimeoutThread - 84691e00-3851-11eb-a2ba-9dab6229acb8 Stop media session 84691e00-3851-11eb-a2ba-9dab6229acb8
15:00:51,411 INFO Agent - IceTimeoutThread - 84691e00-3851-11eb-a2ba-9dab6229acb8 ICE state changed from Running to Terminated. Local ufrag 84691e00/3851/11eb/a2ba/9dab6229acb86haa11eotsj69n
15:00:51,411 INFO ergingDatagramSocket - IceTimeoutThread - 84691e00-3851-11eb-a2ba-9dab6229acb8 Closing.
15:00:51,411 INFO StunUdpSocket - IceTimeoutThread - 84691e00-3851-11eb-a2ba-9dab6229acb8 Close socket
15:00:51,412 INFO MediaSession - IceTimeoutThread - 84691e00-3851-11eb-a2ba-9dab6229acb8 Stop MediaSession id: 84691e00-3851-11eb-a2ba-9dab6229acb8
15:00:51,412 INFO MediaSession - IceTimeoutThread - 84691e00-3851-11eb-a2ba-9dab6229acb8 '84691e00-3851-11eb-a2ba-9dab6229acb8' has been terminated

..... ( publish fail .. reconnect room and republish )

15:01:10,845 INFO RtcMediaClient - IceTimeoutThread - 901a4801-3851-11eb-a2ba-9dab6229acb8 Stop media session 901a4801-3851-11eb-a2ba-9dab6229acb8
15:01:10,845 INFO Agent - IceTimeoutThread - 901a4801-3851-11eb-a2ba-9dab6229acb8 ICE state changed from Running to Terminated. Local ufrag 901a4801/3851/11eb/a2ba/9dab6229acb8bi1io1eotsjp91
15:01:10,845 INFO ergingDatagramSocket - IceTimeoutThread - 901a4801-3851-11eb-a2ba-9dab6229acb8 Closing.
15:01:10,845 INFO StunUdpSocket - IceTimeoutThread - 901a4801-3851-11eb-a2ba-9dab6229acb8 Close socket
15:01:10,846 INFO MediaSession - IceTimeoutThread - 901a4801-3851-11eb-a2ba-9dab6229acb8 Stop MediaSession id: 901a4801-3851-11eb-a2ba-9dab6229acb8
15:01:10,846 INFO MediaSession - IceTimeoutThread - 901a4801-3851-11eb-a2ba-9dab6229acb8 '901a4801-3851-11eb-a2ba-9dab6229acb8' has been terminated

...... ( publish fail .. reconnect and republish )


15:01:25,292 INFO WCS4Handler - DISCONNECT-CLIENT-pool-6-thread-2070 Report client-vetgoqke700prt09vf2t4j16lq-2020.12.07.15.01.25-1607320885292.report is submitted
15:01:25,292 INFO RtcMediaClient - DISCONNECT-CLIENT-pool-6-thread-2070 Stop media session 9badfef0-3851-11eb-a2ba-9dab6229acb8
15:01:25,293 INFO Agent - DISCONNECT-CLIENT-pool-6-thread-2070 ICE state changed from Running to Terminated. Local ufrag 9badfef0/3851/11eb/a2ba/9dab6229acb828m8c1eotskcd5
15:01:25,293 INFO ergingDatagramSocket - DISCONNECT-CLIENT-pool-6-thread-2070 Closing.
15:01:25,293 INFO MediaSession - IceTimeoutThread - 9badfef0-3851-11eb-a2ba-9dab6229acb8 Ice timeout thread interrupted
15:01:25,293 INFO StunUdpSocket - DISCONNECT-CLIENT-pool-6-thread-2070 Close socket
15:01:25,294 INFO MediaSession - DISCONNECT-CLIENT-pool-6-thread-2070 Stop MediaSession id: 9badfef0-3851-11eb-a2ba-9dab6229acb8
15:01:25,294 INFO MediaSession - DISCONNECT-CLIENT-pool-6-thread-2070 '9badfef0-3851-11eb-a2ba-9dab6229acb8' has been terminated
 
Last edited:

Max

Administrator
Staff member
As we wrote above, reconnection example can be applied to playback only. Also, the case of connection closing is not described in the example.
Please implement playback reconnection as described, and try to reproduce the issue on the phone.
In the conference case, you should check:
- if just one participants stream playback failed, but session is not closed, you should just re-play the participants stream. this can be done automatically when participant is re-joined
- if local stream publishing failed, or session is closed, you should reestablish session: connection.disconnect(), Flashphoner.roomApi.connect then joinRoom
 

hyuk

Member
As we wrote above, reconnection example can be applied to playback only. Also, the case of connection closing is not described in the example.
Please implement playback reconnection as described, and try to reproduce the issue on the phone.
In the conference case, you should check:
- if just one participants stream playback failed, but session is not closed, you should just re-play the participants stream. this can be done automatically when participant is re-joined
- if local stream publishing failed, or session is closed, you should reestablish session: connection.disconnect(), Flashphoner.roomApi.connect then joinRoom
I understand that the example doesn't fit the conferece example.
I tried to find the code for the conference example, but couldn't find it.
So it was arbitrarily modified..

Currently, I added a log in the attached code and checked it.

- Wifi
Flashphoner.roomApi.connect > joinRoom > Local stream published ( SUCCESS )
- Lte ( forced change )
Local stream failed > Flashphoner.roomApi.connect > joinRoom > Local stream failed ( FAILED - retry 1 )
( At this time, session_status was established, so connection.disconnect() was not performed. )
connection.disconnect() > Flashphoner.roomApi.connect > joinRoom > Local stream failed ( FAILED - retry 2 )
connection.disconnect() > Flashphoner.roomApi.connect > joinRoom > Local stream failed ( FAILED - retry 3 )
...
The problem persists even when I refresh the page.

Isn't this the way you described it?
I'm only looking at the publish side.

If there was a problem with the code, shouldn't it work on other phones?
Have I ever misunderstood?

1607390863100.png
 
Last edited:

Max

Administrator
Staff member
- Lte ( forced change )
Local stream failed > Flashphoner.roomApi.connect > joinRoom > Local stream failed ( FAILED - retry 1 )
When you forcefully change network type, you must create a new sessoin. So, do the session reconnection always in your code when local publishing is failed.
 
Top