I am attempting to pass an HTML5 video as a property from a parent component to a child component in Vuejs.
Parent Component:
<template>
<div>
<video ref="video">
<source src="@/assets/video.mp4" type="video/mp4">
</video>
<child-component :video="videoElement"></child-component>
</div>
</template>
<script>
export default {
name: "ParentComponent",
computed: {
videoElement () {
return this.$refs.video;
},
};
</script>
Child Component:
<script>
export default {
name: "ParentComponent",
props: {
video: Object
}
};
</script>
This method does not appear to be working for some unknown reason! How can I successfully send the video as a property?