Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tauri desktop application not joining meeting #67

Closed
bennyhodl opened this issue Mar 3, 2025 · 1 comment
Closed

Tauri desktop application not joining meeting #67

bennyhodl opened this issue Mar 3, 2025 · 1 comment

Comments

@bennyhodl
Copy link

DyteMeeting Not Working in Tauri Desktop Build

Description

I'm developing a video call application using the Dyte React component library with Tauri to build desktop and mobile applications. When I attempt to join a meeting in the desktop build, nothing happens after clicking the join button. The issue appears to be specific to the desktop build version, as I'm getting errors related to media devices.

Environment

  • Dyte SDK: @dytesdk/react-web-core and @dytesdk/react-ui-kit
  • Framework: React
  • Platform: Tauri desktop build
  • Operating System: MacOS

Error Message

I'm seeing the following error in the console:

Meeting - undefined
Unhandled Promise Rejection: DyteError: [ERR1609]: {LocalMediaHandler} Failed to fetch list of media devices
Failed to get available devices by kind

A WebSocket connection is established and is sending bytes, but the meeting does not initialize properly.

Code

Here's my implementation:

import { useDyteClient } from '@dytesdk/react-web-core';
import { DyteMeeting } from '@dytesdk/react-ui-kit';
import { useEffect } from 'react';
import { useNavigate } from '@tanstack/react-router';

export default function Meeting() {
  const [meeting, initMeeting] = useDyteClient();
  const navigate = useNavigate();
  
  useEffect(() => {
    initMeeting({
      authToken: '<token>',
      defaults: {
        audio: false,
        video: false,
      },
    });
  }, []);
  
  useEffect(() => {
    if (meeting) {
      console.log("Meeting", meeting)
    }
    console.log("Meeting", meeting)
  }, [meeting])
  
  return (
    <DyteMeeting meeting={meeting} />
  );
}

Steps to Reproduce

  1. Set up a Tauri application with React
  2. Implement the Dyte meeting component as shown above
  3. Build for desktop using Tauri
  4. Attempt to join a meeting
  5. Observe that the meeting does not initialize, with the error about media devices in the console

What I've Tried

  • Verified that WebSocket connections are being established
  • Confirmed that the authentication token is valid
  • Set audio and video to false by default

Questions

  1. Does the Dyte SDK have any specific permissions or configurations needed for Tauri's WebView to access media devices?
  2. Are there any known issues with media device access in Tauri desktop builds?
  3. Is there a recommended approach for handling media permissions in this environment?

Additional Context

I believe this could be related to how Tauri's WebView handles media device permissions compared to a regular browser. The error specifically mentions failing to fetch media devices, which suggests a permissions or API access issue in the Tauri environment.

Any guidance would be greatly appreciated!

@vaibhavshn
Copy link
Member

Hi, have you tried configuring the app to allow camera and mic access?

Like modifying the Info.plist to contain the following: https://tauri.app/distribute/macos-application-bundle/#native-configuration

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>NSCameraUsageDescription</key>
  <string>Request camera access for WebRTC</string>
  <key>NSMicrophoneUsageDescription</key>
  <string>Request microphone access for WebRTC</string>
</dict>
</plist>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants