The player can be configured to play content that requires authentication and authorization (auth for short)
Playing auth content requires the following setup:
The cloud token service requires an appId be passed. See AppId for more details.
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).
See available ways to specify the auth type.
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);