Constructor
new TracksManager(webTransportnon-null, controlStreamnon-null, msfTransportnon-null)
Parameters:
| Name | Type | Description |
|---|---|---|
webTransport |
WebTransport | |
controlStream |
shaka.msf.ControlStream | |
msfTransport |
shaka.msf.MSFTransport |
- Implements:
- Source:
Members
fetchCallbacks_ :Map<bigint, !shaka.msf.Utils.ObjectCallback>
Type:
- Map<bigint, !shaka.msf.Utils.ObjectCallback>
- Source:
Methods
fetchTrack(namespace, trackName, callback) → {Promise}
Send a FETCH request for a track and register a callback for the
response data.
Returns a promise that resolves when the FETCH_OK is received.
Parameters:
| Name | Type | Description |
|---|---|---|
namespace |
string | |
trackName |
string | |
callback |
shaka.msf.Utils.ObjectCallback |
- Source:
Returns:
- Type
- Promise
getNextRequestId() → {bigint}
Get the next request ID (even numbers for client requests)
- Source:
Returns:
- Type
- bigint
handleFetchStream_(readernon-null) → {Promise}
Handle an incoming FETCH_HEADER stream.
Parameters:
| Name | Type | Description |
|---|---|---|
reader |
shaka.msf.Reader |
- Source:
Returns:
- Type
- Promise
handleIncomingStream_(streamnon-null) → {Promise}
Handle an incoming unidirectional stream
Parameters:
| Name | Type | Description |
|---|---|---|
stream |
ReadableStream |
- Source:
Returns:
- Type
- Promise
handlePublishDone(requestId)
Handle PublishDone message (end of stream for a track)
Parameters:
| Name | Type | Description |
|---|---|---|
requestId |
bigint |
- Source:
handleSubgroupStream_(readernon-null, streamType) → {Promise}
Handle a SUBGROUP_HEADER stream with automatic buffering and retry.
Parameters:
| Name | Type | Description |
|---|---|---|
reader |
shaka.msf.Reader | |
streamType |
bigint |
- Source:
Returns:
- Type
- Promise
hasDefaultPriority_(streamType) → {boolean}
Draft-16: returns true when the DEFAULT_PRIORITY bit (0x20) is set
Parameters:
| Name | Type | Description |
|---|---|---|
streamType |
bigint |
- Source:
Returns:
- Type
- boolean
isSubgroupStreamType_(streamType) → {boolean}
Check if a stream type is a valid SUBGROUP_HEADER type.
Draft-11: 0x08-0x0D
Draft-14: 0x10-0x15, 0x18-0x1D
Draft-16: adds 0x30-0x35, 0x38-0x3D (with DEFAULT_PRIORITY bit 0x20)
Parameters:
| Name | Type | Description |
|---|---|---|
streamType |
bigint |
- Source:
Returns:
- Type
- boolean
notifyCallbacks_(trackAlias, obj)
Notify all callbacks registered for a track
Parameters:
| Name | Type | Description |
|---|---|---|
trackAlias |
bigint | |
obj |
shaka.msf.Utils.MOQObject |
- Source:
release()
Request that this object release all internal references.
- Implements:
- Source:
startListeningForStreams_() → {Promise}
Start listening for incoming unidirectional streams
- Source:
Returns:
- Type
- Promise
subscribeTrack(namespace, trackName, callback) → {Promise<bigint>}
Subscribe to a track by namespace and track name
Returns the track alias that can be used to unsubscribe later
Parameters:
| Name | Type | Description |
|---|---|---|
namespace |
string | |
trackName |
string | |
callback |
shaka.msf.Utils.ObjectCallback |
- Source:
Returns:
- Type
- Promise<bigint>
unsubscribeTrack(trackAlias) → {Promise}
Unsubscribe from a track by track alias
Parameters:
| Name | Type | Description |
|---|---|---|
trackAlias |
bigint |
- Source:
Returns:
- Type
- Promise