I've been working on creating a video player with angular js but I'm encountering issues with playing the video. Here's what I have attempted:
videoPlayer.factory('controloptions',function()
{
var controloptions={};
controloptions.state="play";
controloptions.volumestate="high";
controloptions.videoElement=angular.element(document.querySelector("#video_play"))
controloptions.play1=function($event)
{
angular.element(document.querySelector("#video_play")).play();
alert("a")
},
controloptions.pause1=function($event)
{
console.log(controloptions.videoElement)
//controloptions.state="pause";
angular.element(document.querySelector("#video_play")).pause();
}
}
Uncertain if this is the correct approach for playing a video...