Skip to content

Commit

Permalink
Bump version to 3.78.1
Browse files Browse the repository at this point in the history
  • Loading branch information
krocard committed Aug 2, 2024
1 parent f22e981 commit 3f9e377
Show file tree
Hide file tree
Showing 10 changed files with 90 additions and 8 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: CI

on:
pull_request:
push:
branches:
- main

jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- run: ./gradlew buildDebug
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package com.bitmovin.player.samples.fullscreen.basic

import android.app.Activity
import android.os.Build
import android.os.Handler
import android.os.Looper
import android.view.KeyCharacterMap
import androidx.appcompat.widget.Toolbar
import android.view.View
import android.view.ViewGroup
import com.bitmovin.player.PlayerView
import com.bitmovin.player.api.ui.FullscreenHandler
import com.bitmovin.player.ui.getSystemUiVisibilityFlags


class CustomFullscreenHandler(
Expand Down Expand Up @@ -73,3 +74,30 @@ class CustomFullscreenHandler(

override fun onDestroy() = playerOrientationListener.disable()
}

fun getSystemUiVisibilityFlags(fullScreen: Boolean, useFullscreenLayoutFlags: Boolean): Int {
var uiParams: Int
if (!fullScreen) {
uiParams = View.SYSTEM_UI_FLAG_VISIBLE
} else if (Build.VERSION.SDK_INT >= 19) {
uiParams = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION or
View.SYSTEM_UI_FLAG_FULLSCREEN or
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION or
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
} else {
uiParams = View.SYSTEM_UI_FLAG_FULLSCREEN
if (useFullscreenLayoutFlags) {
uiParams = View.SYSTEM_UI_FLAG_FULLSCREEN or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
}
val key1 = KeyCharacterMap.deviceHasKey(4)
val key2 = KeyCharacterMap.deviceHasKey(3)
if (!key1 || !key2) {
uiParams = uiParams or View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
if (useFullscreenLayoutFlags) {
uiParams = uiParams or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
}
}
}
return uiParams
}
4 changes: 4 additions & 0 deletions BasicMediaControlKotlin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ android {
}

buildTypes {
debug {
multiDexEnabled true
}

release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
Expand Down
2 changes: 1 addition & 1 deletion BasicPlaybackTV/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ android {

defaultConfig {
applicationId "com.bitmovin.player.samples.tv.playback.basic"
minSdkVersion 17 // leanback uses 17 as min so we can't go below that for this sample
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion
versionCode 1
versionName "1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ private void initializePlayer() {
"file:///android_asset/bitmovinplayer-ui.css",
null,
"file:///android_asset/bitmovinplayer-ui.js",
true
true,
false
),
false,
ScalingMode.Fit
Expand Down
2 changes: 1 addition & 1 deletion BasicPlaybackTVKotlin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ android {

defaultConfig {
applicationId "com.bitmovin.player.samples.tv.playback.basic"
minSdkVersion 17 // leanback uses 17 as min so we can't go below that for this sample
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion
versionCode 1
versionName "1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ protected void onCreate(Bundle savedInstanceState) {
"file:///android_asset/custom-bitmovinplayer-ui.min.css",
null,
"file:///android_asset/custom-bitmovinplayer-ui.min.js",
true
true,
false
),
false,
ScalingMode.Fit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package com.bitmovin.player.samples.custom.ui

import android.app.Activity
import android.os.Build
import android.view.KeyCharacterMap
import android.view.View
import android.view.ViewGroup
import androidx.appcompat.app.AppCompatActivity
import com.bitmovin.player.api.ui.FullscreenHandler
import com.bitmovin.player.ui.getSystemUiVisibilityFlags

class CustomFullscreenHandler(private val activity: Activity, private val playerUI: PlayerUI) : FullscreenHandler {
private val decorView: View = activity.window.decorView
Expand Down Expand Up @@ -64,3 +65,30 @@ class CustomFullscreenHandler(private val activity: Activity, private val player

override fun onDestroy() = playerOrientationListener.disable()
}

internal fun getSystemUiVisibilityFlags(fullScreen: Boolean, useFullscreenLayoutFlags: Boolean): Int {
var uiParams: Int
if (!fullScreen) {
uiParams = View.SYSTEM_UI_FLAG_VISIBLE
} else if (Build.VERSION.SDK_INT >= 19) {
uiParams = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION or
View.SYSTEM_UI_FLAG_FULLSCREEN or
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION or
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
} else {
uiParams = View.SYSTEM_UI_FLAG_FULLSCREEN
if (useFullscreenLayoutFlags) {
uiParams = View.SYSTEM_UI_FLAG_FULLSCREEN or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
}
val key1 = KeyCharacterMap.deviceHasKey(4)
val key2 = KeyCharacterMap.deviceHasKey(3)
if (!key1 || !key2) {
uiParams = uiParams or View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
if (useFullscreenLayoutFlags) {
uiParams = uiParams or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
}
}
}
return uiParams
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ When you want to develop an own Android application using the Bitmovin Player An
It is recommended to reference a specific version as you can see below:
```
implementation 'com.bitmovin.player:player:3.77.1'
implementation 'com.bitmovin.player:player:3.78.0'
```
#### Additional SDK dependencies
Expand Down
2 changes: 1 addition & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ext {
playServicesAdsIdentifierVersion = '18.0.1'
imaSdkVersion = '3.31.0'
playServicesCastVersion = '21.4.0'
bitmovinPlayerVersion = '3.77.1'
bitmovinPlayerVersion = '3.78.0'
appcompat_version = "1.6.1"
activity_version = "1.6.1"
fragment_version = "1.5.5"
Expand Down

0 comments on commit 3f9e377

Please sign in to comment.