api.consumet.org
api.consumet.org copied to clipboard
HLS Cors error
Describe the bug
I am using the streaming link that is provided by the api in the format of .m3u8 on my frontend using hls.js but it gives cors error and I am unable to play the video is there any way to solve or bypass the cors issue
Steps to reproduce
- Fetch the steaming link of which anime you want to watch
- Using Plyr-React with hls.js to show the video
Expected behavior
The video should play
Actual behavior
Showing cors error
Additional context
No response
You could use a CORS proxy
Hi @SlideMovies If possible, can you please help me how to use or setup the proxy on the frontend or the backend or you can provide any documentation sort off.
@dishant0406 Sure, you can email me at [email protected]
I also came across this error while using React-player can anyone please help me out how to resolve this.
I get this error too,I need help,thanks very much.
I get this error too,I need help,thanks very much.
I found a way around to handle this you can use this url and paste the video url directly after this as path parameter and it will work. "https://corsanywhere.herokuapp.com/"
@Anuragkumarsah It worked, thank you very much.
I get this error too,I need help,thanks very much.
I found a way around to handle this you can use this url and paste the video url directly after this as path parameter and it will work. "https://corsanywhere.herokuapp.com/"
Arent there any rate limit
I get this error too,I need help,thanks very much.
I found a way around to handle this you can use this url and paste the video url directly after this as path parameter and it will work. "https://corsanywhere.herokuapp.com/"
Arent there any rate limit
Yeah there is a rate limit of 50 request per minute, as far as I remember.
I get this error too,I need help,thanks very much.
I found a way around to handle this you can use this url and paste the video url directly after this as path parameter and it will work. "https://corsanywhere.herokuapp.com/"
@Anuragkumarsah can you please share an example - I tried - fetch("https://api.consumet.org/anime/gogoanime/watch/spy-x-family-episode-1") .then((response) => response.json()) .then((result) => console.log(result));
result = { "headers": { "Referer": "https://anihdplay.com/embedplus?id=MTg0MTQx&token=1ctpyL9t_G4C-tgO1FKYnA&expires=1680290342" }, "sources": [ { "url": "https://tc-002.adesicdn.com/1ab5d45273a9183bebb58eb74d5722d8ea6384f350caf008f08cf018f1f0566d0cb82a2a799830d1af97cd3f4b6a9a81ef3aed2fb783292b1abcf1b8560a1d1aa308008b88420298522a9f761e5aa1024fbe74e5aa853cfc933cd1219327d1232e91847a185021b184c027f97ae732b3708ee6beb80ba5db6628ced43f1196fe/0789fd4f049c3ca2a49b860ea5d1f456/ep.1.1677591537.360.m3u8", "isM3U8": true, "quality": "360p" }, { "url": "https://tc-002.adesicdn.com/1ab5d45273a9183bebb58eb74d5722d8ea6384f350caf008f08cf018f1f0566d0cb82a2a799830d1af97cd3f4b6a9a81ef3aed2fb783292b1abcf1b8560a1d1aa308008b88420298522a9f761e5aa1024fbe74e5aa853cfc933cd1219327d1232e91847a185021b184c027f97ae732b3708ee6beb80ba5db6628ced43f1196fe/0789fd4f049c3ca2a49b860ea5d1f456/ep.1.1677591537.480.m3u8", "isM3U8": true, "quality": "480p" }, { "url": "https://tc-002.adesicdn.com/1ab5d45273a9183bebb58eb74d5722d8ea6384f350caf008f08cf018f1f0566d0cb82a2a799830d1af97cd3f4b6a9a81ef3aed2fb783292b1abcf1b8560a1d1aa308008b88420298522a9f761e5aa1024fbe74e5aa853cfc933cd1219327d1232e91847a185021b184c027f97ae732b3708ee6beb80ba5db6628ced43f1196fe/0789fd4f049c3ca2a49b860ea5d1f456/ep.1.1677591537.720.m3u8", "isM3U8": true, "quality": "720p" }, { "url": "https://tc-002.adesicdn.com/1ab5d45273a9183bebb58eb74d5722d8ea6384f350caf008f08cf018f1f0566d0cb82a2a799830d1af97cd3f4b6a9a81ef3aed2fb783292b1abcf1b8560a1d1aa308008b88420298522a9f761e5aa1024fbe74e5aa853cfc933cd1219327d1232e91847a185021b184c027f97ae732b3708ee6beb80ba5db6628ced43f1196fe/0789fd4f049c3ca2a49b860ea5d1f456/ep.1.1677591537.1080.m3u8", "isM3U8": true, "quality": "1080p" }, { "url": "https://tc-002.adesicdn.com/1ab5d45273a9183bebb58eb74d5722d8ea6384f350caf008f08cf018f1f0566d0cb82a2a799830d1af97cd3f4b6a9a81ef3aed2fb783292b1abcf1b8560a1d1aa308008b88420298522a9f761e5aa1024fbe74e5aa853cfc933cd1219327d1232e91847a185021b184c027f97ae732b3708ee6beb80ba5db6628ced43f1196fe/0789fd4f049c3ca2a49b860ea5d1f456/ep.1.1677591537.m3u8", "isM3U8": true, "quality": "default" }, { "url": "https://www002.anifastcdn.info/videos/hls/_PK_JUqGrakYdO8LcdTdMg/1680297543/184141/0789fd4f049c3ca2a49b860ea5d1f456/ep.1.1677591537.m3u8", "isM3U8": true, "quality": "backup" } ], "download": "https://gogohd.net/download?id=MTg0MTQx&token=1ctpyL9t_G4C-tgO1FKYnA&expires=1680290342" }
I'm making the url as https://corsanywhere.herokuapp.com/?path=https://tc-002.adesicdn.com/1ab5d45273a9183bebb58eb74d5722d8ea6384f350caf008f08cf018f1f0566d0cb82a2a799830d1af97cd3f4b6a9a81ef3aed2fb783292b1abcf1b8560a1d1aa308008b88420298522a9f761e5aa1024fbe74e5aa853cfc933cd1219327d1232e91847a185021b184c027f97ae732b3708ee6beb80ba5db6628ced43f1196fe/0789fd4f049c3ca2a49b860ea5d1f456/ep.1.1677591537.360.m3u8 Also tried zoho links. It's not working.
You need to give the url directly after slash path parameter is not need Like - https://corsanywhere.herokuapp.com/https://tc-002.adesicdn.com/1ab5d45273a9183bebb58eb74d5722d8ea6384f350caf008f08cf018f1f0566d0cb82a2a799830d1af97cd3f4b6a9a81ef3aed2fb783292b1abcf1b8560a1d1aa308008b88420298522a9f761e5aa1024fbe74e5aa853cfc933cd1219327d1232e91847a185021b184c027f97ae732b3708ee6beb80ba5db6628ced43f1196fe/0789fd4f049c3ca2a49b860ea5d1f456/ep.1.1677591537.360.m3u8
It says, Missing required request header. Must specify one of: origin,x-requested-with
If you directly follow the link in browser it shows Missing required request header. Must specify one of: origin,x-requested-with
But if you fetch the link form browser it works,
Now again it is not working, I guess, I am again getting Cors error, even with corsanywhere.
Now again it is not working, I guess, I am again getting Cors error, even with corsanywhere.
But it's working for me
Now again it is not working, I guess, I am again getting Cors error, even with corsanywhere.
But it's working for me
It is showing Cors error to me though.
Ok nvm, I think this was a problem from corsanywhere, I used "https://cors.zimjs.com/" and now it is working again.
Ok nvm, I think this was a problem from corsanywhere, I used "https://cors.zimjs.com/" and now it is working again.
hello bro, i have tried using different hls player to play an episode m3u8 link from https://api.consumet.org/anime/zoro/watch?episodeId=tokyo-revengers-15585$episode$64630$both, but none of them worked only jwplayer worked i think its using some unique cors policy or something, can you please help me out, ive tried to run my code on replit it didnt worked, but when i downloaded replit on my mobile and ran it again the video started to play
I guess, Replit code of yours is being prevented by Cors Policy
to fetch the HLS(.m3u8) manifest and play it.
Whereas, the Replit app on mobile devices might has its own browsing environment that might not have Cors Policy.
Well, talking about JWPlayer; Take a look at https://anihdplay.com/embedplus?id=MTY2NDQ4&token=rTS6SSjXPKJJoby90ft--Q&expires=1681475515
This link is the same as provided by API as referrer
for a request at, https://api.consumet.org/anime/gogoanime/watch/dororo-dub-episode-1
Notice that the Referrer
links have just the same JWPlayer in them.
So, it clarifies that the Anime HLS videos from GOGO are specifically meant to be played on JWPlayer as per the Cors Policy.
Here, a cors proxy should be used to use any other player to play on any browser (as each browser has Cors Proxy for security).
I think that the same goes for Zoro also.
I think that the same goes for Zoro also.
i solved the cors error, but im still having one issue, when i fetch animes from zoro provider then in the subordub field i only get to see sub
guys if i created my own instance of jwplayer to avoid cors will it work? If yes, then what will be configuration we have to pass, if no whats the better solution to handle it.