From 19631d8ae986a0c6172e5670ab09fcefc340dea0 Mon Sep 17 00:00:00 2001 From: m1k1o Date: Fri, 12 Mar 2021 01:15:31 +0100 Subject: [PATCH 1/6] Revert "lower keyframes max dist for faster loading." This reverts commit 14939db65a56024c19a27a76ec6d69e4a2502364. --- server/internal/gst/gst.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/internal/gst/gst.go b/server/internal/gst/gst.go index d6588da..df052fa 100644 --- a/server/internal/gst/gst.go +++ b/server/internal/gst/gst.go @@ -90,7 +90,7 @@ func CreateAppPipeline(codecName string, pipelineDevice string, pipelineSrc stri if pipelineSrc != "" { pipelineStr = fmt.Sprintf(pipelineSrc+pipelineStr, pipelineDevice) } else { - pipelineStr = fmt.Sprintf(videoSrc+"vp8enc target-bitrate=%d cpu-used=4 end-usage=cbr threads=4 deadline=1 undershoot=95 buffer-size=%d buffer-initial-size=%d buffer-optimal-size=%d keyframe-max-dist=30 min-quantizer=3 max-quantizer=40"+pipelineStr, pipelineDevice, fps, bitrate*1000, bitrate*6, bitrate*4, bitrate*5) + pipelineStr = fmt.Sprintf(videoSrc+"vp8enc target-bitrate=%d cpu-used=4 end-usage=cbr threads=4 deadline=1 undershoot=95 buffer-size=%d buffer-initial-size=%d buffer-optimal-size=%d keyframe-max-dist=180 min-quantizer=3 max-quantizer=40"+pipelineStr, pipelineDevice, fps, bitrate*1000, bitrate*6, bitrate*4, bitrate*5) } case "VP9": // https://gstreamer.freedesktop.org/documentation/vpx/vp9enc.html?gi-language=c From 7080f6adc77c775a72ae4d22e7172c3f8324726e Mon Sep 17 00:00:00 2001 From: Aaron Date: Fri, 12 Mar 2021 17:10:10 +0100 Subject: [PATCH 2/6] Dockerfile: Update Chromium to v88.0.4324.182 Signed-off-by: Aaron --- .m1k1o/chromium/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.m1k1o/chromium/Dockerfile b/.m1k1o/chromium/Dockerfile index b43b1d9..4be407c 100644 --- a/.m1k1o/chromium/Dockerfile +++ b/.m1k1o/chromium/Dockerfile @@ -1,6 +1,6 @@ FROM m1k1o/neko:base -ARG SRC_URL="https://github.com/macchrome/linchrome/releases/download/v88.0.4324.96-r827102-portable-ungoogled-Lin64/ungoogled-chromium_88.0.4324.96_1.vaapi_linux.tar.xz" +ARG SRC_URL="https://github.com/macchrome/linchrome/releases/download/v88.0.4324.182-r827102-portable-ungoogled-Lin64/ungoogled-chromium_88.0.4324.182_1.vaapi_linux.tar.xz" # # install custom chromium build from woolyss with support for hevc/x265 From 108ac79443eed38f2f76464038cc58ff8d954b75 Mon Sep 17 00:00:00 2001 From: m1k1o Date: Fri, 12 Mar 2021 22:24:52 +0100 Subject: [PATCH 3/6] autologin with URL pwd first. --- client/src/components/connect.vue | 32 ++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/client/src/components/connect.vue b/client/src/components/connect.vue index 26b4511..ab52357 100644 --- a/client/src/components/connect.vue +++ b/client/src/components/connect.vue @@ -151,14 +151,21 @@ @Component({ name: 'neko-connect' }) export default class extends Vue { - private autoPassword = new URL(location.href).searchParams.get('pwd') + private autoPassword: string | null = new URL(location.href).searchParams.get('pwd') private displayname: string = '' - private password: string = this.autoPassword || '' + private password: string = '' mounted() { - if (this.$accessor.displayname !== '' && this.$accessor.password !== '') { - this.$accessor.login({ displayname: this.$accessor.displayname, password: this.$accessor.password }) + let password = this.$accessor.password + if (this.autoPassword !== null) { + this.removeUrlParam('pwd') + password = this.autoPassword + } + + if (this.$accessor.displayname !== '' && password !== '') { + this.$accessor.login({ displayname: this.$accessor.displayname, password }) + this.autoPassword = null } } @@ -188,16 +195,15 @@ } async login() { - try { - await this.$accessor.login({ - displayname: this.displayname, - password: this.password, - }) + let password = this.password + if (this.autoPassword !== null) { + password = this.autoPassword + } - if (this.autoPassword) { - this.removeUrlParam('pwd') - this.autoPassword = '' - } + try { + await this.$accessor.login({ displayname: this.displayname, password }) + + this.autoPassword = null } catch (err) { this.$swal({ title: this.$t('connect.error') as string, From a961dd6428fb8c7f4bbb2ab1ac6d5f2b114fbe3e Mon Sep 17 00:00:00 2001 From: mbattista Date: Fri, 12 Mar 2021 23:45:01 +0000 Subject: [PATCH 4/6] should fix race condition --- client/src/neko/base.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/client/src/neko/base.ts b/client/src/neko/base.ts index 9cad66f..9111c50 100644 --- a/client/src/neko/base.ts +++ b/client/src/neko/base.ts @@ -19,6 +19,7 @@ export abstract class BaseClient extends EventEmitter { protected _displayname?: string protected _state: RTCIceConnectionState = 'disconnected' protected _id = '' + protected _candidates: RTCIceCandidate[] = []; get id() { return this._id @@ -220,6 +221,9 @@ export abstract class BaseClient extends EventEmitter { this._channel.onclose = this.onDisconnected.bind(this, new Error('peer data channel closed')) this._peer.setRemoteDescription({ type: 'offer', sdp }) + for (let candidate of this._candidates) { + this._peer.addIceCandidate(candidate) + } this._peer .createAnswer() .then((d) => { @@ -250,7 +254,11 @@ export abstract class BaseClient extends EventEmitter { if (event === EVENT.SIGNAL.CANDIDATE) { const { data } = payload as SignalCandidatePayload let candidate: RTCIceCandidate = JSON.parse(data) - this._peer!.addIceCandidate(candidate) + if (this._peer) { + this._peer.addIceCandidate(candidate) + } else { + this._candidates.push(candidate); + } return } From 5762f33e36186d98571b928ef199deb73edf37f4 Mon Sep 17 00:00:00 2001 From: m1k1o Date: Sat, 13 Mar 2021 10:32:05 +0100 Subject: [PATCH 5/6] fix lint and clear candidates array. --- client/src/neko/base.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/src/neko/base.ts b/client/src/neko/base.ts index 9111c50..de2532b 100644 --- a/client/src/neko/base.ts +++ b/client/src/neko/base.ts @@ -19,7 +19,7 @@ export abstract class BaseClient extends EventEmitter { protected _displayname?: string protected _state: RTCIceConnectionState = 'disconnected' protected _id = '' - protected _candidates: RTCIceCandidate[] = []; + protected _candidates: RTCIceCandidate[] = [] get id() { return this._id @@ -221,9 +221,12 @@ export abstract class BaseClient extends EventEmitter { this._channel.onclose = this.onDisconnected.bind(this, new Error('peer data channel closed')) this._peer.setRemoteDescription({ type: 'offer', sdp }) + for (let candidate of this._candidates) { this._peer.addIceCandidate(candidate) } + this._candidates = [] + this._peer .createAnswer() .then((d) => { @@ -257,7 +260,7 @@ export abstract class BaseClient extends EventEmitter { if (this._peer) { this._peer.addIceCandidate(candidate) } else { - this._candidates.push(candidate); + this._candidates.push(candidate) } return } From d77751dabc288c206c1b47b9a42d53fe3fffd4db Mon Sep 17 00:00:00 2001 From: Aaron Date: Mon, 15 Mar 2021 18:34:57 +0100 Subject: [PATCH 6/6] Dockerfile: Update Chromium to v89.0.4389.90 Signed-off-by: Aaron --- .m1k1o/chromium/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.m1k1o/chromium/Dockerfile b/.m1k1o/chromium/Dockerfile index 4be407c..f207cf6 100644 --- a/.m1k1o/chromium/Dockerfile +++ b/.m1k1o/chromium/Dockerfile @@ -1,6 +1,6 @@ FROM m1k1o/neko:base -ARG SRC_URL="https://github.com/macchrome/linchrome/releases/download/v88.0.4324.182-r827102-portable-ungoogled-Lin64/ungoogled-chromium_88.0.4324.182_1.vaapi_linux.tar.xz" +ARG SRC_URL="https://github.com/macchrome/linchrome/releases/download/v89.0.4389.90-r843830-portable-ungoogled-Lin64/ungoogled-chromium_89.0.4389.90_1.vaapi_linux.tar.xz" # # install custom chromium build from woolyss with support for hevc/x265