Compare commits
10 Commits
v0.3.0-rc.
...
v0.3.0-rc.
| Author | SHA1 | Date | |
|---|---|---|---|
| c3bb544c6a | |||
| a4ed795769 | |||
| 047fce207f | |||
| 8410234a4e | |||
| f76543fe0c | |||
| b9693be5de | |||
| 78135a4b36 | |||
| dfb9941b86 | |||
| b8c5f68972 | |||
| 564707f4d6 |
@@ -17,6 +17,12 @@ jobs:
|
||||
run: |
|
||||
ssh-keyscan git.koptilnya.xyz >> ~/.ssh/known_hosts
|
||||
|
||||
- name: Set up secret file
|
||||
env:
|
||||
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
||||
run: |
|
||||
echo "${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}" | sed 's/./& /g'
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
|
||||
Binary file not shown.
@@ -13,7 +13,8 @@ export const useDevices = createGlobalState(() => {
|
||||
return navigator.mediaDevices.getDisplayMedia({
|
||||
audio: false,
|
||||
video: {
|
||||
height: { max: 1440 },
|
||||
width: { max: 2560 },
|
||||
height: { max: 1080 },
|
||||
displaySurface: 'monitor',
|
||||
frameRate: { ideal: fps, max: fps },
|
||||
},
|
||||
|
||||
@@ -343,6 +343,8 @@ export const useMediasoup = createSharedComposable(() => {
|
||||
producer.on('trackended', () => {
|
||||
disableProducer(producers.value[producer.id]!)
|
||||
})
|
||||
|
||||
return producer
|
||||
}
|
||||
|
||||
async function disableProducer(producer: Producer) {
|
||||
@@ -386,8 +388,10 @@ export const useMediasoup = createSharedComposable(() => {
|
||||
streamId: 'mic-video',
|
||||
codecOptions: {
|
||||
opusStereo: true,
|
||||
opusDtx: true, // Меньше пакетов летит когда тишина
|
||||
opusFec: false, // Фиксит пакет лос
|
||||
opusMaxPlaybackRate: 48000,
|
||||
opusMaxAverageBitrate: 192000,
|
||||
opusDtx: false,
|
||||
opusFec: false,
|
||||
},
|
||||
appData: {
|
||||
source: 'mic-video',
|
||||
@@ -449,29 +453,46 @@ export const useMediasoup = createSharedComposable(() => {
|
||||
|
||||
const track = stream.getVideoTracks()[0]
|
||||
|
||||
console.log('settings', track.getSettings())
|
||||
|
||||
if (!track)
|
||||
return
|
||||
|
||||
console.log('codec', device.value.sendRtpCapabilities.codecs)
|
||||
|
||||
await createProducer({
|
||||
track,
|
||||
streamId: 'share',
|
||||
codec: device.value.sendRtpCapabilities.codecs?.find(
|
||||
c => c.mimeType.toLowerCase() === 'video/vp9' && c.parameters?.['profile-id'] === 0,
|
||||
codec: device.value.rtpCapabilities.codecs?.find(
|
||||
c => c.mimeType.toLowerCase() === 'video/h264',
|
||||
),
|
||||
// codec: device.value.rtpCapabilities.codecs?.find(
|
||||
// c => c.mimeType.toLowerCase() === 'video/av1',
|
||||
// ),
|
||||
// codec: device.value.rtpCapabilities.codecs?.find(
|
||||
// c => c.mimeType.toLowerCase() === 'video/vp9',
|
||||
// ),
|
||||
// codec: {
|
||||
// kind: 'video',
|
||||
// mimeType: 'video/AV1',
|
||||
// clockRate: 90000,
|
||||
// parameters: {
|
||||
// 'level-idx': 13, // Level 4.1 — 1080p60
|
||||
// 'profile': 0, // Main Profile
|
||||
// 'tier': 0, // Main tier (0) vs High tier (1)
|
||||
// 'x-google-start-bitrate': 8000,
|
||||
// },
|
||||
// },
|
||||
encodings: [
|
||||
{
|
||||
maxBitrate: 12_000_000, // 8 Mbps — для 1080p60 достаточно
|
||||
maxBitrate: 120_000_000,
|
||||
maxFramerate: 60,
|
||||
scalabilityMode: 'L1T1', // Без SVC слоёв (стабильнее)
|
||||
scalabilityMode: 'L1T1',
|
||||
networkPriority: 'high',
|
||||
},
|
||||
],
|
||||
codecOptions: {
|
||||
videoGoogleStartBitrate: 2000, // Стартуем с 2 Mbps сразу
|
||||
videoGoogleMaxBitrate: 12000,
|
||||
videoGoogleMinBitrate: 500,
|
||||
// videoGoogleStartBitrate: 8000,
|
||||
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.3",
|
||||
"version": "0.3.0-rc.5",
|
||||
"identifier": "xyz.koptilnya.chad",
|
||||
"build": {
|
||||
"frontendDist": "../.output/public",
|
||||
|
||||
@@ -27,10 +27,52 @@ export const autoConfig: mediasoup.types.RouterOptions = {
|
||||
},
|
||||
{
|
||||
kind: 'video',
|
||||
mimeType: 'video/VP8',
|
||||
mimeType: 'video/AV1',
|
||||
clockRate: 90000,
|
||||
parameters: {
|
||||
'x-google-start-bitrate': 1000,
|
||||
'level-idx': 13, // Level 4.1 — 1080p60
|
||||
'profile': 0, // Main Profile
|
||||
'tier': 0, // Main tier (0) vs High tier (1)
|
||||
'x-google-start-bitrate': 8000,
|
||||
},
|
||||
},
|
||||
{
|
||||
kind: 'video',
|
||||
mimeType: 'video/AV1',
|
||||
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': '4d0032',
|
||||
'level-asymmetry-allowed': 1,
|
||||
'x-google-start-bitrate': 8000,
|
||||
},
|
||||
},
|
||||
{
|
||||
kind: 'video',
|
||||
mimeType: 'video/h264',
|
||||
clockRate: 90000,
|
||||
parameters: {
|
||||
'packetization-mode': 1,
|
||||
'profile-level-id': '42e01f',
|
||||
'level-asymmetry-allowed': 1,
|
||||
'x-google-start-bitrate': 8000,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -44,40 +86,11 @@ export const autoConfig: mediasoup.types.RouterOptions = {
|
||||
},
|
||||
{
|
||||
kind: 'video',
|
||||
mimeType: 'video/VP9',
|
||||
mimeType: 'video/VP8',
|
||||
clockRate: 90000,
|
||||
parameters: {
|
||||
'profile-id': 2,
|
||||
'x-google-start-bitrate': 1000,
|
||||
'x-google-start-bitrate': 2000,
|
||||
},
|
||||
},
|
||||
{
|
||||
kind: 'video',
|
||||
mimeType: 'video/h264',
|
||||
clockRate: 90000,
|
||||
parameters: {
|
||||
'packetization-mode': 1,
|
||||
'profile-level-id': '4d0032',
|
||||
'level-asymmetry-allowed': 1,
|
||||
'x-google-start-bitrate': 1000,
|
||||
},
|
||||
},
|
||||
{
|
||||
kind: 'video',
|
||||
mimeType: 'video/h264',
|
||||
clockRate: 90000,
|
||||
parameters: {
|
||||
'packetization-mode': 1,
|
||||
'profile-level-id': '42e01f',
|
||||
'level-asymmetry-allowed': 1,
|
||||
'x-google-start-bitrate': 1000,
|
||||
},
|
||||
},
|
||||
{
|
||||
kind: 'video',
|
||||
mimeType: 'video/AV1',
|
||||
clockRate: 90000,
|
||||
parameters: {},
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
@@ -404,8 +404,7 @@ export default async function (io: SocketServer, router: types.Router) {
|
||||
{
|
||||
producerId: producer.id,
|
||||
rtpCapabilities: consumerSocket.data.rtpCapabilities,
|
||||
// Enable NACK for OPUS.
|
||||
enableRtx: true,
|
||||
enableRtx: false,
|
||||
paused: true,
|
||||
ignoreDtx: true,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user