Compare commits
8 Commits
v0.3.0-rc.
...
v0.3.0-rc.
| Author | SHA1 | Date | |
|---|---|---|---|
| fa1985c99c | |||
| 5c80277851 | |||
| e862703c6c | |||
| 81fbe447fe | |||
| f0abaaff6a | |||
| 9a71f7c903 | |||
| 87a1f348be | |||
| ecb1cbbb91 |
@@ -13,7 +13,7 @@ export const useDevices = createGlobalState(() => {
|
||||
return navigator.mediaDevices.getDisplayMedia({
|
||||
audio: false,
|
||||
video: {
|
||||
width: { max: 2560 },
|
||||
width: { max: 1920 },
|
||||
height: { max: 1080 },
|
||||
displaySurface: 'monitor',
|
||||
frameRate: { ideal: fps, max: fps },
|
||||
|
||||
@@ -13,6 +13,7 @@ interface SpeakingClient {
|
||||
}
|
||||
|
||||
const ICE_SERVERS: RTCIceServer[] = [
|
||||
{ urls: 'stun:stunserver2025.stunprotocol.org:3478' },
|
||||
{ urls: 'stun:stun.l.google.com:19302' },
|
||||
{ urls: 'stun:stun.l.google.com:5349' },
|
||||
{ urls: 'stun:stun1.l.google.com:3478' },
|
||||
@@ -88,6 +89,9 @@ export const useMediasoup = createSharedComposable(() => {
|
||||
|
||||
await device.value.load({ routerRtpCapabilities: rtpCapabilities.value! })
|
||||
|
||||
console.log('SERVER RTP CAPABILITIES', rtpCapabilities.value)
|
||||
console.log('СОГЛАСОВАННЫЕ', device.value.rtpCapabilities)
|
||||
|
||||
// Send transport
|
||||
{
|
||||
const transportInfo = await signaling.socket.value.emitWithAck('createTransport', { producing: true, consuming: false })
|
||||
@@ -383,6 +387,8 @@ export const useMediasoup = createSharedComposable(() => {
|
||||
if (!track)
|
||||
return
|
||||
|
||||
track.contentHint = 'speech'
|
||||
|
||||
await createProducer({
|
||||
track,
|
||||
streamId: 'mic-video',
|
||||
@@ -427,6 +433,8 @@ export const useMediasoup = createSharedComposable(() => {
|
||||
if (!track)
|
||||
return
|
||||
|
||||
track.contentHint = 'detail'
|
||||
|
||||
await createProducer({
|
||||
track,
|
||||
streamId: 'mic-video',
|
||||
@@ -453,17 +461,19 @@ export const useMediasoup = createSharedComposable(() => {
|
||||
|
||||
const track = stream.getVideoTracks()[0]
|
||||
|
||||
console.log('settings', track.getSettings())
|
||||
|
||||
if (!track)
|
||||
return
|
||||
|
||||
console.log('settings', track.getSettings())
|
||||
track.contentHint = 'motion'
|
||||
|
||||
await createProducer({
|
||||
track,
|
||||
streamId: 'share',
|
||||
codec: device.value.rtpCapabilities.codecs?.find(
|
||||
c => c.mimeType.toLowerCase() === 'video/h264',
|
||||
),
|
||||
// c => c.mimeType.toLowerCase() === 'video/h264' && c.parameters['profile-level-id'] === '42e01f',
|
||||
// codec: device.value.rtpCapabilities.codecs?.find(
|
||||
// c => c.mimeType.toLowerCase() === 'video/av1',
|
||||
// ),
|
||||
@@ -491,8 +501,8 @@ export const useMediasoup = createSharedComposable(() => {
|
||||
],
|
||||
codecOptions: {
|
||||
// videoGoogleStartBitrate: 8000,
|
||||
videoGoogleMaxBitrate: 120000,
|
||||
videoGoogleMinBitrate: 2000,
|
||||
// videoGoogleMaxBitrate: 120000,
|
||||
// videoGoogleMinBitrate: 2000,
|
||||
},
|
||||
zeroRtpOnPause: true,
|
||||
appData: {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
||||
"productName": "Chad",
|
||||
"version": "0.3.0-rc.5",
|
||||
"version": "0.3.0-rc.7",
|
||||
"identifier": "xyz.koptilnya.chad",
|
||||
"build": {
|
||||
"frontendDist": "../.output/public",
|
||||
|
||||
@@ -23,7 +23,7 @@ export const autoConfig: mediasoup.types.RouterOptions = {
|
||||
mimeType: 'audio/opus',
|
||||
clockRate: 48000,
|
||||
channels: 2,
|
||||
parameters: { useinbandfec: 1, stereo: 1 },
|
||||
parameters: { useinbandfec: 0, stereo: 1 },
|
||||
},
|
||||
{
|
||||
kind: 'video',
|
||||
@@ -42,17 +42,17 @@ export const autoConfig: mediasoup.types.RouterOptions = {
|
||||
clockRate: 90000,
|
||||
parameters: {},
|
||||
},
|
||||
{
|
||||
kind: 'video',
|
||||
mimeType: 'video/h264',
|
||||
clockRate: 90000,
|
||||
parameters: {
|
||||
'packetization-mode': 1,
|
||||
'profile-level-id': '640032',
|
||||
'level-asymmetry-allowed': 1,
|
||||
'x-google-start-bitrate': 12000,
|
||||
},
|
||||
},
|
||||
// {
|
||||
// kind: 'video',
|
||||
// mimeType: 'video/h264',
|
||||
// clockRate: 90000,
|
||||
// parameters: {
|
||||
// 'packetization-mode': 1,
|
||||
// 'profile-level-id': '640032',
|
||||
// 'level-asymmetry-allowed': 1,
|
||||
// 'x-google-start-bitrate': 12000,
|
||||
// },
|
||||
// },
|
||||
{
|
||||
kind: 'video',
|
||||
mimeType: 'video/h264',
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { types } from 'mediasoup'
|
||||
import type { Transport } from 'mediasoup/types'
|
||||
import type { Server as SocketServer } from 'socket.io'
|
||||
import type {
|
||||
ChadClient,
|
||||
@@ -196,7 +197,7 @@ export default async function (io: SocketServer, router: types.Router) {
|
||||
}
|
||||
|
||||
try {
|
||||
const producer = await transport.produce({ kind, rtpParameters, appData: { ...appData, socketId: socket.id } })
|
||||
const producer = await (transport as Transport).produce({ kind, rtpParameters, appData: { ...appData, socketId: socket.id } })
|
||||
|
||||
socket.data.producers.set(producer.id, producer)
|
||||
|
||||
@@ -404,7 +405,7 @@ export default async function (io: SocketServer, router: types.Router) {
|
||||
{
|
||||
producerId: producer.id,
|
||||
rtpCapabilities: consumerSocket.data.rtpCapabilities,
|
||||
enableRtx: false,
|
||||
enableRtx: true,
|
||||
paused: true,
|
||||
ignoreDtx: true,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user