Plyr: ie11 Plyr does not work with slick.js

Created on 23 Apr 2018  路  9Comments  路  Source: sampotts/plyr

Expected behaviour

Work fine with slick-carrousel

Actual behaviour

After update plyr 2.0.18 to 3.0.0 and +
With slick-carousel : 1.8.1 ( https://github.com/kenwheeler/slick/tree/v1.8.1 )

I find an js error only on ie11:
SCRIPT438: Object does not handle property or find method

This error breaks the js on ie11

It's annoying because I can not add the loop option on the video and it does not work on the tag 2.0.18

Environment

Steps to reproduce

  • install slick-carousel : 1.8.1 and plyr 3.0.0 and +
    ( no need to included the video on the slider to reproduce, a separate video and a carousel )

All 9 comments

Did you read the docs about polyfilling?

Thanks i'm going to look, i do not think my team leader will allow me to use polyfilling

There's also an undocumented build with the polyfills bundled (this is arguably worse for performance as it downloads them for everyone, not just for old browsers).

If you're using the cdn the url is https://cdn.plyr.io/3.2.1/plyr.polyfilled.js. If you're using npm it's plyr/dist/plyr.polyfilled.js

Good point @friday , I should document that build.

@ClementThu Sounds like you need a new team leader 馃槅

@friday, @sampotts Thank you for your quick reply, i just make a simple test at home. It's works fine with https://cdn.plyr.io/3.2.1/plyr.polyfilled.js With slick or not ... I have not the error plyr undefiened at works. Maybe a polyfill is allready install. At works when i init plyr the slider is broken in ie11. At home without polyfill the slider works fine. I will investigate tomorow.

With the polyfill same error : SCRIPT438: L鈥檕bjet ne g猫re pas la propri茅t茅 ou la m茅thode 芦 find 禄
But video and slider works...

We prefer use simple solution without polyfill when it's possible for perf...

@sampotts or not ( i think he will read that 馃槅 )

Yeah I'd like to avoid polyfills too but to be able to move forward with better syntax and better performance in 95% of browsers, to support the 5% of people stuck using vintage browsers, we have to use polyfills. You'll find Plyr isn't the only modern JS lib relying on polyfills. Even so, the polyfilled build is ~40kb. By far the best method is to use polyfill.io though as it only serves the polyfills required by that user agent - it's backed by the financial times.

My team leader show me a way to clean :
SCRIPT438: L鈥檕bjet ne g猫re pas la propri茅t茅 ou la m茅thode 芦 find 禄
Mdn polyfill find

Was this page helpful?
0 / 5 - 0 ratings

Related issues

elliottcoe picture elliottcoe  路  4Comments

muuvmuuv picture muuvmuuv  路  3Comments

osamay picture osamay  路  4Comments

nam-co picture nam-co  路  4Comments

frumbert picture frumbert  路  3Comments