Releases: kaltura/playkit-android-youbora
Releases · kaltura/playkit-android-youbora
v4.2.0
Plugin Playkit Support
v4.2.0
Gradle
- implementation 'com.kaltura.playkit:youboraplugin:4.2.0'
v4.1.0
Changes from v4.0.0
Plugin Playkit Support
v4.1.0
Upgrades
* Upgrade to youbora v6.4.7
* FEM-2502 | AndroidX migration
New Feature
- FEM-2585 | Add support in YouboraPlugin to accept youbora Options as Bundle instead of fixed json format in the config.
Example:
pkPluginConfigs.setPluginConfig(YouboraPlugin.factory.getName(), getYouboraBundle());
/**
* Bundle Youbora Configuration
* @return YouboraConfigBundle
*/
private Bundle getYouboraBundle() {
Bundle optBundle = new Bundle();
//Youbora config bundle. Main config goes here.
optBundle.putString(KEY_ACCOUNT_CODE, ACCOUNT_CODE);
optBundle.putString(KEY_USERNAME, UNIQUE_USER_NAME);
optBundle.putBoolean(KEY_ENABLED, true);
//Media entry bundle.
optBundle.putString(KEY_CONTENT_TITLE, MEDIA_TITLE);
//Optional - Device bundle o/w youbora will decide by its own.
///optBundle.putString(KEY_DEVICE_CODE, "AndroidTV");
///optBundle.putString(KEY_DEVICE_BRAND, "Xiaomi");
///optBundle.putString(KEY_DEVICE_MODEL, "Mii3");
///optBundle.putString(KEY_DEVICE_TYPE, "TvBox");
///optBundle.putString(KEY_DEVICE_OS_NAME, "Android/Oreo");
///optBundle.putString(KEY_DEVICE_OS_VERSION, "8.1");
//Youbora ads configuration bundle.
optBundle.putString(KEY_AD_CAMPAIGN, CAMPAIGN);
//Configure custom properties here:
optBundle.putString(KEY_CONTENT_GENRE, GENRE);
optBundle.putString(KEY_CONTENT_TYPE, TYPE);
optBundle.putString(KEY_CONTENT_TRANSACTION_CODE, TRANSACTION_TYPE);
optBundle.putString(KEY_CONTENT_PRICE, PRICE);
optBundle.putString(KEY_CONTENT_ENCODING_AUDIO_CODEC, AUDIO_TYPE);
optBundle.putString(KEY_CONTENT_CHANNEL, AUDIO_CHANNELS);
Bundle contentMetadataBundle = new Bundle();
contentMetadataBundle.putString(KEY_CONTENT_METADATA_YEAR, YEAR);
contentMetadataBundle.putString(KEY_CONTENT_METADATA_CAST, CAST);
contentMetadataBundle.putString(KEY_CONTENT_METADATA_DIRECTOR, DIRECTOR);
contentMetadataBundle.putString(KEY_CONTENT_METADATA_OWNER, OWNER);
contentMetadataBundle.putString(KEY_CONTENT_METADATA_PARENTAL, PARENTAL);
contentMetadataBundle.putString(KEY_CONTENT_METADATA_RATING, RATING);
contentMetadataBundle.putString(KEY_CONTENT_METADATA_QUALITY, QUALITY);
optBundle.putBundle(KEY_CONTENT_METADATA, contentMetadataBundle);
//You can add some extra params here:
optBundle.putString(KEY_CUSTOM_DIMENSION_1, EXTRA_PARAM_1);
optBundle.putString(KEY_CUSTOM_DIMENSION_2, EXTRA_PARAM_2);
return optBundle;
}
App can use it's youbora built in constants constants for the bundle and some of YoboraConfig constantsas well
import static com.kaltura.playkit.plugins.youbora.pluginconfig.YouboraConfig.KEY_CONTENT_METADATA_CAST;
import static com.kaltura.playkit.plugins.youbora.pluginconfig.YouboraConfig.KEY_CONTENT_METADATA_DIRECTOR;
import static com.kaltura.playkit.plugins.youbora.pluginconfig.YouboraConfig.KEY_CONTENT_METADATA_OWNER;
import static com.kaltura.playkit.plugins.youbora.pluginconfig.YouboraConfig.KEY_CONTENT_METADATA_PARENTAL;
import static com.kaltura.playkit.plugins.youbora.pluginconfig.YouboraConfig.KEY_CONTENT_METADATA_QUALITY;
import static com.kaltura.playkit.plugins.youbora.pluginconfig.YouboraConfig.KEY_CONTENT_METADATA_RATING;
import static com.kaltura.playkit.plugins.youbora.pluginconfig.YouboraConfig.KEY_CONTENT_METADATA_YEAR;
import static com.npaw.youbora.lib6.plugin.Options.KEY_ACCOUNT_CODE;
import static com.npaw.youbora.lib6.plugin.Options.KEY_AD_CAMPAIGN;
import static com.npaw.youbora.lib6.plugin.Options.KEY_CONTENT_CHANNEL;
import static com.npaw.youbora.lib6.plugin.Options.KEY_CONTENT_ENCODING_AUDIO_CODEC;
import static com.npaw.youbora.lib6.plugin.Options.KEY_CONTENT_GENRE;
import static com.npaw.youbora.lib6.plugin.Options.KEY_CONTENT_METADATA;
import static com.npaw.youbora.lib6.plugin.Options.KEY_CONTENT_PRICE;
import static com.npaw.youbora.lib6.plugin.Options.KEY_CONTENT_TITLE;
import static com.npaw.youbora.lib6.plugin.Options.KEY_CONTENT_TRANSACTION_CODE;
import static com.npaw.youbora.lib6.plugin.Options.KEY_CONTENT_TYPE;
import static com.npaw.youbora.lib6.plugin.Options.KEY_CUSTOM_DIMENSION_1;
import static com.npaw.youbora.lib6.plugin.Options.KEY_CUSTOM_DIMENSION_2;
import static com.npaw.youbora.lib6.plugin.Options.KEY_DEVICE_BRAND;
import static com.npaw.youbora.lib6.plugin.Options.KEY_DEVICE_CODE;
import static com.npaw.youbora.lib6.plugin.Options.KEY_DEVICE_MODEL;
import static com.npaw.youbora.lib6.plugin.Options.KEY_DEVICE_OS_NAME;
import static com.npaw.youbora.lib6.plugin.Options.KEY_DEVICE_OS_VERSION;
import static com.npaw.youbora.lib6.plugin.Options.KEY_DEVICE_TYPE;
import static com.npaw.youbora.lib6.plugin.Options.KEY_ENABLED;
import static com.npaw.youbora.lib6.plugin.Options.KEY_USERNAME;
Gradle
- implementation 'com.kaltura.playkit:youboraplugin:4.1.0'
v3.9.7
v4.0.0
3.9.6
v3.9.4
v3.9.3
v3.9.2
Plugin Playkit Support
v3.9.2
Bug Fixes
- FEM-2442| Add support in Device Specific data on the youbora config Json
"device":{
"deviceCode": "AndroidTV",
"brand": "Xiaomi",
"model": "Mii3",
"type": "TvBox",
"osName": "Android/Oreo",
"osVersion": "8.1"
}
Example for adding Device specific data to Youbora config
private JsonObject getYouboraJsonObject(boolean isLive, String title) {
JsonObject pluginEntry = new JsonObject();
pluginEntry.addProperty("accountCode", "test");
pluginEntry.addProperty("username", "[email protected]");
pluginEntry.addProperty("haltOnError", true);
pluginEntry.addProperty("enableAnalytics", true);
pluginEntry.addProperty("enableSmartAds", true);
//Device json.
JsonObject deviceJson = new JsonObject();
deviceJson.addProperty("deviceCode", "AndroidTV");
deviceJson.addProperty("brand", "Xiaomi");
deviceJson.addProperty("model", "Mii3");
deviceJson.addProperty("type", "TvBox");
deviceJson.addProperty("osName", "Android/Oreo");
deviceJson.addProperty("osVersion", "8.1");
//Media entry json.
JsonObject mediaEntryJson = new JsonObject();
mediaEntryJson.addProperty("isLive", isLive);
mediaEntryJson.addProperty("title", title);
//Youbora ads configuration json.
JsonObject adsJson = new JsonObject();
adsJson.addProperty("adsExpected", true);
adsJson.addProperty("campaign", "zzz");
//Configure custom properties here:
JsonObject propertiesJson = new JsonObject();
propertiesJson.addProperty("genre", "");
propertiesJson.addProperty("type", "");
propertiesJson.addProperty("transaction_type", "");
propertiesJson.addProperty("year", "");
propertiesJson.addProperty("cast", "");
propertiesJson.addProperty("director", "");
propertiesJson.addProperty("owner", "");
propertiesJson.addProperty("parental", "");
propertiesJson.addProperty("price", "");
propertiesJson.addProperty("rating", "");
propertiesJson.addProperty("audioType", "");
propertiesJson.addProperty("audioChannels", "");
propertiesJson.addProperty("device", "");
propertiesJson.addProperty("quality", "");
//You can add some extra params here:
JsonObject extraParamJson = new JsonObject();
extraParamJson.addProperty("param1", "param1");
extraParamJson.addProperty("param2", "param2");
//Add all the json objects created before to the pluginEntry json.
pluginEntry.add("device", deviceJson);
pluginEntry.add("media", mediaEntryJson);
pluginEntry.add("ads", adsJson);
pluginEntry.add("properties", propertiesJson);
pluginEntry.add("extraParams", extraParamJson);
return pluginEntry;
}
Gradle
- implementation 'com.kaltura.playkit:youboraplugin:3.9.2'