clappr-playback-rate-plugin
clappr-playback-rate-plugin copied to clipboard
PlaybackRatePlugin is not defined
Tried Both way to call the plugin. But getting the same error every time.
plugins: {
'core' : [PlaybackRatePlugin]
},
plugins: {
core : [PlaybackRatePlugin]
},
Uncaught ReferenceError: PlaybackRatePlugin is not defined at window.onload ((index):32).
After that i take code and compile it on my local machine. Files are generated, but getting the same error.
It looks like the instructions for using this outside of an ES6 module are incomplete. I'm assuming you're not using webpack or any other ES6 bundler, correct?
The workaround would be to do the following:
<script src="https://cdnjs.cloudflare.com/ajax/libs/clappr/0.2.87/clappr.min.js"></script>
<script>window.clappr = Clappr</script>
<script src="lib/lib/clappr-playback-rate-plugin.min.js"></script>
<script>window.PlaybackRatePlugin = window['clappr-playback-rate-plugin'].default</script>
<script>
// initialize player as before...
</script>
Also see #8
Its because i didn't add this in code.
Now its working fine. Thanks @bikegriffith for your instant help.