Compare commits
14 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 | |||
| c966aa9c4b |
@@ -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.
2
client/app/components.d.ts
vendored
2
client/app/components.d.ts
vendored
@@ -16,7 +16,6 @@ declare module 'vue' {
|
|||||||
PrimeDivider: typeof import('primevue/divider')['default']
|
PrimeDivider: typeof import('primevue/divider')['default']
|
||||||
PrimeFloatLabel: typeof import('primevue/floatlabel')['default']
|
PrimeFloatLabel: typeof import('primevue/floatlabel')['default']
|
||||||
PrimeInputGroup: typeof import('primevue/inputgroup')['default']
|
PrimeInputGroup: typeof import('primevue/inputgroup')['default']
|
||||||
PrimeInputGroupAddon: typeof import('primevue/inputgroupaddon')['default']
|
|
||||||
PrimeInputText: typeof import('primevue/inputtext')['default']
|
PrimeInputText: typeof import('primevue/inputtext')['default']
|
||||||
PrimePassword: typeof import('primevue/password')['default']
|
PrimePassword: typeof import('primevue/password')['default']
|
||||||
PrimeProgressBar: typeof import('primevue/progressbar')['default']
|
PrimeProgressBar: typeof import('primevue/progressbar')['default']
|
||||||
@@ -25,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']
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { getVersion } from '@tauri-apps/api/app'
|
import { getVersion } from '@tauri-apps/api/app'
|
||||||
|
import { openUrl as tauriOpenUrl } from '@tauri-apps/plugin-opener'
|
||||||
import { computedAsync, createGlobalState } from '@vueuse/core'
|
import { computedAsync, createGlobalState } from '@vueuse/core'
|
||||||
import { useClients } from '~/composables/use-clients'
|
import { useClients } from '~/composables/use-clients'
|
||||||
|
|
||||||
@@ -134,6 +134,15 @@ export const useApp = createGlobalState(() => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function openUrl(href: string) {
|
||||||
|
if (isTauri.value) {
|
||||||
|
await tauriOpenUrl(href)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
window.open(href, '_blank', 'noopener noreferrer')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
ready,
|
ready,
|
||||||
clients,
|
clients,
|
||||||
@@ -153,5 +162,6 @@ export const useApp = createGlobalState(() => {
|
|||||||
videoEnabled,
|
videoEnabled,
|
||||||
sharingEnabled,
|
sharingEnabled,
|
||||||
somebodyStreamingVideo,
|
somebodyStreamingVideo,
|
||||||
|
openUrl,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -39,12 +39,17 @@ 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)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
message.text = message.text.trim()
|
||||||
|
|
||||||
|
if (!message.text.length)
|
||||||
|
return
|
||||||
|
|
||||||
signaling.socket.value!.emit('chat:message', message)
|
signaling.socket.value!.emit('chat:message', message)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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: {
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<PrimeScrollPanel class="flex-1 min-h-0">
|
<p v-if="!messages.length" class="text-muted-color text-center m-auto">
|
||||||
<div v-auto-animate class="flex flex-col gap-3">
|
Chat is empty
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<PrimeScrollPanel v-else ref="scroll" class="flex-1 min-h-0 overflow-x-hidden">
|
||||||
|
<div class="flex flex-col gap-3">
|
||||||
<div
|
<div
|
||||||
v-for="message in messages"
|
v-for="message in messages"
|
||||||
:key="message.id"
|
:key="message.id"
|
||||||
class="min-w-64 w-fit max-w-[60%]"
|
class="w-fit max-w-[60%]"
|
||||||
:class="{
|
:class="{
|
||||||
'ml-auto': message.sender === me?.username,
|
'ml-auto': message.sender === me?.username,
|
||||||
}"
|
}"
|
||||||
@@ -17,14 +21,15 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="px-2 py-1 rounded-lg"
|
class="px-3 py-2 rounded-lg"
|
||||||
:class="{
|
:class="{
|
||||||
'bg-surface-800': message.sender !== me?.username,
|
'bg-surface-800': message.sender !== me?.username,
|
||||||
'bg-surface-700': message.sender === me?.username,
|
'bg-surface-700': message.sender === me?.username,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<p v-html="parseMessageText(message.text)" />
|
<p class="[&>a]:break-all" @click="handleMessageClick" v-html="parseMessageText(message.text)" />
|
||||||
<p class="text-right text-sm text-muted-color">
|
|
||||||
|
<p class="mt-1 text-right text-sm text-muted-color" :title="formatDate(message.createdAt, 'dd.MM.yyyy, HH:mm')">
|
||||||
{{ formatDate(message.createdAt) }}
|
{{ formatDate(message.createdAt) }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -32,7 +37,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</PrimeScrollPanel>
|
</PrimeScrollPanel>
|
||||||
|
|
||||||
<div class="pt-3 mt-auto">
|
<div class="mt-3 shrink-0">
|
||||||
<PrimeInputGroup>
|
<PrimeInputGroup>
|
||||||
<!-- <PrimeInputGroupAddon> -->
|
<!-- <PrimeInputGroupAddon> -->
|
||||||
<!-- <PrimeButton severity="secondary" class="shrink-0" disabled> -->
|
<!-- <PrimeButton severity="secondary" class="shrink-0" disabled> -->
|
||||||
@@ -42,14 +47,24 @@
|
|||||||
<!-- </PrimeButton> -->
|
<!-- </PrimeButton> -->
|
||||||
<!-- </PrimeInputGroupAddon> -->
|
<!-- </PrimeInputGroupAddon> -->
|
||||||
|
|
||||||
<PrimeInputText v-model="text" placeholder="Write a message..." fluid @keydown.enter="sendMessage" />
|
<PrimeInputText
|
||||||
|
ref="input"
|
||||||
|
v-model="text"
|
||||||
|
placeholder="Write a message..."
|
||||||
|
fluid
|
||||||
|
autocomplete="off"
|
||||||
|
@keydown.enter.exact="sendMessage"
|
||||||
|
@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 { 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'
|
||||||
@@ -58,18 +73,37 @@ definePageMeta({
|
|||||||
name: 'Index',
|
name: 'Index',
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const { openUrl } = useApp()
|
||||||
const { me } = useClients()
|
const { me } = useClients()
|
||||||
const chat = useChat()
|
const chat = useChat()
|
||||||
|
const eventBus = useEventBus()
|
||||||
const { messages } = chat
|
const { messages } = chat
|
||||||
|
|
||||||
|
const scrollRef = useTemplateRef('scroll')
|
||||||
|
const inputRef = useTemplateRef('input')
|
||||||
|
const contentRef = computed(() => scrollRef.value?.$refs.content)
|
||||||
|
|
||||||
const text = ref('')
|
const text = ref('')
|
||||||
|
|
||||||
|
eventBus.on('chat:new-message', onNewMessage)
|
||||||
|
|
||||||
|
onScopeDispose(() => {
|
||||||
|
eventBus.off('chat:new-message', onNewMessage)
|
||||||
|
})
|
||||||
|
|
||||||
function parseMessageText(text: string) {
|
function parseMessageText(text: string) {
|
||||||
return linkifyStr(text, { className: 'underline', rel: 'noopener noreferrer', target: '_blank' })
|
return linkifyStr(
|
||||||
|
text,
|
||||||
|
{
|
||||||
|
className: 'underline',
|
||||||
|
rel: 'noopener noreferrer',
|
||||||
|
target: '_blank',
|
||||||
|
},
|
||||||
|
).replaceAll('\n', '<br>')
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatDate(date: string) {
|
function formatDate(date: string, formatStr = 'HH:mm') {
|
||||||
return format(date, 'HH:mm')
|
return format(date, formatStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendMessage() {
|
function sendMessage() {
|
||||||
@@ -82,4 +116,57 @@ function sendMessage() {
|
|||||||
|
|
||||||
text.value = ''
|
text.value = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onInputMounted(ref: VNode) {
|
||||||
|
ref.el?.focus()
|
||||||
|
}
|
||||||
|
|
||||||
|
useEventListener(window, 'focus', async (evt) => {
|
||||||
|
unrefElement(inputRef.value)?.focus()
|
||||||
|
})
|
||||||
|
|
||||||
|
onStartTyping(() => {
|
||||||
|
unrefElement(inputRef.value)?.focus()
|
||||||
|
})
|
||||||
|
|
||||||
|
const ARRIVED_STATE_THRESHOLD_PIXELS = 1
|
||||||
|
async function onNewMessage() {
|
||||||
|
if (!contentRef.value)
|
||||||
|
return
|
||||||
|
|
||||||
|
const arrivedBottom = contentRef.value.scrollTop + contentRef.value.clientHeight
|
||||||
|
>= contentRef.value.scrollHeight - ARRIVED_STATE_THRESHOLD_PIXELS
|
||||||
|
|
||||||
|
const scrollable = contentRef.value.scrollHeight > contentRef.value.clientHeight
|
||||||
|
|
||||||
|
await nextTick()
|
||||||
|
|
||||||
|
if (scrollable && !arrivedBottom)
|
||||||
|
return
|
||||||
|
|
||||||
|
contentRef.value.scrollTo({
|
||||||
|
behavior: 'smooth',
|
||||||
|
top: contentRef.value.scrollHeight,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleMessageClick({ target }: MouseEvent) {
|
||||||
|
if (!target)
|
||||||
|
return
|
||||||
|
|
||||||
|
if (target instanceof HTMLElement) {
|
||||||
|
if (target.tagName === 'A') {
|
||||||
|
target.addEventListener('click', onAnchorClick)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function onAnchorClick(event: MouseEvent) {
|
||||||
|
event.preventDefault()
|
||||||
|
|
||||||
|
const target = event.target as HTMLAnchorElement
|
||||||
|
|
||||||
|
console.log('yo')
|
||||||
|
openUrl(target.href)
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
"@primeuix/themes": "^1.2.5",
|
"@primeuix/themes": "^1.2.5",
|
||||||
"@tailwindcss/vite": "^4.1.14",
|
"@tailwindcss/vite": "^4.1.14",
|
||||||
"@tauri-apps/plugin-global-shortcut": "^2.3.1",
|
"@tauri-apps/plugin-global-shortcut": "^2.3.1",
|
||||||
|
"@tauri-apps/plugin-opener": "~2",
|
||||||
"@tauri-apps/plugin-process": "^2.3.1",
|
"@tauri-apps/plugin-process": "^2.3.1",
|
||||||
"@tauri-apps/plugin-updater": "^2.10.1",
|
"@tauri-apps/plugin-updater": "^2.10.1",
|
||||||
"@vueuse/core": "^13.9.0",
|
"@vueuse/core": "^13.9.0",
|
||||||
|
|||||||
60
client/src-tauri/Cargo.lock
generated
60
client/src-tauri/Cargo.lock
generated
@@ -86,6 +86,7 @@ dependencies = [
|
|||||||
"tauri-build",
|
"tauri-build",
|
||||||
"tauri-plugin-global-shortcut",
|
"tauri-plugin-global-shortcut",
|
||||||
"tauri-plugin-log",
|
"tauri-plugin-log",
|
||||||
|
"tauri-plugin-opener",
|
||||||
"tauri-plugin-process",
|
"tauri-plugin-process",
|
||||||
"tauri-plugin-single-instance",
|
"tauri-plugin-single-instance",
|
||||||
"tauri-plugin-updater",
|
"tauri-plugin-updater",
|
||||||
@@ -2002,6 +2003,25 @@ dependencies = [
|
|||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "is-docker"
|
||||||
|
version = "0.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3"
|
||||||
|
dependencies = [
|
||||||
|
"once_cell",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "is-wsl"
|
||||||
|
version = "0.4.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5"
|
||||||
|
dependencies = [
|
||||||
|
"is-docker",
|
||||||
|
"once_cell",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "itoa"
|
name = "itoa"
|
||||||
version = "1.0.18"
|
version = "1.0.18"
|
||||||
@@ -2567,6 +2587,18 @@ version = "1.21.4"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "open"
|
||||||
|
version = "5.3.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "43bb73a7fa3799b198970490a51174027ba0d4ec504b03cd08caf513d40024bc"
|
||||||
|
dependencies = [
|
||||||
|
"dunce",
|
||||||
|
"is-wsl",
|
||||||
|
"libc",
|
||||||
|
"pathdiff",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "openssl-probe"
|
name = "openssl-probe"
|
||||||
version = "0.2.1"
|
version = "0.2.1"
|
||||||
@@ -2657,6 +2689,12 @@ dependencies = [
|
|||||||
"windows-link 0.2.1",
|
"windows-link 0.2.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pathdiff"
|
||||||
|
version = "0.2.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "percent-encoding"
|
name = "percent-encoding"
|
||||||
version = "2.3.2"
|
version = "2.3.2"
|
||||||
@@ -4275,6 +4313,28 @@ dependencies = [
|
|||||||
"time",
|
"time",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tauri-plugin-opener"
|
||||||
|
version = "2.5.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "fc624469b06f59f5a29f874bbc61a2ed737c0f9c23ef09855a292c389c42e83f"
|
||||||
|
dependencies = [
|
||||||
|
"dunce",
|
||||||
|
"glob",
|
||||||
|
"objc2-app-kit",
|
||||||
|
"objc2-foundation",
|
||||||
|
"open",
|
||||||
|
"schemars 0.8.22",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"tauri",
|
||||||
|
"tauri-plugin",
|
||||||
|
"thiserror 2.0.18",
|
||||||
|
"url",
|
||||||
|
"windows 0.61.3",
|
||||||
|
"zbus",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-plugin-process"
|
name = "tauri-plugin-process"
|
||||||
version = "2.3.1"
|
version = "2.3.1"
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ tauri = { version = "2.8.5", features = [] }
|
|||||||
tauri-plugin-log = "2"
|
tauri-plugin-log = "2"
|
||||||
tauri-plugin-process = "2"
|
tauri-plugin-process = "2"
|
||||||
windows = { version = "0.52", features = ["Win32_UI_Shell"] }
|
windows = { version = "0.52", features = ["Win32_UI_Shell"] }
|
||||||
|
tauri-plugin-opener = "2"
|
||||||
|
|
||||||
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
|
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
|
||||||
tauri-plugin-global-shortcut = "2"
|
tauri-plugin-global-shortcut = "2"
|
||||||
|
|||||||
@@ -13,6 +13,8 @@
|
|||||||
"global-shortcut:allow-is-registered",
|
"global-shortcut:allow-is-registered",
|
||||||
"global-shortcut:allow-register",
|
"global-shortcut:allow-register",
|
||||||
"global-shortcut:allow-unregister",
|
"global-shortcut:allow-unregister",
|
||||||
"global-shortcut:allow-unregister-all"
|
"global-shortcut:allow-unregister-all",
|
||||||
|
"opener:allow-default-urls",
|
||||||
|
"opener:allow-open-url"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||||
pub fn run() {
|
pub fn run() {
|
||||||
tauri::Builder::default()
|
tauri::Builder::default()
|
||||||
|
.plugin(tauri_plugin_opener::init())
|
||||||
.plugin(tauri_plugin_global_shortcut::Builder::new().build())
|
.plugin(tauri_plugin_global_shortcut::Builder::new().build())
|
||||||
.plugin(tauri_plugin_process::init())
|
.plugin(tauri_plugin_process::init())
|
||||||
.plugin(tauri_plugin_updater::Builder::new().build())
|
.plugin(tauri_plugin_updater::Builder::new().build())
|
||||||
// .plugin(tauri_plugin_single_instance::init(|_, _, _| {}))
|
// .plugin(tauri_plugin_single_instance::init(|_, _, _| {}))
|
||||||
.setup(|app| {
|
.setup(|app| {
|
||||||
if cfg!(debug_assertions) {
|
if cfg!(debug_assertions) {
|
||||||
app.handle().plugin(
|
app.handle().plugin(
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ fn set_app_user_model_id() {
|
|||||||
use windows::Win32::UI::Shell::SetCurrentProcessExplicitAppUserModelID;
|
use windows::Win32::UI::Shell::SetCurrentProcessExplicitAppUserModelID;
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
SetCurrentProcessExplicitAppUserModelID(
|
SetCurrentProcessExplicitAppUserModelID(&HSTRING::from("xyz.koptilnya.chad"))
|
||||||
&HSTRING::from("xyz.koptilnya.chad")
|
.ok()
|
||||||
).ok().expect("Failed to set AppUserModelID");
|
.expect("Failed to set AppUserModelID");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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.1",
|
"version": "0.3.0-rc.5",
|
||||||
"identifier": "xyz.koptilnya.chad",
|
"identifier": "xyz.koptilnya.chad",
|
||||||
"build": {
|
"build": {
|
||||||
"frontendDist": "../.output/public",
|
"frontendDist": "../.output/public",
|
||||||
|
|||||||
@@ -2968,6 +2968,15 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"@tauri-apps/plugin-opener@npm:~2":
|
||||||
|
version: 2.5.3
|
||||||
|
resolution: "@tauri-apps/plugin-opener@npm:2.5.3"
|
||||||
|
dependencies:
|
||||||
|
"@tauri-apps/api": "npm:^2.8.0"
|
||||||
|
checksum: 10c0/9ef2fae01e03f3bb16d8e55bfd921cf7c1d284e6459bd5b45777806304eb70ab0b50cbf03be76fc05e64ef70a37493e0cd90b0acc16eaee4a4fc2cfff7e43b71
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"@tauri-apps/plugin-process@npm:^2.3.1":
|
"@tauri-apps/plugin-process@npm:^2.3.1":
|
||||||
version: 2.3.1
|
version: 2.3.1
|
||||||
resolution: "@tauri-apps/plugin-process@npm:2.3.1"
|
resolution: "@tauri-apps/plugin-process@npm:2.3.1"
|
||||||
@@ -4060,6 +4069,7 @@ __metadata:
|
|||||||
"@tailwindcss/vite": "npm:^4.1.14"
|
"@tailwindcss/vite": "npm:^4.1.14"
|
||||||
"@tauri-apps/cli": "npm:^2.8.4"
|
"@tauri-apps/cli": "npm:^2.8.4"
|
||||||
"@tauri-apps/plugin-global-shortcut": "npm:^2.3.1"
|
"@tauri-apps/plugin-global-shortcut": "npm:^2.3.1"
|
||||||
|
"@tauri-apps/plugin-opener": "npm:~2"
|
||||||
"@tauri-apps/plugin-process": "npm:^2.3.1"
|
"@tauri-apps/plugin-process": "npm:^2.3.1"
|
||||||
"@tauri-apps/plugin-updater": "npm:^2.10.1"
|
"@tauri-apps/plugin-updater": "npm:^2.10.1"
|
||||||
"@types/howler": "npm:^2"
|
"@types/howler": "npm:^2"
|
||||||
|
|||||||
@@ -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