### Handle Started Camera Event Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/events.md Example of how to listen for the 'started-camera' event. This can be used to enable UI elements or perform actions that depend on the camera being active. ```typescript call.on('started-camera', (event) => { console.log('Camera started'); }); ``` -------------------------------- ### Handle Track Started Event Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/events.md Example of how to listen for and handle the 'track-started' event. This allows you to react when a new audio, video, or screen track becomes available and access its details. ```typescript call.on('track-started', (event) => { console.log(`Track started: ${event.type}`); console.log(`Participant: ${event.participant?.user_name || 'unknown'}`); // Use event.track with DailyMediaView or RTCView }); ``` -------------------------------- ### startRecording() Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Starts recording the meeting with optional configurations for resolution, frame rate, and layout. ```APIDOC ## startRecording() ### Description Start recording the meeting. ### Method ```typescript startRecording(options?: DailyStreamingOptions<'recording', 'start'>): void ``` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body * **options** (DailyStreamingOptions) - Optional - Recording options (width, height, fps, layout, etc.) ### Request Example ```typescript call.startRecording({ width: 1920, height: 1080, fps: 30, layout: { preset: 'default' } }); ``` ### Response None (void) #### Success Response (200) None #### Response Example None ``` -------------------------------- ### startCamera() Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Starts the local participant's camera. Returns a promise that resolves when the camera is successfully started. ```APIDOC ## startCamera() ### Description Start the camera. ### Method ```typescript startCamera(properties?: DailyCallOptions): Promise ``` ### Parameters #### Request Body - **properties** (DailyCallOptions) - Optional - Camera options ### Response #### Success Response - Resolves when camera is started ### Request Example ```typescript await call.startCamera(); ``` ``` -------------------------------- ### Install iOS Pods Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/README.md After updating the Podfile, run this command to install the necessary pods for your iOS project. ```bash npx pod-install ``` -------------------------------- ### Start Camera Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Begins video capture from the default camera. This method returns a promise that resolves once the camera is successfully started. ```typescript await call.startCamera(); ``` -------------------------------- ### System Screen Capture Start Callback (iOS only) Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/native-utilities.md Sets a callback function that is executed when system screen capture starts on iOS, after permission has been granted. This is used internally to begin the JavaScript screen share. ```APIDOC ## setSystemScreenCaptureStartCallback ### Description Sets a callback function to be executed when system screen capture starts on iOS. ### Method `setSystemScreenCaptureStartCallback(listener: () => void): void` ### Parameters #### Path Parameters - `listener` (function) - Required - Callback function to execute when system screen capture starts. ### Details - Only one callback can be set at a time. ### Request Example ```typescript global.DailyNativeUtils.setSystemScreenCaptureStartCallback(() => { console.log('System screen capture started'); // Proceed with starting screen share }); ``` ``` -------------------------------- ### startScreenShare() Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Starts screen sharing for the call. Allows configuration of screen video quality. ```APIDOC ## startScreenShare() ### Description Starts sharing the screen. ### Method ```typescript startScreenShare(properties?: DailyStartScreenShare): void ``` ### Parameters #### Request Body - **properties** (DailyStartScreenShare) - Optional - Screen share options including video settings ### Request Example ```typescript call.startScreenShare({ screenVideoSendSettings: { maxQuality: 'high' } }); ``` ``` -------------------------------- ### Install react-native-daily-js and Dependencies Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/README.md Install the main package and its peer dependencies using npm. Ensure exact versions for specific packages like react-native-webrtc. ```bash npm i @daily-co/react-native-daily-js @react-native-async-storage/async-storage@^1.15.7 react-native-background-timer@^2.3.1 react-native-get-random-values@^1.9.0 npm i --save-exact @daily-co/react-native-webrtc@124.0.6-daily.1 ``` -------------------------------- ### started-camera Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/events.md Emitted after `startCamera()` successfully completes, indicating the camera has started. ```APIDOC ## started-camera ### Description The camera has successfully started. ### Emitted After `startCamera()` succeeds. ### Example ```typescript call.on('started-camera', (event) => { console.log('Camera started'); }); ``` ``` -------------------------------- ### startLocalAudioLevelObserver Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Starts monitoring the local user's audio levels at a specified interval. ```APIDOC ## startLocalAudioLevelObserver() ### Description Start monitoring local audio levels. ### Method `startLocalAudioLevelObserver(interval?: number): Promise` ### Parameters #### Query Parameters - **interval** (number) - Optional - Sample interval in milliseconds ### Response #### Success Response (Promise) Resolves when the observer is started. ### Request Example ```typescript await call.startLocalAudioLevelObserver(100); ``` ``` -------------------------------- ### local-screen-share-started Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/events.md Indicates that the local user has successfully started screen sharing. Emitted after the `startScreenShare()` method succeeds. ```APIDOC ## local-screen-share-started ### Description Local screen sharing has started. This event is emitted after `startScreenShare()` succeeds. ### Example ```typescript call.on('local-screen-share-started', (event) => { console.log('Screen share started'); }); ``` ``` -------------------------------- ### remote-media-player-started Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/events.md This event is emitted when a remote media player has started. It includes information about who started it and its current state. ```APIDOC ## remote-media-player-started ### Description Emitted when a remote media player has started. ### Event `remote-media-player-started` ### Parameters - **event** (DailyEventObjectRemoteMediaPlayerUpdate) - An object containing event details. - **action** (string) - Always `'remote-media-player-started'`. - **updatedBy** (string) - The ID of the participant who started the media player. - **session_id** (string) - The unique session ID for the remote media player. - **remoteMediaPlayerState** (DailyRemoteMediaPlayerState) - The current state of the remote media player. ### Example ```typescript call.on('remote-media-player-started', (event) => { console.log(`Media player started by ${event.updatedBy}`); console.log(`State: ${event.remoteMediaPlayerState.state}`); }); ``` ``` -------------------------------- ### Start Local Audio Level Observer Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Initiates monitoring of the local user's audio levels. You can specify a sample interval in milliseconds. This method returns a promise that resolves once the observer is successfully started. ```typescript await call.startLocalAudioLevelObserver(100); ``` -------------------------------- ### recording-started Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/events.md This event is emitted after the `startRecording()` method is called and indicates that a recording has started. It may not start immediately after the call. ```APIDOC ## recording-started ### Description Indicates that a recording has started. This event is emitted after `startRecording()` is sent, but the recording may not begin immediately. ### Emitted After `startRecording()` is sent. ### Example ```typescript call.on('recording-started', (event) => { console.log(`Recording started: ${event.recordingId}`); console.log(`Started by: ${event.startedBy}`); }); ``` ``` -------------------------------- ### Basic DailyMediaView Setup Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-media-view.md Renders a participant's video and audio using their persistent tracks. Suitable for general participant display. ```typescript import { DailyMediaView } from '@daily-co/react-native-daily-js'; function ParticipantVideo({ participant }) { return ( ); } ``` -------------------------------- ### Start Recording with Basic Options Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/configuration.md Use DailyStreamingOptions to configure basic recording parameters like resolution, frame rate, and bitrate. The layout can also be specified. ```typescript call.startRecording({ width: 1920, height: 1080, fps: 30, videoBitrate: 5000000, layout: { preset: 'default', max_cam_streams: 6 } }); ``` -------------------------------- ### startRemoteParticipantsAudioLevelObserver Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Starts monitoring the audio levels of all remote participants at a specified interval. ```APIDOC ## startRemoteParticipantsAudioLevelObserver() ### Description Start monitoring remote participants' audio levels. ### Method `startRemoteParticipantsAudioLevelObserver(interval?: number): Promise` ### Parameters #### Query Parameters - **interval** (number) - Optional - Sample interval in milliseconds ### Response #### Success Response (Promise) Resolves when the observer is started. ### Request Example ```typescript await call.startRemoteParticipantsAudioLevelObserver(100); ``` ``` -------------------------------- ### Start Screen Sharing Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Initiates screen sharing with optional quality settings. Use this to share your screen content with other participants. ```typescript call.startScreenShare({ screenVideoSendSettings: { maxQuality: 'high' } }); ``` -------------------------------- ### Start Recording Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Initiates a meeting recording. You can specify options like resolution, frame rate, and layout. ```typescript call.startRecording({ width: 1920, height: 1080, fps: 30, layout: { preset: 'default' } }); ``` -------------------------------- ### Media Control Methods Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/00-START-HERE.md Control the local audio and video streams, including starting the camera. ```typescript call.setLocalAudio(true) call.setLocalVideo(true) call.startCamera() ``` -------------------------------- ### Start Live Streaming Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Begins streaming the meeting to RTMP endpoints. Requires the RTMP URL and can include layout configurations. ```typescript call.startLiveStreaming({ rtmpUrl: 'rtmp://example.com/live', layout: { preset: 'default' } }); ``` -------------------------------- ### Minimal Daily Call Example Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/INDEX.md Demonstrates the basic steps to create a call object, join a meeting, listen for participant events, render a participant's video and audio, and then leave and destroy the call. Ensure you have a Daily call URL to use. ```typescript import Daily, { DailyMediaView } from '@daily-co/react-native-daily-js'; const call = Daily.createCallObject(); // Join a meeting await call.join({ url: 'https://your-team.daily.co/standup' }); // Listen for participants call.on('participant-joined', (event) => { console.log(`${event.participant.user_name} joined`); }); // Render a participant // Leave await call.leave(); await call.destroy(); ``` -------------------------------- ### Configure Advanced WebRTC Settings Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/configuration.md This example demonstrates how to configure advanced WebRTC behaviors using the `dailyConfig` option. It includes settings for audio modes, media constraints, H.264 preference, and ICE server configuration. ```typescript const call = Daily.createCallObject({ dailyConfig: { micAudioMode: 'voice', userMediaAudioConstraints: { echoCancellation: true, noiseSuppression: true }, userMediaVideoConstraints: { width: { ideal: 1280 }, height: { ideal: 720 } }, preferH264ForCam: true, iceConfig: { iceServers: [ { urls: 'stun:stun.l.google.com:19302' } ] } } }); ``` -------------------------------- ### Started Camera Event Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/events.md Represents the event emitted when the camera has successfully started. This confirms that the `startCamera()` method call was successful. ```typescript action: 'started-camera' ``` -------------------------------- ### Screen Sharing Methods Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/00-START-HERE.md Methods to start and stop sharing the local screen. ```typescript call.startScreenShare() call.stopScreenShare() ``` -------------------------------- ### transcription-started Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/events.md Emitted after `startTranscription()` successfully starts. Provides details about the transcription instance that was initiated. ```APIDOC ## transcription-started ### Description Indicates that a transcription session has successfully started. ### Event transcription-started ### Data Structure ```typescript interface DailyEventObjectTranscriptionStarted { action: 'transcription-started'; instanceId: string; transcriptId?: string; language: string; model: string; tier?: string; profanity_filter?: boolean; redact?: Array | Array | boolean; endpointing?: number | boolean; punctuate?: boolean; extra?: Record; includeRawResponse?: boolean; startedBy: string; } ``` ### Example ```typescript call.on('transcription-started', (event) => { console.log(`Transcription started: ${event.instanceId}`); console.log(`Language: ${event.language}, Model: ${event.model}`); }); ``` ``` -------------------------------- ### startRemoteMediaPlayer Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Starts playing remote media (video/audio) in the meeting. It returns a promise with player information, including the session ID. ```APIDOC ## startRemoteMediaPlayer() ### Description Start playing remote media (video/audio) in the meeting. ### Method startRemoteMediaPlayer ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **options.url** (string) - Required - URL of media to play - **options.settings** (DailyRemoteMediaPlayerSettings) - Optional - Play state, volume, encodings ### Request Example ```typescript const player = await call.startRemoteMediaPlayer({ url: 'https://example.com/video.mp4', settings: { state: 'play', volume: 1.0 } }); ``` ### Response #### Success Response (Promise) - **session_id** (string) - The unique identifier for the media player session. - **state** (string) - The current playback state ('play', 'pause', 'stop'). - **url** (string) - The URL of the media being played. - **volume** (number) - The current volume level (0.0 to 1.0). #### Response Example ```json { "session_id": "some-session-id", "state": "play", "url": "https://example.com/video.mp4", "volume": 1.0 } ``` ``` -------------------------------- ### Starting and Stopping Recording and Live Streaming Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/INDEX.md Control the recording and live streaming features of a Daily call. This includes starting and stopping recordings with specified layouts and resolutions, and initiating live streams to RTMP URLs. ```typescript // Start recording call.startRecording({ layout: { preset: 'default', max_cam_streams: 6 }, width: 1920, height: 1080, fps: 30 }); call.on('recording-started', (event) => { console.log('Recording in progress'); }); // Start live streaming call.startLiveStreaming({ rtmpUrl: 'rtmp://stream.example.com/live', layout: { preset: 'active-participant' } }); // Stop call.stopRecording(); call.stopLiveStreaming(); ``` -------------------------------- ### startTranscription() Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Starts audio transcription using Deepgram. Allows configuration of language, model, and filtering options. ```APIDOC ## startTranscription() ### Description Starts audio transcription using Deepgram. Allows configuration of language, model, and filtering options. ### Method `call.startTranscription(options?: DailyTranscriptionDeepgramOptions): void` ### Parameters #### Request Body - **options** (DailyTranscriptionDeepgramOptions) - Optional - Language, model, filtering options, etc. ### Request Example ```typescript call.startTranscription({ language: 'en', model: 'nova-2', profanity_filter: true }); ``` ``` -------------------------------- ### Handle Local Screen Share Started Event Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/events.md Listen for the 'local-screen-share-started' event to know when screen sharing has successfully begun. This event is emitted after `startScreenShare()` is called. ```typescript call.on('local-screen-share-started', (event) => { console.log('Screen share started'); }); ``` -------------------------------- ### Reference Documentation Overview Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/README.md This section provides an overview of the reference documentation, guiding users to specific files for details on types, configuration, and error handling. ```APIDOC ## Reference Documentation This section contains detailed documentation for the following topics: ### `types.md` **Description:** All type definitions and interfaces. ### `configuration.md` **Description:** Configuration options and defaults. ### `errors.md` **Description:** Error types and handling guide. ``` -------------------------------- ### DailyLiveStreamingOptions Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/types.md Specifies the options required to start a live stream, including RTMP URLs, endpoint configurations, and layout settings. ```APIDOC ## Interface: DailyLiveStreamingOptions ### Description Options for starting live streaming. ### Fields - **rtmpUrl** (string | string[]) - Optional - RTMP endpoint URL(s) - **endpoints** (DailyStreamingEndpoint[]) - Optional - Array of endpoint objects - **layout** (DailyLiveStreamingLayoutConfig) - Optional - Layout configuration ### Type Definition ```typescript interface DailyLiveStreamingOptions extends DailyStreamingOptions<'liveStreaming', Type> { rtmpUrl?: string | string[]; endpoints?: DailyStreamingEndpoint[]; } ``` ``` -------------------------------- ### Get Input Devices Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Fetches information about all available input devices, including cameras, microphones, and speakers. Use this to populate device selection UIs. ```typescript const devices = await call.getInputDevices(); console.log('Camera:', devices.camera); console.log('Mic:', devices.mic); console.log('Speaker:', devices.speaker); ``` -------------------------------- ### Handle Remote Media Player Started Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/events.md Listen for when a remote media player begins playing. This snippet logs who initiated the player and its initial state. ```typescript call.on('remote-media-player-started', (event) => { console.log(`Media player started by ${event.updatedBy}`); console.log(`State: ${event.remoteMediaPlayerState.state}`); }); ``` -------------------------------- ### Start Live Streaming with Multiple Endpoints Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/configuration.md For advanced live streaming, provide an array of endpoint configurations in DailyLiveStreamingOptions. This allows streaming to multiple destinations simultaneously. ```typescript // Or with multiple endpoints: call.startLiveStreaming({ endpoints: [ { endpoint: 'rtmp://server1.com/live' }, { endpoint: 'rtmp://server2.com/live' } ], layout: { preset: 'default' } }); ``` -------------------------------- ### Method Documentation Format Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/README.md Illustrates the standard structure for documenting methods or functions, including signature, parameters, return types, and usage examples. ```markdown ### methodName() Brief description. Full signature as code block with types Parameter table with: Parameter | Type | Required | Default | Description Return type and description Throws/errors if applicable Usage example Source reference ``` -------------------------------- ### Start Remote Media Player Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Use this function to begin playing remote media (video/audio) in a Daily.js call. It requires the URL of the media and optional settings for playback state and volume. ```typescript const player = await call.startRemoteMediaPlayer({ url: 'https://example.com/video.mp4', settings: { state: 'play', volume: 1.0 } }); ``` -------------------------------- ### track-started Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/events.md Emitted when a media track (audio, video, screen) has started playing. The `participant` may be null if the participant has left. ```APIDOC ## track-started ### Description A media track (audio, video, screen) has started playing. ### Emitted When a track becomes available. ### Event Object ```typescript interface DailyEventObjectTrack { action: 'track-started'; participant: DailyParticipant | null; track: MediaStreamTrack; type: 'video' | 'audio' | 'screenVideo' | 'screenAudio' | 'rmpVideo' | 'rmpAudio' | string; } ``` ### Example ```typescript call.on('track-started', (event) => { console.log(`Track started: ${event.type}`); console.log(`Participant: ${event.participant?.user_name || 'unknown'}`); // Use event.track with DailyMediaView or RTCView }); ``` ``` -------------------------------- ### Recording Methods Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/00-START-HERE.md Control the recording of the call. Specify layout options when starting the recording. ```typescript call.startRecording({ layout: { preset: 'default' } }) call.stopRecording() ``` -------------------------------- ### Handle Live Streaming Started Event Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/events.md Listen for the 'live-streaming-started' event to know when live streaming has successfully begun. This event can provide an instance ID for tracking. ```typescript call.on('live-streaming-started', (event) => { console.log(`Live streaming started: ${event.instanceId}`); }); ``` -------------------------------- ### join() Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Starts joining a meeting room with specified call options. It returns a promise that resolves to the participants object upon successful joining or rejects with error details if the join fails. ```APIDOC ## join() ### Description Starts joining a meeting room with specified call options. It returns a promise that resolves to the participants object upon successful joining or rejects with error details if the join fails. ### Method POST (or relevant HTTP method if applicable, inferred from SDK context) ### Endpoint (Not directly applicable for SDK method, but conceptually represents joining a call) ### Parameters #### Path Parameters (None) #### Query Parameters (None) #### Request Body - **properties** (DailyCallOptions) - Optional - Call options including URL, token, configuration ### Request Example ```typescript const call = Daily.createCallObject(); const participants = await call.join({ url: 'https://your-team.daily.co/meeting-room', token: 'token-if-required' }); ``` ### Response #### Success Response (200) - **participants** (DailyParticipantsObject | void) - Object containing participant information or void if not applicable. #### Response Example (Refer to TypeScript example for expected outcome structure) ``` -------------------------------- ### Start Live Streaming with RTMP URL Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/configuration.md Configure live streaming using DailyLiveStreamingOptions, specifying a single RTMP URL and basic streaming parameters. Inherits all DailyStreamingOptions. ```typescript call.startLiveStreaming({ rtmpUrl: 'rtmp://streaming-server.com/live/my-stream', width: 1280, height: 720, fps: 30, layout: { preset: 'active-participant' } }); ``` -------------------------------- ### Monitoring Network and CPU Quality Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/INDEX.md Continuously monitor the network and CPU conditions during a call to ensure optimal performance. This example shows how to react to network quality changes by adjusting video settings and warn about high CPU load. ```typescript call.on('network-quality-change', (event) => { console.log(`Network: ${event.networkState}`); if (event.networkState === 'bad') { // Reduce video quality await call.updateSendSettings({ video: 'bandwidth-optimized' }); } }); call.on('cpu-load-change', (event) => { if (event.cpuLoadState === 'high') { console.warn('High CPU load'); } }); ``` -------------------------------- ### Get Current Audio Device Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/native-utilities.md Retrieves the name of the currently active audio output device. This is useful for debugging or informing the user about their audio setup. ```typescript const { audioDevice } = await global.DailyNativeUtils.getAudioDevice(); console.log(`Audio device: ${audioDevice}`); ``` -------------------------------- ### API Reference Overview Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/README.md This section provides an overview of the API reference documentation, guiding users to specific files for detailed information on call objects, factory functions, media views, events, native utilities, and iOS bundle caching. ```APIDOC ## API Reference This section contains detailed documentation for the following modules: ### `daily-call-object.md` **Description:** Main call object with 100+ methods. ### `daily-factory.md` **Description:** Call instance creation and utilities. ### `daily-media-view.md` **Description:** Video/audio React Native component. ### `events.md` **Description:** Complete event system reference. ### `native-utilities.md` **Description:** Native platform integrations. ### `ios-bundle-cache.md` **Description:** iOS bundle caching utility. ``` -------------------------------- ### Handle Available Devices Updates Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/events.md Detect when the available media input devices change, such as when a camera or microphone is connected or disconnected. This example shows how to count available cameras. ```typescript call.on('available-devices-updated', (event) => { const cameras = event.availableDevices.filter(d => d.kind === 'videoinput'); console.log(`${cameras.length} cameras available`); }); ``` -------------------------------- ### Handling Remote Media Player Stopped Event Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/errors.md This example demonstrates how to listen for the 'remote-media-player-stopped' event and react based on the reason provided. Use this to manage playback states or inform users. ```typescript call.on('remote-media-player-stopped', (event) => { console.log(`Media playback stopped: ${event.reason}`); if (event.reason === 'EOS') { // Media finished normally } else { // Stopped by another participant } }); ``` -------------------------------- ### Request Screen Capture Permission (iOS) Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/native-utilities.md Presents the system screen recording permission prompt on iOS. Use this before starting screen capture to ensure the user has granted permission. ```typescript if (global.DailyNativeUtils.isIOS) { const granted = await global.DailyNativeUtils.presentSystemScreenCapturePrompt(); if (granted) { console.log('Screen capture permission granted'); } } ``` -------------------------------- ### Set System Screen Capture Start Callback (iOS) Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/native-utilities.md Set a callback function that is executed when system screen capture begins on iOS. This is used internally to initiate the JavaScript screen share after the system capture is confirmed. ```typescript global.DailyNativeUtils.setSystemScreenCaptureStartCallback(() => { console.log('System screen capture started'); // Proceed with starting screen share }); ``` -------------------------------- ### Handle Track Stopped Event Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/events.md Example of how to listen for and handle the 'track-stopped' event. This is useful for cleaning up resources or updating the UI when a media track is no longer available. ```typescript call.on('track-stopped', (event) => { console.log(`Track stopped: ${event.type}`); }); ``` -------------------------------- ### Handle Camera Error Event Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/events.md Example of how to listen for and handle the 'camera-error' event. This is crucial for informing the user about device issues and potentially offering solutions or fallback options. ```typescript call.on('camera-error', (event) => { console.error('Camera error:', event.errorMsg.errorMsg); console.log('Video OK:', event.errorMsg.videoOk); console.log('Audio OK:', event.errorMsg.audioOk); }); ``` -------------------------------- ### Track Started Event Interface Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/events.md Defines the structure of the event object emitted when a media track starts playing. The participant may be null if the participant has left. ```typescript interface DailyEventObjectTrack { action: 'track-started'; participant: DailyParticipant | null; track: MediaStreamTrack; type: 'video' | 'audio' | 'screenVideo' | 'screenAudio' | 'rmpVideo' | 'rmpAudio' | string; } ``` -------------------------------- ### Starting and Stopping Transcription Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/INDEX.md Enable real-time transcription services for your Daily calls. This snippet shows how to start transcription with language and model settings, listen for transcription messages, and stop the service. ```typescript call.startTranscription({ language: 'en', model: 'nova-2', profanity_filter: true }); call.on('transcription-message', (event) => { console.log(`${event.participantId}: "${event.text}"`); }); call.stopTranscription(); ``` -------------------------------- ### Start Remote Participants Audio Level Observer Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Begins monitoring the audio levels of all remote participants in the call. An optional interval in milliseconds can be provided for sampling frequency. The method returns a promise that resolves upon successful initiation. ```typescript await call.startRemoteParticipantsAudioLevelObserver(100); ``` -------------------------------- ### live-streaming-started Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/events.md This event is emitted after `startLiveStreaming()` successfully connects, indicating that live streaming has begun. ```APIDOC ## live-streaming-started ### Description Indicates that live streaming has started successfully. ### Emitted After `startLiveStreaming()` successfully connects. ### Event Data ```typescript interface DailyEventObjectLiveStreamingStarted { action: 'live-streaming-started'; layout?: DailyLiveStreamingLayoutConfig<'start'>; instanceId?: string; } ``` ### Example ```typescript call.on('live-streaming-started', (event) => { console.log(`Live streaming started: ${event.instanceId}`); }); ``` ``` -------------------------------- ### Create a Daily Call Object with Options Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-factory.md Configure call instances during creation using `DailyFactoryOptions`. This includes setting the meeting URL, user name, and initial audio/video states. ```typescript Daily.createCallObject({ url: 'https://your-team.daily.co/meeting-room', userName: 'John Doe', startVideoOff: false, startAudioOff: true }); ``` -------------------------------- ### startLiveStreaming() Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Initiates live streaming of the meeting to specified RTMP endpoints with configurable layout options. ```APIDOC ## startLiveStreaming() ### Description Start live streaming to RTMP endpoints. ### Method ```typescript startLiveStreaming(options: DailyLiveStreamingOptions<'start'>): void ``` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body * **options** (DailyLiveStreamingOptions) - Required - RTMP URL, endpoints, layout, and other options ### Request Example ```typescript call.startLiveStreaming({ rtmpUrl: 'rtmp://example.com/live', layout: { preset: 'default' } }); ``` ### Response None (void) #### Success Response (200) None #### Response Example None ``` -------------------------------- ### enumerateDevices() Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Fetches a comprehensive list of all available media devices connected to the system. Returns a promise containing an array of MediaDeviceInfo objects. ```APIDOC ## enumerateDevices() ### Description Get all available media devices. ### Method ```typescript enumerateDevices(): Promise<{ devices: MediaDeviceInfo[] }> ``` ### Response #### Success Response - **devices** (MediaDeviceInfo[]) - An array of objects, each representing a media device. ### Request Example ```typescript const { devices } = await call.enumerateDevices(); const cameras = devices.filter(d => d.kind === 'videoinput'); ``` ``` -------------------------------- ### presentSystemScreenCapturePrompt() Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/native-utilities.md Presents the system screen recording permission prompt on iOS. It returns a promise that resolves to a boolean indicating whether the user granted permission. ```APIDOC ## presentSystemScreenCapturePrompt() ### Description (iOS only) Present the system screen recording permission prompt. ### Method (Implicitly invoked via TypeScript signature) ### Parameters None ### Response #### Success Response - **boolean** - Resolves to true if user granted permission, false otherwise ### Request Example ```typescript if (global.DailyNativeUtils.isIOS) { const granted = await global.DailyNativeUtils.presentSystemScreenCapturePrompt(); if (granted) { console.log('Screen capture permission granted'); } } ``` ``` -------------------------------- ### get Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/ios-bundle-cache.md Retrieves the cached bundle code. If the cache has expired, it returns headers for conditional re-fetching. ```APIDOC ## get() ### Description Retrieve cached bundle code, or headers for conditional re-fetching if expired. ### Method `static async get(url: string, ignoreExpiry?: boolean): Promise` ### Parameters #### Path Parameters - **url** (string) - Required - Bundle URL - **ignoreExpiry** (boolean) - Optional - Default: false - Ignore cache expiry and always return stored code ### Returns Type ```typescript type CacheResponse = { code?: string; refetchHeaders?: Headers; }; ``` ### Returns - `null` if no cache entry exists - Object with `code` field if cache is fresh - Object with `refetchHeaders` field if cache expired (contains If-None-Match and If-Modified-Since headers) ### Request Example ```typescript const cached = await iOSCallObjectBundleCache.get('https://api.daily.co/bundle.js'); if (cached?.code) { console.log('Using cached bundle'); // Use the cached bundle code } else if (cached?.refetchHeaders) { console.log('Cache expired, fetching with conditional headers'); // Fetch from server with the refetchHeaders } ``` ### Source `src/iOSCallObjectBundleCache.ts:36-91` ``` -------------------------------- ### Get Participant Counts Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Retrieves the number of visible and hidden participants in the meeting. Useful for understanding room occupancy. ```typescript const counts = call.participantCounts(); console.log(`${counts.present} visible, ${counts.hidden} hidden`); ``` -------------------------------- ### startDialOut() Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Initiate an outbound call to a specified phone number or SIP URI. This method returns a promise that resolves with session information. ```APIDOC ## startDialOut() ### Description Initiate an outbound dial to a phone number or SIP URI. ### Method ```typescript startDialOut(options: DailyStartDialoutOptions): Promise<{ session?: DailyDialOutSession }> ``` ### Parameters #### Arguments - **options** (DailyStartDialoutOptions) - Required - Phone number or SIP URI with options ### Returns Promise with session ID ### Example ```typescript const session = await call.startDialOut({ phoneNumber: '+1-555-0123', displayName: 'Meeting Room' }); ``` ``` -------------------------------- ### Start Daily.js Transcription with Deepgram Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Initiates transcription using Deepgram. Specify language, model, and profanity filter options. ```typescript call.startTranscription({ language: 'en', model: 'nova-2', profanity_filter: true }); ``` -------------------------------- ### getInputDevices() Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Retrieves information about all available input devices, including cameras, microphones, and speakers. Returns a promise with device information. ```APIDOC ## getInputDevices() ### Description Get information about available input devices (camera, mic, speaker). ### Method ```typescript getInputDevices(): Promise ``` ### Response #### Success Response - **camera** (object) - Information about available camera devices. - **mic** (object) - Information about available microphone devices. - **speaker** (object) - Information about available speaker devices. ### Request Example ```typescript const devices = await call.getInputDevices(); console.log('Camera:', devices.camera); console.log('Mic:', devices.mic); console.log('Speaker:', devices.speaker); ``` ``` -------------------------------- ### Initialize and Join a Daily Call Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/README.md Import the Daily library, create a call object, and join a meeting using its URL. Event listeners are set up to log participant information when they join, leave, or update. ```typescript import Daily from '@daily-co/react-native-daily-js'; // ... // Start joining a call const call = Daily.createCallObject(); call.join({ url: 'https://your-team.daily.co/allhands' }); // Listen for events signaling changes to participants or their audio or video. // - 'participant-joined' and 'participant-left' are for remote participants only // - 'participant-updated' is for the local participant as well as remote participants const events: DailyEvent[] = [ 'participant-joined', 'participant-updated', 'participant-left', ]; for (const event of events) { call.on(event, () => { for (const participant of Object.values(call.participants())) { console.log('---'); console.log(`participant ${participant.user_id}:`); if (participant.local) { console.log('is local'); } if (participant.audio) { console.log('audio enabled', participant.audioTrack); } if (participant.video) { console.log('video enabled', participant.videoTrack); } } }); } ``` -------------------------------- ### Configuration Documentation Format Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/README.md Defines the tabular format used for documenting configuration keys, their types, requirements, defaults, and descriptions. ```markdown | Key | Type | Required | Default | Description | ``` -------------------------------- ### AsyncStorageInterface Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/ios-bundle-cache.md The interface required for AsyncStorage implementations to be compatible with the bundle cache. It defines methods for getting, setting, and removing items. ```APIDOC ## AsyncStorageInterface The cache requires an AsyncStorage implementation with this interface: ```typescript interface AsyncStorageInterface { getItem(key: string): Promise; setItem(key: string, value: string): Promise; removeItem(key: string): Promise; } ``` | Method | Signature | Description | |--------|-----------|-------------| | getItem | `(key: string) => Promise` | Retrieve value by key | | setItem | `(key: string, value: string) => Promise` | Store key-value pair | | removeItem | `(key: string) => Promise` | Delete key-value pair | ``` -------------------------------- ### Get Current Geographic Location Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Fetches the current geographic region of the user. This is useful for understanding network routing or regional performance. ```typescript const location = await call.geo(); console.log('Current region:', location.current); ``` -------------------------------- ### Get CPU Load Statistics Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Retrieves CPU load statistics, including the current CPU load state and detailed metrics. ```typescript const stats = await call.getCpuLoadStats(); console.log('CPU state:', stats.cpuLoadState); ``` -------------------------------- ### Get Network Statistics Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Retrieves current network statistics, including state, quality, and detailed metrics like received bitrate. ```typescript const stats = await call.getNetworkStats(); console.log('Network state:', stats.networkState); console.log('Latest bitrate:', stats.stats.latest?.recvBitsPerSecond); ``` -------------------------------- ### Get Receive Settings for Participants Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Fetch receive settings for a specific participant by ID or for all participants. Optionally include inherited values. ```typescript const allSettings = await call.getReceiveSettings(); const oneSettings = await call.getReceiveSettings('participant-id'); ``` -------------------------------- ### Get Meeting State Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Retrieves the current state of the meeting. Use this to check if the meeting is new, loading, joined, or in an error state. ```typescript const state = call.meetingState(); if (state === 'joined-meeting') { console.log('Successfully joined'); } ``` -------------------------------- ### getAudioDevice() Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/native-utilities.md Gets the currently active audio output device. Returns a promise resolving to an object containing the audio device name. ```APIDOC ## getAudioDevice() ### Description Get the currently active audio output device. ### Method (Implicitly invoked via TypeScript signature) ### Parameters None ### Response #### Success Response - **{ audioDevice: string }** - Object containing the current audio device name ### Request Example ```typescript const { audioDevice } = await global.DailyNativeUtils.getAudioDevice(); console.log(`Audio device: ${audioDevice}`); ``` ``` -------------------------------- ### Configure ICE Servers Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Use `setIceConfig` to provide custom ICE server configurations, including STUN servers. This is essential for establishing peer-to-peer connections. ```typescript call.setIceConfig({ iceServers: [{ urls: 'stun:stun.l.google.com:19302' }] }); ``` -------------------------------- ### AsyncStorageInterface Definition Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/ios-bundle-cache.md Defines the interface required for AsyncStorage implementations used by the cache. It includes methods for getting, setting, and removing items. ```typescript interface AsyncStorageInterface { getItem(key: string): Promise; setItem(key: string, value: string): Promise; removeItem(key: string): Promise; } ``` -------------------------------- ### Get Existing Call Instance Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-factory.md Retrieve the currently active `DailyCall` instance using `getCallInstance()`. Returns `undefined` if no call is active. ```typescript const existingCall = Daily.getCallInstance(); if (existingCall) { console.log('Call already exists'); } else { const newCall = Daily.createCallObject(); } ``` -------------------------------- ### setIceConfig() Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Sets the ICE (Interactive Connectivity Establishment) server configuration. This allows customization of STUN and TURN servers used for peer-to-peer connections. ```APIDOC ## setIceConfig(iceConfig?: DailyIceConfig): DailyCall ### Description Set ICE server configuration, including servers and transport policy. ### Method Not applicable (SDK method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```typescript call.setIceConfig({ iceServers: [{ urls: 'stun:stun.l.google.com:19302' }] }); ``` ### Response #### Success Response Returns the DailyCall instance (chainable). #### Response Example ```typescript // Returns DailyCall instance ``` ``` -------------------------------- ### Listen for the 'loading' event Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/events.md The 'loading' event is emitted when the call object starts loading its bundle and initializing. This occurs when `load()` or `join()` is called. ```typescript call.on('loading', (event) => { console.log('Loading call object...'); }); ``` -------------------------------- ### Get Access State Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Checks the current access control state of the meeting. Use this to determine if access has been granted or if the user is awaiting access. ```typescript const state = call.accessState(); if (state.access === 'unknown') { console.log('Access state not yet determined'); } ``` -------------------------------- ### initialize Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/ios-bundle-cache.md Initializes the cache with an AsyncStorage implementation. This method is crucial for setting up the persistent storage mechanism for the cache. ```APIDOC ## initialize() ### Description Initialize the cache with an AsyncStorage implementation. ### Method `static initialize(storage: AsyncStorageInterface): void` ### Parameters #### Path Parameters - **storage** (AsyncStorageInterface) - Required - AsyncStorage implementation ### Request Example ```typescript import AsyncStorage from '@react-native-async-storage/async-storage'; import iOSCallObjectBundleCache from './iOSCallObjectBundleCache'; iOSCallObjectBundleCache.initialize(AsyncStorage); ``` ### Response #### Success Response (void) void ### Source `src/iOSCallObjectBundleCache.ts:32-34` ``` -------------------------------- ### Get Room Information Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Retrieves detailed information about the current room, including its configuration defaults if requested. Use this to inspect room settings before or during a call. ```typescript const room = await call.room(); if (room && 'config' in room) { console.log('Room name:', room.name); console.log('Max participants:', room.config.max_participants); } ``` -------------------------------- ### Configure Info.plist for iOS Permissions and Background Modes Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/README.md Add NSCameraUsageDescription, NSMicrophoneUsageDescription, and UIBackgroundModes with 'voip' to your Info.plist for camera/microphone access and background audio. ```xml ... NSCameraUsageDescription Daily Playground needs camera access to work NSMicrophoneUsageDescription Daily Playground needs microphone access to work UIBackgroundModes voip ... ``` -------------------------------- ### React Native Daily.js Project Structure Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/INDEX.md Illustrates the directory layout of the React Native Daily.js project, highlighting key source files, native code directories, and configuration files. ```tree react-native-daily-js/ ├── src/ │ ├── index.ts # Main entry, global setup │ ├── DailyMediaView.tsx # Video/audio rendering component │ └── iOSCallObjectBundleCache.ts # iOS bundle cache ├── type-overrides/ │ └── @daily-co/daily-js/index.d.ts # Type definitions ├── android/ # Android native code ├── ios/ # iOS native code ├── package.json # npm configuration ├── tsconfig.json # TypeScript config └── README.md # Installation and basic usage ``` -------------------------------- ### Initiate Outbound Dial Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Start an outbound call to a phone number or SIP URI using startDialOut. This function returns a promise that resolves with the session details. ```typescript const session = await call.startDialOut({ phoneNumber: '+1-555-0123', displayName: 'Meeting Room' }); ``` -------------------------------- ### DailySingleParticipantReceiveSettings and DailyVideoReceiveSettings Interfaces Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/types.md Defines receive settings for individual participants, including video and screen video. DailyVideoReceiveSettings allows specifying the desired video layer. ```typescript interface DailySingleParticipantReceiveSettings { video?: DailyVideoReceiveSettings; screenVideo?: DailyVideoReceiveSettings; } interface DailyVideoReceiveSettings { layer?: number; } ``` -------------------------------- ### Get Current Video Send Settings Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Retrieve the current video encoding settings applied to the call. The returned object contains properties like maxQuality. ```typescript const settings = call.getSendSettings(); console.log('Max quality:', settings.video?.maxQuality); ``` -------------------------------- ### Get participants waiting to join Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Retrieve a list of participants currently waiting to join the call using `waitingParticipants`. The result is an object where keys are participant IDs. ```typescript const waiting = call.waitingParticipants(); for (const [id, participant] of Object.entries(waiting)) { console.log(`${participant.name} is waiting`); } ``` -------------------------------- ### Local Participant Video Configuration Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-media-view.md Configures the DailyMediaView for the local participant, enabling mirroring and setting a higher z-order. ```typescript function LocalParticipantVideo({ participant }) { return ( ); } ``` -------------------------------- ### Get All Participants Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/daily-call-object.md Fetches all participants currently in the meeting. The returned object includes participant IDs as keys and their details, along with a 'local' key for the current user. ```typescript const participants = call.participants(); for (const [id, participant] of Object.entries(participants)) { console.log(`${participant.user_name}: audio=${participant.audio}, video=${participant.video}`); } ``` -------------------------------- ### DailySendSettings Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/types.md Defines settings for sending video, including default quality and custom encoding configurations. ```APIDOC ## DailySendSettings ### Description Defines settings for sending video, including default quality and custom encoding configurations. It allows specifying video settings and custom defaults, with support for additional custom keys. ### Type Definition ```typescript interface DailySendSettings { video?: DailyVideoSendSettings | DailyVideoSendSettingsPreset; customVideoDefaults?: DailyVideoSendSettings | DailyVideoSendSettingsPreset; [customKey: string]: DailyVideoSendSettings | DailyVideoSendSettingsPreset | undefined; } ``` ``` -------------------------------- ### Handle test-completed Event Source: https://github.com/daily-co/react-native-daily-js/blob/react-native-daily-js-releases/_autodocs/api-reference/events.md Example of how to listen for the 'test-completed' event and log the results based on the test type. This is useful for monitoring call quality and network conditions. ```typescript call.on('test-completed', (event) => { if (event.test === 'p2p-call-quality') { console.log('P2P quality test complete:', event.results); } }); ```