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
5 changes: 3 additions & 2 deletions src/dashboard/controls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</div>
<div class="setting-control">
<volume-control :muted="muted" />
<picture-in-picture />
<picture-in-picture :pip-visible="pipVisible" />
<settings-control />
<fullscreen-control />
</div>
Expand All @@ -33,7 +33,8 @@ export default {
},
props: {
visible: Boolean,
muted: Boolean
muted: Boolean,
pipVisible: Boolean
}
}
</script>
Expand Down
5 changes: 3 additions & 2 deletions src/dashboard/dashboard.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="vcp-dashboard" autoplay v-show="show" ref="dashboard">
<Progress />
<Controls :muted="muted" />
<Controls :muted="muted" :pip-visible="pipVisible" />
</div>
</template>

Expand All @@ -26,7 +26,8 @@ export default {
},
props: {
controls: [Boolean, String],
muted: Boolean
muted: Boolean,
pipVisible: Boolean
},
data () {
return {
Expand Down
5 changes: 3 additions & 2 deletions src/dashboard/picture-in-picture.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="vue-core-video-player-control" v-if="show" @click="requestPictureInPicture">
<div class="vue-core-video-player-control" v-if="show && pipVisible" @click="requestPictureInPicture">
<div class="btn-control btn-pip" >
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="16" viewBox="0 0 28 16"><g data-name="6 13"><g data-name="5 1" fill="#fff"><path data-name="9" d="M18 14h10v2H18z"/><path data-name="10" d="M26 9h2v6h-2z"/></g></g><g data-name="6 14" fill="#fff"><g data-name="4 1"><path data-name="7" d="M12 16H2v-2h10z"/><path data-name="8" d="M2 16H0V6h2z"/></g><path data-name="41" d="M28 2H0V0h28z"/></g></svg>
<div class="tips">{{$t('dashboard.btn.pip')}}</div>
Expand All @@ -26,7 +26,8 @@ export default {
name: 'PictureInPicture',
mixins: [coreMixins],
props: {
visible: Boolean
visible: Boolean,
pipVisible: Boolean
},
data () {
return {
Expand Down
6 changes: 5 additions & 1 deletion src/vue-core-video-player.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
:playsinline="playsinline"
:src="source"></video>
<Layers />
<Dashboard v-if="!isMobile" :controls="controls" :muted="muted" />
<Dashboard v-if="!isMobile" :controls="controls" :muted="muted" :pip-visible="pipVisible" />
<MobileDashboard v-if="isMobile" :controls="controls" :muted="muted" />
</div>
</template>
Expand Down Expand Up @@ -55,6 +55,10 @@ export default {
type: Boolean,
default: false
},
pipVisible: {
type: Boolean,
default: true
},
controls: {
type: [String, Boolean],
default: true
Expand Down