Compare commits
13 Commits
v0.3.0-rc.
...
v0.3.0-rc.
| Author | SHA1 | Date | |
|---|---|---|---|
| c3bb544c6a | |||
| a4ed795769 | |||
| 047fce207f | |||
| 8410234a4e | |||
| f76543fe0c | |||
| b9693be5de | |||
| 78135a4b36 | |||
| dfb9941b86 | |||
| b8c5f68972 | |||
| 564707f4d6 | |||
| 5f72ad430e | |||
| 8cc60e1849 | |||
| 0b75148a3f |
@@ -17,6 +17,12 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
ssh-keyscan git.koptilnya.xyz >> ~/.ssh/known_hosts
|
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
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
Binary file not shown.
1
client/app/components.d.ts
vendored
1
client/app/components.d.ts
vendored
@@ -24,7 +24,6 @@ declare module 'vue' {
|
|||||||
PrimeSelectButton: typeof import('primevue/selectbutton')['default']
|
PrimeSelectButton: typeof import('primevue/selectbutton')['default']
|
||||||
PrimeSlider: typeof import('primevue/slider')['default']
|
PrimeSlider: typeof import('primevue/slider')['default']
|
||||||
PrimeTag: typeof import('primevue/tag')['default']
|
PrimeTag: typeof import('primevue/tag')['default']
|
||||||
PrimeTextarea: typeof import('primevue/textarea')['default']
|
|
||||||
PrimeToast: typeof import('primevue/toast')['default']
|
PrimeToast: typeof import('primevue/toast')['default']
|
||||||
PrimeToggleSwitch: typeof import('primevue/toggleswitch')['default']
|
PrimeToggleSwitch: typeof import('primevue/toggleswitch')['default']
|
||||||
RouterLink: typeof import('vue-router')['RouterLink']
|
RouterLink: typeof import('vue-router')['RouterLink']
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ export const useChat = createGlobalState(() => {
|
|||||||
socket.on('disconnect', () => {
|
socket.on('disconnect', () => {
|
||||||
messages.value = []
|
messages.value = []
|
||||||
})
|
})
|
||||||
}, { immediate: true })
|
}, { immediate: true, flush: 'sync' })
|
||||||
|
|
||||||
function sendMessage(message: ChatClientMessage) {
|
function sendMessage(message: ChatClientMessage) {
|
||||||
if (!signaling.connected.value)
|
if (!signaling.connected.value)
|
||||||
|
|||||||
@@ -13,8 +13,10 @@ export const useDevices = createGlobalState(() => {
|
|||||||
return navigator.mediaDevices.getDisplayMedia({
|
return navigator.mediaDevices.getDisplayMedia({
|
||||||
audio: false,
|
audio: false,
|
||||||
video: {
|
video: {
|
||||||
|
width: { max: 2560 },
|
||||||
|
height: { max: 1080 },
|
||||||
displaySurface: 'monitor',
|
displaySurface: 'monitor',
|
||||||
frameRate: { max: fps },
|
frameRate: { ideal: fps, max: fps },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -343,6 +343,8 @@ export const useMediasoup = createSharedComposable(() => {
|
|||||||
producer.on('trackended', () => {
|
producer.on('trackended', () => {
|
||||||
disableProducer(producers.value[producer.id]!)
|
disableProducer(producers.value[producer.id]!)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
return producer
|
||||||
}
|
}
|
||||||
|
|
||||||
async function disableProducer(producer: Producer) {
|
async function disableProducer(producer: Producer) {
|
||||||
@@ -386,8 +388,10 @@ export const useMediasoup = createSharedComposable(() => {
|
|||||||
streamId: 'mic-video',
|
streamId: 'mic-video',
|
||||||
codecOptions: {
|
codecOptions: {
|
||||||
opusStereo: true,
|
opusStereo: true,
|
||||||
opusDtx: true, // Меньше пакетов летит когда тишина
|
opusMaxPlaybackRate: 48000,
|
||||||
opusFec: false, // Фиксит пакет лос
|
opusMaxAverageBitrate: 192000,
|
||||||
|
opusDtx: false,
|
||||||
|
opusFec: false,
|
||||||
},
|
},
|
||||||
appData: {
|
appData: {
|
||||||
source: 'mic-video',
|
source: 'mic-video',
|
||||||
@@ -449,6 +453,8 @@ export const useMediasoup = createSharedComposable(() => {
|
|||||||
|
|
||||||
const track = stream.getVideoTracks()[0]
|
const track = stream.getVideoTracks()[0]
|
||||||
|
|
||||||
|
console.log('settings', track.getSettings())
|
||||||
|
|
||||||
if (!track)
|
if (!track)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -456,10 +462,37 @@ export const useMediasoup = createSharedComposable(() => {
|
|||||||
track,
|
track,
|
||||||
streamId: 'share',
|
streamId: 'share',
|
||||||
codec: device.value.rtpCapabilities.codecs?.find(
|
codec: device.value.rtpCapabilities.codecs?.find(
|
||||||
c => c.mimeType.toLowerCase() === 'video/AV1',
|
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: 120_000_000,
|
||||||
|
maxFramerate: 60,
|
||||||
|
scalabilityMode: 'L1T1',
|
||||||
|
networkPriority: 'high',
|
||||||
|
},
|
||||||
|
],
|
||||||
codecOptions: {
|
codecOptions: {
|
||||||
videoGoogleStartBitrate: 1000,
|
// videoGoogleStartBitrate: 8000,
|
||||||
|
videoGoogleMaxBitrate: 120000,
|
||||||
|
videoGoogleMinBitrate: 2000,
|
||||||
},
|
},
|
||||||
zeroRtpOnPause: true,
|
zeroRtpOnPause: true,
|
||||||
appData: {
|
appData: {
|
||||||
|
|||||||
@@ -48,6 +48,7 @@
|
|||||||
<!-- </PrimeInputGroupAddon> -->
|
<!-- </PrimeInputGroupAddon> -->
|
||||||
|
|
||||||
<PrimeInputText
|
<PrimeInputText
|
||||||
|
ref="input"
|
||||||
v-model="text"
|
v-model="text"
|
||||||
placeholder="Write a message..."
|
placeholder="Write a message..."
|
||||||
fluid
|
fluid
|
||||||
@@ -56,13 +57,14 @@
|
|||||||
@vue:mounted="onInputMounted"
|
@vue:mounted="onInputMounted"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<PrimeButton class="shrink-0" label="Send" severity="contrast" @click="sendMessage" />
|
<PrimeButton class="shrink-0" label="Send" severity="contrast" :disabled="!text" @click="sendMessage" />
|
||||||
</PrimeInputGroup>
|
</PrimeInputGroup>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useEventBus } from '#imports'
|
import { useEventBus } from '#imports'
|
||||||
|
import { onStartTyping, unrefElement, useEventListener } from '@vueuse/core'
|
||||||
import { format } from 'date-fns'
|
import { format } from 'date-fns'
|
||||||
import linkifyStr from 'linkify-string'
|
import linkifyStr from 'linkify-string'
|
||||||
import { useChat } from '~/composables/use-chat'
|
import { useChat } from '~/composables/use-chat'
|
||||||
@@ -78,6 +80,7 @@ const eventBus = useEventBus()
|
|||||||
const { messages } = chat
|
const { messages } = chat
|
||||||
|
|
||||||
const scrollRef = useTemplateRef('scroll')
|
const scrollRef = useTemplateRef('scroll')
|
||||||
|
const inputRef = useTemplateRef('input')
|
||||||
const contentRef = computed(() => scrollRef.value?.$refs.content)
|
const contentRef = computed(() => scrollRef.value?.$refs.content)
|
||||||
|
|
||||||
const text = ref('')
|
const text = ref('')
|
||||||
@@ -118,6 +121,14 @@ function onInputMounted(ref: VNode) {
|
|||||||
ref.el?.focus()
|
ref.el?.focus()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
useEventListener(window, 'focus', async (evt) => {
|
||||||
|
unrefElement(inputRef.value)?.focus()
|
||||||
|
})
|
||||||
|
|
||||||
|
onStartTyping(() => {
|
||||||
|
unrefElement(inputRef.value)?.focus()
|
||||||
|
})
|
||||||
|
|
||||||
const ARRIVED_STATE_THRESHOLD_PIXELS = 1
|
const ARRIVED_STATE_THRESHOLD_PIXELS = 1
|
||||||
async function onNewMessage() {
|
async function onNewMessage() {
|
||||||
if (!contentRef.value)
|
if (!contentRef.value)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
|
||||||
"productName": "Chad",
|
"productName": "Chad",
|
||||||
"version": "0.3.0-rc.2",
|
"version": "0.3.0-rc.5",
|
||||||
"identifier": "xyz.koptilnya.chad",
|
"identifier": "xyz.koptilnya.chad",
|
||||||
"build": {
|
"build": {
|
||||||
"frontendDist": "../.output/public",
|
"frontendDist": "../.output/public",
|
||||||
|
|||||||
@@ -27,19 +27,30 @@ export const autoConfig: mediasoup.types.RouterOptions = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
kind: 'video',
|
kind: 'video',
|
||||||
mimeType: 'video/VP8',
|
mimeType: 'video/AV1',
|
||||||
clockRate: 90000,
|
clockRate: 90000,
|
||||||
parameters: {
|
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',
|
kind: 'video',
|
||||||
mimeType: 'video/VP9',
|
mimeType: 'video/AV1',
|
||||||
|
clockRate: 90000,
|
||||||
|
parameters: {},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
kind: 'video',
|
||||||
|
mimeType: 'video/h264',
|
||||||
clockRate: 90000,
|
clockRate: 90000,
|
||||||
parameters: {
|
parameters: {
|
||||||
'profile-id': 2,
|
'packetization-mode': 1,
|
||||||
'x-google-start-bitrate': 1000,
|
'profile-level-id': '640032',
|
||||||
|
'level-asymmetry-allowed': 1,
|
||||||
|
'x-google-start-bitrate': 12000,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -50,7 +61,7 @@ export const autoConfig: mediasoup.types.RouterOptions = {
|
|||||||
'packetization-mode': 1,
|
'packetization-mode': 1,
|
||||||
'profile-level-id': '4d0032',
|
'profile-level-id': '4d0032',
|
||||||
'level-asymmetry-allowed': 1,
|
'level-asymmetry-allowed': 1,
|
||||||
'x-google-start-bitrate': 1000,
|
'x-google-start-bitrate': 8000,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -61,14 +72,25 @@ export const autoConfig: mediasoup.types.RouterOptions = {
|
|||||||
'packetization-mode': 1,
|
'packetization-mode': 1,
|
||||||
'profile-level-id': '42e01f',
|
'profile-level-id': '42e01f',
|
||||||
'level-asymmetry-allowed': 1,
|
'level-asymmetry-allowed': 1,
|
||||||
'x-google-start-bitrate': 1000,
|
'x-google-start-bitrate': 8000,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
kind: 'video',
|
kind: 'video',
|
||||||
mimeType: 'video/AV1',
|
mimeType: 'video/VP9',
|
||||||
clockRate: 90000,
|
clockRate: 90000,
|
||||||
parameters: {},
|
parameters: {
|
||||||
|
'profile-id': 0,
|
||||||
|
'x-google-start-bitrate': 12000,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
kind: 'video',
|
||||||
|
mimeType: 'video/VP8',
|
||||||
|
clockRate: 90000,
|
||||||
|
parameters: {
|
||||||
|
'x-google-start-bitrate': 2000,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,6 +112,8 @@ export default async function (io: SocketServer, router: types.Router) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
initialAvailableOutgoingBitrate: 8_000_000,
|
||||||
|
maxSctpMessageSize: 262144,
|
||||||
enableUdp: true,
|
enableUdp: true,
|
||||||
preferUdp: true,
|
preferUdp: true,
|
||||||
appData: {
|
appData: {
|
||||||
@@ -402,8 +404,7 @@ export default async function (io: SocketServer, router: types.Router) {
|
|||||||
{
|
{
|
||||||
producerId: producer.id,
|
producerId: producer.id,
|
||||||
rtpCapabilities: consumerSocket.data.rtpCapabilities,
|
rtpCapabilities: consumerSocket.data.rtpCapabilities,
|
||||||
// Enable NACK for OPUS.
|
enableRtx: false,
|
||||||
enableRtx: true,
|
|
||||||
paused: true,
|
paused: true,
|
||||||
ignoreDtx: true,
|
ignoreDtx: true,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user