react-native-firework-sdk 2.17.0-beta.11 → 2.17.0-beta.13
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/src/main/java/com/fireworksdk/bridge/reactnative/manager/FWStoryBlockManager.kt
CHANGED
|
@@ -53,13 +53,34 @@ class FWStoryBlockManager : ViewGroupManager<StoryBlockFrameLayout>() {
|
|
|
53
53
|
return map
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
override fun receiveCommand(
|
|
57
|
+
root: StoryBlockFrameLayout,
|
|
58
|
+
commandId: Int,
|
|
59
|
+
args: ReadableArray?
|
|
60
|
+
) {
|
|
61
|
+
super.receiveCommand(root, commandId, args)
|
|
62
|
+
FWLogUtils.d { "FWStoryBlockManager receiveCommand, args (StoryBlockFrameLayout, Int, ReadableArray?), commandId: $commandId, root.isAttachedToWindow: ${root.isAttachedToWindow}" }
|
|
63
|
+
when (commandId) {
|
|
64
|
+
COMMAND_CREATE -> {
|
|
65
|
+
val reactNativeViewId = requireNotNull(args).getInt(0)
|
|
66
|
+
createFragment(root, reactNativeViewId)
|
|
67
|
+
}
|
|
68
|
+
COMMAND_PLAY -> root.storyBlockFragment?.play()
|
|
69
|
+
COMMAND_PAUSE -> root.storyBlockFragment?.pause()
|
|
70
|
+
COMMAND_OPEN_FULL_SCREEN -> root.storyBlockFragment?.openFullscreen()
|
|
71
|
+
COMMAND_ON_VIEWPORT_ENTERED -> root.storyBlockFragment?.onViewportEntered()
|
|
72
|
+
COMMAND_ON_VIEWPORT_LEFT -> root.storyBlockFragment?.onViewportLeft()
|
|
73
|
+
else -> {}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
56
77
|
override fun receiveCommand(
|
|
57
78
|
root: StoryBlockFrameLayout,
|
|
58
79
|
commandId: String?,
|
|
59
80
|
args: ReadableArray?
|
|
60
81
|
) {
|
|
61
82
|
super.receiveCommand(root, commandId, args)
|
|
62
|
-
FWLogUtils.d { "FWStoryBlockManager receiveCommand commandId: $commandId, root.isAttachedToWindow: ${root.isAttachedToWindow}" }
|
|
83
|
+
FWLogUtils.d { "FWStoryBlockManager receiveCommand, args (StoryBlockFrameLayout, String?, ReadableArray?), commandId: $commandId, root.isAttachedToWindow: ${root.isAttachedToWindow}" }
|
|
63
84
|
when (commandId?.toInt()) {
|
|
64
85
|
COMMAND_CREATE -> {
|
|
65
86
|
val reactNativeViewId = requireNotNull(args).getInt(0)
|
package/android/src/main/java/com/fireworksdk/bridge/reactnative/manager/FWVideoFeedManager.kt
CHANGED
|
@@ -242,9 +242,21 @@ class FWVideoFeedManager : SimpleViewManager<FWVideoFeed>() {
|
|
|
242
242
|
return map
|
|
243
243
|
}
|
|
244
244
|
|
|
245
|
+
override fun receiveCommand(root: FWVideoFeed, commandId: Int, args: ReadableArray?) {
|
|
246
|
+
super.receiveCommand(root, commandId, args)
|
|
247
|
+
FWLogUtils.d { "FWVideoFeedManager receiveCommand, args (FWVideoFeed, Int, ReadableArray?), commandId: $commandId" }
|
|
248
|
+
when (commandId) {
|
|
249
|
+
COMMAND_REFRESH -> {
|
|
250
|
+
FWLogUtils.d { "FWVideoFeedManager call refresh" }
|
|
251
|
+
root.refresh()
|
|
252
|
+
}
|
|
253
|
+
else -> {}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
245
257
|
override fun receiveCommand(root: FWVideoFeed, commandId: String?, args: ReadableArray?) {
|
|
246
258
|
super.receiveCommand(root, commandId, args)
|
|
247
|
-
FWLogUtils.d { "FWVideoFeedManager receiveCommand commandId: $commandId" }
|
|
259
|
+
FWLogUtils.d { "FWVideoFeedManager receiveCommand, args (FWVideoFeed, String?, ReadableArray?), commandId: $commandId" }
|
|
248
260
|
when (commandId?.toInt()) {
|
|
249
261
|
COMMAND_REFRESH -> {
|
|
250
262
|
FWLogUtils.d { "FWVideoFeedManager call refresh" }
|