Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div
:class="[isMobile ? 'dropdown-item d-flex row mx-0' : 'mobile-setting']"
v-if="castAvailable && !options.loading"
v-if="castAvailable && !options.loading && !this.viewer.drm"
@click="clickCast"
>
<div :class="[isMobile ? '' : 'mobile-setting']">
Expand Down Expand Up @@ -29,6 +29,9 @@ export default {
castAvailable: (state) => state.castAvailable,
options: (state) => state.castOptions,
}),
...mapState('Params', {
viewer: (state) => state.viewer,
}),
},
methods: {
clickCast() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
:streamId="streamId"
v-if="showButton('settings')"
/>
<VideoPlayerControlsCast v-if="showButton('cast') && castAvailable" />
<VideoPlayerControlsCast v-if="castEnabled" />
<VideoPlayerControlsPip v-if="pipEnabled" />
<VideoPlayerControlsFullscreen
v-if="showButton('fullscreen')"
Expand All @@ -30,7 +30,7 @@
/>
<span
v-if="
(showButton('cast') && castAvailable) ||
castEnabled ||
(isLive && pipEnabled && showButton('pip') && isVideoTag) ||
showButton('fullscreen')
"
Expand All @@ -48,7 +48,9 @@
<div class="dropdown-header d-flex m-0 col-12">
<h6 class="p-0 m-0">Options</h6>
</div>
<VideoPlayerControlsCast v-if="showButton('cast') && castAvailable" />
<VideoPlayerControlsCast
v-if="showButton('cast') && castAvailable && !this.viewer.drm"
/>
<VideoPlayerControlsPip v-if="pipEnabled" />
<VideoPlayerControlsFullscreen
v-if="showButton('fullscreen')"
Expand Down Expand Up @@ -101,6 +103,9 @@ export default {
isLive: (state) => state.isLive,
castAvailable: (state) => state.castAvailable,
}),
...mapState('Params', {
viewer: (state) => state.viewer,
}),
isVideoTag() {
return this.video?.nodeName === 'VIDEO'
},
Expand All @@ -109,9 +114,13 @@ export default {
this.showButton('pip') &&
document.pictureInPictureEnabled &&
this.isLive &&
this.isVideoTag
this.isVideoTag &&
!this.viewer.drm
)
},
castEnabled() {
return this.showButton('cast') && this.castAvailable && !this.viewer.drm
},
},
methods: {
...mapMutations('Controls', ['setDropup', 'toggleFullscreen']),
Expand Down