Options on specifying the auth token type:
Specify the default auth type 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 the default auth type for Spe
}
},
options);Override the AuthTokenType.Spe type in the auth config (see example):
var player = TOP.createAndInitPlayer({
config : {
auth: [
{
type : TOP.auth.AuthTokenType.Spe,
serviceUrl : '//itetoken.aspen.vgtf.net/token/token_spe', // Override defaults for Spe
prefix : 'hdnts'
}
]
},
...
});A custom string can also be used for scenarios where a custom auth service is used, e.g. free preview (see example):
var player = TOP.createAndInitPlayer({
config: {
auth: [
{
type : "testService", // Creating custom auth type
serviceUrl : "//token.ngtv.io/token/token_spe"
}
]
},
...
});Then play content passing in the custom auth type:
player.play({
url: "//tbseastlive-i.akamaihd.net/hls/live/492687/tbse/noslate/master.m3u8",
auth: {
type: "testService" // Using the custom auth type defined in the player config
}
});