bitmovin-player-react-native 0.18.0 → 0.20.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 +1 -1
- package/android/src/main/java/com/bitmovin/player/reactnative/RNPlayerView.kt +2 -0
- package/android/src/main/java/com/bitmovin/player/reactnative/RNPlayerViewManager.kt +61 -59
- package/android/src/main/java/com/bitmovin/player/reactnative/converter/JsonConverter.kt +14 -0
- package/ios/Event+JSON.swift +24 -0
- package/ios/RCTConvert+BitmovinPlayer.swift +11 -1
- package/ios/RNPlayerView+PlayerListener.swift +62 -54
- package/ios/RNPlayerView+UserInterfaceListener.swift +8 -8
- package/ios/RNPlayerView.swift +65 -63
- package/ios/RNPlayerViewManager.m +65 -63
- package/ios/RNPlayerViewManager.swift +47 -19
- package/lib/index.d.mts +57 -1
- package/lib/index.d.ts +57 -1
- package/lib/index.js +69 -63
- package/lib/index.mjs +69 -63
- package/package.json +1 -8
- package/src/components/PlayerView/events.ts +10 -10
- package/src/components/PlayerView/index.tsx +69 -63
- package/src/components/PlayerView/native.ts +1 -1
- package/src/components/PlayerView/nativeEvents.ts +384 -0
- package/src/components/PlayerView/playerViewConfig.ts +8 -0
- package/src/events.ts +36 -0
- package/src/tweaksConfig.ts +7 -0
package/RNBitmovinPlayer.podspec
CHANGED
|
@@ -19,7 +19,7 @@ Pod::Spec.new do |s|
|
|
|
19
19
|
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
20
20
|
|
|
21
21
|
s.dependency "React-Core"
|
|
22
|
-
s.dependency "BitmovinPlayer", "3.
|
|
22
|
+
s.dependency "BitmovinPlayer", "3.57.2"
|
|
23
23
|
s.ios.dependency "GoogleAds-IMA-iOS-SDK", "3.18.4"
|
|
24
24
|
s.tvos.dependency "GoogleAds-IMA-tvOS-SDK", "4.8.2"
|
|
25
25
|
end
|
package/android/build.gradle
CHANGED
|
@@ -103,5 +103,5 @@ dependencies {
|
|
|
103
103
|
// Bitmovin
|
|
104
104
|
implementation 'com.google.ads.interactivemedia.v3:interactivemedia:3.31.0'
|
|
105
105
|
implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
|
|
106
|
-
implementation 'com.bitmovin.player:player:3.
|
|
106
|
+
implementation 'com.bitmovin.player:player:3.64.0+jason'
|
|
107
107
|
}
|
|
@@ -79,6 +79,8 @@ private val EVENT_CLASS_TO_REACT_NATIVE_NAME_MAPPING = mapOf(
|
|
|
79
79
|
PlayerEvent.CastStopped::class to "castStopped",
|
|
80
80
|
PlayerEvent.CastWaitingForDevice::class to "castWaitingForDevice",
|
|
81
81
|
PlayerEvent.CastTimeUpdated::class to "castTimeUpdated",
|
|
82
|
+
PlayerEvent.CueEnter::class to "cueEnter",
|
|
83
|
+
PlayerEvent.CueExit::class to "cueExit",
|
|
82
84
|
)
|
|
83
85
|
|
|
84
86
|
private val EVENT_CLASS_TO_REACT_NATIVE_NAME_MAPPING_UI = mapOf<KClass<out Event>, String>(
|
|
@@ -68,65 +68,67 @@ class RNPlayerViewManager(private val context: ReactApplicationContext) : Simple
|
|
|
68
68
|
* be accessed from React.
|
|
69
69
|
*/
|
|
70
70
|
private val bubblingEventsMapping: Map<String, String> = mapOf(
|
|
71
|
-
"event" to "
|
|
72
|
-
"playerError" to "
|
|
73
|
-
"playerWarning" to "
|
|
74
|
-
"destroy" to "
|
|
75
|
-
"muted" to "
|
|
76
|
-
"unmuted" to "
|
|
77
|
-
"ready" to "
|
|
78
|
-
"paused" to "
|
|
79
|
-
"play" to "
|
|
80
|
-
"playing" to "
|
|
81
|
-
"playbackFinished" to "
|
|
82
|
-
"seek" to "
|
|
83
|
-
"seeked" to "
|
|
84
|
-
"timeShift" to "
|
|
85
|
-
"timeShifted" to "
|
|
86
|
-
"stallStarted" to "
|
|
87
|
-
"stallEnded" to "
|
|
88
|
-
"timeChanged" to "
|
|
89
|
-
"sourceLoad" to "
|
|
90
|
-
"sourceLoaded" to "
|
|
91
|
-
"sourceUnloaded" to "
|
|
92
|
-
"sourceError" to "
|
|
93
|
-
"sourceWarning" to "
|
|
94
|
-
"audioAdded" to "
|
|
95
|
-
"audioChanged" to "
|
|
96
|
-
"audioRemoved" to "
|
|
97
|
-
"subtitleAdded" to "
|
|
98
|
-
"subtitleChanged" to "
|
|
99
|
-
"subtitleRemoved" to "
|
|
100
|
-
"downloadFinished" to "
|
|
101
|
-
"videoDownloadQualityChanged" to "
|
|
102
|
-
"pictureInPictureAvailabilityChanged" to "
|
|
103
|
-
"pictureInPictureEnter" to "
|
|
104
|
-
"pictureInPictureExit" to "
|
|
105
|
-
"adBreakFinished" to "
|
|
106
|
-
"adBreakStarted" to "
|
|
107
|
-
"adClicked" to "
|
|
108
|
-
"adError" to "
|
|
109
|
-
"adFinished" to "
|
|
110
|
-
"adManifestLoad" to "
|
|
111
|
-
"adManifestLoaded" to "
|
|
112
|
-
"adQuartile" to "
|
|
113
|
-
"adScheduled" to "
|
|
114
|
-
"adSkipped" to "
|
|
115
|
-
"adStarted" to "
|
|
116
|
-
"videoPlaybackQualityChanged" to "
|
|
117
|
-
"fullscreenEnabled" to "
|
|
118
|
-
"fullscreenDisabled" to "
|
|
119
|
-
"fullscreenEnter" to "
|
|
120
|
-
"fullscreenExit" to "
|
|
121
|
-
"castStart" to "
|
|
122
|
-
"castPlaybackFinished" to "
|
|
123
|
-
"castPaused" to "
|
|
124
|
-
"castPlaying" to "
|
|
125
|
-
"castStarted" to "
|
|
126
|
-
"castAvailable" to "
|
|
127
|
-
"castStopped" to "
|
|
128
|
-
"castWaitingForDevice" to "
|
|
129
|
-
"castTimeUpdated" to "
|
|
71
|
+
"event" to "onBmpEvent",
|
|
72
|
+
"playerError" to "onBmpPlayerError",
|
|
73
|
+
"playerWarning" to "onBmpPlayerWarning",
|
|
74
|
+
"destroy" to "onBmpDestroy",
|
|
75
|
+
"muted" to "onBmpMuted",
|
|
76
|
+
"unmuted" to "onBmpUnmuted",
|
|
77
|
+
"ready" to "onBmpReady",
|
|
78
|
+
"paused" to "onBmpPaused",
|
|
79
|
+
"play" to "onBmpPlay",
|
|
80
|
+
"playing" to "onBmpPlaying",
|
|
81
|
+
"playbackFinished" to "onBmpPlaybackFinished",
|
|
82
|
+
"seek" to "onBmpSeek",
|
|
83
|
+
"seeked" to "onBmpSeeked",
|
|
84
|
+
"timeShift" to "onBmpTimeShift",
|
|
85
|
+
"timeShifted" to "onBmpTimeShifted",
|
|
86
|
+
"stallStarted" to "onBmpStallStarted",
|
|
87
|
+
"stallEnded" to "onBmpStallEnded",
|
|
88
|
+
"timeChanged" to "onBmpTimeChanged",
|
|
89
|
+
"sourceLoad" to "onBmpSourceLoad",
|
|
90
|
+
"sourceLoaded" to "onBmpSourceLoaded",
|
|
91
|
+
"sourceUnloaded" to "onBmpSourceUnloaded",
|
|
92
|
+
"sourceError" to "onBmpSourceError",
|
|
93
|
+
"sourceWarning" to "onBmpSourceWarning",
|
|
94
|
+
"audioAdded" to "onBmpAudioAdded",
|
|
95
|
+
"audioChanged" to "onBmpAudioChanged",
|
|
96
|
+
"audioRemoved" to "onBmpAudioRemoved",
|
|
97
|
+
"subtitleAdded" to "onBmpSubtitleAdded",
|
|
98
|
+
"subtitleChanged" to "onBmpSubtitleChanged",
|
|
99
|
+
"subtitleRemoved" to "onBmpSubtitleRemoved",
|
|
100
|
+
"downloadFinished" to "onBmpDownloadFinished",
|
|
101
|
+
"videoDownloadQualityChanged" to "onBmpVideoDownloadQualityChanged",
|
|
102
|
+
"pictureInPictureAvailabilityChanged" to "onBmpPictureInPictureAvailabilityChanged",
|
|
103
|
+
"pictureInPictureEnter" to "onBmpPictureInPictureEnter",
|
|
104
|
+
"pictureInPictureExit" to "onBmpPictureInPictureExit",
|
|
105
|
+
"adBreakFinished" to "onBmpAdBreakFinished",
|
|
106
|
+
"adBreakStarted" to "onBmpAdBreakStarted",
|
|
107
|
+
"adClicked" to "onBmpAdClicked",
|
|
108
|
+
"adError" to "onBmpAdError",
|
|
109
|
+
"adFinished" to "onBmpAdFinished",
|
|
110
|
+
"adManifestLoad" to "onBmpAdManifestLoad",
|
|
111
|
+
"adManifestLoaded" to "onBmpAdManifestLoaded",
|
|
112
|
+
"adQuartile" to "onBmpAdQuartile",
|
|
113
|
+
"adScheduled" to "onBmpAdScheduled",
|
|
114
|
+
"adSkipped" to "onBmpAdSkipped",
|
|
115
|
+
"adStarted" to "onBmpAdStarted",
|
|
116
|
+
"videoPlaybackQualityChanged" to "onBmpVideoPlaybackQualityChanged",
|
|
117
|
+
"fullscreenEnabled" to "onBmpFullscreenEnabled",
|
|
118
|
+
"fullscreenDisabled" to "onBmpFullscreenDisabled",
|
|
119
|
+
"fullscreenEnter" to "onBmpFullscreenEnter",
|
|
120
|
+
"fullscreenExit" to "onBmpFullscreenExit",
|
|
121
|
+
"castStart" to "onBmpCastStart",
|
|
122
|
+
"castPlaybackFinished" to "onBmpCastPlaybackFinished",
|
|
123
|
+
"castPaused" to "onBmpCastPaused",
|
|
124
|
+
"castPlaying" to "onBmpCastPlaying",
|
|
125
|
+
"castStarted" to "onBmpCastStarted",
|
|
126
|
+
"castAvailable" to "onBmpCastAvailable",
|
|
127
|
+
"castStopped" to "onBmpCastStopped",
|
|
128
|
+
"castWaitingForDevice" to "onBmpCastWaitingForDevice",
|
|
129
|
+
"castTimeUpdated" to "onBmpCastTimeUpdated",
|
|
130
|
+
"cueEnter" to "onBmpCueEnter",
|
|
131
|
+
"cueExit" to "onBmpCueExit",
|
|
130
132
|
)
|
|
131
133
|
|
|
132
134
|
/**
|
|
@@ -181,6 +181,7 @@ fun ReadableMap.toTweaksConfig(): TweaksConfig = TweaksConfig().apply {
|
|
|
181
181
|
withBoolean("useDrmSessionForClearPeriods") { useDrmSessionForClearPeriods = it }
|
|
182
182
|
withBoolean("useDrmSessionForClearSources") { useDrmSessionForClearSources = it }
|
|
183
183
|
withBoolean("useFiletypeExtractorFallbackForHls") { useFiletypeExtractorFallbackForHls = it }
|
|
184
|
+
withBoolean("preferSoftwareDecodingForAds") { preferSoftwareDecodingForAds = it }
|
|
184
185
|
}
|
|
185
186
|
|
|
186
187
|
/**
|
|
@@ -470,6 +471,18 @@ fun PlayerEvent.toJson(): WritableMap {
|
|
|
470
471
|
json.putString("deviceName", deviceName)
|
|
471
472
|
}
|
|
472
473
|
|
|
474
|
+
is PlayerEvent.CueEnter -> {
|
|
475
|
+
json.putDouble("start", start)
|
|
476
|
+
json.putDouble("end", end)
|
|
477
|
+
json.putString("text", text)
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
is PlayerEvent.CueExit -> {
|
|
481
|
+
json.putDouble("start", start)
|
|
482
|
+
json.putDouble("end", end)
|
|
483
|
+
json.putString("text", text)
|
|
484
|
+
}
|
|
485
|
+
|
|
473
486
|
else -> {
|
|
474
487
|
// Event is not supported yet or does not have any additional data
|
|
475
488
|
}
|
|
@@ -738,6 +751,7 @@ fun toPlayerViewConfig(json: ReadableMap) = PlayerViewConfig(
|
|
|
738
751
|
?.getBooleanOrNull("playbackSpeedSelectionEnabled")
|
|
739
752
|
?: true,
|
|
740
753
|
),
|
|
754
|
+
hideFirstFrame = json.getBooleanOrNull("hideFirstFrame") ?: false,
|
|
741
755
|
)
|
|
742
756
|
|
|
743
757
|
private fun ReadableMap.toUserInterfaceTypeFromPlayerConfig(): UserInterfaceType? =
|
package/ios/Event+JSON.swift
CHANGED
|
@@ -414,6 +414,30 @@ extension PlaybackSpeedChangedEvent: JsonConvertible {
|
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
|
|
417
|
+
extension CueEnterEvent: JsonConvertible {
|
|
418
|
+
func toJSON() -> [AnyHashable: Any] {
|
|
419
|
+
toEventJSON {
|
|
420
|
+
[
|
|
421
|
+
"start": startTime,
|
|
422
|
+
"end": endTime,
|
|
423
|
+
"text": text
|
|
424
|
+
]
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
extension CueExitEvent: JsonConvertible {
|
|
430
|
+
func toJSON() -> [AnyHashable: Any] {
|
|
431
|
+
toEventJSON {
|
|
432
|
+
[
|
|
433
|
+
"start": startTime,
|
|
434
|
+
"end": endTime,
|
|
435
|
+
"text": text
|
|
436
|
+
]
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
|
|
417
441
|
extension PlayerActiveEvent: DefaultJsonConvertibleEvent {}
|
|
418
442
|
extension DestroyEvent: DefaultJsonConvertibleEvent {}
|
|
419
443
|
extension MutedEvent: DefaultJsonConvertibleEvent {}
|
|
@@ -1156,7 +1156,8 @@ extension RCTConvert {
|
|
|
1156
1156
|
|
|
1157
1157
|
return RNPlayerViewConfig(
|
|
1158
1158
|
uiConfig: rnUiConfig(json["uiConfig"]),
|
|
1159
|
-
pictureInPictureConfig: pictureInPictureConfig(json["pictureInPictureConfig"])
|
|
1159
|
+
pictureInPictureConfig: pictureInPictureConfig(json["pictureInPictureConfig"]),
|
|
1160
|
+
hideFirstFrame: json["hideFirstFrame"] as? Bool
|
|
1160
1161
|
)
|
|
1161
1162
|
}
|
|
1162
1163
|
|
|
@@ -1256,6 +1257,15 @@ internal struct RNPlayerViewConfig {
|
|
|
1256
1257
|
}
|
|
1257
1258
|
return config
|
|
1258
1259
|
}
|
|
1260
|
+
|
|
1261
|
+
/**
|
|
1262
|
+
* When set to `true` the first frame of the main content will not be rendered before playback starts.
|
|
1263
|
+
* Default is `false`.
|
|
1264
|
+
*
|
|
1265
|
+
* To reliably hide the first frame before a pre-roll ad, please ensure that you are using the
|
|
1266
|
+
* `AdvertisingConfig` to schedule ads and not the `scheduleAd` API call.
|
|
1267
|
+
*/
|
|
1268
|
+
var hideFirstFrame: Bool?
|
|
1259
1269
|
}
|
|
1260
1270
|
|
|
1261
1271
|
/**
|
|
@@ -3,219 +3,227 @@ import BitmovinPlayer
|
|
|
3
3
|
extension RNPlayerView: PlayerListener {
|
|
4
4
|
public func onEvent(_ event: Event, player: Player) {
|
|
5
5
|
guard let jsonConvertibleEvent = event as? JsonConvertible else { return }
|
|
6
|
-
|
|
6
|
+
onBmpEvent?(jsonConvertibleEvent.toJSON())
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
public func onPlayerActive(_ event: PlayerActiveEvent, player: Player) {
|
|
10
|
-
|
|
10
|
+
onBmpPlayerActive?(event.toJSON())
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
public func onPlayerError(_ event: PlayerErrorEvent, player: Player) {
|
|
14
|
-
|
|
14
|
+
onBmpPlayerError?(event.toJSON())
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
public func onPlayerWarning(_ event: PlayerWarningEvent, player: Player) {
|
|
18
|
-
|
|
18
|
+
onBmpPlayerWarning?(event.toJSON())
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
public func onDestroy(_ event: DestroyEvent, player: Player) {
|
|
22
|
-
|
|
22
|
+
onBmpDestroy?(event.toJSON())
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
public func onMuted(_ event: MutedEvent, player: Player) {
|
|
26
|
-
|
|
26
|
+
onBmpMuted?(event.toJSON())
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
public func onUnmuted(_ event: UnmutedEvent, player: Player) {
|
|
30
|
-
|
|
30
|
+
onBmpUnmuted?(event.toJSON())
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
public func onReady(_ event: ReadyEvent, player: Player) {
|
|
34
|
-
|
|
34
|
+
onBmpReady?(event.toJSON())
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
public func onPaused(_ event: PausedEvent, player: Player) {
|
|
38
|
-
|
|
38
|
+
onBmpPaused?(event.toJSON())
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
public func onPlay(_ event: PlayEvent, player: Player) {
|
|
42
|
-
|
|
42
|
+
onBmpPlay?(event.toJSON())
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
public func onPlaying(_ event: PlayingEvent, player: Player) {
|
|
46
|
-
|
|
46
|
+
onBmpPlaying?(event.toJSON())
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
public func onPlaybackFinished(_ event: PlaybackFinishedEvent, player: Player) {
|
|
50
|
-
|
|
50
|
+
onBmpPlaybackFinished?(event.toJSON())
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
public func onSeek(_ event: SeekEvent, player: Player) {
|
|
54
|
-
|
|
54
|
+
onBmpSeek?(event.toJSON())
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
public func onSeeked(_ event: SeekedEvent, player: Player) {
|
|
58
|
-
|
|
58
|
+
onBmpSeeked?(event.toJSON())
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
public func onTimeShift(_ event: TimeShiftEvent, player: Player) {
|
|
62
|
-
|
|
62
|
+
onBmpTimeShift?(event.toJSON())
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
public func onTimeShifted(_ event: TimeShiftedEvent, player: Player) {
|
|
66
|
-
|
|
66
|
+
onBmpTimeShifted?(event.toJSON())
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
public func onStallStarted(_ event: StallStartedEvent, player: Player) {
|
|
70
|
-
|
|
70
|
+
onBmpStallStarted?(event.toJSON())
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
public func onStallEnded(_ event: StallEndedEvent, player: Player) {
|
|
74
|
-
|
|
74
|
+
onBmpStallEnded?(event.toJSON())
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
public func onTimeChanged(_ event: TimeChangedEvent, player: Player) {
|
|
78
|
-
|
|
78
|
+
onBmpTimeChanged?(event.toJSON())
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
public func onPlaybackSpeedChanged(_ event: PlaybackSpeedChangedEvent, player: Player) {
|
|
82
|
-
|
|
82
|
+
onBmpPlaybackSpeedChanged?(event.toJSON())
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
public func onSourceLoad(_ event: SourceLoadEvent, player: Player) {
|
|
86
|
-
|
|
86
|
+
onBmpSourceLoad?(event.toJSON())
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
public func onSourceLoaded(_ event: SourceLoadedEvent, player: Player) {
|
|
90
|
-
|
|
90
|
+
onBmpSourceLoaded?(event.toJSON())
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
public func onSourceUnloaded(_ event: SourceUnloadedEvent, player: Player) {
|
|
94
|
-
|
|
94
|
+
onBmpSourceUnloaded?(event.toJSON())
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
public func onSourceError(_ event: SourceErrorEvent, player: Player) {
|
|
98
|
-
|
|
98
|
+
onBmpSourceError?(event.toJSON())
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
public func onSourceWarning(_ event: SourceWarningEvent, player: Player) {
|
|
102
|
-
|
|
102
|
+
onBmpSourceWarning?(event.toJSON())
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
public func onAudioAdded(_ event: AudioAddedEvent, player: Player) {
|
|
106
|
-
|
|
106
|
+
onBmpAudioAdded?(event.toJSON())
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
public func onAudioRemoved(_ event: AudioRemovedEvent, player: Player) {
|
|
110
|
-
|
|
110
|
+
onBmpAudioRemoved?(event.toJSON())
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
public func onAudioChanged(_ event: AudioChangedEvent, player: Player) {
|
|
114
|
-
|
|
114
|
+
onBmpAudioChanged?(event.toJSON())
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
public func onSubtitleAdded(_ event: SubtitleAddedEvent, player: Player) {
|
|
118
|
-
|
|
118
|
+
onBmpSubtitleAdded?(event.toJSON())
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
public func onSubtitleRemoved(_ event: SubtitleRemovedEvent, player: Player) {
|
|
122
|
-
|
|
122
|
+
onBmpSubtitleRemoved?(event.toJSON())
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
public func onSubtitleChanged(_ event: SubtitleChangedEvent, player: Player) {
|
|
126
|
-
|
|
126
|
+
onBmpSubtitleChanged?(event.toJSON())
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
public func onDownloadFinished(_ event: DownloadFinishedEvent, player: Player) {
|
|
130
|
-
|
|
130
|
+
onBmpDownloadFinished?(event.toJSON())
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
public func onAdBreakFinished(_ event: AdBreakFinishedEvent, player: Player) {
|
|
134
|
-
|
|
134
|
+
onBmpAdBreakFinished?(event.toJSON())
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
public func onAdBreakStarted(_ event: AdBreakStartedEvent, player: Player) {
|
|
138
|
-
|
|
138
|
+
onBmpAdBreakStarted?(event.toJSON())
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
public func onAdClicked(_ event: AdClickedEvent, player: Player) {
|
|
142
|
-
|
|
142
|
+
onBmpAdClicked?(event.toJSON())
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
public func onAdError(_ event: AdErrorEvent, player: Player) {
|
|
146
|
-
|
|
146
|
+
onBmpAdError?(event.toJSON())
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
public func onAdFinished(_ event: AdFinishedEvent, player: Player) {
|
|
150
|
-
|
|
150
|
+
onBmpAdFinished?(event.toJSON())
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
public func onAdManifestLoad(_ event: AdManifestLoadEvent, player: Player) {
|
|
154
|
-
|
|
154
|
+
onBmpAdManifestLoad?(event.toJSON())
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
public func onAdManifestLoaded(_ event: AdManifestLoadedEvent, player: Player) {
|
|
158
|
-
|
|
158
|
+
onBmpAdManifestLoaded?(event.toJSON())
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
public func onAdQuartile(_ event: AdQuartileEvent, player: Player) {
|
|
162
|
-
|
|
162
|
+
onBmpAdQuartile?(event.toJSON())
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
public func onAdScheduled(_ event: AdScheduledEvent, player: Player) {
|
|
166
|
-
|
|
166
|
+
onBmpAdScheduled?(event.toJSON())
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
public func onAdSkipped(_ event: AdSkippedEvent, player: Player) {
|
|
170
|
-
|
|
170
|
+
onBmpAdSkipped?(event.toJSON())
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
public func onAdStarted(_ event: AdStartedEvent, player: Player) {
|
|
174
|
-
|
|
174
|
+
onBmpAdStarted?(event.toJSON())
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
public func onVideoDownloadQualityChanged(_ event: VideoDownloadQualityChangedEvent, player: Player) {
|
|
178
|
-
|
|
178
|
+
onBmpVideoDownloadQualityChanged?(event.toJSON())
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
public func onVideoPlaybackQualityChanged(_ event: VideoPlaybackQualityChangedEvent, player: Player) {
|
|
182
|
-
|
|
182
|
+
onBmpVideoPlaybackQualityChanged?(event.toJSON())
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
public func onCueEnter(_ event: CueEnterEvent, player: Player) {
|
|
186
|
+
onBmpCueEnter?(event.toJSON())
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
public func onCueExit(_ event: CueExitEvent, player: Player) {
|
|
190
|
+
onBmpCueExit?(event.toJSON())
|
|
183
191
|
}
|
|
184
192
|
|
|
185
193
|
#if os(iOS)
|
|
186
194
|
public func onCastAvailable(_ event: CastAvailableEvent, player: Player) {
|
|
187
|
-
|
|
195
|
+
onBmpCastAvailable?(event.toJSON())
|
|
188
196
|
}
|
|
189
197
|
|
|
190
198
|
public func onCastPaused(_ event: CastPausedEvent, player: Player) {
|
|
191
|
-
|
|
199
|
+
onBmpCastPaused?(event.toJSON())
|
|
192
200
|
}
|
|
193
201
|
|
|
194
202
|
public func onCastPlaybackFinished(_ event: CastPlaybackFinishedEvent, player: Player) {
|
|
195
|
-
|
|
203
|
+
onBmpCastPlaybackFinished?(event.toJSON())
|
|
196
204
|
}
|
|
197
205
|
|
|
198
206
|
public func onCastPlaying(_ event: CastPlayingEvent, player: Player) {
|
|
199
|
-
|
|
207
|
+
onBmpCastPlaying?(event.toJSON())
|
|
200
208
|
}
|
|
201
209
|
|
|
202
210
|
public func onCastStarted(_ event: CastStartedEvent, player: Player) {
|
|
203
|
-
|
|
211
|
+
onBmpCastStarted?(event.toJSON())
|
|
204
212
|
}
|
|
205
213
|
|
|
206
214
|
public func onCastStart(_ event: CastStartEvent, player: Player) {
|
|
207
|
-
|
|
215
|
+
onBmpCastStart?(event.toJSON())
|
|
208
216
|
}
|
|
209
217
|
|
|
210
218
|
public func onCastStopped(_ event: CastStoppedEvent, player: Player) {
|
|
211
|
-
|
|
219
|
+
onBmpCastStopped?(event.toJSON())
|
|
212
220
|
}
|
|
213
221
|
|
|
214
222
|
public func onCastTimeUpdated(_ event: CastTimeUpdatedEvent, player: Player) {
|
|
215
|
-
|
|
223
|
+
onBmpCastTimeUpdated?(event.toJSON())
|
|
216
224
|
}
|
|
217
225
|
public func onCastWaitingForDevice(_ event: CastWaitingForDeviceEvent, player: Player) {
|
|
218
|
-
|
|
226
|
+
onBmpCastWaitingForDevice?(event.toJSON())
|
|
219
227
|
}
|
|
220
228
|
#endif
|
|
221
229
|
}
|
|
@@ -2,34 +2,34 @@ import BitmovinPlayer
|
|
|
2
2
|
|
|
3
3
|
extension RNPlayerView: UserInterfaceListener {
|
|
4
4
|
public func onPictureInPictureEnter(_ event: PictureInPictureEnterEvent, view: PlayerView) {
|
|
5
|
-
|
|
5
|
+
onBmpPictureInPictureEnter?(event.toJSON())
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
public func onPictureInPictureEntered(_ event: PictureInPictureEnteredEvent, view: PlayerView) {
|
|
9
|
-
|
|
9
|
+
onBmpPictureInPictureEntered?(event.toJSON())
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
public func onPictureInPictureExit(_ event: PictureInPictureExitEvent, view: PlayerView) {
|
|
13
|
-
|
|
13
|
+
onBmpPictureInPictureExit?(event.toJSON())
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
public func onPictureInPictureExited(_ event: PictureInPictureExitedEvent, view: PlayerView) {
|
|
17
|
-
|
|
17
|
+
onBmpPictureInPictureExited?(event.toJSON())
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
public func onFullscreenEnter(_ event: FullscreenEnterEvent, view: PlayerView) {
|
|
21
|
-
|
|
21
|
+
onBmpFullscreenEnter?(event.toJSON())
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
public func onFullscreenExit(_ event: FullscreenExitEvent, view: PlayerView) {
|
|
25
|
-
|
|
25
|
+
onBmpFullscreenExit?(event.toJSON())
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
public func onFullscreenEnabled(_ event: FullscreenEnabledEvent, view: PlayerView) {
|
|
29
|
-
|
|
29
|
+
onBmpFullscreenEnabled?(event.toJSON())
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
public func onFullscreenDisabled(_ event: FullscreenDisabledEvent, view: PlayerView) {
|
|
33
|
-
|
|
33
|
+
onBmpFullscreenDisabled?(event.toJSON())
|
|
34
34
|
}
|
|
35
35
|
}
|