Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.36.0 #594

Merged
merged 11 commits into from
Dec 20, 2024
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
# Changelog

## [0.36.0]

### Changed

- Update Bitmovin's native iOS SDK version to `3.80.0`

### Added

- Android: `PlayerViewConfig.surfaceType` that allows to render video on a `TextureView`

## [0.35.0] - 2024-12-10

### Changed

- Update Bitmovin's native Android SDK version to `3.98.0`
- Update Bitmovin's native iOS SDK version to `3.79.0`

### Fixed

- Android: Controls disappearing post midroll ads on select device by setting background color to `Color.TRANSPARENT` on IMA Ad container

## [0.34.0] - 2024-12-04

### Changed
Expand Down
2 changes: 1 addition & 1 deletion RNBitmovinPlayer.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Pod::Spec.new do |s|

s.swift_version = "5.10"
s.dependency "React-Core"
s.dependency "BitmovinPlayer", "3.79.0"
s.dependency "BitmovinPlayer", "3.81.0"
s.ios.dependency "GoogleAds-IMA-iOS-SDK", "3.23.0"
s.tvos.dependency "GoogleAds-IMA-tvOS-SDK", "4.13.0"
end
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import com.bitmovin.player.api.source.TimelineReferencePoint
import com.bitmovin.player.api.ui.PlayerViewConfig
import com.bitmovin.player.api.ui.ScalingMode
import com.bitmovin.player.api.ui.StyleConfig
import com.bitmovin.player.api.ui.SurfaceType
import com.bitmovin.player.api.ui.UiConfig
import com.bitmovin.player.reactnative.BitmovinCastManagerOptions
import com.bitmovin.player.reactnative.PictureInPictureConfig
Expand Down Expand Up @@ -772,8 +773,15 @@ fun ReadableMap.toPictureInPictureConfig(): PictureInPictureConfig = PictureInPi
fun ReadableMap.toPlayerViewConfig(): PlayerViewConfig = PlayerViewConfig(
uiConfig = getMap("uiConfig")?.toUiConfig() ?: UiConfig.WebUi(),
hideFirstFrame = getBooleanOrNull("hideFirstFrame") ?: false,
surfaceType = getString("surfaceType")?.toSurfaceType() ?: SurfaceType.SurfaceView,
)

private fun String.toSurfaceType(): SurfaceType? = when (this) {
"SurfaceView" -> SurfaceType.SurfaceView
"TextureView" -> SurfaceType.TextureView
else -> null
}

