-
-
Notifications
You must be signed in to change notification settings - Fork 701
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
isLive flag for streams #1401
Comments
Could you do this by monitoring the position and duration? |
Thanks for the response @ryanheise! It is very complicated to infer the correct
durationStream:
I have been trying for a while but I couldn't make it work. Any other ideas? |
It sounds like an issue that |
@ryanheise ok, i can create a separate bug ticket if you want. another solution to determine |
Is your feature request related to a problem? Please describe.
I have spent a few days already trying to implement an
isLive
flag in my radio live stream player, but without success. I am playing one simple audio source, a radio stream.Describe the solution you'd like
It would be really helpful if the audio player had a flag
isLive
which is true, when the player is currently playing live, and false if the player is a little behind in time (e.g. when the user paused and resumed the stream)Describe alternatives you've considered
I tried several approaches:
playerStateStream
, e.g. settingisLive=true
if the player is in theready
state and isplaying
, but this is obviously not correct. if the player is paused and resumed, it already breaksisFirstStart
, which is set to true initially. Once the user presses play, i doisLive=isFirstStart
and setisFirstStart=false
at the same time. But this is also not working for all cases, as the sequence of the statesloading
,buffering
andready
is very random between Android and iOS.On Android, for example, it goes from
loading
toready
(playing=false
) directly, and after pressing play, toready
(playing=true
, which is fine).Where on iOS, the sequence is
loading
,buffering
,ready
(withplaying=false
), and then when pressing play:ready
(playing=true
, this is where i setisLive=isFirstStart
and reset my flagisFirstStart=false
),buffering
(again?),ready
(playing=true
, here myisFirstStart
is already false, so theisLive
flag is directly back atfalse
)isLive
from thepositionStream
. i.e. always when the position value is e.g.< 1 second
andplaying==true
, i setisLive
to true. which works fine on android. BUT, on iOS, thepositionStream
is just never getting any event, not even once. is this desired?is there anything else I could try?
it would be really convenient if the audio player could offer an
isLive
flag directlyThe text was updated successfully, but these errors were encountered: