cookpete / react-player

A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion
https://cookpete.github.io/react-player
MIT License
8.89k stars 1.12k forks source link

jsdelivr issue #1834

Closed kah9509 closed 2 weeks ago

kah9509 commented 2 weeks ago

Be sure to search for your issue before opening a new one.

Current Behavior

HLS video does not play.

Expected Behavior

The problem seems to be occurring because the jsdelivr CDN certificate has expired.

Steps to Reproduce

1. 1. 1.

Environment

Other Information

edoko commented 2 weeks ago

https://github.com/cookpete/react-player/issues/605#issuecomment-492561909

I'm having the same problem. There are ways to temporarily replace it with another CDN. Load the hls.js script before the react-player is loaded.

// I used the same version of hls.js that ReactPlayer uses.
<script src="https://cdnjs.cloudflare.com/ajax/libs/hls.js/1.1.4/hls.min.js" />

If possible, I'd like to see ReactPlayer change the default CDN address, or have it built in by default. (Although I understand from the comments in the issue above that it doesn't due to bundle size)

kah9509 commented 2 weeks ago

Thank you!!!! I'll give it a try.

kah9509 commented 2 weeks ago

It works very well. thank you.

mislavmiocevic commented 2 weeks ago

If you are using Next (14) you can have:

import Script from 'next/script';

...
<Head>
    ...
    <Script src="https://cdnjs.cloudflare.com/ajax/libs/hls.js/1.1.4/hls.min.js" strategy="beforeInteractive" />