private fun ReadableMap.toUiConfig(): UiConfig {
val variant = toVariant() ?: UiConfig.WebUi.Variant.SmallScreenUi
val focusUiOnInitialization = getBooleanOrNull("focusUiOnInitialization")
Expand Down
16 changes: 8 additions & 8 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ PODS:
- BitmovinAnalyticsCollector/Core
- BitmovinPlayerCore (~> 3.48)
- BitmovinAnalyticsCollector/Core (3.9.0)
- BitmovinPlayer (3.79.0):
- BitmovinPlayer (3.81.0):
- BitmovinAnalyticsCollector/BitmovinPlayer (~> 3.0)
- BitmovinPlayerCore (= 3.79.0)
- BitmovinPlayerCore (3.79.0)
- BitmovinPlayerCore (= 3.81.0)
- BitmovinPlayerCore (3.81.0)
- boost (1.83.0)
- DoubleConversion (1.1.6)
- FBLazyVector (0.73.4-0)
Expand Down Expand Up @@ -1048,8 +1048,8 @@ PODS:
- React-jsi (= 0.73.4-0)
- React-logger (= 0.73.4-0)
- React-perflogger (= 0.73.4-0)
- RNBitmovinPlayer (0.35.0):
- BitmovinPlayer (= 3.79.0)
- RNBitmovinPlayer (0.36.0):
- BitmovinPlayer (= 3.81.0)
- GoogleAds-IMA-iOS-SDK (= 3.23.0)
- GoogleAds-IMA-tvOS-SDK (= 4.13.0)
- React-Core
Expand Down Expand Up @@ -1245,8 +1245,8 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
BitmovinAnalyticsCollector: d08e0b13bcc32973370e0d71f2faa739561bac0a
BitmovinPlayer: 1c19b819952c2c10c875569756593f2e177cf036
BitmovinPlayerCore: 299f35f2d8882140a80577c14bd3026beb0cae7c
BitmovinPlayer: 4dd87b63c192ceaa4b29db93a7c7430eece618dc
BitmovinPlayerCore: 63641d00a689efbca6fe97bb8f68aea91f303758
boost: 88202336c3ba1e7a264a83c0c888784b0f360c28
DoubleConversion: 74cb0ce4de271b23e772567504735c87134edf0a
FBLazyVector: 33a271a7e8de0bd321e47356d8bc3b2d5fb9ddba
Expand Down Expand Up @@ -1301,7 +1301,7 @@ SPEC CHECKSUMS:
React-runtimescheduler: 20b2202e3396589a71069d12ae9f328949c7c7b8
React-utils: 0307d396f233e47a167b5aaf045b0e4e1dc19d74
ReactCommon: 17891ca337bfa5a7263649b09f27a8c664537bf2
RNBitmovinPlayer: 14ae9eebaf04eb693ce3a713c85b13df52446a00
RNBitmovinPlayer: de83af231ba2a21f957c88ccdabc3541f73f81b3
RNCPicker: b18aaf30df596e9b1738e7c1f9ee55402a229dca
RNScreens: b582cb834dc4133307562e930e8fa914b8c04ef2
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
Expand Down
6 changes: 3 additions & 3 deletions example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3505,9 +3505,9 @@ [email protected]:
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==

nanoid@^3.1.23:
version "3.3.7"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8"
integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==
version "3.3.8"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.8.tgz#b1be3030bee36aaff18bacb375e5cce521684baf"
integrity sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==

[email protected]:
version "0.6.3"
Expand Down
16 changes: 8 additions & 8 deletions integration_test/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ PODS:
- BitmovinAnalyticsCollector/Core
- BitmovinPlayerCore (~> 3.48)
- BitmovinAnalyticsCollector/Core (3.9.0)
- BitmovinPlayer (3.79.0):
- BitmovinPlayer (3.81.0):
- BitmovinAnalyticsCollector/BitmovinPlayer (~> 3.0)
- BitmovinPlayerCore (= 3.79.0)
- BitmovinPlayerCore (3.79.0)
- BitmovinPlayerCore (= 3.81.0)
- BitmovinPlayerCore (3.81.0)
- boost (1.83.0)
- DoubleConversion (1.1.6)
- FBLazyVector (0.73.4-0)
Expand Down Expand Up @@ -1040,8 +1040,8 @@ PODS:
- React-jsi (= 0.73.4-0)
- React-logger (= 0.73.4-0)
- React-perflogger (= 0.73.4-0)
- RNBitmovinPlayer (0.35.0):
- BitmovinPlayer (= 3.79.0)
- RNBitmovinPlayer (0.36.0):
- BitmovinPlayer (= 3.81.0)
- GoogleAds-IMA-iOS-SDK (= 3.23.0)
- GoogleAds-IMA-tvOS-SDK (= 4.13.0)
- React-Core
Expand Down Expand Up @@ -1215,8 +1215,8 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
BitmovinAnalyticsCollector: d08e0b13bcc32973370e0d71f2faa739561bac0a
BitmovinPlayer: 1c19b819952c2c10c875569756593f2e177cf036
BitmovinPlayerCore: 299f35f2d8882140a80577c14bd3026beb0cae7c
BitmovinPlayer: 4dd87b63c192ceaa4b29db93a7c7430eece618dc
BitmovinPlayerCore: 63641d00a689efbca6fe97bb8f68aea91f303758
boost: 88202336c3ba1e7a264a83c0c888784b0f360c28
DoubleConversion: 74cb0ce4de271b23e772567504735c87134edf0a
FBLazyVector: 33a271a7e8de0bd321e47356d8bc3b2d5fb9ddba
Expand Down Expand Up @@ -1266,7 +1266,7 @@ SPEC CHECKSUMS:
React-runtimescheduler: 20b2202e3396589a71069d12ae9f328949c7c7b8
React-utils: 0307d396f233e47a167b5aaf045b0e4e1dc19d74
ReactCommon: 17891ca337bfa5a7263649b09f27a8c664537bf2
RNBitmovinPlayer: 14ae9eebaf04eb693ce3a713c85b13df52446a00
RNBitmovinPlayer: de83af231ba2a21f957c88ccdabc3541f73f81b3
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
Yoga: ab50eb8f7fcf1b36aad1801b5687b66b2c0aa000

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bitmovin-player-react-native",
"version": "0.35.0",
"version": "0.36.0",
"description": "Official React Native bindings for Bitmovin's mobile Player SDKs.",
"main": "lib/index.js",
"module": "lib/index.mjs",
Expand Down
28 changes: 28 additions & 0 deletions src/components/PlayerView/playerViewConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ export interface PlayerViewConfig {
* To reliably hide the first frame before a pre-roll ad, please ensure that you are using the {@link AdvertisingConfig} to schedule ads and not the {@link Player.scheduleAd} API call.
*/
hideFirstFrame?: boolean;

/**
* Specify on which surface type the video should be rendered.
*
* See {@link https://developer.android.com/guide/topics/media/ui/playerview#surfacetype|Choosing a surface type}
* for more information.
*
* Default is {@link SurfaceType.SurfaceView}.
*
* @platform Android
*/
surfaceType?: SurfaceType;
}

/**
Expand Down Expand Up @@ -97,3 +109,19 @@ export class CustomUi extends Variant {
super(uiManagerFactoryFunction);
}
}

/**
* The type of surface on which to render video.
*
* See {@link https://developer.android.com/guide/topics/media/ui/playerview#surfacetype|Choosing a surface type}
* for more information.
*/
export enum SurfaceType {
/**
* SurfaceView generally causes lower battery consumption,
* and has better handling for HDR and secure content.
*/
SurfaceView = 'SurfaceView',
/** TextureView is sometime needed for smooth animations. */
TextureView = 'TextureView',
}
Loading