brandly / angular-youtube-embed

:tv: Embed a YouTube player with a simple directive
http://brandly.github.io/angular-youtube-embed/
MIT License
508 stars 147 forks source link

Unable to embed this directive inside a colorbox #110

Open papes1ns opened 8 years ago

papes1ns commented 8 years ago

My page has a list of links to youtube videos. If the user clicks on a link I want to open it in a jquery.colorbox. The following does not work. The colorbox opens with nothing in it and the youtube video is loaded behind it and is not wrapped in the colorbox.

View <youtube-video class="youtube-video" video-url="videoURL" player-vars="playerVars" player="myPlayer"></youtube-video>

Controller $scope.$on('youtube.player.ready', function ($event, player) { $(".youtube-video").colorbox({ open: true, }); });

brandly commented 8 years ago

this line doesn't look like it'll play very well with angular: $(".youtube-video").colorbox({ open: true, });

i haven't actually used colorbox in any form, but maybe this direction could help: https://github.com/igorlino/angular-colorbox