Generate UUID in case the user-defined nativeId is empty.
Optionalconfig: SourceConfigOptional ReadonlyconfigThe configuration object used to initialize this instance.
OptionaldrmProvides access to DRM runtime APIs for this source.
Use drm.fairplay to access FairplayDrmApi for FairPlay-specific APIs such as FairplayDrmApi.renewExpiringLicense.
undefined if the source was created without a DrmConfig.
Whether the native Source object has been disposed.
Whether the native Source object has been created.
ReadonlynativeOptionally user-defined string id for the native instance, or UUIDv4.
The remote control config for this source. This is only supported on iOS.
Destroys the native Source and releases all of its allocated resources. All listeners are removed.
The duration of the source in seconds if it’s a VoD or INFINITY if it’s a live stream.
Default value is 0 if the duration is not available or not known.
The time in seconds for which to retrieve the thumbnail.
a Thumbnail for the specified playback time if available.
Supported thumbnail formats are:
WebVtt configured via SourceConfig.thumbnailTrack, on all supported platformsImage Media Playlist in the multivariant playlist, Android-onlyImage Adaptation Set as specified in DASH-IF IOP, Android-only
If a WebVtt thumbnail track is provided, any potential in-manifest thumbnails are ignored on Android.Allocates the native Source instance and its resources natively. Calls made while an initialization is in progress share it. Has no effect on a destroyed source.
Whether the source is currently active in a player (i.e. playing back or paused). Only one source can be active in the same player instance at any time.
Whether the source is currently attached to a player instance.
The current LoadingState of the source.
Metadata for the currently loaded source.
Removes a listener previously registered for eventName via Source.on.
Has no effect if the listener is not registered.
The name of the event.
The function passed to Source.on.
Registers listener to be called whenever this source emits eventName.
Unlike Player.on, which only receives the source events of the active source, the source
emits all of its events, including while it is inactive, e.g. sourceLoaded of a preloaded playlist
source. Listeners registered before the source is initialized are attached during
Source.initialize. Calling it on a destroyed source has no effect and logs a warning.
Registering the same listener again for eventName has no effect; use Source.off to remove it.
The name of the event, e.g. sourceLoaded.
The function called with the event.
Set metadata for the currently loaded source.
Setting the metadata to null clears the metadata object in native source.
metadata to be set.
Represents audio and video content that can be loaded into a player.