Class: shaka.msf.draft14.Dialect

Constructor

new Dialect()

Implements:
Deprecated:
  • Yes
Source:

Members

VERSION :number

The in-band version number for draft-14.
Type:
  • number
Source:

Methods

buildAuthToken_(token) → {Uint8Array}

Parameters:
Name Type Description
token string
Source:
Returns:
Type
Uint8Array

connect(webTransportnon-null, confignon-null, authorizationTokenopt, nullable) → {Promise<!shaka.extern.MsfSession>}

Performs this draft's setup handshake over an established WebTransport connection and returns the resulting session. The handshake is part of the dialect because it is not stable across drafts: draft-16 opens a single bidirectional stream and exchanges CLIENT_SETUP and SERVER_SETUP over it, while draft-17 collapsed the two into one SETUP message sent on each of a pair of unidirectional streams.
Parameters:
Name Type Attributes Description
webTransport WebTransport
config shaka.extern.MsfManifestConfiguration
authorizationToken string <optional>
<nullable>
Implements:
Source:
Returns:
Type
Promise<!shaka.extern.MsfSession>

getCodec() → {shaka.extern.MsfCodec}

The primitive codec for this draft, which encodes and decodes the variable-length integers every other field is built from.
Implements:
Source:
Returns:
Type
shaka.extern.MsfCodec

getDraftNumber() → {number}

The draft number, e.g. 16. Used to order dialects by preference during negotiation, newest first.
Implements:
Source:
Returns:
Type
number

getName() → {string}

The draft name, matching the shaka.config.MsfVersion value this dialect is registered under, e.g. 'draft-16'.
Implements:
Source:
Returns:
Type
string

getSubprotocol() → {string}

The WebTransport subprotocol string that selects this draft, e.g. 'moqt-16'.
Implements:
Source:
Returns:
Type
string

readServerSetup_(readernon-null) → {Promise<{version: number, params: (Array<shaka.msf.Utils.KeyValuePair>|undefined)}>}

Reads the draft-14 SERVER_SETUP, which carries the selected version followed by the setup parameters.
Parameters:
Name Type Description
reader shaka.msf.Reader
Source:
Returns:
Type
Promise<{version: number, params: (Array<shaka.msf.Utils.KeyValuePair>|undefined)}>