Skip to content

Commit

Permalink
Bump version to 3.99.0
Browse files Browse the repository at this point in the history
  • Loading branch information
matamegger committed Dec 13, 2024
1 parent 8856da3 commit 7588ee0
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 63 deletions.
2 changes: 1 addition & 1 deletion BasicCasting/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.casting.basic"
minSdkVersion 19
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion
versionCode 1
versionName "1.0"
Expand Down
2 changes: 1 addition & 1 deletion BasicCastingKotlin/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.casting.basic"
minSdkVersion 19
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 @@ -52,7 +52,7 @@ private void handleFullscreen(boolean fullscreen) {

private void doSystemUiVisibility(final boolean fullScreen) {
this.decorView.post(() -> {
int uiParams = FullscreenUtil.getSystemUiVisibilityFlags(fullScreen, true);
int uiParams = getSystemUiVisibilityFlags(fullScreen);

decorView.setSystemUiVisibility(uiParams);
});
Expand Down Expand Up @@ -135,4 +135,16 @@ public void run() {
}
}
}

public int getSystemUiVisibilityFlags(boolean fullScreen) {
if (fullScreen) {
return View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
View.SYSTEM_UI_FLAG_FULLSCREEN |
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
} else {
return View.SYSTEM_UI_FLAG_VISIBLE;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class CustomFullscreenHandler(

private fun doSystemUiVisibility(fullScreen: Boolean) {
decorView?.post {
val uiParams = getSystemUiVisibilityFlags(fullScreen, true)
val uiParams = getSystemUiVisibilityFlags(fullScreen)
decorView?.systemUiVisibility = uiParams
}
}
Expand Down Expand Up @@ -75,29 +75,12 @@ 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
fun getSystemUiVisibilityFlags(fullScreen: Boolean): Int = if (!fullScreen) {
View.SYSTEM_UI_FLAG_VISIBLE
} else {
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
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private void doSystemUiVisibility(final boolean fullScreen) {
this.decorView.post(new Runnable() {
@Override
public void run() {
int uiParams = FullscreenUtil.getSystemUiVisibilityFlags(fullScreen, true);
int uiParams = getSystemUiVisibilityFlags(fullScreen);

decorView.setSystemUiVisibility(uiParams);
}
Expand Down Expand Up @@ -115,4 +115,16 @@ public void onDestroy() {
public boolean isFullscreen() {
return this.isFullscreen;
}

private int getSystemUiVisibilityFlags(boolean fullScreen) {
if (fullScreen) {
return View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |
View.SYSTEM_UI_FLAG_FULLSCREEN |
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
} else {
return View.SYSTEM_UI_FLAG_VISIBLE;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class CustomFullscreenHandler(private val activity: Activity, private val player

private fun doSystemUiVisibility(fullScreen: Boolean) {
decorView.post {
val uiParams = getSystemUiVisibilityFlags(fullScreen, true)
val uiParams = getSystemUiVisibilityFlags(fullScreen)
decorView.systemUiVisibility = uiParams
}
}
Expand All @@ -39,9 +39,9 @@ class CustomFullscreenHandler(private val activity: Activity, private val player
val parentView = playerUI.parent as ViewGroup

(0 until parentView.childCount)
.map { parentView.getChildAt(it) }
.filter { it !== playerUI }
.forEach { it.visibility = if (fullscreen) View.GONE else View.VISIBLE }
.map { parentView.getChildAt(it) }
.filter { it !== playerUI }
.forEach { it.visibility = if (fullscreen) View.GONE else View.VISIBLE }

val params = playerUI.layoutParams.apply {
width = ViewGroup.LayoutParams.MATCH_PARENT
Expand All @@ -66,29 +66,12 @@ 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
}
internal fun getSystemUiVisibilityFlags(fullScreen: Boolean): Int = if (fullScreen) {
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 {
View.SYSTEM_UI_FLAG_VISIBLE
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,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.98.0'
implementation 'com.bitmovin.player:player:3.99.0'
```
#### Additional SDK dependencies
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 {

ext {
// SDK and tools
minSdkVersion = 19
minSdkVersion = 21
targetSdkVersion = 35
compileSdk = 35
}
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.33.0'
playServicesCastVersion = '21.4.0'
bitmovinPlayerVersion = '3.98.0'
bitmovinPlayerVersion = '3.99.0'
appcompat_version = "1.6.1"
activity_version = "1.6.1"
fragment_version = "1.5.5"
Expand Down

0 comments on commit 7588ee0

Please sign in to comment.