Merge branch 'dev' of github.com:m1k1o/neko into dev
This commit is contained in:
commit
bbea5f5715
@ -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/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
|
||||
|
@ -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,
|
||||
})
|
||||
|
||||
if (this.autoPassword) {
|
||||
this.removeUrlParam('pwd')
|
||||
this.autoPassword = ''
|
||||
let password = this.password
|
||||
if (this.autoPassword !== null) {
|
||||
password = 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,
|
||||
|
@ -19,6 +19,7 @@ export abstract class BaseClient extends EventEmitter<BaseEvents> {
|
||||
protected _displayname?: string
|
||||
protected _state: RTCIceConnectionState = 'disconnected'
|
||||
protected _id = ''
|
||||
protected _candidates: RTCIceCandidate[] = []
|
||||
|
||||
get id() {
|
||||
return this._id
|
||||
@ -220,6 +221,12 @@ export abstract class BaseClient extends EventEmitter<BaseEvents> {
|
||||
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) => {
|
||||
@ -250,7 +257,11 @@ export abstract class BaseClient extends EventEmitter<BaseEvents> {
|
||||
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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user