Auth

The player can be configured to play content that requires authentication and authorization (auth for short)

How To

Playing auth content requires the following setup:

  1. Specify appId
  2. Specify auth type
  3. Pass auth token data

AppId

The cloud token service requires an appId be passed. See AppId for more details.

Auth Type

Specify the default auth type (see Auth Type Options for more on overriding and custom auth types) on the data parameter of play (see example):

player.play({
    url: "//tbseastlive-i.akamaihd.net/hls/live/492687/tbse/noslate/master.m3u8",
    auth: {
        type: TOP.auth.AuthTokenType.Spe // Configure auth type
    }
},
options);

Note that specifying the auth type is not required when playing content with the media json or content xml API's (see examples).

Auth Type Options

See available ways to specify the auth type.

Pass Token Data

Token data is retrieved from the Auth Lib. Information returned from Auth Lib gets passed to the player via play options (see example):

var options = {
    accessTokenType : token.accessTokenType,
    accessToken     : token.accessToken,
    mvpd            : token.mvpd
};

player.play(data, options);