GithubHelp home page GithubHelp logo

ashpb / mediaurltimestamper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nkestrel/mediaurltimestamper

0.0 1.0 0.0 37 KB

Media URL Timestamper

License: Other

CSS 0.57% JavaScript 91.55% HTML 7.88%

mediaurltimestamper's Introduction

Media URL Timestamper

Firefox Web Extension Available on Firefox Add-ons

Remember audio/video playback position for later resuming without cookies, storage or logging in by automatically timestamping the link. Compatible with Youtube, SoundCloud, Invidious and others.

Don't lose your spot in long music sets, podcasts, talks/lectures and saved live streams. Conveniently get the media's current time and put it in the URL for later resuming, either manually or automatically at regular intervals. This timestamped URL, also known as a deep link, can then be handled by the browser's session, history, bookmarks, sync service, share services etc. Anywhere the link goes the timestamp conveniently goes with it.

Supported websites: Youtube, SoundCloud, Vimeo, Twitch, DailyMotion, PBS, Hearthis.at, Invidious, HookTube, FramaTube (PeerTube site), BitTube, Vidlii.

Some of these websites already have resume capabilities but require cookies or local storage to be retained. Some also need you to be logged in with watch history enabled and have other requirements like video duration and time watched. Timestamping the URL is more flexible and reliable, allowing you to clear cookies, browse logged out or with watch history disabled, as well as permanently store and share the timestamped links.

Automatic mode applies the current timestamp every interval (default 60 seconds) for media content that exceeds the minimum duration (default 10 minutes) and the current time is not close to the start or end (default 120 seconds). Alternatively the timestamp can be applied manually by clicking the page action icon in the location bar. The page action has a context menu which allows clearing the timestamp and temporarily toggling automatic mode on and off for the current page.

This approach only works with direct media pages and not media embedded in other pages.

Tags: anchor, audio, continue, deep, fragment, hashtag, link, media, music, position, remember, resume, resumer, soundcloud, time, timestamp, track, video, webextension, youtube, cookies, login, privacy, tracking

Technical notes

  • History permission is needed to remove old timestamped URLs and stop them filling up global history.
  • Youtube applies timestamps in order: &time_continue -> &t -> &start -> #t. Changing #t interrupts playback.
  • Where multiple timestamp parameters are available, unused ones may need to be removed to avoid conflicts.
  • Some sites frame their media content which requires injecting into them and sending messages back to the parent window.
  • Important not to overwrite the timestamp due to content taking a while to resume or the video element playing an advertisement.
  • Soundcloud does not use HTML5 media elements so the time and duration are extracted from text nodes.
  • For media players that work across multiple pages, the timestamp should only be updated when the content matches the location.
  • Mixcloud does not support timestamp deep linking for licensing reasons.
  • Twitch keeps track of the current video time in localStorage and automatically resumes.
  • Youtube keeps track of the current video time if the user is logged in, has watch history enabled, video is longer than 20 minutes in addition to other requirements. If cookies are cleared the user must access watch history to resume.
  • Sites that require login usually have watch history and auto-resume.
  • Popularity of deep linking schemes encountered (2019):
Parameter Count
#t 6
&t 4
&start 3
&time_continue 1
&time 1
Units Count
Seconds 11
H/M/S 7

Youtube alternative frontends like Invidious that use the same parameters for compatibility reasons are excluded from the count.

mediaurltimestamper's People

Contributors

ashpb avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.