mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
removed unused connection state props.
This commit is contained in:
parent
b5432d5603
commit
baffa8dde4
@ -87,9 +87,6 @@
|
|||||||
websocket: this.websocket.supported ? 'disconnected' : 'unavailable',
|
websocket: this.websocket.supported ? 'disconnected' : 'unavailable',
|
||||||
webrtc: this.webrtc.supported ? 'disconnected' : 'unavailable',
|
webrtc: this.webrtc.supported ? 'disconnected' : 'unavailable',
|
||||||
type: 'none',
|
type: 'none',
|
||||||
can_watch: false,
|
|
||||||
can_control: false,
|
|
||||||
clipboard_access: false,
|
|
||||||
},
|
},
|
||||||
video: {
|
video: {
|
||||||
playable: false,
|
playable: false,
|
||||||
@ -365,10 +362,12 @@
|
|||||||
})
|
})
|
||||||
this.webrtc.on('connected', () => {
|
this.webrtc.on('connected', () => {
|
||||||
Vue.set(this.state.connection, 'webrtc', 'connected')
|
Vue.set(this.state.connection, 'webrtc', 'connected')
|
||||||
|
Vue.set(this.state.connection, 'type', 'webrtc')
|
||||||
this.events.emit('connection.webrtc', 'connected')
|
this.events.emit('connection.webrtc', 'connected')
|
||||||
})
|
})
|
||||||
this.webrtc.on('disconnected', () => {
|
this.webrtc.on('disconnected', () => {
|
||||||
Vue.set(this.state.connection, 'webrtc', 'disconnected')
|
Vue.set(this.state.connection, 'webrtc', 'disconnected')
|
||||||
|
Vue.set(this.state.connection, 'type', 'none')
|
||||||
this.events.emit('connection.webrtc', 'disconnected')
|
this.events.emit('connection.webrtc', 'disconnected')
|
||||||
|
|
||||||
if (!this._video) return
|
if (!this._video) return
|
||||||
@ -382,11 +381,6 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// hardcoded webrtc for now
|
|
||||||
Vue.set(this.state.connection, 'type', 'webrtc')
|
|
||||||
Vue.set(this.state.connection, 'can_watch', this.webrtc.supported)
|
|
||||||
Vue.set(this.state.connection, 'can_control', this.webrtc.supported)
|
|
||||||
|
|
||||||
// check if is user logged in
|
// check if is user logged in
|
||||||
this.api.session.whoami().then(() => {
|
this.api.session.whoami().then(() => {
|
||||||
Vue.set(this.state.connection, 'authenticated', true)
|
Vue.set(this.state.connection, 'authenticated', true)
|
||||||
@ -395,7 +389,7 @@
|
|||||||
|
|
||||||
// unmute on users first interaction
|
// unmute on users first interaction
|
||||||
if (this.autoplay) {
|
if (this.autoplay) {
|
||||||
document.addEventListener('click', this.unmute, { once: true })
|
document.addEventListener('click', () => this.unmute(), { once: true })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,9 +15,6 @@ export interface Connection {
|
|||||||
websocket: 'unavailable' | 'disconnected' | 'connecting' | 'connected'
|
websocket: 'unavailable' | 'disconnected' | 'connecting' | 'connected'
|
||||||
webrtc: 'unavailable' | 'disconnected' | 'connecting' | 'connected'
|
webrtc: 'unavailable' | 'disconnected' | 'connecting' | 'connected'
|
||||||
type: 'webrtc' | 'fallback' | 'none'
|
type: 'webrtc' | 'fallback' | 'none'
|
||||||
can_watch: boolean
|
|
||||||
can_control: boolean
|
|
||||||
clipboard_access: boolean
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
|
Loading…
Reference in New Issue
Block a user