Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 task
keatkeat87 opened this issue Oct 14, 2024 · 2 comments · Fixed by #29986
Closed
1 task

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

keatkeat87 opened this issue Oct 14, 2024 · 2 comments · Fixed by #29986
Assignees
Labels
area: youtube-player P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@keatkeat87
Copy link

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

<youtube-player width="256" height="144" videoId="mVjYG9TSN88" [startSeconds]="5" (ready)="ready = true" (stateChange)="stateChange = true"/>
<p>{{ ready }}</p> 
<p>{{ stateChange }}</p>

Image

[startSeconds] no function
(ready) no call

Reproduction

git clone https://github.com/keatkeat87/ng-mat-youtube-start-time-issue
click and play the video

Expected Behavior

  1. the video should start at 5 seconds
  2. the (ready) should emit

Actual Behavior

  1. the vide start at 0 second
  2. the (ready) no emit

Environment

Angular CLI: 18.2.8
Node: 20.11.1
Package Manager: yarn 1.22.19
OS: win32 x64

Angular: 18.2.8
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
... youtube-player

Package Version

@angular-devkit/architect 0.1802.8
@angular-devkit/build-angular 18.2.8
@angular-devkit/core 18.2.8
@angular-devkit/schematics 18.2.8
@schematics/angular 18.2.8
rxjs 7.8.1
typescript 5.5.4
zone.js 0.14.10

@keatkeat87 keatkeat87 added the needs triage This issue needs to be triaged by the team label Oct 14, 2024
@crisbeto
Copy link
Member

I suspect that this is an issue only with the placeholder behavior. As a workaround until it gets fixed, you can try setting disablePlaceholder="true".

@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent area: youtube-player and removed needs triage This issue needs to be triaged by the team labels Oct 14, 2024
crisbeto added a commit to crisbeto/material2 that referenced this issue Nov 8, 2024
Fixes that the `startSeconds` input wasn't doing anything if there's a placeholder. This used to work, but seems to have broken during the transition to using the placeholder.

Fixes angular#29874.
crisbeto added a commit to crisbeto/material2 that referenced this issue Nov 8, 2024
Fixes that the `youtube-player`'s `ready` event wasn't emitting. The issue is that we create the outputs lazily based on a stream of newly-created players, however that stream emits after the `ready` event.

Relates to angular#29874.
@crisbeto crisbeto self-assigned this Nov 8, 2024
crisbeto added a commit that referenced this issue Nov 11, 2024
Fixes that the `youtube-player`'s `ready` event wasn't emitting. The issue is that we create the outputs lazily based on a stream of newly-created players, however that stream emits after the `ready` event.

Relates to #29874.
crisbeto added a commit that referenced this issue Nov 11, 2024
Fixes that the `startSeconds` input wasn't doing anything if there's a placeholder. This used to work, but seems to have broken during the transition to using the placeholder.

Fixes #29874.

(cherry picked from commit 23ecba2)
crisbeto added a commit that referenced this issue Nov 11, 2024
Fixes that the `youtube-player`'s `ready` event wasn't emitting. The issue is that we create the outputs lazily based on a stream of newly-created players, however that stream emits after the `ready` event.

Relates to #29874.

(cherry picked from commit 96afa88)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: youtube-player P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants