@shortkitsdk/react-native 0.2.33 → 0.2.35

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 (34) hide show
  1. package/android/libs/shortkit-release.aar +0 -0
  2. package/android/src/main/java/com/shortkit/reactnative/ReactCarouselOverlayHost.kt +6 -1
  3. package/android/src/main/java/com/shortkit/reactnative/ReactOverlayHost.kt +8 -1
  4. package/android/src/main/java/com/shortkit/reactnative/ReactVideoCarouselOverlayHost.kt +7 -0
  5. package/android/src/main/java/com/shortkit/reactnative/ShortKitPackage.kt +0 -2
  6. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Info.plist +2 -2
  7. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.abi.json +357 -35
  8. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +2 -0
  9. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  10. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios.swiftinterface +2 -0
  11. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/ShortKitSDK +0 -0
  12. package/ios/ShortKitSDK.xcframework/ios-arm64/ShortKitSDK.framework/_CodeSignature/CodeResources +9 -9
  13. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Info.plist +2 -2
  14. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +357 -35
  15. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +2 -0
  16. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  17. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +2 -0
  18. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +357 -35
  19. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +2 -0
  20. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  21. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/Modules/ShortKitSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +2 -0
  22. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/ShortKitSDK +0 -0
  23. package/ios/ShortKitSDK.xcframework/ios-arm64_x86_64-simulator/ShortKitSDK.framework/_CodeSignature/CodeResources +17 -17
  24. package/ios/ShortKitWidgetNativeView.swift +40 -7
  25. package/ios/ShortKitWidgetNativeViewManager.mm +1 -0
  26. package/package.json +1 -1
  27. package/src/ShortKitPlayer.tsx +20 -1
  28. package/src/ShortKitWidget.tsx +63 -15
  29. package/src/specs/ShortKitWidgetViewNativeComponent.ts +15 -3
  30. package/src/types.ts +5 -0
  31. package/android/src/main/java/com/shortkit/reactnative/ShortKitPlayerNativeView.kt +0 -149
  32. package/android/src/main/java/com/shortkit/reactnative/ShortKitPlayerViewManager.kt +0 -35
  33. package/android/src/main/java/com/shortkit/reactnative/ShortKitWidgetNativeView.kt +0 -149
  34. package/android/src/main/java/com/shortkit/reactnative/ShortKitWidgetViewManager.kt +0 -30
Binary file
@@ -221,11 +221,16 @@ class ReactCarouselOverlayHost(context: Context) : FrameLayout(context), Carouse
221
221
 
222
222
  override fun activatePlayback() {
223
223
  isActive = true
224
+ // Source mute state from the SDK rather than hardcoding true so
225
+ // overlay icons reflect actual mute state even on image carousels
226
+ // (which have no audio of their own but should still match host
227
+ // expectations).
228
+ val isMutedNow = ShortKitBridge.shared?.sdk?.player?.isMuted?.value ?: true
224
229
  val params = com.facebook.react.bridge.Arguments.createMap().apply {
225
230
  putString("surfaceId", surfaceId)
226
231
  putBoolean("isActive", true)
227
232
  putString("playerState", "idle")
228
- putBoolean("isMuted", true)
233
+ putBoolean("isMuted", isMutedNow)
229
234
  putDouble("playbackRate", 1.0)
230
235
  putBoolean("captionsEnabled", false)
231
236
  putNull("activeCue")
@@ -172,7 +172,14 @@ class ReactOverlayHost(context: Context) : FrameLayout(context), FeedOverlay {
172
172
  cachedDuration = 0.0
173
173
  cachedBuffered = 0.0
174
174
  cachedPlayerState = "idle"
175
- cachedIsMuted = true
175
+ // Read the SDK's actual current mute state instead of hardcoding
176
+ // `true`. The flow subscription below will keep this in sync going
177
+ // forward, but during the brief window between configure() and the
178
+ // first emission the overlay's initialProps would otherwise carry a
179
+ // stale `true`, causing the next-cell mute toggle to compute the
180
+ // wrong target value (the user's tap on the new cell would resolve
181
+ // to setMuted(false) regardless of actual state).
182
+ player?.isMuted?.value?.let { cachedIsMuted = it }
176
183
  cachedPlaybackRate = 1.0
177
184
  cachedCaptionsEnabled = false
178
185
  cachedActiveCue = null
@@ -136,6 +136,13 @@ class ReactVideoCarouselOverlayHost(context: Context) : FrameLayout(context), Vi
136
136
  cachedDuration = 0.0
137
137
  cachedBuffered = 0.0
138
138
  cachedPlayerState = "idle"
139
+ // Seed cachedIsMuted from the SDK's current value so the new
140
+ // surface's initialProps reflect actual mute state. The flow
141
+ // subscription (resubscribeToPlayer) will keep it in sync going
142
+ // forward, but its first emission can race with a host tap on the
143
+ // new cell, leading to a stale-true bug where the toggle target is
144
+ // computed wrong.
145
+ player?.isMuted?.value?.let { cachedIsMuted = it }
139
146
 
140
147
  val json = Json.encodeToString(item)
141
148
  carouselItemJSON = json
@@ -37,8 +37,6 @@ class ShortKitPackage : TurboReactPackage() {
37
37
  ): List<ViewManager<*, *>> {
38
38
  return listOf(
39
39
  ShortKitFeedViewManager(),
40
- ShortKitPlayerViewManager(),
41
- ShortKitWidgetViewManager(),
42
40
  )
43
41
  }
44
42
  }
@@ -11,9 +11,9 @@
11
11
  <key>CFBundlePackageType</key>
12
12
  <string>FMWK</string>
13
13
  <key>CFBundleVersion</key>
14
- <string>0.2.33</string>
14
+ <string>0.2.35</string>
15
15
  <key>CFBundleShortVersionString</key>
16
- <string>0.2.33</string>
16
+ <string>0.2.35</string>
17
17
  <key>MinimumOSVersion</key>
18
18
  <string>16.0</string>
19
19
  </dict>