mirror of
https://github.com/p-stream/providers.git
synced 2026-04-20 04:42:06 +00:00
add 3u8 proxy to streamwish
This commit is contained in:
parent
b65259d795
commit
0bfdad40df
1 changed files with 7 additions and 5 deletions
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
import { flags } from '@/entrypoint/utils/targets';
|
||||
import { makeEmbed } from '@/providers/base';
|
||||
import { createM3U8ProxyUrl } from '@/utils/proxy';
|
||||
|
||||
class Unbaser {
|
||||
private ALPHABET: Record<number, string> = {
|
||||
|
|
@ -213,18 +214,19 @@ function embed(provider: { id: string; name: string; rank: number }) {
|
|||
// Intentionally empty to suppress errors during variant fetching
|
||||
}
|
||||
|
||||
const videoHeaders = {
|
||||
Referer: ctx.url,
|
||||
Origin: ctx.url,
|
||||
};
|
||||
|
||||
return {
|
||||
stream: [
|
||||
{
|
||||
id: 'primary',
|
||||
type: 'hls',
|
||||
playlist: videoUrl,
|
||||
playlist: createM3U8ProxyUrl(videoUrl, videoHeaders),
|
||||
flags: [flags.CORS_ALLOWED],
|
||||
captions: [],
|
||||
headers: {
|
||||
Referer: ctx.url,
|
||||
Origin: ctx.url,
|
||||
},
|
||||
},
|
||||
],
|
||||
embeds: [],
|
||||
|
|
|
|||
Loading…
Reference in a new issue