Open dkam opened 1 year ago
The solution that helped me.
The first thing you need to do is get the contents of this file:
node_modules/plyr/dist/plyr.polyfilled.min.mjs
You can also get it from here: https://www.npmjs.com/package/plyr?activeTab=code
Then copy this code into this file:
vendor/javascript/plyr.js
That's all. As a result, everything should work without problems.
I'm using Plyr in a Rails app, following this example : https://github.com/timnans/episode-18-plyr-in-ruby-on-rails
I'm using importmaps and StimulsJS
My Stimulus controller is:
HTML is
Expected behaviour
Plyr can play the video, and there are no errors in the console.
Actual behaviour
When I switch from version 3.7.3 to 3.7.4 and higher, I get the following error in the console:
In Safari 17.1
In Firefox 119
Steps to reproduce
Clone the example repository, upgrade Plyr to 3.7.4 or higher.
The repository has an accompanying video.
Environment
Console errors (if any)
In Safari 17.1
In Firefox 119
Link to where the bug is happening
I can deploy an app if required.