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>
|
||||
<div ref="component" class="neko-component">
|
||||
<div ref="container" class="neko-container">
|
||||
<video v-show="!screencast" ref="video" :autoplay="autoplay" :muted="autoplay" playsinline />
|
||||
<neko-screencast v-show="screencast" :enabled="screencast" :api="api.room" />
|
||||
<video v-show="!screencast || !screencastReady" ref="video" :autoplay="autoplay" :muted="autoplay" playsinline />
|
||||
<neko-screencast
|
||||
v-show="screencast && screencastReady"
|
||||
:enabled="screencast"
|
||||
:api="api.room"
|
||||
@imageReady="screencastReady = $event"
|
||||
/>
|
||||
<neko-cursors
|
||||
v-if="state.cursors.enabled && state.sessions[state.session_id].profile.can_see_inactive_cursors"
|
||||
:sessions="state.sessions"
|
||||
@ -197,6 +202,7 @@
|
||||
return this.state.session_id != null ? this.state.sessions[this.state.session_id].profile.is_admin : false
|
||||
}
|
||||
|
||||
screencastReady = false
|
||||
public get screencast() {
|
||||
return (
|
||||
this.state.authenticated &&
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<img ref="image" />
|
||||
<img ref="image" @load="onImageLoad" />
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
@ -50,6 +50,11 @@
|
||||
}
|
||||
|
||||
this.running = false
|
||||
this.$emit('imageReady', false)
|
||||
|
||||
if (this._image) {
|
||||
this._image.src = ''
|
||||
}
|
||||
}
|
||||
|
||||
mounted() {
|
||||
@ -81,5 +86,9 @@
|
||||
this.stop()
|
||||
}
|
||||
}
|
||||
|
||||
onImageLoad() {
|
||||
this.$emit('imageReady', this.running)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user