android apk
Some checks failed
Build and Release / build-and-release (push) Failing after 19m13s

This commit is contained in:
Bryan1029384756
2026-02-18 16:18:40 -06:00
parent bdc16b9d3f
commit e407a2d1a5
10 changed files with 73 additions and 13 deletions

View File

@@ -1,7 +1,7 @@
{
"name": "@discord-clone/shared",
"private": true,
"version": "1.0.24",
"version": "1.0.25",
"type": "module",
"main": "src/App.jsx",
"dependencies": {

View File

@@ -240,6 +240,17 @@ export const VoiceProvider = ({ children }) => {
setConnectionState('connecting');
try {
// Request microphone permission (triggers Android runtime prompt)
try {
const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
stream.getTracks().forEach(t => t.stop());
} catch (e) {
console.error('Microphone permission denied:', e);
setConnectionState('error');
setActiveChannelId(null);
return;
}
const { token: lkToken } = await convex.action(api.voice.getToken, {
channelId,
userId,
@@ -255,10 +266,18 @@ export const VoiceProvider = ({ children }) => {
const noiseSuppression = localStorage.getItem('voiceNoiseSuppression') !== 'false'; // default true
const isMobile = /Android|iPhone|iPad/i.test(navigator.userAgent);
const newRoom = new Room({
adaptiveStream: true,
dynacast: true,
autoSubscribe: true,
rtcConfig: {
iceServers: [
{ urls: 'stun:stun.l.google.com:19302' },
{ urls: 'stun:stun1.l.google.com:19302' },
],
},
audioCaptureDefaults: {
autoGainControl: true,
echoCancellation: true,
@@ -275,7 +294,7 @@ export const VoiceProvider = ({ children }) => {
dtx: false,
red: true,
videoEncoding: VideoPresets.h720.encoding,
videoCodec: 'vp9',
videoCodec: isMobile ? 'vp8' : 'vp9',
screenShareEncoding: {
maxBitrate: 10_000_000,
maxFramerate: 60,

View File

@@ -422,7 +422,6 @@ body {
.chat-input-form {
padding: 0 8px 8px;
margin-top: 24px;
background-color: var(--bg-primary);
}