@bluebillywig/react-native-bb-player 8.46.0 → 8.47.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.
Files changed (161) hide show
  1. package/android/build.gradle +9 -3
  2. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeplayersdk/{0.0.11.8-SNAPSHOT/bbnativeplayersdk-0.0.11.8-SNAPSHOT.module → 8.47.0/bbnativeplayersdk-8.47.0.module} +14 -14
  3. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeplayersdk/{0.0.11.8-SNAPSHOT/bbnativeplayersdk-0.0.11.8-SNAPSHOT.pom → 8.47.0/bbnativeplayersdk-8.47.0.pom} +25 -3
  4. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeplayersdk-core/8.47.0/bbnativeplayersdk-core-8.47.0.aar +0 -0
  5. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeplayersdk-core/{0.0.11.8-SNAPSHOT/bbnativeplayersdk-core-0.0.11.8-SNAPSHOT.module → 8.47.0/bbnativeplayersdk-core-8.47.0.module} +26 -26
  6. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeplayersdk-core/{0.0.11.8-SNAPSHOT/bbnativeplayersdk-core-0.0.11.8-SNAPSHOT.pom → 8.47.0/bbnativeplayersdk-core-8.47.0.pom} +24 -2
  7. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeshared/{0.0.11.8-SNAPSHOT/bbnativeshared-0.0.11.8-SNAPSHOT.module → 8.47.0/bbnativeshared-8.47.0.module} +16 -16
  8. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeshared/8.47.0/bbnativeshared-8.47.0.pom +36 -0
  9. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeshared-android/{0.0.11.8-SNAPSHOT/bbnativeshared-android-0.0.11.8-SNAPSHOT.aar → 8.47.0/bbnativeshared-android-8.47.0.aar} +0 -0
  10. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeshared-android/{0.0.11.8-SNAPSHOT/bbnativeshared-android-0.0.11.8-SNAPSHOT.module → 8.47.0/bbnativeshared-android-8.47.0.module} +21 -21
  11. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeshared-android/{0.0.11.8-SNAPSHOT/bbnativeshared-android-0.0.11.8-SNAPSHOT.pom → 8.47.0/bbnativeshared-android-8.47.0.pom} +23 -1
  12. package/android/src/main/java/com/bluebillywig/bbplayer/BBPlayerModule.kt +14 -0
  13. package/android/src/main/java/com/bluebillywig/bbplayer/BBPlayerView.kt +56 -35
  14. package/android/src/paper/java/com/bluebillywig/bbplayer/NativeBBPlayerModuleSpec.java +1 -0
  15. package/ios/BBCastButtonViewManager.swift +4 -0
  16. package/ios/BBCastMiniControlsViewManager.swift +4 -0
  17. package/ios/BBPlayerModule.mm +1 -0
  18. package/ios/BBPlayerModule.swift +12 -0
  19. package/ios/BBPlayerView.swift +49 -35
  20. package/ios/Frameworks/BBNativePlayerKit.xcframework/Info.plist +5 -5
  21. package/ios/Frameworks/BBNativePlayerKit.xcframework/ios-arm64/BBNativePlayerKit.framework/Assets.car +0 -0
  22. package/ios/Frameworks/BBNativePlayerKit.xcframework/ios-arm64/BBNativePlayerKit.framework/BBNativePlayerKit +0 -0
  23. package/ios/Frameworks/BBNativePlayerKit.xcframework/ios-arm64/BBNativePlayerKit.framework/Headers/BBNativePlayerKit-Swift.h +9 -9
  24. package/ios/Frameworks/BBNativePlayerKit.xcframework/ios-arm64/BBNativePlayerKit.framework/Info.plist +0 -0
  25. package/ios/Frameworks/BBNativePlayerKit.xcframework/ios-arm64/BBNativePlayerKit.framework/Modules/BBNativePlayerKit.swiftmodule/arm64-apple-ios.abi.json +1342 -1139
  26. package/ios/Frameworks/BBNativePlayerKit.xcframework/ios-arm64/BBNativePlayerKit.framework/Modules/BBNativePlayerKit.swiftmodule/arm64-apple-ios.private.swiftinterface +136 -2
  27. package/ios/Frameworks/BBNativePlayerKit.xcframework/ios-arm64/BBNativePlayerKit.framework/Modules/BBNativePlayerKit.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  28. package/ios/Frameworks/BBNativePlayerKit.xcframework/ios-arm64/BBNativePlayerKit.framework/Modules/BBNativePlayerKit.swiftmodule/arm64-apple-ios.swiftinterface +136 -2
  29. package/ios/Frameworks/BBNativePlayerKit.xcframework/ios-arm64_x86_64-simulator/BBNativePlayerKit.framework/Assets.car +0 -0
  30. package/ios/Frameworks/BBNativePlayerKit.xcframework/ios-arm64_x86_64-simulator/BBNativePlayerKit.framework/BBNativePlayerKit +0 -0
  31. package/ios/Frameworks/BBNativePlayerKit.xcframework/ios-arm64_x86_64-simulator/BBNativePlayerKit.framework/Headers/BBNativePlayerKit-Swift.h +18 -18
  32. package/ios/Frameworks/BBNativePlayerKit.xcframework/ios-arm64_x86_64-simulator/BBNativePlayerKit.framework/Info.plist +0 -0
  33. package/ios/Frameworks/BBNativePlayerKit.xcframework/ios-arm64_x86_64-simulator/BBNativePlayerKit.framework/Modules/BBNativePlayerKit.swiftmodule/arm64-apple-ios-simulator.abi.json +1342 -1139
  34. package/ios/Frameworks/BBNativePlayerKit.xcframework/ios-arm64_x86_64-simulator/BBNativePlayerKit.framework/Modules/BBNativePlayerKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +136 -2
  35. package/ios/Frameworks/BBNativePlayerKit.xcframework/ios-arm64_x86_64-simulator/BBNativePlayerKit.framework/Modules/BBNativePlayerKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  36. package/ios/Frameworks/BBNativePlayerKit.xcframework/ios-arm64_x86_64-simulator/BBNativePlayerKit.framework/Modules/BBNativePlayerKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface +136 -2
  37. package/ios/Frameworks/BBNativePlayerKit.xcframework/ios-arm64_x86_64-simulator/BBNativePlayerKit.framework/Modules/BBNativePlayerKit.swiftmodule/x86_64-apple-ios-simulator.abi.json +1342 -1139
  38. package/ios/Frameworks/BBNativePlayerKit.xcframework/ios-arm64_x86_64-simulator/BBNativePlayerKit.framework/Modules/BBNativePlayerKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +136 -2
  39. package/ios/Frameworks/BBNativePlayerKit.xcframework/ios-arm64_x86_64-simulator/BBNativePlayerKit.framework/Modules/BBNativePlayerKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  40. package/ios/Frameworks/BBNativePlayerKit.xcframework/ios-arm64_x86_64-simulator/BBNativePlayerKit.framework/Modules/BBNativePlayerKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +136 -2
  41. package/ios/Frameworks/bbnativeshared.xcframework/Info.plist +5 -5
  42. package/ios/Frameworks/bbnativeshared.xcframework/ios-arm64/bbnativeshared.framework/Headers/bbnativeshared.h +3 -2
  43. package/ios/Frameworks/bbnativeshared.xcframework/ios-arm64/bbnativeshared.framework/bbnativeshared +0 -0
  44. package/ios/Frameworks/bbnativeshared.xcframework/ios-arm64/dSYMs/bbnativeshared.framework.dSYM/Contents/Resources/DWARF/bbnativeshared +0 -0
  45. package/ios/Frameworks/bbnativeshared.xcframework/ios-arm64/dSYMs/bbnativeshared.framework.dSYM/Contents/Resources/Relocations/aarch64/bbnativeshared.yml +3276 -3274
  46. package/ios/Frameworks/bbnativeshared.xcframework/ios-arm64_x86_64-simulator/bbnativeshared.framework/Headers/bbnativeshared.h +3 -2
  47. package/ios/Frameworks/bbnativeshared.xcframework/ios-arm64_x86_64-simulator/bbnativeshared.framework/bbnativeshared +0 -0
  48. package/ios/Frameworks/bbnativeshared.xcframework/ios-arm64_x86_64-simulator/dSYMs/bbnativeshared.framework.dSYM/Contents/Resources/DWARF/bbnativeshared +0 -0
  49. package/lib/commonjs/BBCastButton.js +7 -12
  50. package/lib/commonjs/BBCastButton.js.map +1 -1
  51. package/lib/commonjs/BBCastMiniControls.js +7 -12
  52. package/lib/commonjs/BBCastMiniControls.js.map +1 -1
  53. package/lib/commonjs/BBOutstreamView.js +2 -0
  54. package/lib/commonjs/BBOutstreamView.js.map +1 -1
  55. package/lib/commonjs/NativeCommands.js +17 -6
  56. package/lib/commonjs/NativeCommands.js.map +1 -1
  57. package/lib/commonjs/castAvailability.js +30 -0
  58. package/lib/commonjs/castAvailability.js.map +1 -0
  59. package/lib/commonjs/index.js +4 -0
  60. package/lib/commonjs/index.js.map +1 -1
  61. package/lib/commonjs/specs/BBCastButtonViewNativeComponent.js +12 -0
  62. package/lib/commonjs/specs/BBCastButtonViewNativeComponent.js.map +1 -0
  63. package/lib/commonjs/specs/BBCastMiniControlsViewNativeComponent.js +12 -0
  64. package/lib/commonjs/specs/BBCastMiniControlsViewNativeComponent.js.map +1 -0
  65. package/lib/commonjs/specs/BBPlayerViewNativeComponent.js +27 -0
  66. package/lib/commonjs/specs/BBPlayerViewNativeComponent.js.map +1 -0
  67. package/lib/commonjs/specs/BBShortsViewNativeComponent.js +17 -0
  68. package/lib/commonjs/specs/BBShortsViewNativeComponent.js.map +1 -0
  69. package/lib/commonjs/specs/NativeBBPlayerModule.js.map +1 -1
  70. package/lib/module/BBCastButton.js +7 -12
  71. package/lib/module/BBCastButton.js.map +1 -1
  72. package/lib/module/BBCastMiniControls.js +7 -12
  73. package/lib/module/BBCastMiniControls.js.map +1 -1
  74. package/lib/module/BBOutstreamView.js +2 -0
  75. package/lib/module/BBOutstreamView.js.map +1 -1
  76. package/lib/module/NativeCommands.js +17 -6
  77. package/lib/module/NativeCommands.js.map +1 -1
  78. package/lib/module/castAvailability.js +27 -0
  79. package/lib/module/castAvailability.js.map +1 -0
  80. package/lib/module/index.js +8 -0
  81. package/lib/module/index.js.map +1 -1
  82. package/lib/module/specs/BBCastButtonViewNativeComponent.js +7 -0
  83. package/lib/module/specs/BBCastButtonViewNativeComponent.js.map +1 -0
  84. package/lib/module/specs/BBCastMiniControlsViewNativeComponent.js +7 -0
  85. package/lib/module/specs/BBCastMiniControlsViewNativeComponent.js.map +1 -0
  86. package/lib/module/specs/BBPlayerViewNativeComponent.js +24 -0
  87. package/lib/module/specs/BBPlayerViewNativeComponent.js.map +1 -0
  88. package/lib/module/specs/BBShortsViewNativeComponent.js +14 -0
  89. package/lib/module/specs/BBShortsViewNativeComponent.js.map +1 -0
  90. package/lib/module/specs/NativeBBPlayerModule.js.map +1 -1
  91. package/lib/typescript/src/BBCastButton.d.ts +4 -9
  92. package/lib/typescript/src/BBCastButton.d.ts.map +1 -1
  93. package/lib/typescript/src/BBCastMiniControls.d.ts +4 -9
  94. package/lib/typescript/src/BBCastMiniControls.d.ts.map +1 -1
  95. package/lib/typescript/src/BBOutstreamView.d.ts.map +1 -1
  96. package/lib/typescript/src/BBPlayer.types.d.ts +23 -16
  97. package/lib/typescript/src/BBPlayer.types.d.ts.map +1 -1
  98. package/lib/typescript/src/NativeCommands.d.ts +3 -5
  99. package/lib/typescript/src/NativeCommands.d.ts.map +1 -1
  100. package/lib/typescript/src/castAvailability.d.ts +2 -0
  101. package/lib/typescript/src/castAvailability.d.ts.map +1 -0
  102. package/lib/typescript/src/index.d.ts +4 -0
  103. package/lib/typescript/src/index.d.ts.map +1 -1
  104. package/lib/typescript/src/specs/BBCastButtonViewNativeComponent.d.ts +8 -0
  105. package/lib/typescript/src/specs/BBCastButtonViewNativeComponent.d.ts.map +1 -0
  106. package/lib/typescript/src/specs/BBCastMiniControlsViewNativeComponent.d.ts +7 -0
  107. package/lib/typescript/src/specs/BBCastMiniControlsViewNativeComponent.d.ts.map +1 -0
  108. package/lib/typescript/src/specs/BBPlayerViewNativeComponent.d.ts +92 -0
  109. package/lib/typescript/src/specs/BBPlayerViewNativeComponent.d.ts.map +1 -0
  110. package/lib/typescript/src/specs/BBShortsViewNativeComponent.d.ts +24 -0
  111. package/lib/typescript/src/specs/BBShortsViewNativeComponent.d.ts.map +1 -0
  112. package/lib/typescript/src/specs/NativeBBPlayerModule.d.ts +1 -0
  113. package/lib/typescript/src/specs/NativeBBPlayerModule.d.ts.map +1 -1
  114. package/package.json +3 -2
  115. package/src/BBCastButton.tsx +8 -12
  116. package/src/BBCastMiniControls.tsx +8 -13
  117. package/src/BBOutstreamView.tsx +3 -0
  118. package/src/BBPlayer.types.ts +28 -16
  119. package/src/NativeCommands.ts +18 -15
  120. package/src/castAvailability.ts +30 -0
  121. package/src/index.ts +8 -0
  122. package/src/specs/BBCastButtonViewNativeComponent.ts +10 -0
  123. package/src/specs/BBCastMiniControlsViewNativeComponent.ts +8 -0
  124. package/src/specs/BBPlayerViewNativeComponent.ts +74 -0
  125. package/src/specs/BBShortsViewNativeComponent.ts +21 -0
  126. package/src/specs/NativeBBPlayerModule.ts +1 -0
  127. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeplayersdk/0.0.11.8-SNAPSHOT/bbnativeplayersdk-0.0.11.8-SNAPSHOT-javadoc.jar +0 -0
  128. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeplayersdk/0.0.11.8-SNAPSHOT/bbnativeplayersdk-0.0.11.8-SNAPSHOT-sources.jar +0 -0
  129. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeplayersdk/0.0.11.8-SNAPSHOT/maven-metadata-local.xml +0 -41
  130. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeplayersdk/maven-metadata-local.xml +0 -12
  131. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeplayersdk-compose/0.0.11.8-SNAPSHOT/bbnativeplayersdk-compose-0.0.11.8-SNAPSHOT-javadoc.jar +0 -0
  132. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeplayersdk-compose/0.0.11.8-SNAPSHOT/bbnativeplayersdk-compose-0.0.11.8-SNAPSHOT-sources.jar +0 -0
  133. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeplayersdk-compose/0.0.11.8-SNAPSHOT/bbnativeplayersdk-compose-0.0.11.8-SNAPSHOT.aar +0 -0
  134. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeplayersdk-compose/0.0.11.8-SNAPSHOT/bbnativeplayersdk-compose-0.0.11.8-SNAPSHOT.module +0 -167
  135. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeplayersdk-compose/0.0.11.8-SNAPSHOT/bbnativeplayersdk-compose-0.0.11.8-SNAPSHOT.pom +0 -61
  136. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeplayersdk-compose/0.0.11.8-SNAPSHOT/maven-metadata-local.xml +0 -41
  137. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeplayersdk-compose/maven-metadata-local.xml +0 -12
  138. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeplayersdk-core/0.0.11.8-SNAPSHOT/bbnativeplayersdk-core-0.0.11.8-SNAPSHOT-javadoc.jar +0 -0
  139. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeplayersdk-core/0.0.11.8-SNAPSHOT/bbnativeplayersdk-core-0.0.11.8-SNAPSHOT-sources.jar +0 -0
  140. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeplayersdk-core/0.0.11.8-SNAPSHOT/bbnativeplayersdk-core-0.0.11.8-SNAPSHOT.aar +0 -0
  141. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeplayersdk-core/0.0.11.8-SNAPSHOT/maven-metadata-local.xml +0 -41
  142. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeplayersdk-core/maven-metadata-local.xml +0 -12
  143. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeshared/0.0.11.8-SNAPSHOT/bbnativeshared-0.0.11.8-SNAPSHOT-javadoc.jar +0 -0
  144. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeshared/0.0.11.8-SNAPSHOT/bbnativeshared-0.0.11.8-SNAPSHOT-kotlin-tooling-metadata.json +0 -28
  145. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeshared/0.0.11.8-SNAPSHOT/bbnativeshared-0.0.11.8-SNAPSHOT-sources.jar +0 -0
  146. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeshared/0.0.11.8-SNAPSHOT/bbnativeshared-0.0.11.8-SNAPSHOT.pom +0 -14
  147. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeshared/0.0.11.8-SNAPSHOT/maven-metadata-local.xml +0 -47
  148. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeshared/maven-metadata-local.xml +0 -12
  149. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeshared-android/0.0.11.8-SNAPSHOT/bbnativeshared-android-0.0.11.8-SNAPSHOT-javadoc.jar +0 -0
  150. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeshared-android/0.0.11.8-SNAPSHOT/bbnativeshared-android-0.0.11.8-SNAPSHOT-sources.jar +0 -0
  151. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeshared-android/0.0.11.8-SNAPSHOT/maven-metadata-local.xml +0 -41
  152. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeshared-android/maven-metadata-local.xml +0 -12
  153. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeshared-android-debug/0.0.11.8-SNAPSHOT/bbnativeshared-android-debug-0.0.11.8-SNAPSHOT-javadoc.jar +0 -0
  154. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeshared-android-debug/0.0.11.8-SNAPSHOT/bbnativeshared-android-debug-0.0.11.8-SNAPSHOT-sources.jar +0 -0
  155. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeshared-android-debug/0.0.11.8-SNAPSHOT/bbnativeshared-android-debug-0.0.11.8-SNAPSHOT.aar +0 -0
  156. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeshared-android-debug/0.0.11.8-SNAPSHOT/bbnativeshared-android-debug-0.0.11.8-SNAPSHOT.module +0 -332
  157. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeshared-android-debug/0.0.11.8-SNAPSHOT/bbnativeshared-android-debug-0.0.11.8-SNAPSHOT.pom +0 -245
  158. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeshared-android-debug/0.0.11.8-SNAPSHOT/maven-metadata-local.xml +0 -41
  159. package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeshared-android-debug/maven-metadata-local.xml +0 -12
  160. /package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeplayersdk/{0.0.11.8-SNAPSHOT/bbnativeplayersdk-0.0.11.8-SNAPSHOT.aar → 8.47.0/bbnativeplayersdk-8.47.0.aar} +0 -0
  161. /package/android/repo/com/bluebillywig/bbnativeplayersdk/bbnativeshared/{0.0.11.8-SNAPSHOT/bbnativeshared-0.0.11.8-SNAPSHOT.jar → 8.47.0/bbnativeshared-8.47.0.jar} +0 -0
