react-native-firework-sdk 2.14.0 → 2.14.1
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/gradle.properties +1 -1
- package/ios/Components/StoryBlock.swift +14 -3
- package/ios/Components/VideoFeed.swift +4 -0
- package/ios/Modules/FireworkSDKModule/SDKInitOptions.swift +9 -0
- package/lib/typescript/models/StoryBlockConfiguration.d.ts +0 -2
- package/lib/typescript/models/VideoPlayerConfiguration.d.ts +1 -1
- package/package.json +1 -1
- package/react-native-firework-sdk.podspec +2 -2
- package/src/models/StoryBlockConfiguration.ts +0 -2
- package/src/models/VideoPlayerConfiguration.ts +1 -1
|
@@ -244,12 +244,17 @@ public class StoryBlock: UIView, StoryBlockViewControllerDelegate, PictureInPict
|
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
if let showPlaybackButton = config.showPlaybackButton {
|
|
247
|
+
resultConfig.playbackButton.isHidden = !showPlaybackButton
|
|
247
248
|
resultConfig.fullScreenPlayerView.playbackButton.isHidden = !showPlaybackButton
|
|
249
|
+
} else {
|
|
250
|
+
resultConfig.playbackButton.isHidden = false
|
|
251
|
+
resultConfig.fullScreenPlayerView.playbackButton.isHidden = false
|
|
248
252
|
}
|
|
249
253
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
254
|
+
if let showMuteButton = config.showMuteButton {
|
|
255
|
+
resultConfig.muteButton.isHidden = !showMuteButton
|
|
256
|
+
resultConfig.fullScreenPlayerView.muteButton.isHidden = !showMuteButton
|
|
257
|
+
}
|
|
253
258
|
|
|
254
259
|
if let showBranding = config.showBranding {
|
|
255
260
|
resultConfig.videoDetail.fireworkAttribution.isHidden = !showBranding
|
|
@@ -364,6 +369,12 @@ public class StoryBlock: UIView, StoryBlockViewControllerDelegate, PictureInPict
|
|
|
364
369
|
resultConfig.fullScreenPlayerView.countdownTimerConfiguration = countdownTimerConfiguration.fwCountdownTimerConfiguration()
|
|
365
370
|
}
|
|
366
371
|
|
|
372
|
+
if let storyBlockBehavior = gVideoLaunchBehavior?.storyBlockBehavior() {
|
|
373
|
+
resultConfig.onFirstDisplay = storyBlockBehavior
|
|
374
|
+
} else {
|
|
375
|
+
resultConfig.onFirstDisplay = .unmuted
|
|
376
|
+
}
|
|
377
|
+
|
|
367
378
|
storyBlockVC.viewConfiguration = resultConfig
|
|
368
379
|
}
|
|
369
380
|
|
|
@@ -442,10 +442,14 @@ extension VideoFeed {
|
|
|
442
442
|
}
|
|
443
443
|
if let showPlaybackButton = config.showPlaybackButton {
|
|
444
444
|
vpcConfig.playbackButton.isHidden = !showPlaybackButton
|
|
445
|
+
} else {
|
|
446
|
+
vpcConfig.playbackButton.isHidden = false
|
|
445
447
|
}
|
|
448
|
+
|
|
446
449
|
if let showMuteButton = config.showMuteButton {
|
|
447
450
|
vpcConfig.muteButton.isHidden = !showMuteButton
|
|
448
451
|
}
|
|
452
|
+
|
|
449
453
|
if let launchBehavior = gVideoLaunchBehavior {
|
|
450
454
|
vpcConfig.onFirstLaunch = launchBehavior.behavior()
|
|
451
455
|
}
|
|
@@ -29,4 +29,13 @@ extension FWRVideoLaunchBehavior {
|
|
|
29
29
|
return .`default`
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
+
|
|
33
|
+
func storyBlockBehavior() -> FireworkVideo.StoryBlockConfiguration.FirstDisplayBehavior {
|
|
34
|
+
switch self {
|
|
35
|
+
case .muteOnFirstLaunch:
|
|
36
|
+
return .`default`
|
|
37
|
+
default:
|
|
38
|
+
return .unmuted
|
|
39
|
+
}
|
|
40
|
+
}
|
|
32
41
|
}
|
|
@@ -36,8 +36,6 @@ export interface StoryBlockConfiguration {
|
|
|
36
36
|
showPlaybackButton?: boolean;
|
|
37
37
|
/**
|
|
38
38
|
* Indicates if the video player shows mute button.
|
|
39
|
-
* On Android, the property applies to full-screen and compact story block.
|
|
40
|
-
* Only supported on Android.
|
|
41
39
|
*/
|
|
42
40
|
showMuteButton?: boolean;
|
|
43
41
|
/**
|
|
@@ -29,7 +29,7 @@ export default interface VideoPlayerConfiguration {
|
|
|
29
29
|
ctaButtonStyle?: VideoPlayerCTAStyle;
|
|
30
30
|
/**
|
|
31
31
|
* Indicates if the video player shows playback button.
|
|
32
|
-
* Defaults to
|
|
32
|
+
* Defaults to true.
|
|
33
33
|
*/
|
|
34
34
|
showPlaybackButton?: boolean;
|
|
35
35
|
/**
|
package/package.json
CHANGED
|
@@ -37,8 +37,6 @@ export interface StoryBlockConfiguration {
|
|
|
37
37
|
showPlaybackButton?: boolean;
|
|
38
38
|
/**
|
|
39
39
|
* Indicates if the video player shows mute button.
|
|
40
|
-
* On Android, the property applies to full-screen and compact story block.
|
|
41
|
-
* Only supported on Android.
|
|
42
40
|
*/
|
|
43
41
|
showMuteButton?: boolean;
|
|
44
42
|
/**
|
|
@@ -30,7 +30,7 @@ export default interface VideoPlayerConfiguration {
|
|
|
30
30
|
ctaButtonStyle?: VideoPlayerCTAStyle;
|
|
31
31
|
/**
|
|
32
32
|
* Indicates if the video player shows playback button.
|
|
33
|
-
* Defaults to
|
|
33
|
+
* Defaults to true.
|
|
34
34
|
*/
|
|
35
35
|
showPlaybackButton?: boolean;
|
|
36
36
|
/**
|