Skip to content

Commit

Permalink
Merge pull request #15 from kaltura/FEC-12022
Browse files Browse the repository at this point in the history
  • Loading branch information
GouravSna authored Nov 9, 2022
2 parents 5b76390 + f85c38b commit ff357bd
Show file tree
Hide file tree
Showing 63 changed files with 3,543 additions and 1,895 deletions.
13 changes: 12 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ buildscript {
android {
compileSdkVersion 31

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

defaultConfig {
minSdkVersion 21
targetSdkVersion 30
Expand All @@ -31,7 +36,7 @@ dependencies {

implementation fileTree(dir: "libs", include: ["*.jar"])

def kalturaPlayerVersion = '4.24.0'
def kalturaPlayerVersion = '4.24.1'

implementation "com.kaltura.player:tvplayer:$kalturaPlayerVersion"
implementation "com.kaltura.playkit:vrplugin:$kalturaPlayerVersion"
Expand Down Expand Up @@ -60,8 +65,14 @@ dependencies {
}
}

def REACT_NATIVE_VERSION = new File(['node', '--print',"JSON.parse(require('fs').readFileSync(require.resolve('react-native/package.json'), 'utf-8')).version"].execute(null, rootDir).text.trim())

allprojects {
configurations.all {
resolutionStrategy {
force "com.facebook.react:react-native:" + REACT_NATIVE_VERSION
}
}
repositories {
google()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class KalturaPlayerModule(
@ReactMethod
fun setUpPlayer(playerType: String, partnerId: Int = 0, initOptions: String?, promise: Promise) {
log.d("setPartnerId: $partnerId")
checkArguments(this::setUpPlayer.name, playerType)
kalturaPlayerRN.createPlayerInstance(getKalturaPlayerType(playerType), partnerId, initOptions, promise)
}

Expand All @@ -45,7 +46,6 @@ class KalturaPlayerModule(
"\n , mediaAssetJson:" + mediaAsset
)
checkArguments(this::load.name, assetId)
checkArguments(this::load.name, mediaAsset)
kalturaPlayerRN.load(assetId, mediaAsset, promise)
}

Expand Down Expand Up @@ -248,6 +248,12 @@ class KalturaPlayerModule(
kalturaPlayerRN.requestThumbnailInfo(positionMs, promise)
}

@ReactMethod
fun setLogLevel(logLevel: String) {
log.d("setLogLevel $logLevel")
kalturaPlayerRN.setLogLevel(logLevel)
}

@Throws(IllegalArgumentException::class)
@NonNull
private fun checkArguments(methodName: String, arg: String?) {
Expand Down
Loading

0 comments on commit ff357bd

Please sign in to comment.