We have plugins for Ad playback, VR and Youbora analytics. (Chromecast and Offline download plugins are in roadmap)
Player supports these plugins. Kava
and OttAnalytics
are part of the package and it is only for the Kaltura BE customers.
Kaltura Player allows the following plugins for Android and iOS. You can get the version from the release notes / Maven or Cocoapods of the relevant plugin.
-
Android
-
Kaltura Player iOS contains following Native SDK
-
For Android
-
Open
android
folder of your react-native app in 'Android Studio'. -
Open
build.gradle
file of the app. -
In
dependencies
add the following plugin dependencies,implementation "com.kaltura.playkit:imaplugin:$latest_version" implementation "com.kaltura.playkit:youboraplugin:$latest_version" implementation "com.kaltura.playkit:broadpeakplugin:$latest_version"
Note: For Android, VR plugin is not required to be added. It is part of the package itself. Current Android Player version is v4.24.1. It is always recommended to use the same version for plugins like player.
-
-
For iOS
🔴 TODO for iOS
-
Open
Podfile
of 'iOS' folder of your react-native app. -
Add the following to
pod 'PlayKit_IMA' pod 'PlayKitYoubora' pod 'PlayKitVR'
Note: For iOS, VR plugin is required to be added.
-
This is it for the setup on the FE app side. To setup any plugin pass plugin config under plugins
in the PlayerInitOptions
json.
{
plugins: {
pluginName: {
// Plugin Config
}
}
}
pluginName
should be taken from Constants
-
IMA/IMADAI Ads Configuration
This configuration can we done when App wants to play the ads along with the content. Our Ad plugin is built on top of Google IMA SDK.
IMA plugin config. It supports VOD ads.
"plugins": { "ima": { "adTagUrl": "https://kaltura.github.io/playkit-admanager-samples/vast/pod-inline-someskip.xml", "alwaysStartWithPreroll": true, "enableDebugMode": false } }
IMADAI plugin config. It supports DAI Live/VOD ads.
"plugins": { "imadai": { "assetTitle": "VOD - Tears of Steel", "contentSourceId": "2528370", "videoId": "tears-of-steel", "alwaysStartWithPreroll": true } }
More config for
IMA
ads,{ "language": String, "adTagUrl":String, "adTagResponse":String, "adTagType": [AdtagType](./player-functions.md#constants#IMA_AD_TAG_TYPE), "enableBackgroundPlayback": Boolean, "videoBitrate" : Number, "adAttribution": Boolean, "adCountDown": Boolean, "enableDebugMode": Boolean, "alwaysStartWithPreroll": Boolean, "enableFocusSkipButton": Boolean, "enableCustomTabs": Boolean, "adLoadTimeOut": Number, "maxRedirects": Number, "contentDuration" : Float Number, "playerType": String, "playerVersion": String, "sessionId": String, "videoMimeTypes": List_of_String, }
Note: Currently our package does not support
FriendlyObstruction
andCompanionAds
.More config for
IMADAI
ads,{ "assetTitle": String, "assetKey":String, "apiKey":String, "contentSourceId": String, "videoId" : String, "streamFormat": [Stream Format](./player-functions.md#constants#IMADAI_STREAM_FORMAT), "licenseUrl": String, "adTagParams": {{"key": "value"}}, "streamActivityMonitorId" : String, "authToken": String , "language": String, "adCountDown": Boolean, "enableDebugMode": Boolean, "alwaysStartWithPreroll": Boolean, "enableFocusSkipButton": Boolean, "enableCustomTabs": Boolean, "adLoadTimeOut": Number, "maxRedirects": Number, "playerType": String, "playerVersion": String, "sessionId": String }
-
Youbora Configuration
Following configuration can be passed for the youbora setup,
plugins: { pluginName: { params:{ // Plugin Config } } }
Note: For
Youbora
plugin, underpluginName
,params
are mandatory to be passed. Underparams
youbora config should be passed."plugins": { "youbora": { "params": { "accountCode": "kalturatest", "username": "test_rn" } } } }
Other helpful
Youbora
configs,"youbora": { "params": { "accountCode": "kalturatest", "username": "test_rn", "userEmail": "[email protected]", "userAnonymousId": "user_anonymous_Id", "userType": "user_type", "houseHoldId": "zxzxz", "userObfuscateIp": true, "httpSecure": true, "transportFormat": "transportFormat", "urlToParse": "urlToParse", "linkedViewId": "linkedViewId", "isAutoStart": true, "isAutoDetectBackground": true, "isEnabled": true, "isForceInit": true, "isOffline": false, "haltOnError": false, "enableAnalytics": true, "enableSmartAds": true, "content": { "contentBitrate": 640000, "contentCdn": "a", "contentCdnNode": "b", "contentCdnType": "c", "contentChannel": "d", "contentContractedResolution": "720p", "contentCost": "122", "contentDrm": "e", "contentDuration": 1200000, "contentEncodingAudioCodec": "ec-3", "contentEncodingCodecProfile": "f", "contentEncodingContainerFormat": "g", "contentEncodingVideoCodec": "h", "contentEpisodeTitle": "title2", "contentFps": 60, "contentGenre": "drama", "contentGracenoteId": "i", "contentId": "1st_media", "contentImdbId": "j", "contentIsLive": false, "contentIsLiveNoSeek": false, "contentLanguage": "en", "contentPackage": "aaa", "contentPlaybackType": "bbb", "contentPrice": 10000, "contentProgram": "program", "contentRendition": "22223", "contentSaga": "ccc", "contentSeason": "ddd", "contentStreamingProtocol": "applehttp", "contentSubtitles": "en", "contentThroughput": 1230000, "contentTitle": "title", "contentTransactionCode": "dssd", "contentTotalBytes": 123344, "contentSendTotalBytes": false, "contentTvShow": "sadsa", "contentType": "drama" } } }
Note: If FE app wants to show the logs of underlying Youbora plugin then for Android, it can add the following in the native Android app side. App can choose the log level from the Youbora plugin.
YouboraLog.setDebugLevel(YouboraLog.Level.DEBUG);
-
Broadpeak Configuration
"plugins": { "broadpeak": { "analyticsAddress": String, "nanoCDNHost": String, "broadpeakDomainNames": String, // "*" for everything "uuid": String, "deviceType": String, "userAgent": String, "nanoCDNResolvingRetryDelay": 10000, // In Milliseconds "nanoCDNHttpsEnabled": Boolean, "adCustomReference": String, "adParameters": json with <String String> Key/Value pairs, "customParameters": json with <String String> Key/Value pairs, "options": json with <Number Object> Key/Value pairs, } }
More info about Broadpeak Plugin android integration in Android side can be found here.
🔴 Currently not available in iOS
Updating the plugin config is handy while changing to another media. Suppose FE wants to play another 'Ad' for the next media then FE can pass another config with new Ad to the player.
App can call the following with the updated plugin's config,
const updatedIMAPlugin = {
"ima": {
"adTagUrl": "https://kaltura.github.io/playkit-admanager-samples/vast/pod-inline-someskip.xml",
"alwaysStartWithPreroll": true,
"enableDebugMode": false
}
};
KalturaPlayerAPI.updatePluginConfigs(JSON.stringify(updatedIMAPlugin));