Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PlayerOptions - startTime parameter isn't working

See original GitHub issue

Hi, using this code :


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:closed
  • Created a year ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

Deivucommented, May 28, 2022

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: 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

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 and options as its properties on PlayOptions. Now what is Options? I already told you that options is here (Link: 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, with track as string and options as object. Now I think you get the gist now with this explanation

Hydro001commented, May 28, 2022

I 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. 👍

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found