From 9d3c3013c9fea2cb31cc19282ef11d16b0083dbd Mon Sep 17 00:00:00 2001 From: Gilad Nadav Date: Tue, 19 May 2020 23:35:36 +0300 Subject: [PATCH 01/15] subtitles pos first draft --- .../android/player-settings-android.md | 68 +++++++++++++++++-- 1 file changed, 64 insertions(+), 4 deletions(-) diff --git a/documentation/player-portal/android/player-settings-android.md b/documentation/player-portal/android/player-settings-android.md index 63b6299b..aba5d13e 100644 --- a/documentation/player-portal/android/player-settings-android.md +++ b/documentation/player-portal/android/player-settings-android.md @@ -484,6 +484,67 @@ player.updateSubtitleStyle(subtitleStyleSettings); {% endhighlight %} +### Subtitle View Postioning Configuration +> Since Playkit version 4.8.0 + +* {% highlight java %}PKSubtitlePosition pkSubtitlePosition = PKSubtitlePosition(boolean overrideInlineCueConfig){% endhighlight %} + + If `overrideInlineCueConfig` is set to `true` then player will use the given Cue Settings to override the values coming in Cue Settings. + +* {% highlight java %}setVerticalPosition(int verticalPositionPercentage){% endhighlight %} + + Set the subtitle position only in Vertical direction (Up or Down) on the video frame. This method only allows to move in Y - coordinate. + +* {% highlight java %}setPosition(int horizontalPositionPercentage, int verticalPositionPercentage, Layout.Alignment horizontalAlignment){% endhighlight %} + + Set the subtitle position any where on the video frame. This method allows to move in X-Y coordinates. + +* {% highlight java %}setToDefaultPosition(boolean overrideInlineCueConfig){% endhighlight %} + + If `overrideInlineCueConfig` is `false` that means; app does not want to override the inline Cue configuration. App wants to go with Cue configuration. + + Note! if `setOverrideInlineCueConfig(boolean)` is called with `false` value means after that in next call, app needs to `setOverrideInlineCueConfig(boolean)` with the required value. + + Otherwise + + If `overrideInlineCueConfig` is `true` then it will move subtitle to Bottom-Center which is a standard position for it. + +* {% highlight java %}setOverrideInlineCueConfig(boolean overrideInlineCueConfig){% endhighlight %} + + If `overrideInlineCueConfig` is set to true then player will use the given Cue Settings to override the values coming in Cue Settings. + +##### Note: Horizontal / Vertical position percentage limit is between 10% to 100%. + +##### Vertical - 10% Top to 100% Bottom +##### Horizontal - 10% Center to 100% screen edge usually (ALIGN_NORMAL - LEFT, ALIGN_OPPOSITE - RIGHT) + +#### Example + +To set the subtitle position, it is part of `SubtitleStyleSettings` + +{% highlight java %} +SubtitleStyleSettings subtitleStyleSettings = new SubtitleStyleSettings("MyCustomSubtitleStyle"); +PKSubtitlePosition pkSubtitlePosition = new PKSubtitlePosition(true); +pkSubtitlePosition.setPosition(70, 30, Layout.Alignment.ALIGN_NORMALR); + subtitleStyleSettings.setSubtitlePosition(pkSubtitlePosition); + player.getSettings().setSubtitleStyle(subtitleStyleSettings); +{% endhighlight %} + +To update the subtitle position, use the new configuration or call setToDefault + +{% highlight java %} +pkSubtitlePosition.setToDefaultPosition(true); +subtitleStyleSettings.setSubtitlePosition(pkSubtitlePosition); +player.updateSubtitleStyle(subtitleStyleSettings); +{% endhighlight %} + +{% highlight java %} +SubtitleStyleSettings subtitleStyleSettings = new SubtitleStyleSettings("MyCustomSubtitleStyle"); +PKSubtitlePosition pkSubtitlePosition = new PKSubtitlePosition(true); +pkSubtitlePosition.setVerticalPosition(80); +subtitleStyleSettings.setSubtitlePosition(pkSubtitlePosition); +player.getSettings().setSubtitleStyle(subtitleStyleSettings); +{% endhighlight %} ### Set ABR Settings @@ -493,9 +554,9 @@ To enable track selection to select subset of tracks that participate in the ABR {% highlight java %} player.getSettings().setABRSettings(new ABRSettings(). -setMinVideoBitrate(900000). -setMaxVideoBitrate(3000000). -setInitialBitrateEstimate(100000)); +setMinVideoBitrate(500000). +setMaxVideoBitrate(1500000). +setInitialBitrateEstimate(400000)); {% endhighlight %} In order to reset these values in Change Media if needed: @@ -592,7 +653,6 @@ player.getSettings().setVRSettings(new VRSettings().setInteractionMode(VRInterac VRSettings vrSettings = new VRSettings(); vrSettings.setFlingEnabled(true); vrSettings.setVrModeEnabled(false); - vrSettings.setZoomWithPinchEnabled(true); VRInteractionMode interactionMode = vrSettings.getInteractionMode(); if (VRUtil.isModeSupported(MainActivity.this, VRInteractionMode.MotionWithTouch)) { From 27c179ff5ddf9a805b87289761ef000d93dff74c Mon Sep 17 00:00:00 2001 From: Gilad Nadav Date: Tue, 19 May 2020 23:50:12 +0300 Subject: [PATCH 02/15] capital --- documentation/player-portal/android/player-settings-android.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/player-portal/android/player-settings-android.md b/documentation/player-portal/android/player-settings-android.md index aba5d13e..8d772a1f 100644 --- a/documentation/player-portal/android/player-settings-android.md +++ b/documentation/player-portal/android/player-settings-android.md @@ -516,7 +516,7 @@ player.updateSubtitleStyle(subtitleStyleSettings); ##### Note: Horizontal / Vertical position percentage limit is between 10% to 100%. ##### Vertical - 10% Top to 100% Bottom -##### Horizontal - 10% Center to 100% screen edge usually (ALIGN_NORMAL - LEFT, ALIGN_OPPOSITE - RIGHT) +##### Horizontal - 10% Center to 100% Screen Edge - usually (ALIGN_NORMAL - LEFT, ALIGN_OPPOSITE - RIGHT) #### Example From c483a4a977f89bc86e8a89aa9a7af7b676fb4a00 Mon Sep 17 00:00:00 2001 From: GouravSna <38206744+GouravSna@users.noreply.github.com> Date: Wed, 20 May 2020 10:06:53 +0530 Subject: [PATCH 03/15] - Spelling change --- documentation/player-portal/android/player-settings-android.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/player-portal/android/player-settings-android.md b/documentation/player-portal/android/player-settings-android.md index 8d772a1f..6244fee5 100644 --- a/documentation/player-portal/android/player-settings-android.md +++ b/documentation/player-portal/android/player-settings-android.md @@ -484,7 +484,7 @@ player.updateSubtitleStyle(subtitleStyleSettings); {% endhighlight %} -### Subtitle View Postioning Configuration +### Subtitle View Positioning Configuration > Since Playkit version 4.8.0 * {% highlight java %}PKSubtitlePosition pkSubtitlePosition = PKSubtitlePosition(boolean overrideInlineCueConfig){% endhighlight %} From 55e49cb2ef9f82e85bde73aa256a49fcedd7a89e Mon Sep 17 00:00:00 2001 From: Gilad Nadav Date: Wed, 20 May 2020 10:17:10 +0300 Subject: [PATCH 04/15] fix spelling --- .../player-portal/android/player-settings-android.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/player-portal/android/player-settings-android.md b/documentation/player-portal/android/player-settings-android.md index 6244fee5..7ef08503 100644 --- a/documentation/player-portal/android/player-settings-android.md +++ b/documentation/player-portal/android/player-settings-android.md @@ -484,7 +484,7 @@ player.updateSubtitleStyle(subtitleStyleSettings); {% endhighlight %} -### Subtitle View Positioning Configuration +### Subtitle View Postioning Configuration > Since Playkit version 4.8.0 * {% highlight java %}PKSubtitlePosition pkSubtitlePosition = PKSubtitlePosition(boolean overrideInlineCueConfig){% endhighlight %} @@ -525,7 +525,7 @@ To set the subtitle position, it is part of `SubtitleStyleSettings` {% highlight java %} SubtitleStyleSettings subtitleStyleSettings = new SubtitleStyleSettings("MyCustomSubtitleStyle"); PKSubtitlePosition pkSubtitlePosition = new PKSubtitlePosition(true); -pkSubtitlePosition.setPosition(70, 30, Layout.Alignment.ALIGN_NORMALR); +pkSubtitlePosition.setPosition(70, 30, Layout.Alignment.ALIGN_NORMAL); subtitleStyleSettings.setSubtitlePosition(pkSubtitlePosition); player.getSettings().setSubtitleStyle(subtitleStyleSettings); {% endhighlight %} From f36f9259dc07eac05b914403c1f54a8cd836f1fd Mon Sep 17 00:00:00 2001 From: Gilad Nadav Date: Thu, 21 May 2020 16:32:50 +0300 Subject: [PATCH 05/15] fix values --- .../player-portal/android/player-settings-android.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/documentation/player-portal/android/player-settings-android.md b/documentation/player-portal/android/player-settings-android.md index 7ef08503..b9d5dddd 100644 --- a/documentation/player-portal/android/player-settings-android.md +++ b/documentation/player-portal/android/player-settings-android.md @@ -513,10 +513,10 @@ player.updateSubtitleStyle(subtitleStyleSettings); If `overrideInlineCueConfig` is set to true then player will use the given Cue Settings to override the values coming in Cue Settings. -##### Note: Horizontal / Vertical position percentage limit is between 10% to 100%. +##### Note: Horizontal / Vertical position percentage limit is between 10% up to 100%. -##### Vertical - 10% Top to 100% Bottom -##### Horizontal - 10% Center to 100% Screen Edge - usually (ALIGN_NORMAL - LEFT, ALIGN_OPPOSITE - RIGHT) +##### Vertical positioning - 100% Top to 10% Bottom +##### Horizontal positioning- 10% Center to 100% Screen Edge - (ALIGN_NORMAL - LEFT, ALIGN_OPPOSITE - RIGHT) in RTL languages it will be the oposite #### Example From 9cdf5dfb4000b504f1aee68454c579605d5a05f7 Mon Sep 17 00:00:00 2001 From: Gilad Nadav Date: Thu, 9 Jul 2020 09:47:54 +0300 Subject: [PATCH 06/15] fix code review comments --- .../player-portal/android/player-settings-android.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/documentation/player-portal/android/player-settings-android.md b/documentation/player-portal/android/player-settings-android.md index b9d5dddd..baadce2a 100644 --- a/documentation/player-portal/android/player-settings-android.md +++ b/documentation/player-portal/android/player-settings-android.md @@ -484,7 +484,7 @@ player.updateSubtitleStyle(subtitleStyleSettings); {% endhighlight %} -### Subtitle View Postioning Configuration +### Subtitle View Positioning Configuration > Since Playkit version 4.8.0 * {% highlight java %}PKSubtitlePosition pkSubtitlePosition = PKSubtitlePosition(boolean overrideInlineCueConfig){% endhighlight %} @@ -520,17 +520,17 @@ player.updateSubtitleStyle(subtitleStyleSettings); #### Example -To set the subtitle position, it is part of `SubtitleStyleSettings` +Subtitle position configuration is done by updating the `SubtitleStyleSettings` object {% highlight java %} SubtitleStyleSettings subtitleStyleSettings = new SubtitleStyleSettings("MyCustomSubtitleStyle"); PKSubtitlePosition pkSubtitlePosition = new PKSubtitlePosition(true); pkSubtitlePosition.setPosition(70, 30, Layout.Alignment.ALIGN_NORMAL); - subtitleStyleSettings.setSubtitlePosition(pkSubtitlePosition); - player.getSettings().setSubtitleStyle(subtitleStyleSettings); +subtitleStyleSettings.setSubtitlePosition(pkSubtitlePosition); +player.getSettings().setSubtitleStyle(subtitleStyleSettings); {% endhighlight %} -To update the subtitle position, use the new configuration or call setToDefault +#### To update the subtitle position, use a new `PKSubtitlePosition` configuration or call `setToDefault` API {% highlight java %} pkSubtitlePosition.setToDefaultPosition(true); From 81f1850ee21a1bf33bae55dfac6ee8e74e06e483 Mon Sep 17 00:00:00 2001 From: Gilad Nadav Date: Thu, 9 Jul 2020 11:09:58 +0300 Subject: [PATCH 07/15] update --- .../player-portal/android/ads-android.md | 116 ++++++++++++------ 1 file changed, 76 insertions(+), 40 deletions(-) diff --git a/documentation/player-portal/android/ads-android.md b/documentation/player-portal/android/ads-android.md index 957c2565..b415b699 100644 --- a/documentation/player-portal/android/ads-android.md +++ b/documentation/player-portal/android/ads-android.md @@ -5,16 +5,26 @@ weight: 110 --- This article describes the steps required for adding support for the IMA Plugin functionality on Android devices. IMA (Interactive Media Ads) was developed by Google to enable you to display ads in your application's video, audio, and game content. +### Add imaplugin depandancy in `build.gradle` + +``` +implementation 'com.kaltura.playkit:imaplugin:4.x.x' +``` ### Configure the Plugin Configuration Object To configure the plugin, add the following configuration to your `pluginConfig` file as follows: ```java -private void configureIMAPlugin(PlayerConfig pluginConfig) { - String adTagUrl = VIOAdUtil.getCastAdTag(mVideoDetailsModel); +private IMAConfig getIMAPluginConfig() { + String adTagUrl = adUtil.getAdTag(mVideoDetailsModel); List videoMimeTypes = new ArrayList<>(); - IMAConfig adsConfig = new IMAConfig("en", false, true, -1, videoMimeTypes, adTagUrl, true, true); + videoMimeTypes.add(PKMediaFormat.mp4.mimeType); + videoMimeTypes.add(PKMediaFormat.hls.mimeType); + IMAConfig adsConfig = new IMAConfig().setAdTagUrl(adTagUrl).enableDebugMode(false).setVideoMimeTypes(videoMimeTypes); ``` + +for more configuration option check IMAConfig API. + ### IMConfig Constructor ```java @@ -26,24 +36,36 @@ IMAConfig(String language, boolean enableBackgroundPlayback, boolean autoPlayAdB For the IMA Plugin to start loading, you'll need to set the plugin configuration you created as follows: ```java -PlayerConfig config = new PlayerConfig(); -PlayerConfig.Plugins plugins = config.plugins; -pluginConfig.plugins.setPluginConfig(IMAPlugin.factory.getName(), adsConfig.toJSONObject()); + +PlayKitManager.registerPlugins(getActivity(), IMAPlugin.factory); + +PKPluginConfigs pluginConfig = new PKPluginConfigs(); + +pluginConfig.setPluginConfig(IMAPlugin.factory.getName(), getIMAPluginConfig()); + + + player = PlayKitManager.loadPlayer(this.getActivity(), pluginConfig); + +``` + +### Chanage media with new adTag requiores updating. the plugin on player level before calling `player.prepare` + +```java +player.updatePluginConfig(IMAPlugin.factory.getName(), getIMAPluginConfig()); + ``` + + ### Register to the Ad Started Event The Ad Started event includes the `AdInfo` payload. You can fetch this data in the following way: ```java -player.addEventListener(new PKEvent.Listener() { - @Override - public void onEvent(PKEvent event) { - log.d("AD_STARTED"); - mAdStartedEventInfo = (AdEvent.AdStartedEvent) event; - appProgressBar.setVisibility(View.INVISIBLE); - } - }, AdEvent.Type.STARTED); +player.addListener(this, AdEvent.started, event -> { + log("AD STARTED adInfo AdPositionType =" + event.adInfo.getAdPositionType()); +}); + ``` ### AdInfo API @@ -67,35 +89,49 @@ player.addEventListener(new PKEvent.Listener() { ```java - public void onEvent(PKEvent event) { - log.d("AD_CONTENT_PAUSE_REQUESTED"); - PKAdInfo adInfo = player.getAdInfo(); - appProgressBar.setVisibility(View.VISIBLE); + player.addListener(this, AdEvent.cuepointsChanged, event -> { + adCuePoints = event.cuePoints; + if (adCuePoints != null) { + log.d("Has Postroll = " + adCuePoints.hasPostRoll()); } - }, AdEvent.Type.CONTENT_PAUSE_REQUESTED); + }); - player.addEventListener(new PKEvent.Listener() { - @Override - public void onEvent(PKEvent event) { - log.d("Ad Event AD_RESUMED"); - nowPlaying = true; - appProgressBar.setVisibility(View.INVISIBLE); - } - }, AdEvent.Type.RESUMED); - player.addEventListener(new PKEvent.Listener() { - @Override - public void onEvent(PKEvent event) { - log.d("Ad Event AD_ALL_ADS_COMPLETED"); - appProgressBar.setVisibility(View.INVISIBLE); - } - }, AdEvent.Type.ALL_ADS_COMPLETED); - player.addEventListener(new PKEvent.Listener() { - @Override - public void onEvent(PKEvent event) { - log.d("Ad Error Event VAST_LOAD_TIMEOUT"); - } - }, AdError.Type.VAST_LOAD_TIMEOUT); + player.addListener(this, AdEvent.adRequested, event -> { + AdEvent.AdRequestedEvent adRequestEvent = event; + log("AD_REQUESTED adtag = " + adRequestEvent.adTagUrl); + }); + + player.addListener(this, AdEvent.contentPauseRequested, event -> { + log("ADS_PLAYBACK_START"); + }); + + player.addListener(this, AdEvent.contentResumeRequested, event -> { + log("ADS_PLAYBACK_ENDE"); + }); + + player.addListener(this, AdEvent.resumed, event -> { + log("ADS_PLAYBACK_RESUMED"); + }); + + player.addListener(this, AdEvent.allAdsCompleted, event -> { + log("ALL_ADS_COMPLETED"); + }); + + player.addListener(this, AdEvent.error, event -> { + AdEvent.Error adError = event; + Log.d(TAG, "AD_ERROR " + adError.type + " " + adError.error.message); + appProgressBar.setVisibility(View.INVISIBLE); + log("AD_ERROR"); + }); +``` + +#### Please unregister all the events on player destroy stage + +```java +player.removeListeners(this); +player.destroy() ``` + ### Ad Events The IMA Plugin supports the following ad events: From 6529222b5b8feab6aa622910af7b1de3c96adaa4 Mon Sep 17 00:00:00 2001 From: Gilad Nadav Date: Thu, 9 Jul 2020 11:11:01 +0300 Subject: [PATCH 08/15] cont --- documentation/player-portal/android/ads-android.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/documentation/player-portal/android/ads-android.md b/documentation/player-portal/android/ads-android.md index b415b699..c97fa9c5 100644 --- a/documentation/player-portal/android/ads-android.md +++ b/documentation/player-portal/android/ads-android.md @@ -23,7 +23,7 @@ private IMAConfig getIMAPluginConfig() { IMAConfig adsConfig = new IMAConfig().setAdTagUrl(adTagUrl).enableDebugMode(false).setVideoMimeTypes(videoMimeTypes); ``` -for more configuration option check IMAConfig API. +for more configuration options check IMAConfig API. ### IMConfig Constructor @@ -43,8 +43,7 @@ PKPluginConfigs pluginConfig = new PKPluginConfigs(); pluginConfig.setPluginConfig(IMAPlugin.factory.getName(), getIMAPluginConfig()); - - player = PlayKitManager.loadPlayer(this.getActivity(), pluginConfig); +player = PlayKitManager.loadPlayer(this.getActivity(), pluginConfig); ``` @@ -55,8 +54,6 @@ player.updatePluginConfig(IMAPlugin.factory.getName(), getIMAPluginConfig()); ``` - - ### Register to the Ad Started Event The Ad Started event includes the `AdInfo` payload. You can fetch this data in the following way: From 7f9328fd499f64b125bbc721555d3037b2139bd3 Mon Sep 17 00:00:00 2001 From: Gilad Nadav Date: Thu, 9 Jul 2020 11:50:27 +0300 Subject: [PATCH 09/15] add dependancies explanation --- .../android/getting-started-android.md | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/documentation/player-portal/android/getting-started-android.md b/documentation/player-portal/android/getting-started-android.md index 5ef83f63..55db68f3 100644 --- a/documentation/player-portal/android/getting-started-android.md +++ b/documentation/player-portal/android/getting-started-android.md @@ -263,3 +263,63 @@ We made a few other changes to the activity XML, like turning the view into a `L [Download](https://github.com/kaltura/kaltura-player-android-samples/tree/master/OVPSamples/GettingStarted) + +### Gradle Dependencies for Playkit SDK + +##### A. Kaltura Player: +This dependency can be used on client app side. If client app use this then *there is no need to use Playkit, Kava, DTG and Providers dependency separately*. Because it is inbuilt in Kaltura Player. +Find more [here](https://github.com/kaltura/kaltura-player-android/blob/develop/README.md) + +`implementation 'com.kaltura.player:tvplayer:kaltura_player_version'` + +Please check our [Kaltura Player samples](https://github.com/kaltura/kaltura-player-android-samples/blob/8c743c7083ec2848cc0db979a194b9c92ce1a36b/AdvancedSamples/FullDemo/playkitdemo/build.gradle#L34) + +#####B. Use Player components standalone: +If client app wants to use player and its plugins standalone then other dependecies should be added.Find more [here](https://kaltura.github.io/playkit/guide/android/) + +Please check our [Playkit Samples](https://github.com/kaltura/playkit-android-samples/blob/fd33d9709396fce6c4df983fc5efe7652fd1427b/FullDemo/app/build.gradle#L29) + +##### 1. Playkit: +Core Player which handles Non-DRM/Clear and DRM content playback. +`implementation 'com.kaltura.playkit:playkit:latest_version'` +##### 2. DTG (Download To Go): +Plugin which handles download of dash(including DRM) and hls streams(clear streams) +`implementation 'com.kaltura.dtg:dtglib:dtg_latest_version'` +##### 3. Phoenix Provider Plugin: +If you are Kaltura customer then this plugin which handles Kaltura OTT and OVP BE api calls. +`implementation 'com.kaltura.playkit:playkitproviders:latest_version'` +##### 4. IMA Ads Plugin: +Plugin which handles ads playback. +`implementation 'com.kaltura.playkit:imaplugin:latest_version'` +##### 5. Kava Analytics Plugin: +Plugin for analytics. +`implementation 'com.kaltura.playkit:kavaplugin:latest_version'` +##### 6. Youbora Analytics Plugin: +Plugin for Youbora analytics. +`implementation 'com.kaltura.playkit:youboraplugin:latest_version'` +##### 7. Googlecast Plugin: +Plugin for content playback on Googlecast. +`implementation 'com.kaltura.playkit:googlecast:latest_version'` +##### 8. VR Plugin: +Plugin for 360 or VR content playback. +`implementation 'com.kaltura.playkit:vrplugin:latest_version'` + +If client apps want to exclude the playkit from other plugins in case they find any cyclic dependency issue on app side then simply it can exclude the tree from the relavant dependency. + +######Example +``` +implementation 'com.kaltura.playkit:anyPlugin:latest_version', { +exclude group: 'com.kaltura.playkit', module: 'playkit' +} + +``` + +######Note +> `latest_version` can be picked up from [here](https://github.com/kaltura/playkit-android/releases). +> +> `dtg_latest_version ` can be picked from [here](https://github.com/kaltura/playkit-dtg-android/releases) +> +> `kaltura_player_version` can be picked from [here](https://github.com/kaltura/kaltura-player-android/releases) + + + From 2bee02fbba339a04f56274987729610687e13bb2 Mon Sep 17 00:00:00 2001 From: Gilad Nadav Date: Sun, 12 Jul 2020 10:37:01 +0300 Subject: [PATCH 10/15] review fixes --- documentation/player-portal/android/ads-android.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/player-portal/android/ads-android.md b/documentation/player-portal/android/ads-android.md index c97fa9c5..6909e9ef 100644 --- a/documentation/player-portal/android/ads-android.md +++ b/documentation/player-portal/android/ads-android.md @@ -5,7 +5,7 @@ weight: 110 --- This article describes the steps required for adding support for the IMA Plugin functionality on Android devices. IMA (Interactive Media Ads) was developed by Google to enable you to display ads in your application's video, audio, and game content. -### Add imaplugin depandancy in `build.gradle` +### Add imaplugin dependency in `build.gradle` ``` implementation 'com.kaltura.playkit:imaplugin:4.x.x' @@ -47,7 +47,7 @@ player = PlayKitManager.loadPlayer(this.getActivity(), pluginConfig); ``` -### Chanage media with new adTag requiores updating. the plugin on player level before calling `player.prepare` +### Chanage media with new adTag requires updating the plugin. This is done using player api `player.updatePluginConfig` before calling `player.prepare` ```java player.updatePluginConfig(IMAPlugin.factory.getName(), getIMAPluginConfig()); From 570fd9e396c098549e21fe3beaac189ce41ffa93 Mon Sep 17 00:00:00 2001 From: Gilad Nadav Date: Sun, 12 Jul 2020 10:42:12 +0300 Subject: [PATCH 11/15] review fixes --- documentation/player-portal/android/ads-android.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/player-portal/android/ads-android.md b/documentation/player-portal/android/ads-android.md index 6909e9ef..06b79eff 100644 --- a/documentation/player-portal/android/ads-android.md +++ b/documentation/player-portal/android/ads-android.md @@ -122,7 +122,7 @@ player.addListener(this, AdEvent.started, event -> { }); ``` -#### Please unregister all the events on player destroy stage +#### Please deregister all the events on player destroy phase ```java player.removeListeners(this); From c50dface1fd9dce5cc64f7d6d3919c0031a60a19 Mon Sep 17 00:00:00 2001 From: Gilad Nadav Date: Mon, 13 Jul 2020 12:27:24 +0300 Subject: [PATCH 12/15] Review changes for change meida --- documentation/player-portal/android/ads-android.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/documentation/player-portal/android/ads-android.md b/documentation/player-portal/android/ads-android.md index 06b79eff..bd493736 100644 --- a/documentation/player-portal/android/ads-android.md +++ b/documentation/player-portal/android/ads-android.md @@ -47,8 +47,14 @@ player = PlayKitManager.loadPlayer(this.getActivity(), pluginConfig); ``` -### Chanage media with new adTag requires updating the plugin. This is done using player api `player.updatePluginConfig` before calling `player.prepare` +### Chanage media +Change media scenario involves also a new adTag url within new `IMAPluginConfig`. +This requires the application to update the `IMAPlugin` with this new information. +To apply an update, you have to call player API `player.updatePluginConfig` before calling `player.prepare` + +##### Example + ```java player.updatePluginConfig(IMAPlugin.factory.getName(), getIMAPluginConfig()); From 4828897e531515ac864da347c79169d15fb293eb Mon Sep 17 00:00:00 2001 From: Gilad Nadav Date: Mon, 13 Jul 2020 16:00:22 +0300 Subject: [PATCH 13/15] typo --- documentation/player-portal/android/ads-android.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/player-portal/android/ads-android.md b/documentation/player-portal/android/ads-android.md index bd493736..7358ebd1 100644 --- a/documentation/player-portal/android/ads-android.md +++ b/documentation/player-portal/android/ads-android.md @@ -47,7 +47,7 @@ player = PlayKitManager.loadPlayer(this.getActivity(), pluginConfig); ``` -### Chanage media +### Change media Change media scenario involves also a new adTag url within new `IMAPluginConfig`. This requires the application to update the `IMAPlugin` with this new information. From 927af493f4e303d130c5921b595c7cc7a8534f84 Mon Sep 17 00:00:00 2001 From: Jess Portnoy Date: Tue, 14 Jul 2020 12:15:29 +0100 Subject: [PATCH 14/15] Update ads-android.md --- documentation/player-portal/android/ads-android.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/documentation/player-portal/android/ads-android.md b/documentation/player-portal/android/ads-android.md index 7358ebd1..cd17d060 100644 --- a/documentation/player-portal/android/ads-android.md +++ b/documentation/player-portal/android/ads-android.md @@ -48,10 +48,9 @@ player = PlayKitManager.loadPlayer(this.getActivity(), pluginConfig); ``` ### Change media - -Change media scenario involves also a new adTag url within new `IMAPluginConfig`. -This requires the application to update the `IMAPlugin` with this new information. -To apply an update, you have to call player API `player.updatePluginConfig` before calling `player.prepare` +This scenario requires a new adTag url within `IMAPluginConfig`. +The application must update the `IMAPlugin` with this information. +To update, call the `player.updatePluginConfig` API before calling `player.prepare`. ##### Example From 066fe957adbbe53b262bca27991c6196f77ff7e7 Mon Sep 17 00:00:00 2001 From: Gilad Nadav Date: Tue, 14 Jul 2020 20:40:49 +0300 Subject: [PATCH 15/15] pass spelling check --- .../player-portal/android/player-settings-android.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/player-portal/android/player-settings-android.md b/documentation/player-portal/android/player-settings-android.md index baadce2a..776fca3b 100644 --- a/documentation/player-portal/android/player-settings-android.md +++ b/documentation/player-portal/android/player-settings-android.md @@ -497,13 +497,13 @@ player.updateSubtitleStyle(subtitleStyleSettings); * {% highlight java %}setPosition(int horizontalPositionPercentage, int verticalPositionPercentage, Layout.Alignment horizontalAlignment){% endhighlight %} - Set the subtitle position any where on the video frame. This method allows to move in X-Y coordinates. + Set the subtitle position anywhere on the video frame. This method allows moving in X-Y coordinates. * {% highlight java %}setToDefaultPosition(boolean overrideInlineCueConfig){% endhighlight %} If `overrideInlineCueConfig` is `false` that means; app does not want to override the inline Cue configuration. App wants to go with Cue configuration. - Note! if `setOverrideInlineCueConfig(boolean)` is called with `false` value means after that in next call, app needs to `setOverrideInlineCueConfig(boolean)` with the required value. + Note! If `setOverrideInlineCueConfig(boolean)` is called with `false` value means after that in next call, app needs to `setOverrideInlineCueConfig(boolean)` with the required value. Otherwise