bitmovin-player-react-native 0.28.0 → 0.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/RNBitmovinPlayer.podspec +1 -1
- package/android/build.gradle +2 -2
- package/android/src/main/java/com/bitmovin/player/reactnative/converter/JsonConverter.kt +27 -11
- package/ios/RCTConvert+BitmovinPlayer.swift +6 -1
- package/ios/RNPlayerViewManager.swift +1 -0
- package/lib/index.d.mts +52 -1
- package/lib/index.d.ts +52 -1
- package/lib/index.js +46 -0
- package/lib/index.mjs +42 -0
- package/package.json +1 -1
- package/src/adaptationConfig.ts +8 -0
- package/src/components/PlayerView/playerViewConfig.ts +53 -0
package/RNBitmovinPlayer.podspec
CHANGED
|
@@ -20,7 +20,7 @@ Pod::Spec.new do |s|
|
|
|
20
20
|
|
|
21
21
|
s.swift_version = "5.10"
|
|
22
22
|
s.dependency "React-Core"
|
|
23
|
-
s.dependency "BitmovinPlayer", "3.
|
|
23
|
+
s.dependency "BitmovinPlayer", "3.77.0"
|
|
24
24
|
s.ios.dependency "GoogleAds-IMA-iOS-SDK", "3.23.0"
|
|
25
25
|
s.tvos.dependency "GoogleAds-IMA-tvOS-SDK", "4.13.0"
|
|
26
26
|
end
|
package/android/build.gradle
CHANGED
|
@@ -103,7 +103,7 @@ dependencies {
|
|
|
103
103
|
implementation "androidx.concurrent:concurrent-futures-ktx:1.1.0"
|
|
104
104
|
|
|
105
105
|
// Bitmovin
|
|
106
|
-
implementation 'com.google.ads.interactivemedia.v3:interactivemedia:3.
|
|
106
|
+
implementation 'com.google.ads.interactivemedia.v3:interactivemedia:3.33.0'
|
|
107
107
|
implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
|
|
108
|
-
implementation 'com.bitmovin.player:player:3.
|
|
108
|
+
implementation 'com.bitmovin.player:player:3.90.0+jason'
|
|
109
109
|
}
|
|
@@ -144,6 +144,7 @@ private fun String.toTimelineReferencePoint(): TimelineReferencePoint? = when (t
|
|
|
144
144
|
*/
|
|
145
145
|
private fun ReadableMap.toAdaptationConfig(): AdaptationConfig = AdaptationConfig().apply {
|
|
146
146
|
withInt("maxSelectableBitrate") { maxSelectableVideoBitrate = it }
|
|
147
|
+
withInt("initialBandwidthEstimateOverride") { initialBandwidthEstimateOverride = it.toLong(); }
|
|
147
148
|
}
|
|
148
149
|
|
|
149
150
|
/**
|
|
@@ -751,18 +752,33 @@ fun ReadableMap.toPictureInPictureConfig(): PictureInPictureConfig = PictureInPi
|
|
|
751
752
|
isEnabled = getBooleanOrNull("isEnabled") ?: false,
|
|
752
753
|
)
|
|
753
754
|
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
fun toPlayerViewConfig(json: ReadableMap) = PlayerViewConfig(
|
|
758
|
-
uiConfig = UiConfig.WebUi(
|
|
759
|
-
playbackSpeedSelectionEnabled = json.getMap("uiConfig")
|
|
760
|
-
?.getBooleanOrNull("playbackSpeedSelectionEnabled")
|
|
761
|
-
?: true,
|
|
762
|
-
),
|
|
763
|
-
hideFirstFrame = json.getBooleanOrNull("hideFirstFrame") ?: false,
|
|
755
|
+
fun ReadableMap.toPlayerViewConfig(): PlayerViewConfig = PlayerViewConfig(
|
|
756
|
+
uiConfig = getMap("uiConfig")?.toUiConfig() ?: UiConfig.WebUi(),
|
|
757
|
+
hideFirstFrame = getBooleanOrNull("hideFirstFrame") ?: false,
|
|
764
758
|
)
|
|
765
759
|
|
|
760
|
+
private fun ReadableMap.toUiConfig(): UiConfig {
|
|
761
|
+
val variant = toVariant() ?: UiConfig.WebUi.Variant.SmallScreenUi
|
|
762
|
+
val focusUiOnInitialization = getBooleanOrNull("focusUiOnInitialization")
|
|
763
|
+
val defaultFocusUiOnInitialization = variant == UiConfig.WebUi.Variant.TvUi
|
|
764
|
+
|
|
765
|
+
return UiConfig.WebUi(
|
|
766
|
+
playbackSpeedSelectionEnabled = getBooleanOrNull("playbackSpeedSelectionEnabled") ?: true,
|
|
767
|
+
variant = variant,
|
|
768
|
+
focusUiOnInitialization = focusUiOnInitialization ?: defaultFocusUiOnInitialization,
|
|
769
|
+
)
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
private fun ReadableMap.toVariant(): UiConfig.WebUi.Variant? {
|
|
773
|
+
val uiManagerFactoryFunction = getMap("variant")?.getString("uiManagerFactoryFunction") ?: return null
|
|
774
|
+
|
|
775
|
+
return when (uiManagerFactoryFunction) {
|
|
776
|
+
"bitmovin.playerui.UIFactory.buildDefaultSmallScreenUI" -> UiConfig.WebUi.Variant.SmallScreenUi
|
|
777
|
+
"bitmovin.playerui.UIFactory.buildDefaultTvUI" -> UiConfig.WebUi.Variant.TvUi
|
|
778
|
+
else -> UiConfig.WebUi.Variant.Custom(uiManagerFactoryFunction)
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
|
|
766
782
|
private fun ReadableMap.toUserInterfaceTypeFromPlayerConfig(): UserInterfaceType? =
|
|
767
783
|
when (getMap("styleConfig")?.getString("userInterfaceType")) {
|
|
768
784
|
"Subtitle" -> UserInterfaceType.Subtitle
|
|
@@ -774,7 +790,7 @@ private fun ReadableMap.toUserInterfaceTypeFromPlayerConfig(): UserInterfaceType
|
|
|
774
790
|
* Converts the [this@toRNPlayerViewConfigWrapper] to a `RNPlayerViewConfig` object.
|
|
775
791
|
*/
|
|
776
792
|
fun ReadableMap.toRNPlayerViewConfigWrapper() = RNPlayerViewConfigWrapper(
|
|
777
|
-
playerViewConfig = toPlayerViewConfig(
|
|
793
|
+
playerViewConfig = toPlayerViewConfig(),
|
|
778
794
|
pictureInPictureConfig = getMap("pictureInPictureConfig")?.toPictureInPictureConfig(),
|
|
779
795
|
)
|
|
780
796
|
|
|
@@ -1239,9 +1239,13 @@ extension RCTConvert {
|
|
|
1239
1239
|
guard let json = json as? [String: Any?] else {
|
|
1240
1240
|
return nil
|
|
1241
1241
|
}
|
|
1242
|
+
let variant = json["variant"] as? [String: Any?]
|
|
1243
|
+
let uiManagerFactoryFunction = variant?["uiManagerFactoryFunction"] as? String
|
|
1244
|
+
let defaultUiManagerFactoryFunction = "bitmovin.playerui.UIFactory.buildDefaultSmallScreenUI"
|
|
1242
1245
|
|
|
1243
1246
|
return RNUiConfig(
|
|
1244
|
-
playbackSpeedSelectionEnabled: json["playbackSpeedSelectionEnabled"] as? Bool ?? true
|
|
1247
|
+
playbackSpeedSelectionEnabled: json["playbackSpeedSelectionEnabled"] as? Bool ?? true,
|
|
1248
|
+
uiManagerFactoryFunction: uiManagerFactoryFunction ?? defaultUiManagerFactoryFunction
|
|
1245
1249
|
)
|
|
1246
1250
|
}
|
|
1247
1251
|
|
|
@@ -1369,6 +1373,7 @@ internal struct RNPlayerViewConfig {
|
|
|
1369
1373
|
*/
|
|
1370
1374
|
internal struct RNUiConfig {
|
|
1371
1375
|
let playbackSpeedSelectionEnabled: Bool
|
|
1376
|
+
let uiManagerFactoryFunction: String
|
|
1372
1377
|
}
|
|
1373
1378
|
|
|
1374
1379
|
/**
|
|
@@ -74,6 +74,7 @@ public class RNPlayerViewManager: RCTViewManager {
|
|
|
74
74
|
if let uiConfig = playerViewConfig?.uiConfig {
|
|
75
75
|
bitmovinUserInterfaceConfig
|
|
76
76
|
.playbackSpeedSelectionEnabled = uiConfig.playbackSpeedSelectionEnabled
|
|
77
|
+
bitmovinUserInterfaceConfig.uiManagerFactoryFunction = uiConfig.uiManagerFactoryFunction
|
|
77
78
|
}
|
|
78
79
|
if let hideFirstFrame = playerViewConfig?.hideFirstFrame {
|
|
79
80
|
bitmovinUserInterfaceConfig.hideFirstFrame = hideFirstFrame
|
package/lib/index.d.mts
CHANGED
|
@@ -10,6 +10,13 @@ interface AdaptationConfig {
|
|
|
10
10
|
* Can be set to `undefined` for no limitation.
|
|
11
11
|
*/
|
|
12
12
|
maxSelectableBitrate?: number;
|
|
13
|
+
/**
|
|
14
|
+
* The initial bandwidth estimate in bits per second the player uses to select the optimal media tracks before actual bandwidth data is available. Overriding this value should only be done in specific cases and will most of the time not result in better selection logic.
|
|
15
|
+
*
|
|
16
|
+
* @platform Android
|
|
17
|
+
* @see https://cdn.bitmovin.com/player/android/3/docs/player-core/com.bitmovin.player.api.media/-adaptation-config/initial-bandwidth-estimate-override.html
|
|
18
|
+
*/
|
|
19
|
+
initialBandwidthEstimateOverride?: number;
|
|
13
20
|
}
|
|
14
21
|
|
|
15
22
|
/**
|
|
@@ -3702,6 +3709,50 @@ interface WebUiConfig extends UiConfig {
|
|
|
3702
3709
|
* Default is `true`.
|
|
3703
3710
|
*/
|
|
3704
3711
|
playbackSpeedSelectionEnabled?: boolean;
|
|
3712
|
+
/**
|
|
3713
|
+
* The UI variant to use for the Bitmovin Player Web UI.
|
|
3714
|
+
*
|
|
3715
|
+
* Default is {@link SmallScreenUi}
|
|
3716
|
+
*/
|
|
3717
|
+
variant?: Variant;
|
|
3718
|
+
/**
|
|
3719
|
+
* Whether the WebView should be focused on initialization.
|
|
3720
|
+
*
|
|
3721
|
+
* By default this is enabled only for the TV UI variant, as it's needed there to
|
|
3722
|
+
* initiate spatial navigation using the remote control.
|
|
3723
|
+
*
|
|
3724
|
+
* @platform Android
|
|
3725
|
+
*/
|
|
3726
|
+
focusUiOnInitialization?: boolean;
|
|
3727
|
+
}
|
|
3728
|
+
declare abstract class Variant {
|
|
3729
|
+
readonly uiManagerFactoryFunction: string;
|
|
3730
|
+
/**
|
|
3731
|
+
* Specifies the function name that will be used to initialize the `UIManager`
|
|
3732
|
+
* for the Bitmovin Player Web UI.
|
|
3733
|
+
*
|
|
3734
|
+
* The function is called on the `window` object with the `Player` as the first argument and
|
|
3735
|
+
* the `UIConfig` as the second argument.
|
|
3736
|
+
*
|
|
3737
|
+
* Example:
|
|
3738
|
+
* When you added a new function or want to use a different function of our `UIFactory`,
|
|
3739
|
+
* you can specify the full qualifier name including namespaces.
|
|
3740
|
+
* e.g. `bitmovin.playerui.UIFactory.buildDefaultSmallScreenUI` for the SmallScreenUi.
|
|
3741
|
+
* @see UIFactory https://github.com/bitmovin/bitmovin-player-ui/blob/develop/src/ts/uifactory.ts#L60
|
|
3742
|
+
*
|
|
3743
|
+
* Notes:
|
|
3744
|
+
* - It's not necessary to use our `UIFactory`. Any static function can be specified.
|
|
3745
|
+
*/
|
|
3746
|
+
constructor(uiManagerFactoryFunction: string);
|
|
3747
|
+
}
|
|
3748
|
+
declare class SmallScreenUi extends Variant {
|
|
3749
|
+
constructor();
|
|
3750
|
+
}
|
|
3751
|
+
declare class TvUi extends Variant {
|
|
3752
|
+
constructor();
|
|
3753
|
+
}
|
|
3754
|
+
declare class CustomUi extends Variant {
|
|
3755
|
+
constructor(uiManagerFactoryFunction: string);
|
|
3705
3756
|
}
|
|
3706
3757
|
|
|
3707
3758
|
/**
|
|
@@ -3875,4 +3926,4 @@ declare class Network extends NativeInstance<NetworkConfig> {
|
|
|
3875
3926
|
onPreprocessHttpResponse: (responseId: string, type: HttpRequestType, response: HttpResponse) => void;
|
|
3876
3927
|
}
|
|
3877
3928
|
|
|
3878
|
-
export { Ad, AdBreak, AdBreakFinishedEvent, AdBreakStartedEvent, AdClickedEvent, AdConfig, AdData, AdErrorEvent, AdFinishedEvent, AdItem, AdManifestLoadEvent, AdManifestLoadedEvent, AdQuartile, AdQuartileEvent, AdScheduledEvent, AdSkippedEvent, AdSource, AdSourceType, AdStartedEvent, AdaptationConfig, AdvertisingConfig, AnalyticsApi, AnalyticsConfig, AudioAddedEvent, AudioChangedEvent, AudioRemovedEvent, AudioSession, AudioSessionCategory, AudioTrack, BasePlayerViewProps, BitmovinCastManager, BitmovinCastManagerOptions, BitmovinNativeOfflineEventData, BufferApi, BufferConfig, BufferLevel, BufferLevels, BufferMediaTypeConfig, BufferType, CastAvailableEvent, CastPausedEvent, CastPayload, CastPlaybackFinishedEvent, CastPlayingEvent, CastStartEvent, CastStartedEvent, CastStoppedEvent, CastTimeUpdatedEvent, CastWaitingForDeviceEvent, CueEnterEvent, CueExitEvent, CustomDataConfig, CustomMessageHandler, CustomMessageHandlerProps, DefaultMetadata, DestroyEvent, DownloadFinishedEvent, Drm, DrmConfig, ErrorEvent, Event, EventSource, FairplayConfig, FullscreenDisabledEvent, FullscreenEnabledEvent, FullscreenEnterEvent, FullscreenExitEvent, FullscreenHandler, HttpRequest, HttpRequestType, HttpResponse, LiveConfig, LoadingState, MediaType, MutedEvent, Network, NetworkConfig, OfflineContentConfig, OfflineContentManager, OfflineContentManagerListener, OfflineContentOptionEntry, OfflineContentOptions, OfflineDownloadRequest, OfflineEvent, OfflineEventType, OfflineSourceOptions, OfflineState, OnCanceledEvent, OnCompletedEvent, OnDrmLicenseExpiredEvent, OnDrmLicenseUpdatedEvent, OnErrorEvent, OnOptionsAvailableEvent, OnProgressEvent, OnResumedEvent, OnSuspendedEvent, PausedEvent, PictureInPictureAvailabilityChangedEvent, PictureInPictureConfig, PictureInPictureEnterEvent, PictureInPictureEnteredEvent, PictureInPictureExitEvent, PictureInPictureExitedEvent, PlayEvent, PlaybackConfig, PlaybackFinishedEvent, PlaybackSpeedChangedEvent, Player, PlayerActiveEvent, PlayerConfig, PlayerErrorEvent, PlayerView, PlayerViewConfig, PlayerViewProps, PlayerWarningEvent, PlayingEvent, ReadyEvent, RemoteControlConfig, ScalingMode, SeekEvent, SeekPosition, SeekedEvent, SideLoadedSubtitleTrack, Source, SourceConfig, SourceErrorEvent, SourceLoadEvent, SourceLoadedEvent, SourceMetadata, SourceOptions, SourceRemoteControlConfig, SourceType, SourceUnloadedEvent, SourceWarningEvent, StallEndedEvent, StallStartedEvent, StyleConfig, SubtitleAddedEvent, SubtitleChangedEvent, SubtitleFormat, SubtitleRemovedEvent, SubtitleTrack, Thumbnail, TimeChangedEvent, TimeShiftEvent, TimeShiftedEvent, TimelineReferencePoint, TweaksConfig, UiConfig, UnmutedEvent, UserInterfaceType, VideoDownloadQualityChangedEvent, VideoPlaybackQualityChangedEvent, VideoQuality, WebUiConfig, WidevineConfig, usePlayer };
|
|
3929
|
+
export { Ad, AdBreak, AdBreakFinishedEvent, AdBreakStartedEvent, AdClickedEvent, AdConfig, AdData, AdErrorEvent, AdFinishedEvent, AdItem, AdManifestLoadEvent, AdManifestLoadedEvent, AdQuartile, AdQuartileEvent, AdScheduledEvent, AdSkippedEvent, AdSource, AdSourceType, AdStartedEvent, AdaptationConfig, AdvertisingConfig, AnalyticsApi, AnalyticsConfig, AudioAddedEvent, AudioChangedEvent, AudioRemovedEvent, AudioSession, AudioSessionCategory, AudioTrack, BasePlayerViewProps, BitmovinCastManager, BitmovinCastManagerOptions, BitmovinNativeOfflineEventData, BufferApi, BufferConfig, BufferLevel, BufferLevels, BufferMediaTypeConfig, BufferType, CastAvailableEvent, CastPausedEvent, CastPayload, CastPlaybackFinishedEvent, CastPlayingEvent, CastStartEvent, CastStartedEvent, CastStoppedEvent, CastTimeUpdatedEvent, CastWaitingForDeviceEvent, CueEnterEvent, CueExitEvent, CustomDataConfig, CustomMessageHandler, CustomMessageHandlerProps, CustomUi, DefaultMetadata, DestroyEvent, DownloadFinishedEvent, Drm, DrmConfig, ErrorEvent, Event, EventSource, FairplayConfig, FullscreenDisabledEvent, FullscreenEnabledEvent, FullscreenEnterEvent, FullscreenExitEvent, FullscreenHandler, HttpRequest, HttpRequestType, HttpResponse, LiveConfig, LoadingState, MediaType, MutedEvent, Network, NetworkConfig, OfflineContentConfig, OfflineContentManager, OfflineContentManagerListener, OfflineContentOptionEntry, OfflineContentOptions, OfflineDownloadRequest, OfflineEvent, OfflineEventType, OfflineSourceOptions, OfflineState, OnCanceledEvent, OnCompletedEvent, OnDrmLicenseExpiredEvent, OnDrmLicenseUpdatedEvent, OnErrorEvent, OnOptionsAvailableEvent, OnProgressEvent, OnResumedEvent, OnSuspendedEvent, PausedEvent, PictureInPictureAvailabilityChangedEvent, PictureInPictureConfig, PictureInPictureEnterEvent, PictureInPictureEnteredEvent, PictureInPictureExitEvent, PictureInPictureExitedEvent, PlayEvent, PlaybackConfig, PlaybackFinishedEvent, PlaybackSpeedChangedEvent, Player, PlayerActiveEvent, PlayerConfig, PlayerErrorEvent, PlayerView, PlayerViewConfig, PlayerViewProps, PlayerWarningEvent, PlayingEvent, ReadyEvent, RemoteControlConfig, ScalingMode, SeekEvent, SeekPosition, SeekedEvent, SideLoadedSubtitleTrack, SmallScreenUi, Source, SourceConfig, SourceErrorEvent, SourceLoadEvent, SourceLoadedEvent, SourceMetadata, SourceOptions, SourceRemoteControlConfig, SourceType, SourceUnloadedEvent, SourceWarningEvent, StallEndedEvent, StallStartedEvent, StyleConfig, SubtitleAddedEvent, SubtitleChangedEvent, SubtitleFormat, SubtitleRemovedEvent, SubtitleTrack, Thumbnail, TimeChangedEvent, TimeShiftEvent, TimeShiftedEvent, TimelineReferencePoint, TvUi, TweaksConfig, UiConfig, UnmutedEvent, UserInterfaceType, Variant, VideoDownloadQualityChangedEvent, VideoPlaybackQualityChangedEvent, VideoQuality, WebUiConfig, WidevineConfig, usePlayer };
|
package/lib/index.d.ts
CHANGED
|
@@ -10,6 +10,13 @@ interface AdaptationConfig {
|
|
|
10
10
|
* Can be set to `undefined` for no limitation.
|
|
11
11
|
*/
|
|
12
12
|
maxSelectableBitrate?: number;
|
|
13
|
+
/**
|
|
14
|
+
* The initial bandwidth estimate in bits per second the player uses to select the optimal media tracks before actual bandwidth data is available. Overriding this value should only be done in specific cases and will most of the time not result in better selection logic.
|
|
15
|
+
*
|
|
16
|
+
* @platform Android
|
|
17
|
+
* @see https://cdn.bitmovin.com/player/android/3/docs/player-core/com.bitmovin.player.api.media/-adaptation-config/initial-bandwidth-estimate-override.html
|
|
18
|
+
*/
|
|
19
|
+
initialBandwidthEstimateOverride?: number;
|
|
13
20
|
}
|
|
14
21
|
|
|
15
22
|
/**
|
|
@@ -3702,6 +3709,50 @@ interface WebUiConfig extends UiConfig {
|
|
|
3702
3709
|
* Default is `true`.
|
|
3703
3710
|
*/
|
|
3704
3711
|
playbackSpeedSelectionEnabled?: boolean;
|
|
3712
|
+
/**
|
|
3713
|
+
* The UI variant to use for the Bitmovin Player Web UI.
|
|
3714
|
+
*
|
|
3715
|
+
* Default is {@link SmallScreenUi}
|
|
3716
|
+
*/
|
|
3717
|
+
variant?: Variant;
|
|
3718
|
+
/**
|
|
3719
|
+
* Whether the WebView should be focused on initialization.
|
|
3720
|
+
*
|
|
3721
|
+
* By default this is enabled only for the TV UI variant, as it's needed there to
|
|
3722
|
+
* initiate spatial navigation using the remote control.
|
|
3723
|
+
*
|
|
3724
|
+
* @platform Android
|
|
3725
|
+
*/
|
|
3726
|
+
focusUiOnInitialization?: boolean;
|
|
3727
|
+
}
|
|
3728
|
+
declare abstract class Variant {
|
|
3729
|
+
readonly uiManagerFactoryFunction: string;
|
|
3730
|
+
/**
|
|
3731
|
+
* Specifies the function name that will be used to initialize the `UIManager`
|
|
3732
|
+
* for the Bitmovin Player Web UI.
|
|
3733
|
+
*
|
|
3734
|
+
* The function is called on the `window` object with the `Player` as the first argument and
|
|
3735
|
+
* the `UIConfig` as the second argument.
|
|
3736
|
+
*
|
|
3737
|
+
* Example:
|
|
3738
|
+
* When you added a new function or want to use a different function of our `UIFactory`,
|
|
3739
|
+
* you can specify the full qualifier name including namespaces.
|
|
3740
|
+
* e.g. `bitmovin.playerui.UIFactory.buildDefaultSmallScreenUI` for the SmallScreenUi.
|
|
3741
|
+
* @see UIFactory https://github.com/bitmovin/bitmovin-player-ui/blob/develop/src/ts/uifactory.ts#L60
|
|
3742
|
+
*
|
|
3743
|
+
* Notes:
|
|
3744
|
+
* - It's not necessary to use our `UIFactory`. Any static function can be specified.
|
|
3745
|
+
*/
|
|
3746
|
+
constructor(uiManagerFactoryFunction: string);
|
|
3747
|
+
}
|
|
3748
|
+
declare class SmallScreenUi extends Variant {
|
|
3749
|
+
constructor();
|
|
3750
|
+
}
|
|
3751
|
+
declare class TvUi extends Variant {
|
|
3752
|
+
constructor();
|
|
3753
|
+
}
|
|
3754
|
+
declare class CustomUi extends Variant {
|
|
3755
|
+
constructor(uiManagerFactoryFunction: string);
|
|
3705
3756
|
}
|
|
3706
3757
|
|
|
3707
3758
|
/**
|
|
@@ -3875,4 +3926,4 @@ declare class Network extends NativeInstance<NetworkConfig> {
|
|
|
3875
3926
|
onPreprocessHttpResponse: (responseId: string, type: HttpRequestType, response: HttpResponse) => void;
|
|
3876
3927
|
}
|
|
3877
3928
|
|
|
3878
|
-
export { Ad, AdBreak, AdBreakFinishedEvent, AdBreakStartedEvent, AdClickedEvent, AdConfig, AdData, AdErrorEvent, AdFinishedEvent, AdItem, AdManifestLoadEvent, AdManifestLoadedEvent, AdQuartile, AdQuartileEvent, AdScheduledEvent, AdSkippedEvent, AdSource, AdSourceType, AdStartedEvent, AdaptationConfig, AdvertisingConfig, AnalyticsApi, AnalyticsConfig, AudioAddedEvent, AudioChangedEvent, AudioRemovedEvent, AudioSession, AudioSessionCategory, AudioTrack, BasePlayerViewProps, BitmovinCastManager, BitmovinCastManagerOptions, BitmovinNativeOfflineEventData, BufferApi, BufferConfig, BufferLevel, BufferLevels, BufferMediaTypeConfig, BufferType, CastAvailableEvent, CastPausedEvent, CastPayload, CastPlaybackFinishedEvent, CastPlayingEvent, CastStartEvent, CastStartedEvent, CastStoppedEvent, CastTimeUpdatedEvent, CastWaitingForDeviceEvent, CueEnterEvent, CueExitEvent, CustomDataConfig, CustomMessageHandler, CustomMessageHandlerProps, DefaultMetadata, DestroyEvent, DownloadFinishedEvent, Drm, DrmConfig, ErrorEvent, Event, EventSource, FairplayConfig, FullscreenDisabledEvent, FullscreenEnabledEvent, FullscreenEnterEvent, FullscreenExitEvent, FullscreenHandler, HttpRequest, HttpRequestType, HttpResponse, LiveConfig, LoadingState, MediaType, MutedEvent, Network, NetworkConfig, OfflineContentConfig, OfflineContentManager, OfflineContentManagerListener, OfflineContentOptionEntry, OfflineContentOptions, OfflineDownloadRequest, OfflineEvent, OfflineEventType, OfflineSourceOptions, OfflineState, OnCanceledEvent, OnCompletedEvent, OnDrmLicenseExpiredEvent, OnDrmLicenseUpdatedEvent, OnErrorEvent, OnOptionsAvailableEvent, OnProgressEvent, OnResumedEvent, OnSuspendedEvent, PausedEvent, PictureInPictureAvailabilityChangedEvent, PictureInPictureConfig, PictureInPictureEnterEvent, PictureInPictureEnteredEvent, PictureInPictureExitEvent, PictureInPictureExitedEvent, PlayEvent, PlaybackConfig, PlaybackFinishedEvent, PlaybackSpeedChangedEvent, Player, PlayerActiveEvent, PlayerConfig, PlayerErrorEvent, PlayerView, PlayerViewConfig, PlayerViewProps, PlayerWarningEvent, PlayingEvent, ReadyEvent, RemoteControlConfig, ScalingMode, SeekEvent, SeekPosition, SeekedEvent, SideLoadedSubtitleTrack, Source, SourceConfig, SourceErrorEvent, SourceLoadEvent, SourceLoadedEvent, SourceMetadata, SourceOptions, SourceRemoteControlConfig, SourceType, SourceUnloadedEvent, SourceWarningEvent, StallEndedEvent, StallStartedEvent, StyleConfig, SubtitleAddedEvent, SubtitleChangedEvent, SubtitleFormat, SubtitleRemovedEvent, SubtitleTrack, Thumbnail, TimeChangedEvent, TimeShiftEvent, TimeShiftedEvent, TimelineReferencePoint, TweaksConfig, UiConfig, UnmutedEvent, UserInterfaceType, VideoDownloadQualityChangedEvent, VideoPlaybackQualityChangedEvent, VideoQuality, WebUiConfig, WidevineConfig, usePlayer };
|
|
3929
|
+
export { Ad, AdBreak, AdBreakFinishedEvent, AdBreakStartedEvent, AdClickedEvent, AdConfig, AdData, AdErrorEvent, AdFinishedEvent, AdItem, AdManifestLoadEvent, AdManifestLoadedEvent, AdQuartile, AdQuartileEvent, AdScheduledEvent, AdSkippedEvent, AdSource, AdSourceType, AdStartedEvent, AdaptationConfig, AdvertisingConfig, AnalyticsApi, AnalyticsConfig, AudioAddedEvent, AudioChangedEvent, AudioRemovedEvent, AudioSession, AudioSessionCategory, AudioTrack, BasePlayerViewProps, BitmovinCastManager, BitmovinCastManagerOptions, BitmovinNativeOfflineEventData, BufferApi, BufferConfig, BufferLevel, BufferLevels, BufferMediaTypeConfig, BufferType, CastAvailableEvent, CastPausedEvent, CastPayload, CastPlaybackFinishedEvent, CastPlayingEvent, CastStartEvent, CastStartedEvent, CastStoppedEvent, CastTimeUpdatedEvent, CastWaitingForDeviceEvent, CueEnterEvent, CueExitEvent, CustomDataConfig, CustomMessageHandler, CustomMessageHandlerProps, CustomUi, DefaultMetadata, DestroyEvent, DownloadFinishedEvent, Drm, DrmConfig, ErrorEvent, Event, EventSource, FairplayConfig, FullscreenDisabledEvent, FullscreenEnabledEvent, FullscreenEnterEvent, FullscreenExitEvent, FullscreenHandler, HttpRequest, HttpRequestType, HttpResponse, LiveConfig, LoadingState, MediaType, MutedEvent, Network, NetworkConfig, OfflineContentConfig, OfflineContentManager, OfflineContentManagerListener, OfflineContentOptionEntry, OfflineContentOptions, OfflineDownloadRequest, OfflineEvent, OfflineEventType, OfflineSourceOptions, OfflineState, OnCanceledEvent, OnCompletedEvent, OnDrmLicenseExpiredEvent, OnDrmLicenseUpdatedEvent, OnErrorEvent, OnOptionsAvailableEvent, OnProgressEvent, OnResumedEvent, OnSuspendedEvent, PausedEvent, PictureInPictureAvailabilityChangedEvent, PictureInPictureConfig, PictureInPictureEnterEvent, PictureInPictureEnteredEvent, PictureInPictureExitEvent, PictureInPictureExitedEvent, PlayEvent, PlaybackConfig, PlaybackFinishedEvent, PlaybackSpeedChangedEvent, Player, PlayerActiveEvent, PlayerConfig, PlayerErrorEvent, PlayerView, PlayerViewConfig, PlayerViewProps, PlayerWarningEvent, PlayingEvent, ReadyEvent, RemoteControlConfig, ScalingMode, SeekEvent, SeekPosition, SeekedEvent, SideLoadedSubtitleTrack, SmallScreenUi, Source, SourceConfig, SourceErrorEvent, SourceLoadEvent, SourceLoadedEvent, SourceMetadata, SourceOptions, SourceRemoteControlConfig, SourceType, SourceUnloadedEvent, SourceWarningEvent, StallEndedEvent, StallStartedEvent, StyleConfig, SubtitleAddedEvent, SubtitleChangedEvent, SubtitleFormat, SubtitleRemovedEvent, SubtitleTrack, Thumbnail, TimeChangedEvent, TimeShiftEvent, TimeShiftedEvent, TimelineReferencePoint, TvUi, TweaksConfig, UiConfig, UnmutedEvent, UserInterfaceType, Variant, VideoDownloadQualityChangedEvent, VideoPlaybackQualityChangedEvent, VideoQuality, WebUiConfig, WidevineConfig, usePlayer };
|
package/lib/index.js
CHANGED
|
@@ -43,6 +43,7 @@ __export(src_exports, {
|
|
|
43
43
|
BufferApi: () => BufferApi,
|
|
44
44
|
BufferType: () => BufferType,
|
|
45
45
|
CustomMessageHandler: () => CustomMessageHandler,
|
|
46
|
+
CustomUi: () => CustomUi,
|
|
46
47
|
Drm: () => Drm,
|
|
47
48
|
HttpRequestType: () => HttpRequestType,
|
|
48
49
|
LoadingState: () => LoadingState,
|
|
@@ -54,11 +55,14 @@ __export(src_exports, {
|
|
|
54
55
|
Player: () => Player,
|
|
55
56
|
PlayerView: () => PlayerView,
|
|
56
57
|
ScalingMode: () => ScalingMode,
|
|
58
|
+
SmallScreenUi: () => SmallScreenUi,
|
|
57
59
|
Source: () => Source,
|
|
58
60
|
SourceType: () => SourceType,
|
|
59
61
|
SubtitleFormat: () => SubtitleFormat,
|
|
60
62
|
TimelineReferencePoint: () => TimelineReferencePoint,
|
|
63
|
+
TvUi: () => TvUi,
|
|
61
64
|
UserInterfaceType: () => UserInterfaceType,
|
|
65
|
+
Variant: () => Variant,
|
|
62
66
|
usePlayer: () => usePlayer
|
|
63
67
|
});
|
|
64
68
|
module.exports = __toCommonJS(src_exports);
|
|
@@ -455,6 +459,44 @@ function PlayerView({
|
|
|
455
459
|
);
|
|
456
460
|
}
|
|
457
461
|
|
|
462
|
+
// src/components/PlayerView/playerViewConfig.ts
|
|
463
|
+
var Variant = class {
|
|
464
|
+
/**
|
|
465
|
+
* Specifies the function name that will be used to initialize the `UIManager`
|
|
466
|
+
* for the Bitmovin Player Web UI.
|
|
467
|
+
*
|
|
468
|
+
* The function is called on the `window` object with the `Player` as the first argument and
|
|
469
|
+
* the `UIConfig` as the second argument.
|
|
470
|
+
*
|
|
471
|
+
* Example:
|
|
472
|
+
* When you added a new function or want to use a different function of our `UIFactory`,
|
|
473
|
+
* you can specify the full qualifier name including namespaces.
|
|
474
|
+
* e.g. `bitmovin.playerui.UIFactory.buildDefaultSmallScreenUI` for the SmallScreenUi.
|
|
475
|
+
* @see UIFactory https://github.com/bitmovin/bitmovin-player-ui/blob/develop/src/ts/uifactory.ts#L60
|
|
476
|
+
*
|
|
477
|
+
* Notes:
|
|
478
|
+
* - It's not necessary to use our `UIFactory`. Any static function can be specified.
|
|
479
|
+
*/
|
|
480
|
+
constructor(uiManagerFactoryFunction) {
|
|
481
|
+
this.uiManagerFactoryFunction = uiManagerFactoryFunction;
|
|
482
|
+
}
|
|
483
|
+
};
|
|
484
|
+
var SmallScreenUi = class extends Variant {
|
|
485
|
+
constructor() {
|
|
486
|
+
super("bitmovin.playerui.UIFactory.buildDefaultSmallScreenUI");
|
|
487
|
+
}
|
|
488
|
+
};
|
|
489
|
+
var TvUi = class extends Variant {
|
|
490
|
+
constructor() {
|
|
491
|
+
super("bitmovin.playerui.UIFactory.buildDefaultTvUI");
|
|
492
|
+
}
|
|
493
|
+
};
|
|
494
|
+
var CustomUi = class extends Variant {
|
|
495
|
+
constructor(uiManagerFactoryFunction) {
|
|
496
|
+
super(uiManagerFactoryFunction);
|
|
497
|
+
}
|
|
498
|
+
};
|
|
499
|
+
|
|
458
500
|
// src/drm/index.ts
|
|
459
501
|
var import_react_native9 = require("react-native");
|
|
460
502
|
var import_BatchedBridge3 = __toESM(require("react-native/Libraries/BatchedBridge/BatchedBridge"));
|
|
@@ -1681,6 +1723,7 @@ var BitmovinCastManager = {
|
|
|
1681
1723
|
BufferApi,
|
|
1682
1724
|
BufferType,
|
|
1683
1725
|
CustomMessageHandler,
|
|
1726
|
+
CustomUi,
|
|
1684
1727
|
Drm,
|
|
1685
1728
|
HttpRequestType,
|
|
1686
1729
|
LoadingState,
|
|
@@ -1692,10 +1735,13 @@ var BitmovinCastManager = {
|
|
|
1692
1735
|
Player,
|
|
1693
1736
|
PlayerView,
|
|
1694
1737
|
ScalingMode,
|
|
1738
|
+
SmallScreenUi,
|
|
1695
1739
|
Source,
|
|
1696
1740
|
SourceType,
|
|
1697
1741
|
SubtitleFormat,
|
|
1698
1742
|
TimelineReferencePoint,
|
|
1743
|
+
TvUi,
|
|
1699
1744
|
UserInterfaceType,
|
|
1745
|
+
Variant,
|
|
1700
1746
|
usePlayer
|
|
1701
1747
|
});
|
package/lib/index.mjs
CHANGED
|
@@ -402,6 +402,44 @@ function PlayerView({
|
|
|
402
402
|
);
|
|
403
403
|
}
|
|
404
404
|
|
|
405
|
+
// src/components/PlayerView/playerViewConfig.ts
|
|
406
|
+
var Variant = class {
|
|
407
|
+
/**
|
|
408
|
+
* Specifies the function name that will be used to initialize the `UIManager`
|
|
409
|
+
* for the Bitmovin Player Web UI.
|
|
410
|
+
*
|
|
411
|
+
* The function is called on the `window` object with the `Player` as the first argument and
|
|
412
|
+
* the `UIConfig` as the second argument.
|
|
413
|
+
*
|
|
414
|
+
* Example:
|
|
415
|
+
* When you added a new function or want to use a different function of our `UIFactory`,
|
|
416
|
+
* you can specify the full qualifier name including namespaces.
|
|
417
|
+
* e.g. `bitmovin.playerui.UIFactory.buildDefaultSmallScreenUI` for the SmallScreenUi.
|
|
418
|
+
* @see UIFactory https://github.com/bitmovin/bitmovin-player-ui/blob/develop/src/ts/uifactory.ts#L60
|
|
419
|
+
*
|
|
420
|
+
* Notes:
|
|
421
|
+
* - It's not necessary to use our `UIFactory`. Any static function can be specified.
|
|
422
|
+
*/
|
|
423
|
+
constructor(uiManagerFactoryFunction) {
|
|
424
|
+
this.uiManagerFactoryFunction = uiManagerFactoryFunction;
|
|
425
|
+
}
|
|
426
|
+
};
|
|
427
|
+
var SmallScreenUi = class extends Variant {
|
|
428
|
+
constructor() {
|
|
429
|
+
super("bitmovin.playerui.UIFactory.buildDefaultSmallScreenUI");
|
|
430
|
+
}
|
|
431
|
+
};
|
|
432
|
+
var TvUi = class extends Variant {
|
|
433
|
+
constructor() {
|
|
434
|
+
super("bitmovin.playerui.UIFactory.buildDefaultTvUI");
|
|
435
|
+
}
|
|
436
|
+
};
|
|
437
|
+
var CustomUi = class extends Variant {
|
|
438
|
+
constructor(uiManagerFactoryFunction) {
|
|
439
|
+
super(uiManagerFactoryFunction);
|
|
440
|
+
}
|
|
441
|
+
};
|
|
442
|
+
|
|
405
443
|
// src/drm/index.ts
|
|
406
444
|
import { NativeModules as NativeModules6, Platform as Platform2 } from "react-native";
|
|
407
445
|
import BatchedBridge3 from "react-native/Libraries/BatchedBridge/BatchedBridge";
|
|
@@ -1630,6 +1668,7 @@ export {
|
|
|
1630
1668
|
BufferApi,
|
|
1631
1669
|
BufferType,
|
|
1632
1670
|
CustomMessageHandler,
|
|
1671
|
+
CustomUi,
|
|
1633
1672
|
Drm,
|
|
1634
1673
|
HttpRequestType,
|
|
1635
1674
|
LoadingState,
|
|
@@ -1641,10 +1680,13 @@ export {
|
|
|
1641
1680
|
Player,
|
|
1642
1681
|
PlayerView,
|
|
1643
1682
|
ScalingMode,
|
|
1683
|
+
SmallScreenUi,
|
|
1644
1684
|
Source,
|
|
1645
1685
|
SourceType,
|
|
1646
1686
|
SubtitleFormat,
|
|
1647
1687
|
TimelineReferencePoint,
|
|
1688
|
+
TvUi,
|
|
1648
1689
|
UserInterfaceType,
|
|
1690
|
+
Variant,
|
|
1649
1691
|
usePlayer
|
|
1650
1692
|
};
|
package/package.json
CHANGED
package/src/adaptationConfig.ts
CHANGED
|
@@ -7,4 +7,12 @@ export interface AdaptationConfig {
|
|
|
7
7
|
* Can be set to `undefined` for no limitation.
|
|
8
8
|
*/
|
|
9
9
|
maxSelectableBitrate?: number;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The initial bandwidth estimate in bits per second the player uses to select the optimal media tracks before actual bandwidth data is available. Overriding this value should only be done in specific cases and will most of the time not result in better selection logic.
|
|
13
|
+
*
|
|
14
|
+
* @platform Android
|
|
15
|
+
* @see https://cdn.bitmovin.com/player/android/3/docs/player-core/com.bitmovin.player.api.media/-adaptation-config/initial-bandwidth-estimate-override.html
|
|
16
|
+
*/
|
|
17
|
+
initialBandwidthEstimateOverride?: number;
|
|
10
18
|
}
|
|
@@ -43,4 +43,57 @@ export interface WebUiConfig extends UiConfig {
|
|
|
43
43
|
* Default is `true`.
|
|
44
44
|
*/
|
|
45
45
|
playbackSpeedSelectionEnabled?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* The UI variant to use for the Bitmovin Player Web UI.
|
|
48
|
+
*
|
|
49
|
+
* Default is {@link SmallScreenUi}
|
|
50
|
+
*/
|
|
51
|
+
variant?: Variant;
|
|
52
|
+
/**
|
|
53
|
+
* Whether the WebView should be focused on initialization.
|
|
54
|
+
*
|
|
55
|
+
* By default this is enabled only for the TV UI variant, as it's needed there to
|
|
56
|
+
* initiate spatial navigation using the remote control.
|
|
57
|
+
*
|
|
58
|
+
* @platform Android
|
|
59
|
+
*/
|
|
60
|
+
focusUiOnInitialization?: boolean;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export abstract class Variant {
|
|
64
|
+
/**
|
|
65
|
+
* Specifies the function name that will be used to initialize the `UIManager`
|
|
66
|
+
* for the Bitmovin Player Web UI.
|
|
67
|
+
*
|
|
68
|
+
* The function is called on the `window` object with the `Player` as the first argument and
|
|
69
|
+
* the `UIConfig` as the second argument.
|
|
70
|
+
*
|
|
71
|
+
* Example:
|
|
72
|
+
* When you added a new function or want to use a different function of our `UIFactory`,
|
|
73
|
+
* you can specify the full qualifier name including namespaces.
|
|
74
|
+
* e.g. `bitmovin.playerui.UIFactory.buildDefaultSmallScreenUI` for the SmallScreenUi.
|
|
75
|
+
* @see UIFactory https://github.com/bitmovin/bitmovin-player-ui/blob/develop/src/ts/uifactory.ts#L60
|
|
76
|
+
*
|
|
77
|
+
* Notes:
|
|
78
|
+
* - It's not necessary to use our `UIFactory`. Any static function can be specified.
|
|
79
|
+
*/
|
|
80
|
+
constructor(public readonly uiManagerFactoryFunction: string) {}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export class SmallScreenUi extends Variant {
|
|
84
|
+
constructor() {
|
|
85
|
+
super('bitmovin.playerui.UIFactory.buildDefaultSmallScreenUI');
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export class TvUi extends Variant {
|
|
90
|
+
constructor() {
|
|
91
|
+
super('bitmovin.playerui.UIFactory.buildDefaultTvUI');
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export class CustomUi extends Variant {
|
|
96
|
+
constructor(uiManagerFactoryFunction: string) {
|
|
97
|
+
super(uiManagerFactoryFunction);
|
|
98
|
+
}
|
|
46
99
|
}
|