Open bvibber opened 8 years ago
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.
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.
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.
Implement a MSE shim would be a great idea
Regarding notes from https://github.com/brion/ogv.js/issues/475 :
Is there any progress about implementing MSE ?
Might be better to implement adaptive streaming using standardish Media Source Extensions interfaces rather than hacking it custom inside the player.
Public APIs:
Internals: