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.

We should have an API to allow an application to pre-load a manifest and some of the media segments without involving MediaSource or a <video> element. An application could speculatively pre-load the beginning of several pieces of content while the user is making a decision. That content could then begin playing almost instantly.

This requires some redesign. Currently, new Player() requires an HTMLMediaElement, and the load() pipeline connects from manifest parsing all the way to streaming and MediaSource. These things would need to be decoupled, and a new preload() method would have to be introduced.

Note, though, that if we had it today, this new preload() method would not be usable from a service worker just yet, because our DASH manifest parser depends on DOMParser for XML parsing, and DOMParser is not available in a service worker.

Until manifest parsing can be done from a service worker context, operations involving a manifest must be done from the page context.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:13
  • Comments:39 (30 by maintainers)

github_iconTop GitHub Comments

2reactions
michellezhuoggcommented, Mar 11, 2021

Hi everyone,

Our design for Preload API is posted for review. Please take a look and let us know if you have any questions, comments or suggestions. Thank you!

2reactions
OrenMecommented, Feb 24, 2020

Yes, this will generally work, but the are some limitations like managing autoplay restrictions on video elements, or devices that support only one video element at a time(smart TVs, cast device etc) Having such an api to load the data and possibly storing it in an array of array buffers and feeding it to a source buffer that will be attached to only one vide element will enable support across platforms with different limitations.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Link types: preload - HTML: HyperText Markup Language | MDN
The preload value of the <link> element's rel attribute lets you declare fetch requests in the HTML's <head> , specifying resources that ...
Read more >
Preload ads | Ad Placement API - Google Developers
The Ads Placement API downloads and caches ads for use in adBreak() calls. By default it uses a set of automatic heuristics to...
Read more >
Preload critical assets to improve loading speed - web.dev
Because browsers don't execute preloaded files, preloading is useful to separate fetching from execution which can improve metrics such as Time ...
Read more >
What is video preload?
Preload is an attribute of the HTML5 video tag. The preload attribute lets the developer advise the browser how much of the video...
Read more >
Preload (Active Objects - The library 0.25.0 API) - javadoc.io
If the developer knows that every time an entity of a certain type is retrieved, certain fields will be accessed, this is a...
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