PlayerOptions - startTime parameter isn't working
See original GitHub issueHi, using this code :
const track_url = "QAAAhgIAIU5QQyByaWRlcyBoaXMgYmlrZSBpbnRvIHRoZSBtYXlvcgALTWVtZSBUeWNvb24AAAAAAAAfQAALMkpZSkY5TDVZVzQAAQAraHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj0ySllKRjlMNVlXNAAHeW91dHViZQAAAAAAAAAA"
await player.playTrack({
track: track_url,
startTime: 5
});
The video is 8 seconds long and i want it to start at five but it starts at the beggining whatever i do. Have a nice day 👍
Issue Analytics
- State:
- Created a year ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Youtube Javascript API: start parameter not working on replay
I've tried the above solution without succes (error console : "playerOptions is not defined"). But ...
Read more >YouTube Player API Reference for iframe Embeds
Requirements; Getting started; Loading a video player; Operations; Functions ... The second parameter is an object that specifies player options.
Read more >Use the Stream Player - Cloudflare Docs
Cloudflare provides a customizable web player that can play both on-demand and live video, and requires zero additional engineering work.
Read more >Player - Video.js Documentation
An instance of the Player class is created when any of the Video.js setup methods are used to initialize a video. var myPlayer...
Read more >Interact with and control an embedded Vimeo Player. - GitHub
Warning: When using this parameter, the play bar and UI will be hidden. ... getLoop().then(function(loop) { // whether or not the player is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You are confusing parameters over an object, what you did is just input track and options as a parameter. playTrack only accepts a single parameter. Which is an object, in the name of PlayOptions (Link: https://deivu.github.io/Shoukaku/interfaces/guild_Player.PlayOptions.html#options). Now in this documentation, you see on Index/Properties that you have an property of track and options here.
Now in my code example which is on Readme on the very bottom https://github.com/Deivu/Kongou/blob/60770035184b56333ea1c5ebee8be1521226d92b/src/modules/KongouDispatcher.js#L68
What did I do, did I make two parameters or supplied a single parameter as an object? Now based on the documentation, it says this object only have
track
andoptions
as its properties on PlayOptions. Now what is Options? I already told you that options is here (Link: https://deivu.github.io/Shoukaku/interfaces/guild_Player.PlayOptions.html#options). Now you would see this if you scrolled down a bit, but I would link it here for your convenience. Now you see clearly startTime and the other optional properties with{}
. Now what does that signify? It means its an object. Now it means playOptions accepts an object, withtrack
as string andoptions
as object. Now I think you get the gist now with this explanationI understand better now, being new these misunderstandings tend to happen unfortunately, sorry to have bothered, thanks a lot for your patience.
Have a nice day and thanks again. 👍