You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have you read the FAQ and checked for duplicate open issues?
Yes
What version of Shaka Player are you using?
3.2.0
Please ask your question
Hello! I am trying to create custom buttons that are able to skip a video ±X time. So, for that, I decided to look into the existing rewind/forward button. Upon checking I found that they just changed the trickPlay rate. Trick play internally had a playRateController which has some private methods to set the rate.
At this part, I got a bit confused on how to reuse this existing play rate controller to just skip the video ±X seconds.
Later, I found that on the video tag object we have a method named currentTime and upon changing its value I was able to update the current play time.
So, is there any way I could reuse the existing playRateController to update the current play time? If not, then is it okay to update the currentTime in the new button using the second way as I explained above? :)
The text was updated successfully, but these errors were encountered:
PlayRateController is an internal component and shouldn't be used by apps. Trick play is fast forward, which controls the playback rate, not directly the current time. For positive playback rates, you can just set the video.playbackRate; for rewind (or fast forward if you want), you can use player.trickPlay(2).
The correct way to change the current time is setting video.currentTime. For example:
Have you read the Tutorials?
Yes
Have you read the FAQ and checked for duplicate open issues?
Yes
What version of Shaka Player are you using?
3.2.0
Please ask your question
Hello! I am trying to create custom buttons that are able to skip a video
±X
time. So, for that, I decided to look into the existing rewind/forward button. Upon checking I found that they just changed thetrickPlay
rate. Trick play internally had aplayRateController
which has some private methods to set the rate.At this part, I got a bit confused on how to reuse this existing play rate controller to just skip the video
±X
seconds.Later, I found that on the
video
tag object we have a method namedcurrentTime
and upon changing its value I was able to update the current play time.So, is there any way I could reuse the existing
playRateController
to update the current play time? If not, then is it okay to update thecurrentTime
in the new button using the second way as I explained above? :)The text was updated successfully, but these errors were encountered: