Auth Type Options

Options on specifying the auth token type:

  1. Default
  2. Override
  3. Custom

Default

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

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'
            }
        ]
    },
    ...
});

Custom

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
    }
});