SamirHodzic / ngx-embed-video

Get embed code for embedding youtube/vimeo/dailymotion/* video in websites from URL or ID in Angular 6+.
MIT License
56 stars 41 forks source link

Iframe sizes on diferent resolutions and devices #20

Closed darkMT closed 5 years ago

darkMT commented 5 years ago

Hi Guys,

I really like your plugin but the only thing that I cant display an image thumb as it is giving me the {{ object.promise }} even when I store the result in a variable like this let thumb_1 = this.embedService.embed_image(value.firstVideo);

and in the template i use: <span [innerHtml]="battle.thumbOne"></span>

SamirHodzic commented 5 years ago

Hi @darkMT,

Sorry, readme is not clear enough about it, will update. It is using promise, so to get the resolved value you need to use then callback function.

this.embedService.embed_image(value.firstVideo).then((res) => { 
  this.thumbnail = res.html;
});
darkMT commented 5 years ago

Thanks/Hvala Samir,

I have already done that :)

SamirHodzic commented 5 years ago

Awesome 👍