react-native-firework-sdk 2.14.0 → 2.14.2

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.
@@ -6,4 +6,4 @@ FireworkSDK_minSdkVersion=21
6
6
  FireworkSDK_compileSdkVersion=33
7
7
  FireworkSDK_targetSdkVersion=33
8
8
  FireworkSDK_fwPlayerLaunchMode=singleTask
9
- FireworkSDK_fwNativeVersion=6.11.0
9
+ FireworkSDK_fwNativeVersion=6.13.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
- // if let showMuteButton = config.showMuteButton {
251
- // resultConfig.fullScreenPlayerView.muteButton.isHidden = !showMuteButton
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 false on iOS. Default to true on Android.
32
+ * Defaults to true.
33
33
  */
34
34
  showPlaybackButton?: boolean;
35
35
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-firework-sdk",
3
- "version": "2.14.0",
3
+ "version": "2.14.2",
4
4
  "description": "Firework React Native SDK",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -33,6 +33,6 @@ fi
33
33
  s.static_framework = true
34
34
 
35
35
  s.dependency 'React-Core'
36
- s.dependency 'FireworkVideoUI', '0.1.2'
37
- s.dependency 'FireworkVideo', '1.21.0'
36
+ s.dependency 'FireworkVideoUI', '0.1.4'
37
+ s.dependency 'FireworkVideo', '1.23.3'
38
38
  end
@@ -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 false on iOS. Default to true on Android.
33
+ * Defaults to true.
34
34
  */
35
35
  showPlaybackButton?: boolean;
36
36
  /**