Answer the question
In order to leave comments, you need to log in
How to catch the DOM change event of an element by an external library?
https://vuejs.org/v2/guide/computed.html
<video ref="videoPlayer"
class='video-js vjs-big-play-centered'
:key="getCurrentPlayVideoUrl"
>
<source :src="getCurrentPlayVideoUrl"
type="video/mp4"
v-model="this.currentVideoSource"
>
</video>
export default {
data() {
return {
currentVideoSource: '', // @todo - it is by default differs from getCurrentPlayVideoUrl
player: null,
}
},
watch: {
currentVideoSource: function (newQuestion, oldQuestion) {
console.log(newQuestion);
console.log(oldQuestion);
}
},
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question