ArunMichaelDsouza / ng-youtube-embed

AngularJS module to embed Youtube videos with support for Youtube player parameters and JavaScript API for iframe embeds. Superlight (less than 5KB) and easy to use! Supports Youtube video URLs and IDs. No 3rd party JS dependencies.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stop video

Steco17 opened this issue · comments

Hi, i have been having issues trying to write an angular function to stop the video. i can't see any example in you documentation please you i get some help here. i'll appreciate if you provide me with an example. i tried this but nothing and i can't find any help online

$scope.stopVid = function(){
var player = ngYoutubeEmbedService.getPlayerById('myvideo');
player.stopVideo();
}

Hi, I tried your code sample and it seemed to be working fine. I hope the videoid parameter is correctly used with the value of myvideo.