Video Player Component
Next, create a video-player component in the form of a file named VideoPlayer.vue
, which plays the selected trailer or, in case none is selected, the default trailer.
Make the VideoPlayer.vue
file read like this:
The above template relies on a movie
object to show the content of the movie or that of the default. movie
also renders a video
tag to be attached to the source through the Cloudinary API. Also created is a button for playing or pausing the trailer.
Last updated