@bluebillywig/react-native-bb-player 8.45.10 → 8.45.11
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/android/build.gradle +0 -4
- package/android/src/main/java/com/bluebillywig/bbplayer/BBShortsView.kt +36 -6
- package/android/src/main/java/com/bluebillywig/bbplayer/BBShortsViewManager.kt +6 -2
- package/ios/BBPlayer-Bridging-Header.h +0 -1
- package/ios/BBPlayerModule.swift +1 -7
- package/lib/commonjs/BBModalPlayer.js +3 -30
- package/lib/commonjs/BBModalPlayer.js.map +1 -1
- package/lib/module/BBModalPlayer.js +4 -32
- package/lib/module/BBModalPlayer.js.map +1 -1
- package/lib/typescript/src/BBModalPlayer.d.ts +1 -6
- package/lib/typescript/src/BBModalPlayer.d.ts.map +1 -1
- package/package.json +1 -2
- package/react-native-bb-player.podspec +6 -13
- package/src/BBModalPlayer.ts +5 -40
package/android/build.gradle
CHANGED
|
@@ -2,6 +2,8 @@ package com.bluebillywig.bbplayer
|
|
|
2
2
|
|
|
3
3
|
import android.app.Activity
|
|
4
4
|
import android.util.Log
|
|
5
|
+
import android.view.Choreographer
|
|
6
|
+
import android.view.View.MeasureSpec
|
|
5
7
|
import android.widget.FrameLayout
|
|
6
8
|
import com.bluebillywig.bbnativeplayersdk.BBNativeShorts
|
|
7
9
|
import com.bluebillywig.bbnativeplayersdk.BBNativeShortsView
|
|
@@ -9,6 +11,7 @@ import com.bluebillywig.bbnativeplayersdk.BBNativeShortsViewDelegate
|
|
|
9
11
|
import com.facebook.react.bridge.Arguments
|
|
10
12
|
import com.facebook.react.bridge.ReadableMap
|
|
11
13
|
import com.facebook.react.bridge.WritableMap
|
|
14
|
+
import com.facebook.react.modules.core.ReactChoreographer
|
|
12
15
|
import com.facebook.react.uimanager.ThemedReactContext
|
|
13
16
|
import com.facebook.react.uimanager.UIManagerHelper
|
|
14
17
|
import com.facebook.react.uimanager.events.Event
|
|
@@ -48,20 +51,47 @@ class BBShortsView(private val reactContext: ThemedReactContext) : FrameLayout(r
|
|
|
48
51
|
|
|
49
52
|
private var shortsView: BBNativeShortsView? = null
|
|
50
53
|
|
|
54
|
+
// ReactChoreographer layout pattern - same as BBPlayerView
|
|
55
|
+
private var isLayoutEnqueued = false
|
|
56
|
+
private var constructorComplete = false
|
|
57
|
+
|
|
58
|
+
private val layoutCallback = Choreographer.FrameCallback {
|
|
59
|
+
isLayoutEnqueued = false
|
|
60
|
+
measure(
|
|
61
|
+
MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY),
|
|
62
|
+
MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY)
|
|
63
|
+
)
|
|
64
|
+
layout(left, top, right, bottom)
|
|
65
|
+
}
|
|
66
|
+
|
|
51
67
|
init {
|
|
52
68
|
// Default to black background for Shorts
|
|
53
69
|
setBackgroundColor(android.graphics.Color.BLACK)
|
|
70
|
+
setPadding(0, 0, 0, 0)
|
|
71
|
+
clipToPadding = false
|
|
72
|
+
clipChildren = false
|
|
73
|
+
constructorComplete = true
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
override fun requestLayout() {
|
|
77
|
+
super.requestLayout()
|
|
78
|
+
if (!constructorComplete) return
|
|
79
|
+
if (!isLayoutEnqueued) {
|
|
80
|
+
isLayoutEnqueued = true
|
|
81
|
+
ReactChoreographer.getInstance()
|
|
82
|
+
.postFrameCallback(
|
|
83
|
+
ReactChoreographer.CallbackType.NATIVE_ANIMATED_MODULE,
|
|
84
|
+
layoutCallback
|
|
85
|
+
)
|
|
86
|
+
}
|
|
54
87
|
}
|
|
55
88
|
|
|
56
|
-
/**
|
|
57
|
-
* Override onLayout to ensure child views receive proper bounds.
|
|
58
|
-
* This is critical for React Native Fabric where layout isn't automatically propagated.
|
|
59
|
-
*/
|
|
60
89
|
override fun onLayout(changed: Boolean, left: Int, top: Int, right: Int, bottom: Int) {
|
|
61
90
|
super.onLayout(changed, left, top, right, bottom)
|
|
62
|
-
|
|
91
|
+
val w = right - left
|
|
92
|
+
val h = bottom - top
|
|
63
93
|
for (i in 0 until childCount) {
|
|
64
|
-
getChildAt(i)?.layout(0, 0,
|
|
94
|
+
getChildAt(i)?.layout(0, 0, w, h)
|
|
65
95
|
}
|
|
66
96
|
}
|
|
67
97
|
|
|
@@ -2,17 +2,21 @@ package com.bluebillywig.bbplayer
|
|
|
2
2
|
|
|
3
3
|
import com.facebook.react.bridge.ReadableArray
|
|
4
4
|
import com.facebook.react.bridge.ReadableMap
|
|
5
|
-
import com.facebook.react.uimanager.SimpleViewManager
|
|
6
5
|
import com.facebook.react.uimanager.ThemedReactContext
|
|
6
|
+
import com.facebook.react.uimanager.ViewGroupManager
|
|
7
7
|
import com.facebook.react.uimanager.annotations.ReactProp
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* ViewManager for BBShortsView - manages the React Native native view for Shorts playback.
|
|
11
|
+
* Uses ViewGroupManager (not SimpleViewManager) because the native Shorts view has child views
|
|
12
|
+
* that need custom layout propagation via needsCustomLayoutForChildren().
|
|
11
13
|
*/
|
|
12
|
-
class BBShortsViewManager :
|
|
14
|
+
class BBShortsViewManager : ViewGroupManager<BBShortsView>() {
|
|
13
15
|
|
|
14
16
|
override fun getName(): String = REACT_CLASS
|
|
15
17
|
|
|
18
|
+
override fun needsCustomLayoutForChildren(): Boolean = true
|
|
19
|
+
|
|
16
20
|
override fun createViewInstance(reactContext: ThemedReactContext): BBShortsView {
|
|
17
21
|
return BBShortsView(reactContext)
|
|
18
22
|
}
|
package/ios/BBPlayerModule.swift
CHANGED
|
@@ -303,13 +303,7 @@ class BBPlayerModule: RCTEventEmitter {
|
|
|
303
303
|
|
|
304
304
|
@objc func presentModalPlayer(_ jsonUrl: String, optionsJson: String?, contextJson: String?) {
|
|
305
305
|
DispatchQueue.main.async {
|
|
306
|
-
|
|
307
|
-
// Fallback to UIScene-based lookup to find the root view controller.
|
|
308
|
-
guard let rootVC = RCTPresentedViewController()
|
|
309
|
-
?? UIApplication.shared.connectedScenes
|
|
310
|
-
.compactMap({ ($0 as? UIWindowScene)?.windows.first(where: { $0.isKeyWindow })?.rootViewController })
|
|
311
|
-
.first
|
|
312
|
-
else {
|
|
306
|
+
guard let rootVC = RCTPresentedViewController() else {
|
|
313
307
|
NSLog("BBPlayerModule: No root view controller found")
|
|
314
308
|
return
|
|
315
309
|
}
|
|
@@ -5,38 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.BBModalPlayer = void 0;
|
|
7
7
|
var _reactNative = require("react-native");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
try {
|
|
11
|
-
BBPlayerModule = require('./specs/NativeBBPlayerModule').default;
|
|
12
|
-
} catch {
|
|
13
|
-
// TurboModule not available
|
|
14
|
-
}
|
|
15
|
-
if (!BBPlayerModule) {
|
|
16
|
-
BBPlayerModule = _reactNative.NativeModules.BBPlayerModule;
|
|
17
|
-
}
|
|
18
|
-
if (!BBPlayerModule) {
|
|
19
|
-
console.warn('[BBModalPlayer] Native BBPlayerModule not found. ' + 'TurboModuleRegistry and NativeModules both returned null. ' + `Platform: ${_reactNative.Platform.OS}`);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// NativeEventEmitter requires a non-null module on iOS to avoid warnings.
|
|
23
|
-
// Pass null-safe: events will simply never fire if module is missing.
|
|
24
|
-
const eventEmitter = BBPlayerModule ? new _reactNative.NativeEventEmitter(BBPlayerModule) : new _reactNative.NativeEventEmitter();
|
|
8
|
+
const BBPlayerModule = _reactNative.NativeModules.BBPlayerModule;
|
|
9
|
+
const eventEmitter = new _reactNative.NativeEventEmitter(BBPlayerModule);
|
|
25
10
|
const BBModalPlayer = exports.BBModalPlayer = {
|
|
26
|
-
/**
|
|
27
|
-
* Whether the native modal player module is available.
|
|
28
|
-
* When false, present() will be a no-op.
|
|
29
|
-
*/
|
|
30
|
-
get isAvailable() {
|
|
31
|
-
return BBPlayerModule != null;
|
|
32
|
-
},
|
|
33
11
|
present(jsonUrl, options, context) {
|
|
34
|
-
|
|
35
|
-
console.warn('[BBModalPlayer] present() called but native module is null — cannot open modal');
|
|
36
|
-
return false;
|
|
37
|
-
}
|
|
38
|
-
BBPlayerModule.presentModalPlayer(jsonUrl, options ? JSON.stringify(options) : null, context ? JSON.stringify(context) : null);
|
|
39
|
-
return true;
|
|
12
|
+
BBPlayerModule?.presentModalPlayer(jsonUrl, options ? JSON.stringify(options) : null, context ? JSON.stringify(context) : null);
|
|
40
13
|
},
|
|
41
14
|
dismiss() {
|
|
42
15
|
BBPlayerModule?.dismissModalPlayer();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","BBPlayerModule","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","BBPlayerModule","NativeModules","eventEmitter","NativeEventEmitter","BBModalPlayer","exports","present","jsonUrl","options","context","presentModalPlayer","JSON","stringify","dismiss","dismissModalPlayer","addEventListener","event","callback","addListener"],"sourceRoot":"../../src","sources":["BBModalPlayer.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,MAAMC,cAAc,GAAGC,0BAAa,CAACD,cAAc;AACnD,MAAME,YAAY,GAAG,IAAIC,+BAAkB,CAACH,cAAc,CAAC;AAUpD,MAAMI,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG;EAC3BE,OAAOA,CAACC,OAAe,EAAEC,OAA4B,EAAEC,OAAgC,EAAE;IACvFT,cAAc,EAAEU,kBAAkB,CAChCH,OAAO,EACPC,OAAO,GAAGG,IAAI,CAACC,SAAS,CAACJ,OAAO,CAAC,GAAG,IAAI,EACxCC,OAAO,GAAGE,IAAI,CAACC,SAAS,CAACH,OAAO,CAAC,GAAG,IACtC,CAAC;EACH,CAAC;EAEDI,OAAOA,CAAA,EAAG;IACRb,cAAc,EAAEc,kBAAkB,CAAC,CAAC;EACtC,CAAC;EAEDC,gBAAgBA,CACdC,KAAa,EACbC,QAAkC,EAClC;IACA,OAAOf,YAAY,CAACgB,WAAW,CAACF,KAAK,EAAEC,QAAQ,CAAC;EAClD;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,39 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { NativeEventEmitter, NativeModules
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
let BBPlayerModule = null;
|
|
7
|
-
try {
|
|
8
|
-
BBPlayerModule = require('./specs/NativeBBPlayerModule').default;
|
|
9
|
-
} catch {
|
|
10
|
-
// TurboModule not available
|
|
11
|
-
}
|
|
12
|
-
if (!BBPlayerModule) {
|
|
13
|
-
BBPlayerModule = NativeModules.BBPlayerModule;
|
|
14
|
-
}
|
|
15
|
-
if (!BBPlayerModule) {
|
|
16
|
-
console.warn('[BBModalPlayer] Native BBPlayerModule not found. ' + 'TurboModuleRegistry and NativeModules both returned null. ' + `Platform: ${Platform.OS}`);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// NativeEventEmitter requires a non-null module on iOS to avoid warnings.
|
|
20
|
-
// Pass null-safe: events will simply never fire if module is missing.
|
|
21
|
-
const eventEmitter = BBPlayerModule ? new NativeEventEmitter(BBPlayerModule) : new NativeEventEmitter();
|
|
3
|
+
import { NativeEventEmitter, NativeModules } from 'react-native';
|
|
4
|
+
const BBPlayerModule = NativeModules.BBPlayerModule;
|
|
5
|
+
const eventEmitter = new NativeEventEmitter(BBPlayerModule);
|
|
22
6
|
export const BBModalPlayer = {
|
|
23
|
-
/**
|
|
24
|
-
* Whether the native modal player module is available.
|
|
25
|
-
* When false, present() will be a no-op.
|
|
26
|
-
*/
|
|
27
|
-
get isAvailable() {
|
|
28
|
-
return BBPlayerModule != null;
|
|
29
|
-
},
|
|
30
7
|
present(jsonUrl, options, context) {
|
|
31
|
-
|
|
32
|
-
console.warn('[BBModalPlayer] present() called but native module is null — cannot open modal');
|
|
33
|
-
return false;
|
|
34
|
-
}
|
|
35
|
-
BBPlayerModule.presentModalPlayer(jsonUrl, options ? JSON.stringify(options) : null, context ? JSON.stringify(context) : null);
|
|
36
|
-
return true;
|
|
8
|
+
BBPlayerModule?.presentModalPlayer(jsonUrl, options ? JSON.stringify(options) : null, context ? JSON.stringify(context) : null);
|
|
37
9
|
},
|
|
38
10
|
dismiss() {
|
|
39
11
|
BBPlayerModule?.dismissModalPlayer();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NativeEventEmitter","NativeModules","
|
|
1
|
+
{"version":3,"names":["NativeEventEmitter","NativeModules","BBPlayerModule","eventEmitter","BBModalPlayer","present","jsonUrl","options","context","presentModalPlayer","JSON","stringify","dismiss","dismissModalPlayer","addEventListener","event","callback","addListener"],"sourceRoot":"../../src","sources":["BBModalPlayer.ts"],"mappings":";;AAAA,SAASA,kBAAkB,EAAEC,aAAa,QAAQ,cAAc;AAEhE,MAAMC,cAAc,GAAGD,aAAa,CAACC,cAAc;AACnD,MAAMC,YAAY,GAAG,IAAIH,kBAAkB,CAACE,cAAc,CAAC;AAU3D,OAAO,MAAME,aAAa,GAAG;EAC3BC,OAAOA,CAACC,OAAe,EAAEC,OAA4B,EAAEC,OAAgC,EAAE;IACvFN,cAAc,EAAEO,kBAAkB,CAChCH,OAAO,EACPC,OAAO,GAAGG,IAAI,CAACC,SAAS,CAACJ,OAAO,CAAC,GAAG,IAAI,EACxCC,OAAO,GAAGE,IAAI,CAACC,SAAS,CAACH,OAAO,CAAC,GAAG,IACtC,CAAC;EACH,CAAC;EAEDI,OAAOA,CAAA,EAAG;IACRV,cAAc,EAAEW,kBAAkB,CAAC,CAAC;EACtC,CAAC;EAEDC,gBAAgBA,CACdC,KAAa,EACbC,QAAkC,EAClC;IACA,OAAOb,YAAY,CAACc,WAAW,CAACF,KAAK,EAAEC,QAAQ,CAAC;EAClD;AACF,CAAC","ignoreList":[]}
|
|
@@ -6,12 +6,7 @@ export interface ModalPlayerOptions {
|
|
|
6
6
|
[key: string]: unknown;
|
|
7
7
|
}
|
|
8
8
|
export declare const BBModalPlayer: {
|
|
9
|
-
|
|
10
|
-
* Whether the native modal player module is available.
|
|
11
|
-
* When false, present() will be a no-op.
|
|
12
|
-
*/
|
|
13
|
-
readonly isAvailable: boolean;
|
|
14
|
-
present(jsonUrl: string, options?: ModalPlayerOptions, context?: Record<string, string>): boolean;
|
|
9
|
+
present(jsonUrl: string, options?: ModalPlayerOptions, context?: Record<string, string>): void;
|
|
15
10
|
dismiss(): void;
|
|
16
11
|
addEventListener(event: string, callback: (...args: any[]) => void): import("react-native").EmitterSubscription;
|
|
17
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BBModalPlayer.d.ts","sourceRoot":"","sources":["../../../src/BBModalPlayer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BBModalPlayer.d.ts","sourceRoot":"","sources":["../../../src/BBModalPlayer.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,aAAa;qBACP,MAAM,YAAY,kBAAkB,YAAY,OAAO,MAAM,EAAE,MAAM,CAAC;;4BAa9E,MAAM,sBACO,GAAG,EAAE,KAAK,IAAI;CAIrC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bluebillywig/react-native-bb-player",
|
|
3
|
-
"version": "8.45.
|
|
3
|
+
"version": "8.45.11",
|
|
4
4
|
"description": "Blue Billywig Native Video Player for React Native - iOS AVPlayer and Android ExoPlayer integration",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -32,7 +32,6 @@
|
|
|
32
32
|
"ios",
|
|
33
33
|
"android/src",
|
|
34
34
|
"android/build.gradle",
|
|
35
|
-
"android/repo",
|
|
36
35
|
"plugin/build",
|
|
37
36
|
"app.plugin.js",
|
|
38
37
|
"README.md",
|
|
@@ -23,19 +23,12 @@ Pod::Spec.new do |s|
|
|
|
23
23
|
s.static_framework = true
|
|
24
24
|
|
|
25
25
|
s.dependency 'React-Core'
|
|
26
|
+
s.dependency 'BlueBillywigNativePlayerKit-iOS'
|
|
27
|
+
s.dependency 'BlueBillywigNativePlayerKit-iOS/GoogleCastSDK'
|
|
26
28
|
|
|
27
|
-
#
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
s.vendored_frameworks = 'ios/Frameworks/BBNativePlayerKit.xcframework',
|
|
31
|
-
'ios/Frameworks/bbnativeshared.xcframework'
|
|
32
|
-
s.dependency 'GoogleAds-IMA-iOS-SDK', '3.23.0'
|
|
33
|
-
s.dependency 'GoogleUserMessagingPlatform', '~> 2.1'
|
|
34
|
-
s.dependency 'google-cast-sdk-dynamic-xcframework-ios-bb', '4.8.0'
|
|
35
|
-
else
|
|
36
|
-
s.dependency 'BlueBillywigNativePlayerKit-iOS'
|
|
37
|
-
s.dependency 'BlueBillywigNativePlayerKit-iOS/GoogleCastSDK'
|
|
38
|
-
end
|
|
29
|
+
# Note: TurboModule/New Architecture dependencies (React-Codegen, RCT-Folly, etc.)
|
|
30
|
+
# are automatically provided by React Native when New Architecture is enabled.
|
|
31
|
+
# No need to specify them here as they would create duplicate/conflicting deps.
|
|
39
32
|
|
|
40
33
|
# Swift/Objective-C compatibility
|
|
41
34
|
s.pod_target_xcconfig = {
|
|
@@ -43,5 +36,5 @@ Pod::Spec.new do |s|
|
|
|
43
36
|
'SWIFT_COMPILATION_MODE' => 'wholemodule'
|
|
44
37
|
}
|
|
45
38
|
|
|
46
|
-
s.source_files = "ios
|
|
39
|
+
s.source_files = "ios/**/*.{h,m,mm,swift,hpp,cpp}"
|
|
47
40
|
end
|
package/src/BBModalPlayer.ts
CHANGED
|
@@ -1,29 +1,7 @@
|
|
|
1
|
-
import { NativeEventEmitter, NativeModules
|
|
1
|
+
import { NativeEventEmitter, NativeModules } from 'react-native';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
try {
|
|
6
|
-
BBPlayerModule = require('./specs/NativeBBPlayerModule').default;
|
|
7
|
-
} catch {
|
|
8
|
-
// TurboModule not available
|
|
9
|
-
}
|
|
10
|
-
if (!BBPlayerModule) {
|
|
11
|
-
BBPlayerModule = NativeModules.BBPlayerModule;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
if (!BBPlayerModule) {
|
|
15
|
-
console.warn(
|
|
16
|
-
'[BBModalPlayer] Native BBPlayerModule not found. ' +
|
|
17
|
-
'TurboModuleRegistry and NativeModules both returned null. ' +
|
|
18
|
-
`Platform: ${Platform.OS}`,
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// NativeEventEmitter requires a non-null module on iOS to avoid warnings.
|
|
23
|
-
// Pass null-safe: events will simply never fire if module is missing.
|
|
24
|
-
const eventEmitter = BBPlayerModule
|
|
25
|
-
? new NativeEventEmitter(BBPlayerModule)
|
|
26
|
-
: new NativeEventEmitter();
|
|
3
|
+
const BBPlayerModule = NativeModules.BBPlayerModule;
|
|
4
|
+
const eventEmitter = new NativeEventEmitter(BBPlayerModule);
|
|
27
5
|
|
|
28
6
|
export interface ModalPlayerOptions {
|
|
29
7
|
autoPlay?: boolean;
|
|
@@ -34,25 +12,12 @@ export interface ModalPlayerOptions {
|
|
|
34
12
|
}
|
|
35
13
|
|
|
36
14
|
export const BBModalPlayer = {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
* When false, present() will be a no-op.
|
|
40
|
-
*/
|
|
41
|
-
get isAvailable(): boolean {
|
|
42
|
-
return BBPlayerModule != null;
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
present(jsonUrl: string, options?: ModalPlayerOptions, context?: Record<string, string>): boolean {
|
|
46
|
-
if (!BBPlayerModule) {
|
|
47
|
-
console.warn('[BBModalPlayer] present() called but native module is null — cannot open modal');
|
|
48
|
-
return false;
|
|
49
|
-
}
|
|
50
|
-
BBPlayerModule.presentModalPlayer(
|
|
15
|
+
present(jsonUrl: string, options?: ModalPlayerOptions, context?: Record<string, string>) {
|
|
16
|
+
BBPlayerModule?.presentModalPlayer(
|
|
51
17
|
jsonUrl,
|
|
52
18
|
options ? JSON.stringify(options) : null,
|
|
53
19
|
context ? JSON.stringify(context) : null,
|
|
54
20
|
);
|
|
55
|
-
return true;
|
|
56
21
|
},
|
|
57
22
|
|
|
58
23
|
dismiss() {
|