Skip to content

v4.1.0

Compare
Choose a tag to compare
@kaltura-fe-ci kaltura-fe-ci released this 13 Aug 08:52

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'