Interface: shaka.extern.MsfSession

Extends

Methods

close(codeopt, reasonopt) → {Promise}

Closes the underlying transport.
Parameters:
Name Type Attributes Description
code number <optional>
reason string <optional>
Source:
Returns:
Type
Promise

configure(confignon-null)

Parameters:
Name Type Description
config shaka.extern.MsfManifestConfiguration
Source:

fetch(namespace, trackName, callback) → {Promise}

Retrieves a track once rather than subscribing to it. Resolves when the request has been accepted; objects arrive on the callback.
Parameters:
Name Type Description
namespace Array<string>
trackName string
callback shaka.extern.MsfObjectCallback
Source:
Returns:
Type
Promise

onNamespacePublished(callback) → {function()}

Registers a callback for namespaces the peer announces it can serve.
Parameters:
Name Type Description
callback function(Array<string>)
Source:
Returns:
Unregisters the callback.
Type
function()

release()

Request that this object release all internal references.
Inherited From:
Source:

subscribe(namespace, trackName, callback, startLocationopt, nullable, joinCurrentGroupopt) → {Promise<bigint>}

Subscribes to a track, delivering its objects to the callback until unsubscribed. Resolves with the track alias assigned by the publisher.
Parameters:
Name Type Attributes Description
namespace Array<string>
trackName string
callback shaka.extern.MsfObjectCallback
startLocation shaka.extern.MsfLocation <optional>
<nullable>
Where delivery should begin, for a subscription that is not meant to start at the live edge, which is what a seek into published-but-not-yet-received content needs. Every draft carries it, though not alike: draft-18 in the SUBSCRIPTION_FILTER parameter, draft-20 in LOCATION_FILTER. A publisher may still refuse it, in which case the subscription fails rather than silently starting somewhere else.
joinCurrentGroup boolean <optional>
Also deliver the Group the live edge is in from its first Object, rather than only what comes after the subscription starts. MSF requires it of the catalog, whose current state is the first Object of the latest Group plus the ones after it. Draft-18 does it with a Joining FETCH and draft-20 with FILL_PARAMETERS; the Objects arrive on the same callback as the subscription's, in Location order and without repeats. A session that cannot do it, or whose publisher does not answer in time, delivers only what the subscription does.
Source:
Returns:
Type
Promise<bigint>

unsubscribe(trackAlias) → {Promise}

Stops delivery for a subscription.
Parameters:
Name Type Description
trackAlias bigint
Source:
Returns:
Type
Promise