Audio description in a11y not working for external YouTube videos
digitas-git opened this issue · 0 comments
Using the a11y plugin for adding audio description I recognized, that it works fine if I don't use videos rom YouTube. The button for audio description is added but there is no effect clicking it.
It seems that the EventListeners for playing, pausing, timeupdate etc. added to the player.node are working fine for "local" videos, but that for YouTube videos the player.media (that is the wrapper for the iframe tag and the video tag) needs these eventListeners. Changing t.node.addEventListener to t.media.addEventListener makes the plugin work also for YouTube videos. Also the timeupdate event and the volumechange event have to be modified because t.node.currentTime or t.node.volume are unknown for YouTube videos.
I will add a pull request for this and link it here.
Edited:
Pull request is here: #200