SamirHodzic/ngx-embed-video

How to handle error in the Youtube URL

Closed this issue · 1 comments

this.embedService.embed(this.exercise.YoutubeUrl, {
query: { portrait: 0, color: 'black' },
attr: { width: 800, height: 380, frameborder:1 }
}).then(res => {
this.iframeURL = res.html;
});

Error:
this.embedService.embed(...).then is not a function

You mixed embed and embed_image usage.
embed function doesn't have callback.

this.iframeURL = this.embedService.embed(this.exercise.YoutubeUrl, {
    query: { portrait: 0, color: 'black' },
    attr: { width: 800, height: 380, frameborder:1 }
});