Skip to content

youtube-player Unable to play video in ready Event handler. #18279

@mcroker

Description

@mcroker

Reproduction

Use StackBlitz to reproduce your issue:
https://stackblitz.com/edit/components-issue-qcwjmp?file=app%2Fapp.component.ts

Steps to reproduce:

  1. Run the stackbliz, a google video should load but not start playing...

Expected Behaviour

I was expecting to be able to run playVideo() from within the ready function.

Actual Behaviour

I was expecting the video to start playing one loaded.
The iframe loads, and the ready event fires - but playVideo() does nothing.
Investigating into the playVideo() code - at the point the ready event fires this._player is still not set.

Environment

Ionic CLI : 5.4.15
Ionic Framework : @ionic/angular 4.11.8
@angular-devkit/build-angular : 0.801.3
@angular-devkit/schematics : 8.1.3
@angular/cli : 8.1.3
@ionic/angular-toolkit : 2.1.2

  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Mac

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions