-
-
Notifications
You must be signed in to change notification settings - Fork 764
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
tracker is not updating and is returning 0.0 as duration initially #1186
Comments
Hey, could you provide the code? if this is a bug, i'd suggest finding a way to replicate it in the sample app. |
@PierfrancescoSoffritti Thanks for your reply, I have recreated that with a example here is the code code
output I got
here on videoDuration method is called after the video is being played but yet i got total duration as 0.0 Hope you respond soon @PierfrancescoSoffritti |
@PierfrancescoSoffritti have you got the issue? |
Question / Problem
the tracker for youtube is returning 0.0 as video duration when song is being played
Summary
In my code i initialized youtube player widgit where i used onready() and onStateChanged()
in onready() i am adding tracker to the youtubeplayer
but in onstatechanged if i get duration of the video playing at first it return zero but if we change the state i.e. if we pause then it gets updated
also when i change the song i.e. play other then it stores the duration of previous video untill pause is clicked
same happens with current second duration (i.e. played duration)
What I've tried
i tried to remove the previous listener if any and add the listener every time after the song has been played then also it didn't work
Flow of code
platform : Android
on create --> Initialize youtube player (but will not play anything) --> on button click load the video into youtube player view
during initialization i have added the tracker
The text was updated successfully, but these errors were encountered: