brandly / angular-youtube-embed

:tv: Embed a YouTube player with a simple directive

Home Page:http://brandly.github.io/angular-youtube-embed/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change player size

diegoaguilar opened this issue · comments

I tried following jade markup

.embed-responsive.embed-responsive-16by9
  youtube-video(video-id='currentVideoId' player='youtubePlayer' player-width="'100%'" player-height="'504px'").embed-responsive-item

Also tried changing the width for 896px. Player size is not changing, how should I set it up?

you're probably running into a conflict, since those embed classes are trying to set the width and height of the player. setting player-width and player-height should work fine. they're really just a convenient way to call player.setSize

instead of inlining a string, you can also have a variable like

$scope.width = '100%'
$scope.height = '504px'
youtube-video(video-id='currentVideoId' player='youtubePlayer' player-width="width" player-height="height")

It didn't work by assigning it to $scope variables

if you provide a jsfiddle example of the issue, i'd be happy to look