temp: pass random param
There are some channels returning 304, and they can't stream without this param
This commit is contained in:
parent
192e1d4923
commit
aeb475ec2e
2 changed files with 2 additions and 2 deletions
|
@ -97,7 +97,7 @@ export const fetchLiveChannels = async (): Promise<LivestreamInfo> => {
|
|||
*/
|
||||
export const fetchLiveChannel = async (channelId: string): Promise<LiveChannelStatus> => {
|
||||
const newApiEndpoint = LIVESTREAM_LIVE_API;
|
||||
const newApiResponse = await fetch(`${newApiEndpoint}/${channelId}`);
|
||||
const newApiResponse = await fetch(`${newApiEndpoint}/${channelId}?1`);
|
||||
const newApiData = (await newApiResponse.json()).data;
|
||||
const isLive = newApiData.live;
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ export const killStream = async (channelId: string, channelName: string) => {
|
|||
|
||||
export const isLiveStreaming = async (channelId: string): Promise<boolean> => {
|
||||
try {
|
||||
const response = await fetch(`${LIVESTREAM_LIVE_API}/${channelId}`);
|
||||
const response = await fetch(`${LIVESTREAM_LIVE_API}/${channelId}?1`);
|
||||
const stream = await response.json();
|
||||
return stream.data?.live;
|
||||
} catch {
|
||||
|
|
Loading…
Reference in a new issue