mse

mse

R:video

  • MediaSource object contains sourcebuffers

  • MediaSource basically exposes an abstract equivalent of src attribute for the mediaelement

  • Once a mediasource object has been connected to the media element, its ready state will get set to ‘open’

  • Sourcebuffer like the name suggests, is a buffer between mediasource and the media element.

  • readystate values
closed Indicates the source is not currently attached to a media element.
open The source has been opened by a media element and is ready for data to be appended to the SourceBuffer objects in sourceBuffers.
ended The source is still attached to a media element, but endOfStream() has been called.