question-mark
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.

Autoplaying + Timestamps in URLs

See original GitHub issue

Typically when you use a time bookmark, it plays the content automatically. It would be nice if the LBRY framework also did this for a smother experience.

Example:

$(document).ready(function () {
    if(window.location.href.contains("?t=") > -1) {
       // autoplay
    }
});

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:20 (20 by maintainers)

github_iconTop GitHub Comments

1reaction
mayeauxcommented, May 12, 2021

Okay, I can confirm that if autoplay is turned off via settings then it doesn’t autoplay given a timestamp.

I also confirmed that calling player.play() from the console did autostart the video from the given timestamp point.

$(document).ready(function () {
    if(window.location.href.contains("?t=") > -1) {
       // autoplay
    }
});

This code which was posted by @ElectronEsq is a pretty quick and dirty way to autoplay in all instances.

Probably a good approach would be to hook into an event, such as canplay and then call player.play() to force autoplaying the video in all instances where a timestamp exists.

https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canplay_event

Not exactly sure where to drop that code yet but would be a pretty easy PR if someone knew the appropriate place to drop that code and if everyone is willing to sign off on that design.

1reaction
tzarebczancommented, May 12, 2021

I think the last discussion we had about this was to ensure that even if the video is paused or autoplay is disabled, that clicking the timestamp would still start the video. Forgot to mention that in this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Start playback at a specific timecode – Help Center - Vimeo
To share a video link that will begin playback at a specific point, add #t= to the end of the URL followed by...
Read more >
Navigating to specific video timestamps. How it's done (Part 3)
Part 3 of our blog post series covering implementing video timestamps for users to effectively navigate to specific sections of a video.
Read more >
Playing several custom YouTube video urls with start and end ...
What is the best way we could consider for playing several of these custom YouTube video urls, with start and end time, in...
Read more >
Timestamp URL: - AutoPlay Media Studio
Timestamp URL : The URL of a timestamp DLL on the Web to use for all new AutoPlay applications, such as: http://timestamp.verisign.com/scripts/timstamp.dll.
Read more >
Make your video play at a specific time - Vidyard Support
Add ?autoplay=1 to the end of the sharing page link. This URL argument will make the video play automatically when the page loads....
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found