Hey there fellow developers!
I just dove into learning Vue.js yesterday, and I'm already hooked! I'm currently working on a small application that utilizes Vue (1.0.28) to showcase an online course. You can find a JSFiddle link at the end of this post, but first, let me share my current roadblock:
Within the javascript file of this application, I've defined a const
named course_bundle
, which holds all the necessary information about the course including the title, chapters, and files. Using Vue, I'm rendering this course on the screen.
Each chapter in the course comprises videos, and within the Vue instance, I'm initializing the player (with videos hosted on viddler) using Viddler's API:
let embed = new ViddlerEmbed({
videoId: this.active,
target: '#player',
autoplay: 'true',
type: 'video',
width: '100%'
});
Everything seems to be working fine. However, I encounter an issue when attempting to switch to another video by clicking on a chapter's title, which results in the video being duplicated. What I actually want is to pause the current video and then play the next one.
I might be missing something here, so any insights or suggestions would be greatly appreciated.
Here's a peek at what I've accomplished so far: https://jsfiddle.net/grpaiva/bkadrz9h/
Cheers to progress!