agora-appbuilder-core 4.0.0-beta.51 → 4.0.0-beta.52

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agora-appbuilder-core",
3
- "version": "4.0.0-beta.51",
3
+ "version": "4.0.0-beta.52",
4
4
  "description": "React Native template for RTE app builder",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import {MaxVideoView} from '../../../agora-rn-uikit';
2
+ import {MaxVideoView, useLocalUid} from '../../../agora-rn-uikit';
3
3
  import {useContent, usePreCall, useRtc} from 'customization-api';
4
4
  import InlineNotification from '../../atoms/InlineNotification';
5
5
 
@@ -8,9 +8,9 @@ interface VideoPreviewProps {
8
8
  }
9
9
 
10
10
  const VideoPreview = ({isLocalVideoON = false}: VideoPreviewProps) => {
11
- const {defaultContent, activeUids} = useContent();
12
- const [maxUid] = activeUids;
11
+ const {defaultContent} = useContent();
13
12
  const {isCameraAvailable} = usePreCall();
13
+ const localUid = useLocalUid();
14
14
 
15
15
  const rtc = useRtc();
16
16
  const fallbackText = isCameraAvailable
@@ -25,8 +25,8 @@ as your camera turns on.`
25
25
 
26
26
  return (
27
27
  <MaxVideoView
28
- user={defaultContent[maxUid]}
29
- key={maxUid}
28
+ user={defaultContent[localUid]}
29
+ key={localUid}
30
30
  fallback={() => <InlineNotification text={fallbackText} />}
31
31
  isFullView={true}
32
32
  containerStyle={{
@@ -1,7 +1,7 @@
1
1
  import {StyleSheet, View} from 'react-native';
2
2
  import React, {useContext} from 'react';
3
3
  import {useContent, useLocalUserInfo, usePreCall} from 'customization-api';
4
- import {MaxVideoView, RtcContext} from '../../../agora-rn-uikit';
4
+ import {MaxVideoView, RtcContext, useLocalUid} from '../../../agora-rn-uikit';
5
5
  import {ToggleState} from '../../../agora-rn-uikit/src/Contexts/PropsContext';
6
6
  import AgoraRTC from 'agora-rtc-sdk-ng';
7
7
  import {useVB} from './useVB';
@@ -18,6 +18,7 @@ const VideoPreview = ({isLocalVideoON}: VideoPreviewProps) => {
18
18
  const vContainerRef = React.useRef(null);
19
19
  const {video: localVideoStatus} = useLocalUserInfo();
20
20
  const {isCameraAvailable} = usePreCall();
21
+ const localUid = useLocalUid();
21
22
 
22
23
  const isMobileWeb = isMobileUA();
23
24
  const {defaultContent, activeUids} = useContent();
@@ -66,8 +67,8 @@ const VideoPreview = ({isLocalVideoON}: VideoPreviewProps) => {
66
67
  }>
67
68
  {isMobileWeb ? (
68
69
  <MaxVideoView
69
- user={defaultContent[maxUid]}
70
- key={maxUid}
70
+ user={defaultContent[localUid]}
71
+ key={localUid}
71
72
  fallback={() => (
72
73
  <InlineNotification
73
74
  text="Camera is currently off. Selected background will be applied as soon
@@ -343,8 +343,8 @@ export const ScreenshareConfigure = (props: {children: React.ReactNode}) => {
343
343
  Toast.show({
344
344
  leadingIconName: 'alert',
345
345
  type: 'error',
346
- text1: 'Failed to start the screen sharing',
347
- text2: 'Please allow the permission to start the screen sharing',
346
+ text1: 'Failed to initiate screen sharing',
347
+ text2: 'Permission denied',
348
348
  visibilityTime: 1000 * 10,
349
349
  primaryBtn: null,
350
350
  secondaryBtn: null