Commit 3b31dac
fix(youtube-player): invalid URL when playlist is passed in without videoId (#31403)
* Fix null issue in url youtube url when running a playlist with no videoId
When playing a playlist via playerVars.list = [playlistId] we dont have a videoId available yet. Plus we don't need one, Youtube will start at the first video of the playlist by default.
By injecting an undefined videoId in the YT Player constructur, we end up with null value in the iframe url (`ps://www.youtube.com/embed/null?cc_load_policy=1&enablejsapi=1&controls=1&showinfo=0&rel=0&listType=playlist&list=PLxf07yK_HAvdwhW-L0X3uP5aMe6eEt50v`) which is causing an Invalid Video Id error for consumers.
* Update youtube-player.ts
apply YT.PlayerOptions to params
* Update youtube-player.ts
fix formatting
* Update youtube-player.spec.ts
fix unit test
* Update youtube-player.ts
Fix formatting
(cherry picked from commit 2c87ec3)1 parent c3bb067 commit 3b31dac
File tree
2 files changed
+19
-14
lines changed- src/youtube-player
2 files changed
+19
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
515 | 515 | | |
516 | 516 | | |
517 | 517 | | |
518 | | - | |
| 518 | + | |
519 | 519 | | |
520 | 520 | | |
521 | 521 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
587 | 587 | | |
588 | 588 | | |
589 | 589 | | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
590 | 604 | | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
| 605 | + | |
601 | 606 | | |
602 | 607 | | |
603 | 608 | | |
| |||
710 | 715 | | |
711 | 716 | | |
712 | 717 | | |
713 | | - | |
714 | | - | |
715 | | - | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
716 | 721 | | |
717 | 722 | | |
718 | 723 | | |
| |||
0 commit comments