Comments (14)
Same issue here, using dynamic import
solved.
const Player = dynamic(
() => import('react-hls-player'),
{ ssr: false },
);
from react-hls.
Version 2.0.0 working great, thanks!
from react-hls.
I'm using Typescript with Next.js.
This import code runs on the client:
import ReactHlsPlayer from "react-hls-player";
In case it helps, the actual HLS package runs fine imported this way:
import Hls from "hls.js"
from react-hls.
Here's a minimal StackBlitz example: https://stackblitz.com/edit/nextjs-bgkcxa?devtoolsheight=33&file=pages/index.js
from react-hls.
Great, thanks! I'll try one of those versions. Let me know if I can help with anything :)
If you're familiar with creating react packages with typescript and might be able to point me in the right direction that'd be helpful. I'm reading through some articles trying to figure out the best way for compatibility.
from react-hls.
React +Nextjs latest version + react-hls latest = Not working: import error..
from react-hls.
Same issue here, using
dynamic import
solved.const Player = dynamic( () => import('react-hls-player'), { ssr: false }, );
Using Dynamic import in Next.js helped 😃
from react-hls.
Are you using import
or require
? And are you using the latest create-react-app template or a custom build process? Can you provide any additional info that may help out about your project?
I think there may be an issue with the way I'm currently building the package.
from react-hls.
Thanks @colinricardo I think I may have found the issue. Going to test it out in a create-react-app and create-next-app to see
from react-hls.
Alright, the issue is going to be a bit more than I'm able to get to at the moment. I'd recommend using version 2.0.0 or 1.1.0 in the meantime. I think I'm going to need to introduce a proper bundler for this. In version 3 I was hoping to shed off some of the heavy configurations needed with webpack and what not, and I'm pretty sure getting rid of webpack is what's causing this issue.
Thanks for bringing this too my attention
from react-hls.
Great, thanks! I'll try one of those versions. Let me know if I can help with anything :)
from react-hls.
Same here
from react-hls.
@yuri-devi @iMJumpmxn I'm not sure when I'll get a chance to look in to this. In the meantime, you should be able to npm install [email protected]
. There were some api changes between v2 and v3, but nothing too drastic.
from react-hls.
@tgwow I was thinking this may be the case, but haven't had the time to look in to it. Thanks for sharing!
from react-hls.
Related Issues (20)
- Player gets destroyed when interacting with components that use setState/state HOT 1
- TypeScript error - "playerRef" is required prop HOT 2
- this package is dead ? HOT 4
- react 17 support HOT 4
- Listen to video buffer data
- Use it in react native HOT 1
- Playback stalling at @59.598812 due to low buffer
- SSR error (Gatsby)
- How to start the player from a given location? HOT 1
- Multiple audio tracks not supported HOT 6
- use latest version of hls.js, and enable fetch loader? HOT 2
- Player start playing from start every time there is a state update with useSate HOT 1
- React-native app
- Stream is running in loop HOT 1
- Open for contributors? HOT 1
- NEW Package here: https://github.com/gumlet/react-hls-player HOT 6
- React 18 Support HOT 3
- HTTP “Content-Type” of “application/vnd.apple.mpegurl” is not supported. HOT 1
- Not able to play hls video in react-native-webview
- Seekbar is not working in IOS.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-hls.