Class MediaSourceHandle
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The MediaSourceHandle interface of the {{domxref("Media Source Extensions API", "Media Source Extensions API", "", "nocode")}} is a proxy for a MediaSource that can be transferred from a dedicated worker back to the main thread and attached to a media element via its SrcObject property. MediaSource objects are not transferable because they are event targets, hence the need for MediaSourceHandles.
[Value("MediaSourceHandle")]
public class MediaSourceHandle
- Inheritance
-
MediaSourceHandle
- Inherited Members
Remarks
It can be accessed via the Handle property.
Each MediaSource object created inside a dedicated worker has its own distinct MediaSourceHandle. The MediaSource.handle getter will always return the MediaSourceHandle instance specific to the associated dedicated worker MediaSource instance. If the handle has already been transferred to the main thread using PostMessage(dynamic, List<Object>), the handle instance in the worker is technically detached and can't be transferred again.
MediaSourceHandle is a transferable object.
-MSE-in-Workers Demo by Matt Wolenetz
-{{domxref("Media Source Extensions API", "Media Source Extensions API", "", "nocode")}}
-MediaSource
-SourceBuffer
Constructors
MediaSourceHandle()
public MediaSourceHandle()