From ade8f3f46a3a37f0fd77c193a88dae8d525a8421 Mon Sep 17 00:00:00 2001 From: Anna Olak <15946812+anna1901@users.noreply.github.com> Date: Tue, 2 Dec 2025 12:34:51 +0100 Subject: [PATCH 1/2] Implement proper livestream example app --- examples/video-player/App.tsx | 50 ++++++-- examples/video-player/app.json | 16 ++- .../video-player/components/FishjamPlayer.tsx | 108 ------------------ .../components/FishjamPlayerStreamer.tsx | 68 +++++++++++ .../components/FishjamPlayerViewer.tsx | 63 ++++++++++ 5 files changed, 187 insertions(+), 118 deletions(-) delete mode 100644 examples/video-player/components/FishjamPlayer.tsx create mode 100644 examples/video-player/components/FishjamPlayerStreamer.tsx create mode 100644 examples/video-player/components/FishjamPlayerViewer.tsx diff --git a/examples/video-player/App.tsx b/examples/video-player/App.tsx index 4787ae1fe..e51785e02 100644 --- a/examples/video-player/App.tsx +++ b/examples/video-player/App.tsx @@ -1,12 +1,33 @@ -import { StyleSheet, View } from 'react-native'; -import FishjamPlayer from './components/FishjamPlayer'; - -const roomName = 'test'; +import { StyleSheet, TextInput, View, Button } from 'react-native'; +import FishjamPlayerViewer from './components/FishjamPlayerViewer'; +import FishjamPlayerStreamer from './components/FishjamPlayerStreamer'; +import { useState } from 'react'; const App = () => { + const [roomName, setRoomName] = useState('test-room'); + const [selection, setSelection] = useState<'streamer' | 'viewer' | 'none'>('none'); + return ( - - + + {selection === 'none' && ( + <> + +