mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
hide buttons in cast mode
This commit is contained in:
parent
50e5483661
commit
1f81bd3efc
@ -1,17 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="neko" :class="[!hideControls && side ? 'expanded' : '']">
|
<div id="neko" :class="[!videoOnly && side ? 'expanded' : '']">
|
||||||
<template v-if="!$client.supported">
|
<template v-if="!$client.supported">
|
||||||
<neko-unsupported />
|
<neko-unsupported />
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<main class="neko-main">
|
<main class="neko-main">
|
||||||
<div v-if="!hideControls" class="header-container">
|
<div v-if="!videoOnly" class="header-container">
|
||||||
<neko-header />
|
<neko-header />
|
||||||
</div>
|
</div>
|
||||||
<div class="video-container">
|
<div class="video-container">
|
||||||
<neko-video ref="video" :hideControls="hideControls" @control-attempt="controlAttempt" />
|
<neko-video ref="video" :hideControls="hideControls" @control-attempt="controlAttempt" />
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!hideControls" class="room-container">
|
<div v-if="!videoOnly" class="room-container">
|
||||||
<neko-members />
|
<neko-members />
|
||||||
<div class="room-menu">
|
<div class="room-menu">
|
||||||
<div class="settings">
|
<div class="settings">
|
||||||
@ -26,11 +26,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
<neko-side v-if="!hideControls && side" />
|
<neko-side v-if="!videoOnly && side" />
|
||||||
<neko-connect v-if="!connected" />
|
<neko-connect v-if="!connected" />
|
||||||
<neko-about v-if="about" />
|
<neko-about v-if="about" />
|
||||||
<notifications
|
<notifications
|
||||||
v-if="!hideControls"
|
v-if="!videoOnly"
|
||||||
group="neko"
|
group="neko"
|
||||||
position="top left"
|
position="top left"
|
||||||
style="top: 50px; pointer-events: none"
|
style="top: 50px; pointer-events: none"
|
||||||
@ -176,10 +176,22 @@
|
|||||||
|
|
||||||
shakeKbd = false
|
shakeKbd = false
|
||||||
|
|
||||||
get hideControls() {
|
get isCastMode() {
|
||||||
return !!new URL(location.href).searchParams.get('cast')
|
return !!new URL(location.href).searchParams.get('cast')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get isEmbedMode() {
|
||||||
|
return !!new URL(location.href).searchParams.get('embed')
|
||||||
|
}
|
||||||
|
|
||||||
|
get hideControls() {
|
||||||
|
return this.isCastMode
|
||||||
|
}
|
||||||
|
|
||||||
|
get videoOnly() {
|
||||||
|
return this.isCastMode || this.isEmbedMode
|
||||||
|
}
|
||||||
|
|
||||||
@Watch('hideControls', { immediate: true })
|
@Watch('hideControls', { immediate: true })
|
||||||
onHideControls(enabled: boolean) {
|
onHideControls(enabled: boolean) {
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
|
@ -30,17 +30,17 @@
|
|||||||
</div>
|
</div>
|
||||||
<div ref="aspect" class="player-aspect" />
|
<div ref="aspect" class="player-aspect" />
|
||||||
</div>
|
</div>
|
||||||
<ul v-if="!fullscreen" class="video-menu top">
|
<ul v-if="!fullscreen && !hideControls" class="video-menu top">
|
||||||
<li><i @click.stop.prevent="requestFullscreen" class="fas fa-expand"></i></li>
|
<li><i @click.stop.prevent="requestFullscreen" class="fas fa-expand"></i></li>
|
||||||
<li v-if="admin"><i @click.stop.prevent="openResolution" class="fas fa-desktop"></i></li>
|
<li v-if="admin"><i @click.stop.prevent="openResolution" class="fas fa-desktop"></i></li>
|
||||||
<li :class="hideControls || 'request-control'">
|
<li v-if="!this.implicitHosting" class="request-control">
|
||||||
<i
|
<i
|
||||||
:class="[hosted && !hosting ? 'disabled' : '', !hosted && !hosting ? 'faded' : '', 'fas', 'fa-keyboard']"
|
:class="[hosted && !hosting ? 'disabled' : '', !hosted && !hosting ? 'faded' : '', 'fas', 'fa-keyboard']"
|
||||||
@click.stop.prevent="toggleControl"
|
@click.stop.prevent="toggleControl"
|
||||||
/>
|
/>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul v-if="!fullscreen" class="video-menu bottom">
|
<ul v-if="!fullscreen && !hideControls" class="video-menu bottom">
|
||||||
<li v-if="hosting && (!clipboard_read_available || !clipboard_write_available)">
|
<li v-if="hosting && (!clipboard_read_available || !clipboard_write_available)">
|
||||||
<i @click.stop.prevent="openClipboard" class="fas fa-clipboard"></i>
|
<i @click.stop.prevent="openClipboard" class="fas fa-clipboard"></i>
|
||||||
</li>
|
</li>
|
||||||
@ -107,13 +107,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&.request-control {
|
&.request-control {
|
||||||
display: none;
|
display: inline-block;
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
|
||||||
&.request-control {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
|
@ -230,6 +230,7 @@ Note, currently only browser GPU acceleration is supported, not encoding.
|
|||||||
- Adding `?pwd=<password>` will prefill password.
|
- Adding `?pwd=<password>` will prefill password.
|
||||||
- Adding `?usr=<display-name>` will prefill username.
|
- Adding `?usr=<display-name>` will prefill username.
|
||||||
- Adding `?cast=1` will hide all control and show only video.
|
- Adding `?cast=1` will hide all control and show only video.
|
||||||
|
- Adding `?embed=1` will hide most additional components and show only video.
|
||||||
- e.g. `http(s)://<URL:Port>/?pwd=neko&usr=guest&cast=1`
|
- e.g. `http(s)://<URL:Port>/?pwd=neko&usr=guest&cast=1`
|
||||||
|
|
||||||
### Screen size
|
### Screen size
|
||||||
|
Loading…
Reference in New Issue
Block a user