ManagedMediaSource Class

A media source that tells the application when to fetch and append media data (https://w3c.github.io/media-source/#managedmediasource-interface): ManagedMediaSource.Streaming is true while the source is open and its media element does not have enough data to play without interruption (its ready state is lower than HAVE_ENOUGH_DATA). Its source buffers are ManagedSourceBuffer objects.

public sealed class ManagedMediaSource : MediaSource

Remarks

The library never evicts the buffered data of a managed source by itself (the memory cleanup algorithm is only run by a user agent under memory pressure): the data is only evicted when a source buffer is full, as for a MediaSource.

See also

Inheritance
MediaSource ManagedMediaSource

Constructors

NameDescription
ManagedMediaSource()Creates a managed media source (https://w3c.github.io/media-source/#dom-managedmediasource-constructor).

ManagedMediaSource()

ManagedMediaSource.cs

Creates a managed media source (https://w3c.github.io/media-source/#dom-managedmediasource-constructor).

public ManagedMediaSource()

Properties

NameDescription
OnEndStreamingGets or sets the event handler of the endstreaming event.
OnStartStreamingGets or sets the event handler of the startstreaming event.
StreamingGets a value indicating whether the application should fetch and append media data (https://w3c.github.io/media-source/#dom-managedmediasource-streaming).

OnEndStreaming

ManagedMediaSource.cs

Gets or sets the event handler of the endstreaming event.

public Action<Event>? OnEndStreaming { get; set; }

OnStartStreaming

ManagedMediaSource.cs

Gets or sets the event handler of the startstreaming event.

public Action<Event>? OnStartStreaming { get; set; }

Gets a value indicating whether the application should fetch and append media data (https://w3c.github.io/media-source/#dom-managedmediasource-streaming).

public bool Streaming { get; }