Skip to content

Commit 0e7c6fd

Browse files
authored
Allow setting of arbitrary attributes on video player (#435)
* Mute video prop * Allow setting arbitrary attributes
1 parent d4e3ea0 commit 0e7c6fd

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

client/src/components/annotators/VideoAnnotator.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ export default Vue.extend({
1212
type: String,
1313
required: true,
1414
},
15+
videoPlayerAttributes: {
16+
type: Object,
17+
default: () => ({}),
18+
},
1519
},
1620
1721
computed: {
@@ -25,6 +29,9 @@ export default Vue.extend({
2529
this.video = video;
2630
video.preload = 'auto';
2731
video.src = this.videoUrl;
32+
Object.entries(this.videoPlayerAttributes).forEach(([key, val]) => {
33+
this.video[key] = val;
34+
});
2835
video.onloadedmetadata = () => {
2936
video.onloadedmetadata = null;
3037
this.width = video.videoWidth;

0 commit comments

Comments
 (0)