[Vuejs]-Cannot set property 'srcObject' of null, because of my component

2👍

The model is bind to the showModal variable. Model will only appear when this value is true but by default the value is set to false. Therefor, you have to first set this value to true before appending any element to the modal.

if(your condition is true){
   this.showModal = true;
   // write further logic to append the video element
}

Leave a comment