Skip to content

Commit

Permalink
ASTRO-1204: Astro -support Android 14 in player playkit SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
volodymyr-bondarenko85 committed Oct 1, 2024
1 parent 9ffbd69 commit a7e6fa5
Show file tree
Hide file tree
Showing 33 changed files with 96 additions and 36 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
- name: Checkout repo and clone to CI workspace
uses: actions/checkout@v3

- name: Setup JDK 11
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'adopt'
cache: 'gradle'

Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ jobs:
mkdir $PWD/.kltrenv && echo "${{ secrets.SIGNING_KEY }}" > $PWD/.kltrenv/secring.gpg.b64
base64 -d $PWD/.kltrenv/secring.gpg.b64 > $PWD/.kltrenv/secring.gpg
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
cache: 'gradle'

- name: Run publish Script
run: |
RELEASE_TYPE=${RELEASE_TYPE} NEW_VERSION=${NEW_VERSION}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.2.1'
classpath 'com.android.tools.build:gradle:8.3.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'io.github.gradle-nexus:publish-plugin:1.1.0'
}
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Apr 01 12:55:57 IDT 2020
#Thu Jul 11 16:22:33 IDT 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
2 changes: 1 addition & 1 deletion jitpack.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
jdk:
- openjdk11
- openjdk17
before_install:
- curl https://kaltura.github.io/fe-tools/android/license.sh | sh
22 changes: 16 additions & 6 deletions tvplayer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ apply from: 'version.gradle'


android {
compileSdkVersion 33
namespace 'com.kaltura.tvplayer'
compileSdk 34
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
minSdkVersion 17
targetSdkVersion 33
minSdkVersion 21
targetSdkVersion 34
versionCode 1
versionName "1.0"
multiDexEnabled true
Expand All @@ -26,13 +27,22 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
buildFeatures {
buildConfig = true
}
publishing {
publishing {
singleVariant('release') {
}
}
}
}

