mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
Resolve "Fallback image caching problem"
This commit is contained in:
parent
f4c0fe7e87
commit
c5e845c025
@ -1,8 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div ref="component" class="neko-component">
|
<div ref="component" class="neko-component">
|
||||||
<div ref="container" class="neko-container">
|
<div ref="container" class="neko-container">
|
||||||
<video v-show="!screencast" ref="video" :autoplay="autoplay" :muted="autoplay" playsinline />
|
<video v-show="!screencast || !screencastReady" ref="video" :autoplay="autoplay" :muted="autoplay" playsinline />
|
||||||
<neko-screencast v-show="screencast" :enabled="screencast" :api="api.room" />
|
<neko-screencast
|
||||||
|
v-show="screencast && screencastReady"
|
||||||
|
:enabled="screencast"
|
||||||
|
:api="api.room"
|
||||||
|
@imageReady="screencastReady = $event"
|
||||||
|
/>
|
||||||
<neko-cursors
|
<neko-cursors
|
||||||
v-if="state.cursors.enabled && state.sessions[state.session_id].profile.can_see_inactive_cursors"
|
v-if="state.cursors.enabled && state.sessions[state.session_id].profile.can_see_inactive_cursors"
|
||||||
:sessions="state.sessions"
|
:sessions="state.sessions"
|
||||||
@ -197,6 +202,7 @@
|
|||||||
return this.state.session_id != null ? this.state.sessions[this.state.session_id].profile.is_admin : false
|
return this.state.session_id != null ? this.state.sessions[this.state.session_id].profile.is_admin : false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
screencastReady = false
|
||||||
public get screencast() {
|
public get screencast() {
|
||||||
return (
|
return (
|
||||||
this.state.authenticated &&
|
this.state.authenticated &&
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<img ref="image" />
|
<img ref="image" @load="onImageLoad" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
@ -50,6 +50,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.running = false
|
this.running = false
|
||||||
|
this.$emit('imageReady', false)
|
||||||
|
|
||||||
|
if (this._image) {
|
||||||
|
this._image.src = ''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -81,5 +86,9 @@
|
|||||||
this.stop()
|
this.stop()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onImageLoad() {
|
||||||
|
this.$emit('imageReady', this.running)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user