feat(Youtube Player): view loading status and load programmatically
- 主要语言
- TypeScript
- 星标
- 25k
- 派生
- 6.8k
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 91
描述
### Feature Description
Since the ready event is not fired anymore (https://github.com/angular/components/issues/28834), I would like to know if the player has been loaded yet or not (still showing placeholder). Is there already an api for that? If so I did not find it.
Furthermore it would be great if there were a way to programmatically load the player.
(The load method is currently private to the player component.)
"Dirty" workaround:
I am accessing the placeholder via css selectors and dispatching a click event on them in order to trigger the player load.
### Use Case
Example use case: UI Button that will trigger the player to play.
=> The button label may change depending on the loaded status and the click might trigger the player to load and start.
_PS: Thanks for the wrapper component. 🙏_
贡献指南
调研方向
从 Youtube Player 组件及其当前为 private 的 load 方法开始,并以链接的 ready-event issue 作为上下文。将完成定义为:提供一种公开的方式来确定 Player 是否已加载,以及一种以编程方式加载它的 public 方式,从而支持所描述的 button 用例。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- api, frontend
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 40/100