Skip to content

Commit

Permalink
feat: extend VideoBackgroud by object-position and posterBgSize
Browse files Browse the repository at this point in the history
  • Loading branch information
kleinpetr committed Dec 14, 2024
1 parent b6219f2 commit c3c4e19
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/VideoBackground.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<video-poster
v-if="current.poster || poster"
:poster="current.poster || poster"
:background-size="posterBgSize"
:background-position="objectPosition"
/>

<video-player
Expand All @@ -18,6 +20,7 @@
:playback-rate="playbackRate"
:transition="transition"
:object-fit="objectFit"
:object-position="objectPosition"
@ready="playVideo"
@playing="$emit('playing')"
@error="$emit('error')"
Expand Down
4 changes: 4 additions & 0 deletions src/core/playerProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ export default {
type: String,
default: 'cover',
},
posterBgSize: {
type: String,
default: 'cover',
},
objectPosition: {
type: String,
default: 'center',
Expand Down

0 comments on commit c3c4e19

Please sign in to comment.