@@ -293,74 +293,95 @@ class BBPlayerView(private val reactContext: ThemedReactContext) : FrameLayout(r
293
293
  }
294
294
 
295
295
  /**
296
- * Load content from a JSON URL into the existing player.
297
- * Extracts IDs from the URL and uses the native SDK's loadWithXxxId methods.
298
- * This is more reliable than parsing JSON because the SDK handles all the loading internally.
296
+ * Load content by explicit content ID and type. Preferred over loadWithJsonUrl.
299
297
  *
300
- * Note: Shorts URLs (/sh/{id}.json) are NOT supported here - use BBShortsView instead.
298
+ * @param contentId numeric content ID string
299
+ * @param contentType "mediaclip" | "mediacliplist" | "project" (or short forms "c", "l", "p"/"pj")
300
+ * @param autoPlay whether to start playback immediately
301
+ * @param contextJson optional context JSON string
301
302
  */
302
- fun loadWithJsonUrl(url: String, autoPlay: Boolean = true, contextJson: String? = null) {
303
+ fun loadWithContentIdAndType(contentId: String, contentType: String, autoPlay: Boolean = true, contextJson: String? = null) {
303
304
  if (!::playerView.isInitialized) {
304
305
  Log.w("BBPlayerView", "Cannot load content - playerView not initialized")
305
306
  return
306
307
  }
308
+ Log.d("BBPlayerView", "loadWithContentIdAndType called - id: $contentId, type: $contentType, autoPlay: $autoPlay")
309
+ val context = parseContext(contextJson)
310
+ when (contentType.lowercase()) {
311
+ "mediacliplist", "l" -> playerView.player?.loadWithClipListId(contentId, "external", autoPlay, null, context)
312
+ "project", "p", "pj" -> playerView.player?.loadWithProjectId(contentId, "external", autoPlay, null, context)
313
+ "mediaclip", "c" -> playerView.player?.loadWithClipId(contentId, "external", autoPlay, null, context)
314
+ else -> {
315
+ Log.e("BBPlayerView", "loadWithContentIdAndType: unknown contentType '$contentType'")
316
+ sendEvent("onDidFailWithError", Arguments.createMap().apply {
317
+ putString("payload", "Unknown contentType: '$contentType'. Expected one of: mediaclip, mediacliplist, project")
318
+ })
319
+ }
320
+ }
321
+ }
307
322
 
308
- Log.d("BBPlayerView", "loadWithJsonUrl called with URL: $url, context: $contextJson")
323
+ /**
324
+ * Convenience method: load content from a BB JSON URL.
325
+ * Parses the URL to extract content ID and type, then delegates to loadWithContentIdAndType.
326
+ * Note: Shorts URLs (/sh/{id}.json) are NOT supported — use BBShortsView instead.
327
+ */
328
+ fun loadWithJsonUrl(url: String, autoPlay: Boolean = true, contextJson: String? = null) {
329
+ if (!::playerView.isInitialized) {
330
+ Log.w("BBPlayerView", "Cannot load content - playerView not initialized")
331
+ return
332
+ }
309
333
 
310
- // Extract ID from URL patterns like:
311
- // /c/{id}.json or /mediaclip/{id}.json -> clip ID
312
- // /l/{id}.json or /mediacliplist/{id}.json -> clip list ID
313
- // /pj/{id}.json or /project/{id}.json -> project ID
334
+ Log.d("BBPlayerView", "loadWithJsonUrl called with URL: $url")
314
335
 
315
- val clipIdRegex = Regex("/c/([0-9]+)\\.json|/mediaclip/([0-9]+)")
316
- val clipListIdRegex = Regex("/l/([0-9]+)\\.json|/mediacliplist/([0-9]+)")
317
- val projectIdRegex = Regex("/pj/([0-9]+)\\.json|/project/([0-9]+)")
318
336
  val shortsIdRegex = Regex("/sh/([0-9]+)\\.json")
337
+ val clipListIdRegex = Regex("/l/([0-9]+)\\.json|/mediacliplist/([0-9]+)")
338
+ val projectIdRegex = Regex("/pj/([0-9]+)\\.json|/p/[^/]+/p/([0-9]+)\\.json|/project/([0-9]+)")
339
+ val clipIdRegex = Regex("/c/([0-9]+)\\.json|/mediaclip/([0-9]+)")
319
340
 
320
- val context = parseContext(contextJson)
341
+ fun extractId(regex: Regex): String? =
342
+ regex.find(url)?.groupValues?.drop(1)?.firstOrNull { it.isNotEmpty() }
321
343
 
322
344
  when {
323
345
  shortsIdRegex.containsMatchIn(url) -> {
324
- // Shorts require a separate BBShortsView component
325
346
  Log.e("BBPlayerView", "Shorts URLs are not supported in BBPlayerView. Use BBShortsView instead.")
326
347
  sendEvent("onDidFailWithError", Arguments.createMap().apply {
327
- putString("error", "Shorts URLs are not supported in BBPlayerView. Use BBShortsView instead.")
348
+ putString("payload", "Shorts URLs are not supported in BBPlayerView. Use BBShortsView instead.")
328
349
  })
329
350
  }
330
351
  clipListIdRegex.containsMatchIn(url) -> {
331
- val match = clipListIdRegex.find(url)
332
- val clipListId = match?.groupValues?.drop(1)?.firstOrNull { it.isNotEmpty() }
333
- if (clipListId != null) {
334
- Log.d("BBPlayerView", "Loading ClipList by ID: $clipListId")
335
- playerView.player?.loadWithClipListId(clipListId, "external", autoPlay, null, context)
336
- } else {
352
+ val id = extractId(clipListIdRegex)
353
+ if (id != null) loadWithContentIdAndType(id, "mediacliplist", autoPlay, contextJson)
354
+ else {
337
355
  Log.e("BBPlayerView", "Failed to extract cliplist ID from URL: $url")
356
+ sendEvent("onDidFailWithError", Arguments.createMap().apply {
357
+ putString("payload", "Cannot load content: failed to extract ID from URL")
358
+ })
338
359
  }
339
360
  }
340
361
  projectIdRegex.containsMatchIn(url) -> {
341
- val match = projectIdRegex.find(url)
342
- val projectId = match?.groupValues?.drop(1)?.firstOrNull { it.isNotEmpty() }
343
- if (projectId != null) {
344
- Log.d("BBPlayerView", "Loading Project by ID: $projectId")
345
- playerView.player?.loadWithProjectId(projectId, "external", autoPlay, null, context)
346
- } else {
362
+ val id = extractId(projectIdRegex)
363
+ if (id != null) loadWithContentIdAndType(id, "project", autoPlay, contextJson)
364
+ else {
347
365
  Log.e("BBPlayerView", "Failed to extract project ID from URL: $url")
366
+ sendEvent("onDidFailWithError", Arguments.createMap().apply {
367
+ putString("payload", "Cannot load content: failed to extract ID from URL")
368
+ })
348
369
  }
349
370
  }
350
371
  clipIdRegex.containsMatchIn(url) -> {
351
- val match = clipIdRegex.find(url)
352
- val clipId = match?.groupValues?.drop(1)?.firstOrNull { it.isNotEmpty() }
353
- if (clipId != null) {
354
- Log.d("BBPlayerView", "Loading Clip by ID: $clipId")
355
- playerView.player?.loadWithClipId(clipId, "external", autoPlay, null, context)
356
- } else {
372
+ val id = extractId(clipIdRegex)
373
+ if (id != null) loadWithContentIdAndType(id, "mediaclip", autoPlay, contextJson)
374
+ else {
357
375
  Log.e("BBPlayerView", "Failed to extract clip ID from URL: $url")
376
+ sendEvent("onDidFailWithError", Arguments.createMap().apply {
377
+ putString("payload", "Cannot load content: failed to extract ID from URL")
378
+ })
358
379
  }
359
380
  }
360
381
  else -> {
361
382
  Log.e("BBPlayerView", "Unknown URL format, cannot extract ID: $url")
362
383
  sendEvent("onDidFailWithError", Arguments.createMap().apply {
363
- putString("error", "Cannot load content: unsupported URL format")
384
+ putString("payload", "Cannot load content: unsupported URL format")
364
385
  })
365
386
  }
366
387
  }
@@ -56,6 +56,7 @@ public abstract class NativeBBPlayerModuleSpec extends ReactContextBaseJavaModul
56
56
  public abstract void loadWithClipListJson(int viewTag, String clipListJson, String initiator, boolean autoPlay, double seekTo, String contextJson);
57
57
  public abstract void loadWithProjectJson(int viewTag, String projectJson, String initiator, boolean autoPlay, double seekTo, String contextJson);
58
58
  public abstract void loadWithJsonUrl(int viewTag, String jsonUrl, boolean autoPlay, String contextJson);
59
+ public abstract void loadWithContentIdAndType(int viewTag, String contentId, String contentType, boolean autoPlay, String contextJson);
59
60
 
60
61
  // Viewability control
61
62
  public abstract void setInView(int viewTag, boolean inView);
@@ -9,4 +9,8 @@ class BBCastButtonViewManager: RCTViewManager {
9
9
  override static func requiresMainQueueSetup() -> Bool {
10
10
  return true
11
11
  }
12
+
13
+ @objc override static func moduleName() -> String! {
14
+ return "BBCastButtonView"
15
+ }
12
16
  }
@@ -9,4 +9,8 @@ class BBCastMiniControlsViewManager: RCTViewManager {
9
9
  override static func requiresMainQueueSetup() -> Bool {
10
10
  return true
11
11
  }
12
+
13
+ @objc override static func moduleName() -> String! {
14
+ return "BBCastMiniControlsView"
15
+ }
12
16
  }
@@ -37,6 +37,7 @@ RCT_EXTERN_METHOD(loadWithClipJson:(nonnull NSNumber *)viewTag clipJson:(NSStrin
37
37
  RCT_EXTERN_METHOD(loadWithClipListJson:(nonnull NSNumber *)viewTag clipListJson:(NSString *)clipListJson initiator:(NSString *)initiator autoPlay:(BOOL)autoPlay seekTo:(NSNumber *)seekTo contextJson:(NSString *)contextJson)
38
38
  RCT_EXTERN_METHOD(loadWithProjectJson:(nonnull NSNumber *)viewTag projectJson:(NSString *)projectJson initiator:(NSString *)initiator autoPlay:(BOOL)autoPlay seekTo:(NSNumber *)seekTo contextJson:(NSString *)contextJson)
39
39
  RCT_EXTERN_METHOD(loadWithJsonUrl:(nonnull NSNumber *)viewTag jsonUrl:(NSString *)jsonUrl autoPlay:(BOOL)autoPlay contextJson:(NSString *)contextJson)
40
+ RCT_EXTERN_METHOD(loadWithContentIdAndType:(nonnull NSNumber *)viewTag contentId:(NSString *)contentId contentType:(NSString *)contentType autoPlay:(BOOL)autoPlay contextJson:(NSString *)contextJson)
40
41
 
41
42
  // Getter methods with Promise
42
43
  RCT_EXTERN_METHOD(getDuration:(nonnull NSNumber *)viewTag resolver:(RCTPromiseResolveBlock)resolver rejecter:(RCTPromiseRejectBlock)rejecter)
@@ -234,6 +234,18 @@ class BBPlayerModule: RCTEventEmitter {
234
234
  }
235
235
  }
236
236
 
237
+ @objc func loadWithContentIdAndType(_ viewTag: NSNumber, contentId: String?, contentType: String?, autoPlay: Bool, contextJson: String?) {
238
+ DispatchQueue.main.async {
239
+ let view = self.getView(viewTag)
240
+ guard let view = view, let id = contentId, let type = contentType else {
241
+ NSLog("BBPlayerModule.loadWithContentIdAndType - FAILED: view=%@, id=%@, type=%@",
242
+ view != nil ? "found" : "nil", contentId ?? "nil", contentType ?? "nil")
243
+ return
244
+ }
245
+ view.loadWithContentIdAndType(id, contentType: type, autoPlay: autoPlay, contextJson: contextJson)
246
+ }
247
+ }
248
+
237
249
  // MARK: - Getter methods with Promise support
238
250
 
239
251
  @objc func getDuration(_ viewTag: NSNumber, resolver: @escaping RCTPromiseResolveBlock, rejecter: @escaping RCTPromiseRejectBlock) {
@@ -646,69 +646,83 @@ class BBPlayerView: UIView, BBNativePlayerViewDelegate {
646
646
  }
647
647
 
648
648
  /**
649
- * Load content from a JSON URL into the existing player.
650
- * Extracts IDs from the URL and uses the native SDK's loadWithXxxId methods.
651
- * This is more reliable than parsing JSON because the SDK handles all the loading internally.
649
+ * Load content by explicit content ID and type. Preferred over loadWithJsonUrl.
652
650
  *
653
- * Note: Shorts URLs (/sh/{id}.json) are NOT supported here - use BBShortsView instead.
651
+ * - Parameters:
652
+ * - contentId: numeric content ID string
653
+ * - contentType: "mediaclip", "mediacliplist", or "project" (short forms "c", "l", "p"/"pj" also accepted)
654
+ * - autoPlay: whether to start playback immediately
655
+ * - contextJson: optional context JSON string
656
+ */
657
+ func loadWithContentIdAndType(_ contentId: String, contentType: String, autoPlay: Bool, contextJson: String? = nil) {
658
+ guard playerView != nil else {
659
+ NSLog("BBPlayerView.loadWithContentIdAndType ERROR - playerView not initialized")
660
+ return
661
+ }
662
+ NSLog("BBPlayerView.loadWithContentIdAndType called - id: %@, type: %@, autoPlay: %d", contentId, contentType, autoPlay)
663
+ let context = parseContext(contextJson)
664
+ switch contentType.lowercased() {
665
+ case "mediacliplist", "l":
666
+ playerView?.player.loadWithClipListId(clipListId: contentId, initiator: "external", autoPlay: autoPlay, seekTo: nil, context: context)
667
+ case "project", "p", "pj":
668
+ playerView?.player.loadWithProjectId(projectId: contentId, initiator: "external", autoPlay: autoPlay, seekTo: nil, context: context)
669
+ case "mediaclip", "c":
670
+ playerView?.player.loadWithClipId(clipId: contentId, initiator: "external", autoPlay: autoPlay, seekTo: nil, context: context)
671
+ default:
672
+ NSLog("BBPlayerView.loadWithContentIdAndType ERROR - unknown contentType '%@'", contentType)
673
+ onDidFailWithError?(["payload": "Unknown contentType: '\(contentType)'. Expected one of: mediaclip, mediacliplist, project"])
674
+ }
675
+ }
676
+
677
+ /**
678
+ * Convenience method: load content from a BB JSON URL.
679
+ * Parses the URL to extract content ID and type, then delegates to loadWithContentIdAndType.
680
+ * Note: Shorts URLs (/sh/{id}.json) are NOT supported — use BBShortsView instead.
654
681
  */
655
682
  func loadWithJsonUrl(_ url: String, autoPlay: Bool, contextJson: String? = nil) {
656
- NSLog("BBPlayerView.loadWithJsonUrl called - url: %@, autoPlay: %d, context: %@", url, autoPlay, contextJson ?? "nil")
683
+ NSLog("BBPlayerView.loadWithJsonUrl called - url: %@, autoPlay: %d", url, autoPlay)
657
684
  guard playerView != nil else {
658
685
  NSLog("BBPlayerView.loadWithJsonUrl ERROR - playerView not initialized")
659
686
  return
660
687
  }
661
688
 
662
- NSLog("BBPlayerView.loadWithJsonUrl - playerView exists, parsing URL")
663
-
664
- // Extract ID from URL patterns like:
665
- // /c/{id}.json or /mediaclip/{id}.json -> clip ID
666
- // /l/{id}.json or /mediacliplist/{id}.json -> clip list ID
667
- // /pj/{id}.json or /project/{id}.json -> project ID
668
-
669
- let clipIdPattern = "/c/([0-9]+)\\.json|/mediaclip/([0-9]+)"
670
- let clipListIdPattern = "/l/([0-9]+)\\.json|/mediacliplist/([0-9]+)"
671
- let projectIdPattern = "/pj/([0-9]+)\\.json|/project/([0-9]+)"
672
- let shortsIdPattern = "/sh/([0-9]+)\\.json"
673
-
674
- let context = parseContext(contextJson)
689
+ let shortsPattern = "/sh/([0-9]+)\\.json"
690
+ let clipListPattern = "/l/([0-9]+)\\.json|/mediacliplist/([0-9]+)"
691
+ let projectPattern = "/pj/([0-9]+)\\.json|/p/[^/]+/p/([0-9]+)\\.json|/project/([0-9]+)"
692
+ let clipPattern = "/c/([0-9]+)\\.json|/mediaclip/([0-9]+)"
675
693
 
676
- if let shortsMatch = url.range(of: shortsIdPattern, options: .regularExpression) {
677
- // Shorts require a separate BBShortsView component
694
+ if url.range(of: shortsPattern, options: .regularExpression) != nil {
678
695
  log("ERROR - Shorts URLs are not supported in BBPlayerView. Use BBShortsView instead.", level: .error)
679
696
  onDidFailWithError?(["payload": "Shorts URLs are not supported in BBPlayerView. Use BBShortsView instead."])
680
697
  return
681
698
  }
682
699
 
683
- if let match = url.range(of: clipListIdPattern, options: .regularExpression) {
684
- // Extract the cliplist ID
685
- if let clipListId = extractIdFromUrl(url, pattern: clipListIdPattern) {
686
- NSLog("BBPlayerView.loadWithJsonUrl - Loading ClipList by ID: %@", clipListId)
687
- playerView?.player.loadWithClipListId(clipListId: clipListId, initiator: "external", autoPlay: autoPlay, seekTo: nil, context: context)
700
+ if url.range(of: clipListPattern, options: .regularExpression) != nil {
701
+ if let id = extractIdFromUrl(url, pattern: clipListPattern) {
702
+ loadWithContentIdAndType(id, contentType: "mediacliplist", autoPlay: autoPlay, contextJson: contextJson)
688
703
  } else {
689
704
  NSLog("BBPlayerView.loadWithJsonUrl ERROR - Failed to extract cliplist ID from URL: %@", url)
705
+ onDidFailWithError?(["payload": "Cannot load content: failed to extract ID from URL"])
690
706
  }
691
707
  return
692
708
  }
693
709
 
694
- if let match = url.range(of: projectIdPattern, options: .regularExpression) {
695
- // Extract the project ID
696
- if let projectId = extractIdFromUrl(url, pattern: projectIdPattern) {
697
- NSLog("BBPlayerView.loadWithJsonUrl - Loading Project by ID: %@", projectId)
698
- playerView?.player.loadWithProjectId(projectId: projectId, initiator: "external", autoPlay: autoPlay, seekTo: nil, context: context)
710
+ if url.range(of: projectPattern, options: .regularExpression) != nil {
711
+ if let id = extractIdFromUrl(url, pattern: projectPattern) {
712
+ loadWithContentIdAndType(id, contentType: "project", autoPlay: autoPlay, contextJson: contextJson)
699
713
  } else {
700
714
  NSLog("BBPlayerView.loadWithJsonUrl ERROR - Failed to extract project ID from URL: %@", url)
715
+ onDidFailWithError?(["payload": "Cannot load content: failed to extract ID from URL"])
701
716
  }
702
717
  return
703
718
  }
704
719
 
705
- if let match = url.range(of: clipIdPattern, options: .regularExpression) {
706
- // Extract the clip ID
707
- if let clipId = extractIdFromUrl(url, pattern: clipIdPattern) {
708
- NSLog("BBPlayerView.loadWithJsonUrl - Loading Clip by ID: %@", clipId)
709
- playerView?.player.loadWithClipId(clipId: clipId, initiator: "external", autoPlay: autoPlay, seekTo: nil, context: context)
720
+ if url.range(of: clipPattern, options: .regularExpression) != nil {
721
+ if let id = extractIdFromUrl(url, pattern: clipPattern) {
722
+ loadWithContentIdAndType(id, contentType: "mediaclip", autoPlay: autoPlay, contextJson: contextJson)
710
723
  } else {
711
724
  NSLog("BBPlayerView.loadWithJsonUrl ERROR - Failed to extract clip ID from URL: %@", url)
725
+ onDidFailWithError?(["payload": "Cannot load content: failed to extract ID from URL"])
712
726
  }
713
727
  return
714
728
  }
@@ -8,32 +8,32 @@
8
8
  <key>BinaryPath</key>
9
9
  <string>BBNativePlayerKit.framework/BBNativePlayerKit</string>
10
10
  <key>LibraryIdentifier</key>
11
- <string>ios-arm64</string>
11
+ <string>ios-arm64_x86_64-simulator</string>
12
12
  <key>LibraryPath</key>
13
13
  <string>BBNativePlayerKit.framework</string>
14
14
  <key>SupportedArchitectures</key>
15
15
  <array>
16
16
  <string>arm64</string>
17
+ <string>x86_64</string>
17
18
  </array>
18
19
  <key>SupportedPlatform</key>
19
20
  <string>ios</string>
21
+ <key>SupportedPlatformVariant</key>
22
+ <string>simulator</string>
20
23
  </dict>
21
24
  <dict>
22
25
  <key>BinaryPath</key>
23
26
  <string>BBNativePlayerKit.framework/BBNativePlayerKit</string>
24
27
  <key>LibraryIdentifier</key>
25
- <string>ios-arm64_x86_64-simulator</string>
28
+ <string>ios-arm64</string>
26
29
  <key>LibraryPath</key>
27
30
  <string>BBNativePlayerKit.framework</string>
28
31
  <key>SupportedArchitectures</key>
29
32
  <array>
30
33
  <string>arm64</string>
31
- <string>x86_64</string>
32
34
  </array>
33
35
  <key>SupportedPlatform</key>
34
36
  <string>ios</string>
35
- <key>SupportedPlatformVariant</key>
36
- <string>simulator</string>
37
37
  </dict>
38
38
  </array>
39
39
  <key>CFBundlePackageType</key>
@@ -1,6 +1,6 @@
1
1
  #if 0
2
2
  #elif defined(__arm64__) && __arm64__
3
- // Generated by Apple Swift version 6.1.2 (swiftlang-6.1.2.1.2 clang-1700.0.13.5)
3
+ // Generated by Apple Swift version 6.2.4 (swiftlang-6.2.4.1.4 clang-1700.6.4.2)
4
4
  #ifndef BBNATIVEPLAYERKIT_SWIFT_H
5
5
  #define BBNATIVEPLAYERKIT_SWIFT_H
6
6
  #pragma clang diagnostic push
@@ -358,14 +358,14 @@ SWIFT_CLASS("_TtC17BBNativePlayerKit28BBNativePlayerViewController")
358
358
  @property (nonatomic, readonly) UIInterfaceOrientationMask supportedInterfaceOrientations;
359
359
  @end
360
360
 
361
- @interface BBNativePlayerViewController (SWIFT_EXTENSION(BBNativePlayerKit)) <GCKDiscoveryManagerListener>
362
- - (void)didUpdateDeviceList;
363
- @end
364
-
365
361
  @interface BBNativePlayerViewController (SWIFT_EXTENSION(BBNativePlayerKit)) <BbnativesharedEventListenerInterface>
366
362
  - (void)onEventEventType:(BbnativesharedEventName * _Nonnull)eventType data:(NSDictionary<NSString *, id> * _Nullable)data;
367
363
  @end
368
364
 
365
+ @interface BBNativePlayerViewController (SWIFT_EXTENSION(BBNativePlayerKit)) <GCKDiscoveryManagerListener>
366
+ - (void)didUpdateDeviceList;
367
+ @end
368
+
369
369
  @interface BBNativePlayerViewController (SWIFT_EXTENSION(BBNativePlayerKit)) <UIGestureRecognizerDelegate>
370
370
  - (BOOL)gestureRecognizer:(UIGestureRecognizer * _Nonnull)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer * _Nonnull)otherGestureRecognizer SWIFT_WARN_UNUSED_RESULT;
371
371
  - (BOOL)gestureRecognizer:(UIGestureRecognizer * _Nonnull)gestureRecognizer shouldReceiveTouch:(UITouch * _Nonnull)touch SWIFT_WARN_UNUSED_RESULT;
@@ -650,14 +650,14 @@ SWIFT_CLASS("_TtC17BBNativePlayerKit18BBNativeShortsView")
650
650
  - (void)removeFromSuperview;
651
651
  @end
652
652
 
653
- @interface BBNativeShortsView (SWIFT_EXTENSION(BBNativePlayerKit)) <BbnativesharedEventListenerInterface>
654
- - (void)onEventEventType:(BbnativesharedEventName * _Nonnull)eventType data:(NSDictionary<NSString *, id> * _Nullable)data;
655
- @end
656
-
657
653
  @interface BBNativeShortsView (SWIFT_EXTENSION(BBNativePlayerKit)) <BBNativePlayerViewDelegate>
658
654
  - (void)bbNativePlayerViewWithPlayerView:(BBNativePlayerView * _Nonnull)playerView didSetupWithJsonUrl:(NSString * _Nullable)url;
659
655
  @end
660
656
 
657
+ @interface BBNativeShortsView (SWIFT_EXTENSION(BBNativePlayerKit)) <BbnativesharedEventListenerInterface>
658
+ - (void)onEventEventType:(BbnativesharedEventName * _Nonnull)eventType data:(NSDictionary<NSString *, id> * _Nullable)data;
659
+ @end
660
+
661
661
  /// :nodoc:
662
662
  SWIFT_CLASS("_TtC17BBNativePlayerKit28BBNativeShortsViewController")
663
663
  @interface BBNativeShortsViewController : UIViewController