-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[video_player] How to get an Error when the network connection is lost? #549
Comments
Doesn't disconnecting the device from the network mean that it can't even send error messages to your host? (because it is not connected to anything) |
My app has been rejected because when the tester disable the device wifi, my app shows no errors, it's normal because my tests shows that no errors events comes when the wifi is disconnected during the play, actualy I continue to get normal position progress event, but the stream is not playing any more, this is a bug of the player But immediately when I reconnect the Wifi, strangly I get an Error from the player :
I got this when I reconnect the WIFI after disconnecting it for 20 seconds.
|
@swift-kim I don't think that disabling the PC wifi stop events, because as I said I continue to get normal positon events after disabling the wifi :
|
Here's a screen recording, which shows the bug, the player continue to send a progressing position when the Wifi is disabled https://drive.google.com/file/d/1lo_enTz2aIaUaL4SSBL7QH9UtxK98PPM/view?usp=sharing |
As a temporary work around, I tried to use an HttpProxy to detect the loose of the connection 👍 But I am getting this permission denied OS Error :
|
@swift-kim I am using an emulator, so the events use the local loop I think, that's why I don't need the Wifi to get the events |
Okay, I thought you were using a physical TV device. Which emulator device (mobile or wearable?) did you use? Probably you didn't use TV emulator, as it is not supported by the video_player_tizen plugin. It seems the native To see the logs printed by sdb dlog VideoPlayerTizenPlugin in the host shell if you're using a mobile or wearable emulator. If you're debugging on a physical TV or TV emulator, you'll need to replace |
@nassimus26 Hi~ But I use a stream which duration only 30 seconds,it isn't stop after disconnection wifi. |
@hyue7 I did my tests with live streams located in this file (the Samsung tester also) (first ones) https://github.com/nassimus26/naviptv/blob/main/demo.m3u The problem is that the stream play stop on the player (TV or Emulator, inside the emulator the sound is stopped), but I continue to get new positions progress without any error and this for a long time, when I reconnect the Wifi sometimes I recieve an Error sometimes not. |
@swift-kim I am using the TV Emulator, I trust the sound, if I hear the sound I know it's playing, I don't need the image because my code is working fine on others platforms (Windows, Android), I am just porting the App to Tizen I just retest, and I confirm to you that the positions continue to come after the play has stopped. |
@swift-kim I tried to apply your suggested changes but I am not good in C#
Gives this error , probably the function signature is different
|
Ok, I finally change it to a simple |
If you decide to use #define LOG(prio, fmt, arg...) \
printf("%s: %s(%d) > " fmt "\n", __MODULE__, __func__, __LINE__, ##arg)
|
I diconnect the Wifi around 6 seconds, the sound stop at 12 seconds , but here the full log (and it has never stopped ): It continue to send new positions until 23 seconds, then it send the same position 23 seconds indefinitely (the good news is that it stop incrementing the position, but between 12 seconds and 23 seconds, the player is not playing so no way to notify the user quickly) The tested stream is :
|
Another observation, if I don't disconnect the WIFI, after around 30 seconds of play the Sound is stopped (it's not playing anymore), but the position continue to progress indefinitely also |
After resizing a Wearable and testing on it, I think that Emulator is so slow that I am losing the sound after 30 seconds, but it continue to play (sometimes it's black screen but most of time it's blinking between the video and black screen ). It's impossible to test the player well on any Emulator Wearable or not. |
@nassimus26 I test on TV emulator, it can receive If you want to immediately stop video, maybe you can use this plugin connectivity_plus to listen network status, and then stop video by app. |
Hi @hyue7 did you try with the live stream url which I used ? |
@hyue7 No the true problem is not just the network status, most Iptv providers use temporary stream link, so when the link reach the end we need to get the error as quickly as possible to generate a new link |
Yes, I tried this: |
Ok @hyue7 thank you, in this case I don’t know why the Samsung tester report this problem since it happening only on my slow emulator, I was about to abort this version, but I will re-submit it once again , thanks again for your time |
@hyue7 the last possible case is that the problem is in my app and not in the player, an app which working fine on others platforms and the networks issues are managed with the same shared code, could you (if you want) try my app on your TV or simulator, https://raw.githubusercontent.com/nassimus26/naviptv/main/apks/com.agiprod.naviptv-3.4.6.tpk Just click on the Admin Profil, then add the DEMO provider, then select any Kid channel, then disable the network, after 2 or 3 seconds the bottom player control panel should appear showing ( Retryng..., Connecting ....) If you have no issue, it means ... I have no idea . |
Actually what you describe it happens sometimes, the error message comes after a 17 seconds of same position, but most of the time the error message never comes, at least on my emulator. And between the 12 seconds and the 29 seconds, the player did continue to play ( already buffered ) or it was stopped ? ( 17 seconds is too long to create a new temporary link , the live stream which I sent you doesn’t use temporary link but paid Iptv providers do ) |
@hyue7 in my last version I already added a timer, if the position is not changing for more than 2 seconds, I consider that a stream error had occurred, this should reduce the risk of not handling the disconnection ( even if the player doesn’t send the error ). |
after add the DEMO provider, nothing happen, i can't find any Kid channel. And your app i can't launch on emulator.... |
player will play buffer, the video position stopped at 29s, that means buffer end at 29s, and then connection failed |
Do you want to player send complete message to app when stream completed? But it is not an error.... what do you actually want? |
Hi @hyue7 , the end of the stream is not an error but the isPlaying variable should be false. |
What player do you use and how do you use it to play |
Here's my code :
The problem is that I am not getting any error when I disconnect my Wifi !
I am trying to dig into the Plugin code to understand what's happening, so I have 2 others questions :
1- Is it possible to debug the dart code from the IDE ? if yes how ?
2- In the Tizen plugin code we have:
But in the console, I don't see any kind of the player logging message (events or errors), so is it possible to activate and see this C or C# logging message in the dart console ? or how to see them ?
The text was updated successfully, but these errors were encountered: