Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The handle
read-only property of the MediaSource
interface returns a MediaSourceHandle
object, a proxy for the MediaSource
that can be transferred from a dedicated worker back to the main thread and attached to a media element via its HTMLMediaElement.srcObject
property.
Note: handle
is only visible on MediaSource
instances inside dedicated workers.
Each MediaSource
object created inside a dedicated worker has its own distinct MediaSourceHandle
. The 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()
, the handle instance in the worker is technically detached and can't be transferred again.
Note: This feature is available in Web Workers