How can I create quality controls option for my project if it's HLS, or else just attach mp4 video and play? #734
-
Hello, can I ask for more detail about my project, I'm trying to use Plyr-react to implement video into my project. I'm using React + Javascript, not Typescript so there's some example written in Typescript and I can't exactly do the following like that. I have the mp4 URL or m3u8 URL for HLS, it depends on the Anime I watched. How can I:
I have read a few documents but I'm still confused about how to implement them into my project. From this code: I've succeeded to play the m3u8 URL video, but I can't change quality control because I really don't know how to implement them. And I don't know how to implement the video if it's the mp4 URL... I need a few more examples, it doesn't have to be exactly solved my problem but I need some guidance. I'm really stuck, thanks for reading my post. (In the useEffect I have 2 responses, feel free to skip the Here's my code:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
Hi @huy232 We are working on a stand-alone integration, ready to use and bug-free in the future, so your feedback is always welcomed. For the issue you mentioned For the second one, I guess we got an issue which was with the plyr package itself. I will test that out soon. It would be helpful if you can make a runnable code on the code sandbox to make it possible to solve your exact concern. |
Beta Was this translation helpful? Give feedback.
-
Hi @amirHossein-Ebrahimi This is the code sandbox that is runnable, I've made a few changes for more simplicity, but it serves the same as my situation. Please help me as the part of And by the way, is there anyways I can implement a custom button into this If you can have some simple examples, please provide me, I can base on that and try to make my own feature. Thanks for answering my question. |
Beta Was this translation helpful? Give feedback.
usePlyr
hook is from our alpha release4.0.0-alpha.1
forwardRef
just pass theref
with a different name simply as props e.g.plyrRef
, that should completely work :).Here is the same component we have in our readme + new alpha release integration + type removed
https://codesandbox.io/s/silent-hooks-tpsbe?file=/src/HLS-javascript.jsx