aws-samples / amazon-ivs-player-android-sample

This repository contains sample apps which use the IVS Player Android SDK.
https://docs.aws.amazon.com/ivs/
MIT No Attribution
28 stars 8 forks source link

the player can't resume #8

Open linhphan534 opened 3 years ago

linhphan534 commented 3 years ago

hello, I working with your player a while, currently I got an issue, if streamer got a network problem in short time (such as switching from wifi to 4g or vise vera ) the player goes into the buffering state, after a while it goes to playing state or even ended state, in both cases the viewer is frozen. If I implement a mechanism to retry, I got this error **com.amazonaws.ivs.player.PlayerException: Segment : ERROR_NETWORK : 404 : Segment download http error** until 1 minute later.

iannparker commented 3 years ago

Hi,

Could you provide more details about your retry mechanism? If you restart the stream by calling load() and play() on the player once the broadcaster has resumed broadcasting the stream I would expect the stream to resume as normal.

We are also actively working on automatic network recovery in a number of situations and hope to deliver this in an upcoming release.

linhphan534 commented 3 years ago

hi @iannparker thanks for your response. I listen for the state Player.State.ENDED then I postpone in a short period of time before calling my own retry mechanism. I tried a number of differences of delayed time (10s, 20s, 30s, 40s, 50s, 60s) I tried both player?.play() and

player?.load(Uri.parse(url))
 player?.play()

I realized that only the second one works after 60s of delayed time.

maxstoller commented 3 years ago

Hi @linhphan534 - it sounds like you got it working, but if you need further support on this topic, could you please file a ticket in the AWS Support Center so we can take a deeper look at your broadcasts? Thanks!

linhphan534 commented 3 years ago

hi @maxstoller thank you so much for the response. actually, my problem haven't solved yet, some time after host gets the connection disconnected then resume, the ivs player at viewer side change state from buffering ---> playing but the screen is still freezed.