diff --git a/example/src/components/DolbyIOProvider/DolbyIOProvider.tsx b/example/src/components/DolbyIOProvider/DolbyIOProvider.tsx index 5a203593..3d71486c 100644 --- a/example/src/components/DolbyIOProvider/DolbyIOProvider.tsx +++ b/example/src/components/DolbyIOProvider/DolbyIOProvider.tsx @@ -36,6 +36,7 @@ export interface IDolbyIOProvider { conference?: Conference; conferenceStatus?: ConferenceStatus; participants: Participant[]; + isBottomSheetVisible: Boolean initialize: (token: string, refreshToken: () => Promise) => void; openSession: (name: string, externalId?: string) => Promise; closeSession: () => Promise; @@ -48,10 +49,12 @@ export interface IDolbyIOProvider { goToAudioPreviewScreen: (isVisible: boolean) => void; leave: (leaveRoom: boolean) => void; setSessionParticipant: () => void; + setBottomSheetVisibility: (isVisible: boolean) => void; } export const DolbyIOContext = React.createContext({ isInitialized: false, + isBottomSheetVisible: false, me: undefined, conference: undefined, conferenceStatus: undefined, @@ -69,6 +72,7 @@ export const DolbyIOContext = React.createContext({ getCurrentConference: () => {}, goToAudioPreviewScreen: () => {}, setSessionParticipant: () => {}, + setBottomSheetVisibility: () => {}, }); type DolbyProps = { @@ -76,6 +80,7 @@ type DolbyProps = { }; const DolbyIOProvider: React.FC = ({ children }) => { + const [isBottomSheetVisible, setIsBottomSheetVisible] = useState(false); const [isInitialized, setIsInitialized] = useState(false); const [me, setMe] = useState(undefined); const [isAudioPreviewScreen, setIsAudioPreviewScreen] = useState(false); @@ -443,8 +448,13 @@ const DolbyIOProvider: React.FC = ({ children }) => { setIsAudioPreviewScreen(isVisible); } + const setBottomSheetVisibility = (isVisible: boolean) => { + setIsBottomSheetVisible(isVisible); + } + const contextValue = { isInitialized, + isBottomSheetVisible, isAudioPreviewScreen, me, conference, @@ -462,6 +472,7 @@ const DolbyIOProvider: React.FC = ({ children }) => { getCurrentConference, goToAudioPreviewScreen, setSessionParticipant, + setBottomSheetVisibility, }; return ( diff --git a/example/src/screens/AudioPreviewScreen/AudioPreviewScreen.style.ts b/example/src/screens/AudioPreviewScreen/AudioPreviewScreen.style.ts index 9a893ebb..37b0b6da 100644 --- a/example/src/screens/AudioPreviewScreen/AudioPreviewScreen.style.ts +++ b/example/src/screens/AudioPreviewScreen/AudioPreviewScreen.style.ts @@ -27,4 +27,7 @@ export default StyleSheet.create({ backgroundColor: COLORS.BLUE, borderRadius: SPACE_L, }, + center: { + alignItems: 'center', + }, }); diff --git a/example/src/screens/AudioPreviewScreen/AudioPreviewScreen.tsx b/example/src/screens/AudioPreviewScreen/AudioPreviewScreen.tsx index 592b7ec9..50b8ab3d 100644 --- a/example/src/screens/AudioPreviewScreen/AudioPreviewScreen.tsx +++ b/example/src/screens/AudioPreviewScreen/AudioPreviewScreen.tsx @@ -150,7 +150,7 @@ const AudioPreviewScreen: FunctionComponent = () => { > - + Dolby.io diff --git a/example/src/screens/ConferenceScreen/ConferenceScreen.style.ts b/example/src/screens/ConferenceScreen/ConferenceScreen.style.ts index 3227cb9b..9dc897d0 100644 --- a/example/src/screens/ConferenceScreen/ConferenceScreen.style.ts +++ b/example/src/screens/ConferenceScreen/ConferenceScreen.style.ts @@ -25,7 +25,7 @@ export default StyleSheet.create({ top: {}, topBar: { flexDirection: 'row', - justifyContent: 'space-between', + justifyContent: 'flex-end', alignItems: 'center', }, center: { @@ -130,6 +130,7 @@ export default StyleSheet.create({ }, centerButtons: { flexDirection: 'row', + marginBottom: 20, }, videoButtonGreen: { backgroundColor: COLORS.GREEN, diff --git a/example/src/screens/ConferenceScreen/ConferenceScreen.tsx b/example/src/screens/ConferenceScreen/ConferenceScreen.tsx index 568901dd..9d643b13 100644 --- a/example/src/screens/ConferenceScreen/ConferenceScreen.tsx +++ b/example/src/screens/ConferenceScreen/ConferenceScreen.tsx @@ -25,7 +25,7 @@ const DISPLAYED_STATUSES: ParticipantStatus[] = [ ]; const ConferenceScreen: FunctionComponent = () => { - const { me, conference, participants } = useContext(DolbyIOContext); + const { me, conference, participants, isBottomSheetVisible, setBottomSheetVisibility } = useContext(DolbyIOContext); const { isRecording } = useContext(RecordingContext); const { fileSrc, isPresentingFile, fileOwnerName } = useContext( FilePresentationContext @@ -42,7 +42,6 @@ const ConferenceScreen: FunctionComponent = () => { (p) => p.status && DISPLAYED_STATUSES.includes(p.status) ); }, [participants]); - const [isBottomSheetVisible, setIsBottomSheetVisible] = useState(false); if (!conference || !me) { return ; @@ -77,23 +76,14 @@ const ConferenceScreen: FunctionComponent = () => { - - { - setIsBottomSheetVisible(!isBottomSheetVisible); - }} - > - - TEST BUTTONS + + + + Conference: {conference.alias} - - Logged as: {me.info.name} + - - Conference: {conference.alias} - {isRecording ? ( ) : null} @@ -150,6 +140,18 @@ const ConferenceScreen: FunctionComponent = () => { + + { + setBottomSheetVisibility(true); + }} + > + + TEST BUTTONS + + + diff --git a/example/src/screens/ConferenceScreen/ConferenceScreenBottomSheet.tsx b/example/src/screens/ConferenceScreen/ConferenceScreenBottomSheet.tsx index 0922b285..b0cf698b 100644 --- a/example/src/screens/ConferenceScreen/ConferenceScreenBottomSheet.tsx +++ b/example/src/screens/ConferenceScreen/ConferenceScreenBottomSheet.tsx @@ -81,7 +81,7 @@ import { startLocalVideo, stopLocalVideo } from '@utils/video.tester'; const ConferenceScreenBottomSheet = () => { const bottomSheetRef = useRef(null); - const { me, conference } = useContext(DolbyIOContext); + const { me, conference, setBottomSheetVisibility } = useContext(DolbyIOContext); const { startRecord, stopRecord } = useContext(RecordingContext); const { participants } = conference as Conference; let convertedFile: FileConverted | null = null; @@ -228,7 +228,7 @@ const ConferenceScreenBottomSheet = () => { }; return ( - + setBottomSheetVisibility(false)}> diff --git a/example/src/screens/InputTokenScreen/InputTokenScreen.style.ts b/example/src/screens/InputTokenScreen/InputTokenScreen.style.ts index 4c733048..853354bd 100644 --- a/example/src/screens/InputTokenScreen/InputTokenScreen.style.ts +++ b/example/src/screens/InputTokenScreen/InputTokenScreen.style.ts @@ -12,4 +12,7 @@ export default StyleSheet.create({ padding: 10, borderRadius: SPACE_XXS, }, + center: { + alignItems: 'center', + }, }); diff --git a/example/src/screens/InputTokenScreen/InputTokenScreen.tsx b/example/src/screens/InputTokenScreen/InputTokenScreen.tsx index e53cbf3b..b823551d 100644 --- a/example/src/screens/InputTokenScreen/InputTokenScreen.tsx +++ b/example/src/screens/InputTokenScreen/InputTokenScreen.tsx @@ -23,7 +23,7 @@ import React, { - + Dolby.io diff --git a/example/src/screens/JoinScreen/JoinScreen.style.ts b/example/src/screens/JoinScreen/JoinScreen.style.ts index d68ac98b..004e2d97 100644 --- a/example/src/screens/JoinScreen/JoinScreen.style.ts +++ b/example/src/screens/JoinScreen/JoinScreen.style.ts @@ -19,7 +19,11 @@ export default StyleSheet.create({ borderRadius: SPACE_S, height: SPACE_XL, }, - + center: { + justifyContent: 'center', + alignContent: 'center', + alignItems: 'center', + }, menuButton: { justifyContent: 'center', flexDirection: 'row', diff --git a/example/src/screens/JoinScreen/JoinScreen.tsx b/example/src/screens/JoinScreen/JoinScreen.tsx index 9b692221..4f2f41c9 100644 --- a/example/src/screens/JoinScreen/JoinScreen.tsx +++ b/example/src/screens/JoinScreen/JoinScreen.tsx @@ -111,10 +111,12 @@ const JoinScreen: FunctionComponent = () => { - - Join the Conference - - + + + Join the Conference + + + { - + Dolby.io diff --git a/example/src/ui/FloatingButton/FloatingButton.style.ts b/example/src/ui/FloatingButton/FloatingButton.style.ts index 5187e80f..db96e4e7 100644 --- a/example/src/ui/FloatingButton/FloatingButton.style.ts +++ b/example/src/ui/FloatingButton/FloatingButton.style.ts @@ -3,8 +3,8 @@ import { StyleSheet } from 'react-native'; export default StyleSheet.create({ container: { position: 'absolute', - bottom: 20, - right: 20, + top: 20, + left: 20, }, button: { backgroundColor: '#ffffff',