mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
set URL from query.
This commit is contained in:
parent
a1860d5f56
commit
80e5277fb6
@ -94,7 +94,12 @@
|
||||
export default class extends Vue {
|
||||
@Prop() readonly neko!: Neko
|
||||
|
||||
url: string = location.href
|
||||
@Watch('neko.state.connection.url')
|
||||
updateUrl(url: string) {
|
||||
this.url = url
|
||||
}
|
||||
|
||||
url: string = ''
|
||||
|
||||
async setUrl() {
|
||||
if (this.url == '') {
|
||||
|
@ -5,7 +5,7 @@
|
||||
<neko-header :neko="neko" @toggle="expanded = !expanded" />
|
||||
</div>
|
||||
<div class="video-container">
|
||||
<neko-canvas ref="neko" autologin autoconnect autoplay />
|
||||
<neko-canvas ref="neko" :server="server" autologin autoconnect autoplay />
|
||||
<div v-if="loaded && neko.private_mode_enabled" class="player-notif">Private mode is currently enabled.</div>
|
||||
<div
|
||||
v-if="loaded && neko.state.connection.type === 'webrtc' && !neko.state.video.playing"
|
||||
@ -366,6 +366,8 @@
|
||||
loaded: boolean = false
|
||||
tab: string = ''
|
||||
|
||||
server: string = location.href
|
||||
|
||||
uploadActive = false
|
||||
uploadProgress = 0
|
||||
|
||||
@ -399,6 +401,12 @@
|
||||
//@ts-ignore
|
||||
window.neko = this.neko
|
||||
|
||||
// initial URL
|
||||
const url = new URL(location.href).searchParams.get('url')
|
||||
if (url) {
|
||||
this.server = url
|
||||
}
|
||||
|
||||
//
|
||||
// connection events
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user