dispaly PIP only if available.
This commit is contained in:
parent
1834186f40
commit
3160382015
@ -42,6 +42,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<i
|
<i
|
||||||
|
v-if="pip_available"
|
||||||
@click.stop.prevent="requestPictureInPicture"
|
@click.stop.prevent="requestPictureInPicture"
|
||||||
v-tooltip="{ content: 'Picture-in-Picture', placement: 'left', offset: 5, boundariesElement: 'body' }"
|
v-tooltip="{ content: 'Picture-in-Picture', placement: 'left', offset: 5, boundariesElement: 'body' }"
|
||||||
class="fas fa-external-link-alt"
|
class="fas fa-external-link-alt"
|
||||||
@ -274,6 +275,11 @@
|
|||||||
return this.$accessor.settings.scroll_invert
|
return this.$accessor.settings.scroll_invert
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get pip_available() {
|
||||||
|
//@ts-ignore
|
||||||
|
return typeof document.createElement('video').requestPictureInPicture === 'function'
|
||||||
|
}
|
||||||
|
|
||||||
get clipboard_read_available() {
|
get clipboard_read_available() {
|
||||||
return 'clipboard' in navigator && typeof navigator.clipboard.readText === 'function'
|
return 'clipboard' in navigator && typeof navigator.clipboard.readText === 'function'
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user