dependencies {

api 'com.kaltura:playkit-android:dev-SNAPSHOT'
api 'com.kaltura:playkit-android-providers:develop-SNAPSHOT'
api 'com.kaltura:playkit-android-kava:develop-SNAPSHOT'
api 'com.kaltura:playkit-android:KUX-1761-SNAPSHOT'
api 'com.kaltura:playkit-android-providers:KUX-1761-SNAPSHOT'
api 'com.kaltura:playkit-android-kava:KUX-1761-SNAPSHOT'
api 'com.kaltura:playkit-dtg-android:current-SNAPSHOT'

// api project(":playkit")
Expand Down
4 changes: 2 additions & 2 deletions tvplayer/gradle-mvn-local.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
apply plugin: 'maven-publish'

task androidSourcesJar(type: Jar) {
classifier 'sources'
archiveClassifier = 'sources'
from android.sourceSets.main.java.sourceFiles
}

project.afterEvaluate {
publishing {
publications {
mavenJava(MavenPublication) {
from components.release
from components.findByName('release')
}
}
repositories {
Expand Down
6 changes: 3 additions & 3 deletions tvplayer/gradle-mvn-push.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ afterEvaluate { project ->
publishing {
publications {
mavenJava(MavenPublication) {
from components.release
from components.findByName('release')
groupId = GROUP
artifactId = POM_ARTIFACT_ID

Expand Down Expand Up @@ -98,12 +98,12 @@ afterEvaluate { project ->
}

task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
classifier 'javadoc'
archiveClassifier = 'javadoc'
from androidJavadocs.destinationDir
}

task androidSourcesJar(type: Jar) {
classifier 'sources'
archiveClassifier = 'sources'
from android.sourceSets.main.java.sourceFiles
}

Expand Down
2 changes: 0 additions & 2 deletions tvplayer/src/androidTest/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<resources>

<style name="AppTheme" parent="Theme.MaterialComponents.Light" />

<style name="AppTheme">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

import androidx.annotation.NonNull;

import com.kaltura.androidx.media3.common.util.UnstableApi;
import com.kaltura.playkit.PKLog;

@UnstableApi
public class KalturaBasicPlayer extends KalturaPlayer {

private static final PKLog log = PKLog.get("KalturaBasicPlayer");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

import android.content.Context;
import androidx.annotation.NonNull;

import com.kaltura.androidx.media3.common.util.UnstableApi;
import com.kaltura.playkit.PKLog;

@UnstableApi
public class KalturaOttPlayer extends KalturaPlayer {

private static final PKLog log = PKLog.get("KalturaOttPlayer");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.kaltura.androidx.media3.common.util.UnstableApi;
import com.kaltura.playkit.PKLog;

@UnstableApi
public class KalturaOvpPlayer extends KalturaPlayer {

private static final PKLog log = PKLog.get("KalturaOvpPlayer");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import androidx.annotation.Nullable;

import com.google.gson.Gson;
import com.kaltura.androidx.media3.common.util.UnstableApi;
import com.kaltura.netkit.connect.executor.APIOkRequestsExecutor;
import com.kaltura.netkit.connect.response.ResultElement;
import com.kaltura.netkit.utils.ErrorElement;
Expand Down Expand Up @@ -73,6 +74,7 @@
import java.util.List;
import java.util.Map;

@UnstableApi
public abstract class KalturaPlayer {

private static final PKLog log = PKLog.get("KalturaPlayer");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.kaltura.androidx.media3.common.util.UnstableApi;
import com.kaltura.androidx.media3.database.DatabaseProvider;
import com.kaltura.androidx.media3.datasource.cache.Cache;
import com.kaltura.playkit.PKDrmParams;
Expand All @@ -28,6 +29,7 @@


@SuppressWarnings({"WeakerAccess", "unused", "JavaDoc"})
@UnstableApi
public abstract class OfflineManager {

protected String kalturaServerUrl = KalturaPlayer.DEFAULT_OVP_SERVER_URL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import androidx.annotation.Nullable;

import com.kaltura.androidx.media3.common.util.UnstableApi;
import com.kaltura.netkit.utils.ErrorElement;
import com.kaltura.playkit.PKError;
import com.kaltura.playkit.PKLog;
Expand Down Expand Up @@ -32,6 +33,7 @@
import java.util.List;
import java.util.Map;

@UnstableApi
public class PKPlaylistController implements PlaylistController {

private static final PKLog log = PKLog.get("PlaylistController");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

import com.kaltura.androidx.media3.common.Player;
import com.kaltura.androidx.media3.common.Timeline;
import com.kaltura.androidx.media3.common.util.UnstableApi;
import com.kaltura.androidx.media3.ui.DefaultTimeBar;
import com.kaltura.androidx.media3.ui.TimeBar;
import com.kaltura.playkit.PKLog;
Expand All @@ -27,7 +28,7 @@
import static com.kaltura.playkit.PKMediaEntry.MediaEntryType.DvrLive;
import static com.kaltura.playkit.PKMediaEntry.MediaEntryType.Live;


@UnstableApi
public class PlaybackControlsView extends LinearLayout {

private static final PKLog log = PKLog.get("PlaybackControlsView");
Expand Down Expand Up @@ -79,7 +80,7 @@ private void initPlaybackControls() {
togglePlayPauseClick();
});

seekBar = this.findViewById(R.id.kexo_progress);
seekBar = this.findViewById(com.kaltura.androidx.media3.R.id.kexo_progress);
seekBar.addListener(componentListener);

tvCurTime = this.findViewById(R.id.time_current);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.gson.JsonSyntaxException;
import com.kaltura.androidx.media3.common.util.UnstableApi;
import com.kaltura.netkit.utils.ErrorElement;
import com.kaltura.playkit.PKLog;
import com.kaltura.playkit.providers.api.ovp.OvpConfigs;
Expand All @@ -26,6 +27,7 @@
import java.io.FileWriter;
import java.io.IOException;

@UnstableApi
public class PlayerConfigManager {

private static final PKLog log = PKLog.get("PlayerConfigManager");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.kaltura.tvplayer;

import com.kaltura.androidx.media3.common.util.UnstableApi;
import com.kaltura.playkit.PKMediaFormat;
import com.kaltura.playkit.PKPluginConfigs;
import com.kaltura.playkit.PKRequestConfig;
Expand All @@ -21,6 +22,7 @@
import com.kaltura.tvplayer.config.MediaEntryCacheConfig;
import com.kaltura.tvplayer.config.TVPlayerParams;

@UnstableApi
public class PlayerInitOptions {

public final Integer partnerId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.text.TextUtils;

import com.kaltura.androidx.media3.common.util.UnstableApi;
import com.kaltura.playkit.PKMediaEntry;
import com.kaltura.tvplayer.config.PhoenixTVPlayerParams;
import com.kaltura.tvplayer.utils.MapTokenResolver;
Expand All @@ -10,6 +11,7 @@
import java.util.List;
import java.util.Map;

@UnstableApi
class PlayerTokenResolver extends MapTokenResolver {

private List<String> entryKeys = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import androidx.annotation.Nullable;

import com.google.gson.Gson;
import com.kaltura.androidx.media3.common.util.UnstableApi;
import com.kaltura.playkit.*;
import com.kaltura.playkit.player.MediaSupport;
import com.kaltura.playkit.player.SourceSelector;
Expand All @@ -23,6 +24,7 @@
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;

@UnstableApi
public abstract class AbstractOfflineManager extends OfflineManager {
private static final PKLog log = PKLog.get("AbstractOfflineManager");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import androidx.annotation.NonNull;

import com.kaltura.androidx.media3.common.util.UnstableApi;
import com.kaltura.playkit.PKMediaEntry;
import com.kaltura.tvplayer.KalturaPlayer;
import com.kaltura.tvplayer.MediaOptions;
Expand All @@ -10,6 +11,7 @@

import java.util.List;

@UnstableApi
public interface Prefetch {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

import androidx.annotation.NonNull;

import com.kaltura.androidx.media3.common.util.UnstableApi;
import com.kaltura.dtg.DownloadItem;
import com.kaltura.tvplayer.OfflineManager;
import com.kaltura.tvplayer.OfflineManager.AssetDownloadState;
import com.kaltura.tvplayer.offline.exo.PrefetchConfig;


@UnstableApi
class DTGAssetInfo extends OfflineManager.AssetInfo {

final private String itemId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.kaltura.androidx.media3.common.util.UnstableApi;
import com.kaltura.androidx.media3.database.DatabaseProvider;
import com.kaltura.androidx.media3.datasource.cache.Cache;
import com.kaltura.dtg.AssetFormat;
Expand Down Expand Up @@ -35,6 +36,7 @@
import java.util.Collections;
import java.util.List;

@UnstableApi
public class DTGOfflineManager extends AbstractOfflineManager {
private static final PKLog log = PKLog.get("DTGOfflineManager");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

package com.kaltura.tvplayer.offline.dtg

import com.kaltura.androidx.media3.common.util.UnstableApi
import com.kaltura.dtg.AssetFormat
import com.kaltura.dtg.CodecSupport
import com.kaltura.dtg.DownloadItem
Expand All @@ -17,7 +18,7 @@ import java.util.*
import kotlin.collections.ArrayList
import kotlin.collections.HashMap


@UnstableApi
fun selectTracks(
assetFormat: AssetFormat,
trackSelector: TrackSelector,
Expand All @@ -28,6 +29,7 @@ fun selectTracks(

private val log = PKLog.get("DTGTrackSelection")

@UnstableApi
class DTGTrackSelection(
private val assetFormat: AssetFormat,
private val prefs: SelectionPrefs,
Expand Down Expand Up @@ -383,8 +385,8 @@ class DTGTrackSelection(

}

private val videoCodecs = listOf(HEVC, AVC1)
private val audioCodecs = listOf(EAC3, AC3, MP4A)
@UnstableApi private val videoCodecs = listOf(HEVC, AVC1)
@UnstableApi private val audioCodecs = listOf(EAC3, AC3, MP4A)

private typealias CodecTag = String

Expand Down
Loading

0 comments on commit a7e6fa5

Please sign in to comment.