bug(Angular Youtube player: Cannot read properties of null (reading 'src') #29221
Labels
area: youtube-player
cannot reproduce
The team is unable to reproduce this issue with the information provided
P4
A relatively minor issue that is not relevant to core functions
Is this a regression?
The previous version in which this bug was not present was
17.0.9
Description
In our app, we can play YT music playlists. When we search for a keyword and get a couple of YT playlists as result, we can play the first result which opens the YT player. When I then search again and start the second search result, whilst the YT play er is still active, I change the playerVars with the new playlist ID.
The playlist will load but an error is thrown in the console
which is being picked up by my app error handler.
I have to be able to load a different video in the videoplayer, and the video player Angular component will not always be destroyed.
Reproduction
In our app, we can play YT music playlists. When we search for a keyword and get a couple of YT playlists as result, we can play the first result which opens the YT player. When I then search again and start the second search result, whilst the YT play er is still active, I change the playerVars with the new playlist ID.
The playlist will load but an error is thrown in the console:
whichi is being picked up by my app error handler.
Expected Behavior
No error when I change the youtube playlist id.
I
Actual Behavior
JS error thrown
TypeError: Cannot read properties of null (reading 'src')
at r.sendMessage (www-widgetapi.js:253:96)
at Jc (www-widgetapi.js:243:100)
at .c. [as pauseVideo] (www-widgetapi.js:258:135)
at a.pauseVideo (youtube-player.mjs:201:22)
at Object.next (youtube-player.component.ts:82:20)
at o.subscribe.a (tap.js:17:71)
at Is._next (OperatorSubscriber.js:12:9)
at Is.next (Subscriber.js:29:12)
at filter.js:6:122
at Is._next (OperatorSubscriber.js:12:9)
The text was updated successfully, but these errors were encountered: