Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement OGVMediaSource (Media Source Extensions / MSE shim) #359

Open
bvibber opened this issue Apr 12, 2016 · 6 comments
Open

Implement OGVMediaSource (Media Source Extensions / MSE shim) #359

bvibber opened this issue Apr 12, 2016 · 6 comments

Comments

@bvibber
Copy link
Owner

bvibber commented Apr 12, 2016

Might be better to implement adaptive streaming using standardish Media Source Extensions interfaces rather than hacking it custom inside the player.

Public APIs:

  • OGVMediaSource - shim for MediaSource that works with ogv.js instead of native
    • OGVSourceBuffer - shim for SourceBuffer that demuxes data for a particular format
  • URL.createObjectURL - need an equivalent for this (avoid hacking up the native func?)
    • or can we assign an OGVMediaSource directly to srcObject?

Internals:

  • implement both for WebM and Ogg
  • need to be able to combine audio and video tracks demuxed from separate streams into the same player (separate OGVSourceBuffers)
  • consider reimplementing internal reading/seeking behavior etc on top of the MSE APIs
@yarontorbaty
Copy link

For General purposes MSE would do.
For Safari on iOS/iPhones, where inline video playing is prohibited and therefore most needed, it would not work as iOS does not support MSE as of now.
So maybe hacking it inside the player is a better approach.

@bvibber
Copy link
Owner Author

bvibber commented Apr 13, 2016

Right you'd use OGVMediaSource which would be part of ogv.js, not the default MediaSource class which either doesn't exist or wouldn't work.

@bvibber
Copy link
Owner Author

bvibber commented Apr 13, 2016

Roughly, in MSE the MediaSource class encapsulates part of the interface to the demuxers, exposing to the client code the ability to stuff input data buffers in. You then hook up your MediaSource to a video or audio element, which behind the scenes knows how to pull actual video and audio data from the demuxers. Because there is no public interface defined for how the player gets data from the MediaSource, you would not be able to use a native MediaSource with an OGVPlayer, nor an OGVMediaSource with an HTMLVideoElement. So the presence of native MSE doesn't affect how ogv.js's own MSE implementation would work; they are parallel and separate.

@publicocean0
Copy link

Implement a MSE shim would be a great idea

@bvibber bvibber mentioned this issue Jan 28, 2018
@bvibber
Copy link
Owner Author

bvibber commented Jan 28, 2018

Regarding notes from #475 :

  1. Theoretically, the OGVInputSource interface is/will be a subset of what StreamFile does, so a custom object could be assigned (but need to actually make it so you can use one).
  2. StreamFile has been refactored to use promises, but have not yet done the same for the demuxer and codec interfaces. This is still pending; old notes are at https://github.com/brion/ogv.js/wiki/Proposed-module-interfaces
  3. ideally, internally the high-level OGVPlayer should implement handling of plain-files-referenced-by-URL by using the lower-level OGVMediaSource internally. This'll require separating out the display-and-UI parts of OGVPlayer from the internal bits that keep track of the demuxer and decoders.

@suman
Copy link

suman commented Jun 3, 2020

Is there any progress about implementing MSE ?

@bvibber bvibber removed this from the ogv.js 2.0 - modular cleanup milestone May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants