Skip to content

Commit

Permalink
fix: Autoplay option for video
Browse files Browse the repository at this point in the history
Merge pull request simwrapper#135 from simwrapper/video-autoplay
  • Loading branch information
billyc committed Mar 21, 2022
2 parents faec8d9 + 4132b53 commit cce6922
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/charts/video.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

figure(class="video_container")

video(:controls="controls" :loop='loop' :allowfullscreen='allowfullscreen')
video(:controls="controls" :loop='loop' :allowfullscreen='allowfullscreen' :autoplay="autoplay" :muted="muted")

source(v-for="(src, type) in sources" :src="src" :type="type" :key="type")

Expand All @@ -27,6 +27,8 @@ export default class VueComponent extends Vue {
private controls: string | null = null
private loop: string | null = null
private allowfullscreen: string | null = null
private autoplay: string | null = null
private muted: string | null = null
private sources: { [key: string]: string } = {}
// true for absolute URLs
Expand All @@ -36,6 +38,8 @@ export default class VueComponent extends Vue {
this.controls = this.config.controls
this.loop = this.config.loop
this.allowfullscreen = this.config.allowfullscreen
this.autoplay = this.config.autoplay
this.muted = this.config.muted
this.sources = {}
Expand Down

0 comments on commit cce6922

Please sign in to comment.