@applicaster/zapp-react-native-ui-components 16.0.0-alpha.4115436491 → 16.0.0-alpha.5222020837

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.
@@ -48,6 +48,7 @@ type Position = {
48
48
  type PlayerFactoryConfig = {
49
49
  player: any; // React ref for native view
50
50
  playerId: string;
51
+ muted: boolean;
51
52
  playerPluginId: string;
52
53
  screenConfig: Record<string, any>;
53
54
  entry: ZappEntry; // original entry, used as fallback if no hooks
@@ -295,7 +296,7 @@ export class LiveImageManager implements PlayerLifecycleListener {
295
296
 
296
297
  setUserCellPlayerMutedPreference(true);
297
298
 
298
- this.items.forEach((liveImage) => liveImage.mute());
299
+ this.items.forEach((liveImage) => liveImage.player?.mute());
299
300
  };
300
301
 
301
302
  public unmuteAll = () => {
@@ -303,7 +304,7 @@ export class LiveImageManager implements PlayerLifecycleListener {
303
304
 
304
305
  setUserCellPlayerMutedPreference(false);
305
306
 
306
- this.items.forEach((liveImage) => liveImage.unmute());
307
+ this.items.forEach((liveImage) => liveImage.player?.unmute());
307
308
  };
308
309
 
309
310
  public onViewPositionChanged = (item: LiveImage) => {
@@ -573,20 +574,6 @@ export class LiveImage implements QuickBrickPlayer.SharedPlayerCallBacks {
573
574
  left: 0,
574
575
  };
575
576
 
576
- // Keeps muted state in sync: updates the initial value for deferred
577
- // player creation and forwards to the player if it already exists.
578
- public initiallyMuted: boolean = true;
579
-
580
- mute = () => {
581
- this.initiallyMuted = true;
582
- this.player?.mute();
583
- };
584
-
585
- unmute = () => {
586
- this.initiallyMuted = false;
587
- this.player?.unmute();
588
- };
589
-
590
577
  positionToString() {
591
578
  if (!this.position) {
592
579
  return "position not set";
@@ -648,7 +635,7 @@ export class LiveImage implements QuickBrickPlayer.SharedPlayerCallBacks {
648
635
  playerId: this.factoryConfig.playerId,
649
636
  autoplay: false,
650
637
  entry,
651
- muted: this.initiallyMuted,
638
+ muted: this.factoryConfig.muted,
652
639
  playerPluginId: this.factoryConfig.playerPluginId,
653
640
  screenConfig: this.factoryConfig.screenConfig,
654
641
  playerRole: PlayerRole.Cell,
@@ -126,16 +126,14 @@ const PlayerLiveImageComponent = (props: Props) => {
126
126
  factoryConfig: {
127
127
  player: ref,
128
128
  playerId,
129
+ muted,
129
130
  playerPluginId: playerPluginId,
130
131
  screenConfig: screenConfig,
131
132
  entry: item,
132
133
  },
133
134
  tag: item.title?.toString(),
134
135
  });
135
- }, [playerId, preloadHooks, playerPluginId, screenConfig, item]);
136
-
137
- // Keep the muted state in sync with user preference and player state
138
- liveImageItem.initiallyMuted = muted;
136
+ }, [playerId, preloadHooks, muted, playerPluginId, screenConfig, item]);
139
137
 
140
138
  React.useEffect(() => {
141
139
  liveImageItem.setMode = setModeDebounced;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-ui-components",
3
- "version": "16.0.0-alpha.4115436491",
3
+ "version": "16.0.0-alpha.5222020837",
4
4
  "description": "Applicaster Zapp React Native ui components for the Quick Brick App",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -28,10 +28,10 @@
28
28
  },
29
29
  "homepage": "https://github.com/applicaster/quickbrick#readme",
30
30
  "dependencies": {
31
- "@applicaster/applicaster-types": "16.0.0-alpha.4115436491",
32
- "@applicaster/zapp-react-native-bridge": "16.0.0-alpha.4115436491",
33
- "@applicaster/zapp-react-native-redux": "16.0.0-alpha.4115436491",
34
- "@applicaster/zapp-react-native-utils": "16.0.0-alpha.4115436491",
31
+ "@applicaster/applicaster-types": "16.0.0-alpha.5222020837",
32
+ "@applicaster/zapp-react-native-bridge": "16.0.0-alpha.5222020837",
33
+ "@applicaster/zapp-react-native-redux": "16.0.0-alpha.5222020837",
34
+ "@applicaster/zapp-react-native-utils": "16.0.0-alpha.5222020837",
35
35
  "fast-json-stable-stringify": "^2.1.0",
36
36
  "promise": "^8.3.0",
37
37
  "url": "^0.11.0",