member is watching.

This commit is contained in:
Miroslav Šedivý 2020-11-08 22:48:04 +01:00
parent 214d3e04f4
commit 3c09eaf0ad
2 changed files with 5 additions and 2 deletions

View File

@ -99,7 +99,7 @@
<th>member.is_admin</th> <th>member.is_admin</th>
<td>{{ neko.state.member.is_admin }}</td> <td>{{ neko.state.member.is_admin }}</td>
</tr> </tr>
<tr> <tr class="ok">
<th>member.is_watching</th> <th>member.is_watching</th>
<td>{{ neko.state.member.is_watching }}</td> <td>{{ neko.state.member.is_watching }}</td>
</tr> </tr>

View File

@ -131,6 +131,9 @@
if (!this.video.paused && !play) { if (!this.video.paused && !play) {
this.video.pause() this.video.pause()
} }
// TODO: check if user has tab focused and send via websocket
Vue.set(this.state.member, 'is_watching', play)
} }
@Watch('state.video.volume') @Watch('state.video.volume')
@ -267,7 +270,7 @@
Vue.set(this.state.connection, 'webrtc', 'disconnected') Vue.set(this.state.connection, 'webrtc', 'disconnected')
this.events.emit('system.webrtc', 'disconnected') this.events.emit('system.webrtc', 'disconnected')
// @ts-ignore // @ts-ignore
this.video.src = null if (this.video) this.video.src = null
}) })
} }