From 74cb223aa0e10bbe03b3f48d9f5ccafefd270eda Mon Sep 17 00:00:00 2001 From: Matt Luedke Date: Wed, 15 Nov 2023 12:26:28 -0500 Subject: [PATCH] docs: add note about transpiling/polyfilling --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 8a4b04e..469ff77 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,17 @@ that you can use to register the plugin with videojs by passing in a reference t Then, follow the steps in the "Configuration" section above. +> [!WARNING] +> This plugin's source code uses ES6+ syntax and keywords, such as `class` and `static`. +> If you need to support [browsers that do not support newer JavaScript +> syntax](https://caniuse.com/es6), you will need to use a tool like +> [Babel](https://babeljs.io/) to transpile and polyfill your code. +> +> Alternatively, you can +> `require('@silvermine/videojs-airplay/dist/silvermine-videojs-airplay.js')` +> to use a JavaScript file that has already been polyfilled/transpiled down to ES5 +> compatibility. + ### Using the CSS and images If you are using SCSS in your project, you can simply reference the plugin's main SCSS