About
The NPAW Smart Switch plugin integrates Kaltura Player with the NPAW CDN Balancer service. Before playback begins, the plugin requests an ordered list of CDN URLs from the NPAW Smart Switch service and uses the preferred CDN for playback.
This article explains how the plugin works and how to configure it in your player.
Related references
Plugin flow
Kaltura Player sends the playback URL to the NPAW Smart Switch service, which returns an ordered list of CDNs. The plugin then plays the media from the first CDN in the list.
Error handling
The plugin handles Smart Switch errors internally. If an error occurs, playback starts with the original playback URL.
Plugin configuration
Make sure your player is configured to bundle the plugin: "playkit-smartswitch":"{latest}". To use a specific version, replace {latest} with the version number, for example "playkit-smartswitch":"0.2.0".
Default configuration
smartswitch: {
accountCode: '',
application: 'default',
responseTimeoutSec: 10,
optionalParams: {},
domainUrl: 'https://api.gbnpaw.com',
followRedirects: false
}
Example
plugins: {
smartswitch: {
domainUrl: 'https://api.gbnpaw.com',
accountCode: 'YOUR_ACCOUNT', // Replace with your Youbora account code.
application: 'KLTR test',
responseTimeoutSec: 15,
followRedirects: true,
optionalParams: {
protocol: 'hls',
extended: true,
originCode: 'default',
live: false,
//nva: '',
//nvb: '',
//token: '',
//dynamicRules: ''
}
}
}