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
9.37k stars 1.15k forks source link

Player plays Twitch MOVIES but doesn't play Twitch CLIPS. #1107

Closed szymanskicode closed 3 years ago

szymanskicode commented 3 years ago

Twitch has to ways of storing videos, one where are stored streams and they are storend under link like this:

https://www.twitch.tv/videos/840320121

and this format works in React-Player but there is other way where Twitch stores Clips which are made by viewers and which are stored in streamer profile - format of clips is:

https://www.twitch.tv/bonkol/clip/FrailSavoryShieldNononoCat

where "bonkol" is a streamer chanell name and where "FrailSavoryShieldNononoCat" is some randomly generated clip name. Neverthelesl pasting whole url to React-Player should work couse clips are more important that whole movies on Twitch.

All the best M8!

cookpete commented 3 years ago

I can't do much until the Twitch player supports it.

The embedded clips player uses a different set of query parameters and does not support the JavaScript interactive embed.

https://dev.twitch.tv/docs/embed/video-and-clips/#non-interactive-iframes-for-clips

If the interactive embed is not supported, you might as well just render the <iframe> directly. ReactPlayer would be a waste of bytes.