typescript - Angular Youtube - onReady - Stack Overflow

I am trying to wrap AngularYoutube component, described here.This stackblitz is the result.The probl

I am trying to wrap Angular/Youtube component, described here.

This stackblitz is the result.

The problem here is that

<youtube-player
  #musicPlayer
  [videoId]="extractVideoId(videoId)"
  (ready)="onReadyInternal($event)">
</youtube-player>

is not firing at all the onReadyevent. I never have my console log.

  onReadyInternal(event: any): void {
    console.log(event, 'Is Ready');
    this.onReady.emit(event);
  }

I based my work on another question with a linked project. The onReady fires normally on this one, and the code looks very similar.

I am trying to wrap Angular/Youtube component, described here.

This stackblitz is the result.

The problem here is that

<youtube-player
  #musicPlayer
  [videoId]="extractVideoId(videoId)"
  (ready)="onReadyInternal($event)">
</youtube-player>

is not firing at all the onReadyevent. I never have my console log.

  onReadyInternal(event: any): void {
    console.log(event, 'Is Ready');
    this.onReady.emit(event);
  }

I based my work on another question with a linked project. The onReady fires normally on this one, and the code looks very similar.

Share Improve this question edited Mar 27 at 6:54 Naren Murali 60.1k5 gold badges44 silver badges77 bronze badges asked Mar 26 at 18:46 FoxhuntFoxhunt 9222 gold badges13 silver badges31 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

This is an issue on angular/components github.

bug(YouTubePlayer): startSeconds and ready not working #29874

The fix is provided in the PR:

Youtube player startSeconds and ready event not working #29986

You can upgrade angular and angular components to 18 to solve the problem.

I tried for a workaround but did not have luck.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744131689a4559871.html

相关推荐

  • typescript - Angular Youtube - onReady - Stack Overflow

    I am trying to wrap AngularYoutube component, described here.This stackblitz is the result.The probl

    8天前
    60

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信