Skip to content

Commit

Permalink
fix(youtube-player): update to latest typings
Browse files Browse the repository at this point in the history
Updates the YouTube player to the latest typings to account for a breaking change.
  • Loading branch information
crisbeto committed Dec 4, 2024
1 parent f0a767c commit e620e7e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"@angular/forms": "^19.0.0",
"@angular/platform-browser": "^19.0.0",
"@types/google.maps": "^3.54.10",
"@types/youtube": "^0.0.50",
"@types/youtube": "^0.1.0",
"rxjs": "^6.6.7",
"rxjs-tslint-rules": "^4.34.8",
"tslib": "^2.3.1",
Expand Down
2 changes: 1 addition & 1 deletion src/youtube-player/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"homepage": "https://github.com/angular/components/tree/main/src/youtube-player#readme",
"dependencies": {
"@types/youtube": "^0.0.50",
"@types/youtube": "^0.1.0",
"tslib": "0.0.0-TSLIB"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions src/youtube-player/youtube-player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -689,10 +689,10 @@ export class YouTubePlayer implements AfterViewInit, OnChanges, OnDestroy {
switchMap(player => {
return player
? fromEventPattern<T>(
(listener: (event: T) => void) => {
listener => {
player.addEventListener(name, listener);
},
(listener: (event: T) => void) => {
listener => {
// The API seems to throw when we try to unbind from a destroyed player and it doesn't
// expose whether the player has been destroyed so we have to wrap it in a try/catch to
// prevent the entire stream from erroring out.
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4242,10 +4242,10 @@
dependencies:
"@types/node" "*"

"@types/youtube@^0.0.50":
version "0.0.50"
resolved "https://registry.yarnpkg.com/@types/youtube/-/youtube-0.0.50.tgz#c28cefde8e3f17ac3564bd83952eacf806d96eea"
integrity sha512-d4GpH4uPYp9W07kc487tiq6V/EUHl18vZWFMbQoe4Sk9LXEWzFi/BMf9x7TI4m7/j7gU3KeX8H6M8aPBgykeLw==
"@types/youtube@^0.1.0":
version "0.1.0"
resolved "https://registry.yarnpkg.com/@types/youtube/-/youtube-0.1.0.tgz#0e116bd0a8ddb93daf1372fb5e07f576cf9fe5cc"
integrity sha512-Pg33m3X2mFgdmhtvzOlAfUfgOa3341N3/2JCrVY/mXVxb4hagcqqEG6w4vGCfB64StQNWHSj/T8Eotb1Rko/FQ==

"@typescript-eslint/[email protected]":
version "4.33.0"
Expand Down

0 comments on commit e620e7e

Please sign in to comment.