diff --git a/package.json b/package.json index 6e9a1492..ab452d53 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mage-website", - "version": "0.1.04", + "version": "0.1.05", "license": "GPL-3.0", "private": true, "type": "module", diff --git a/src/lib/assets/icons/channel/IconMultistream.svelte b/src/lib/assets/icons/channel/IconRestream.svelte similarity index 100% rename from src/lib/assets/icons/channel/IconMultistream.svelte rename to src/lib/assets/icons/channel/IconRestream.svelte diff --git a/src/lib/components/Channel/Stream/StreamContainer.svelte b/src/lib/components/Channel/Stream/StreamContainer.svelte index fb4d4ba5..041b912a 100644 --- a/src/lib/components/Channel/Stream/StreamContainer.svelte +++ b/src/lib/components/Channel/Stream/StreamContainer.svelte @@ -99,7 +99,7 @@ {/each} -
+
diff --git a/src/lib/components/Channel/Stream/StreamControls.svelte b/src/lib/components/Channel/Stream/StreamControls.svelte index ad899808..0b23c9d3 100644 --- a/src/lib/components/Channel/Stream/StreamControls.svelte +++ b/src/lib/components/Channel/Stream/StreamControls.svelte @@ -21,8 +21,11 @@ import { channel_connection } from '$lib/stores/websocketStore' import { onDestroy, onMount } from 'svelte' import IconShareObs from '$lib/assets/icons/channel/IconShareObs.svelte' - import { is_feature_multistream_enabled } from '$lib/stores/remoteConfigStore' - import IconMultistream from '$lib/assets/icons/channel/IconMultistream.svelte' + import { + is_feature_apps_enabled, + is_feature_restream_enabled + } from '$lib/stores/remoteConfigStore' + import IconRestream from '$lib/assets/icons/channel/IconRestream.svelte' export let isHostOrGuest: boolean = false, channel: any, @@ -53,7 +56,7 @@ } const createLiveInput = async (trackData: any) => { - return await put(`cloudflare/live-input`, trackData, { + return await put(`live-input`, trackData, { userId: $page.data.user?.userId, token: $page.data.user?.token }) @@ -68,14 +71,16 @@ channelTitle: string username: string }) => { - return await post( - `firebase/send-fcm`, - { channelId, channelTitle, username }, - { - userId: $page.data.user?.userId, - token: $page.data.user?.token - } - ) + if ($is_feature_apps_enabled) { + return await post( + `firebase/send-fcm`, + { channelId, channelTitle, username }, + { + userId: $page.data.user?.userId, + token: $page.data.user?.token + } + ) + } } const deleteLiveInput = async ({ @@ -89,7 +94,7 @@ }) => { if (channelId && userId && trackType) { return await del( - `cloudflare/live-input?channelId=${channelId}&userId=${userId}&trackType=${trackType}`, + `live-input?channelId=${channelId}&userId=${userId}&trackType=${trackType}`, { userId: $page.data.user?.userId, token: $page.data.user?.token @@ -349,66 +354,59 @@ }) -
- - - - - +
+
+ - + - {#if $is_feature_multistream_enabled} + +
+
- {/if} - + {#if $is_feature_restream_enabled} + + {/if} + + +
= writable(false) export const is_feature_affiliate_enabled: Writable = writable(false) export const is_feature_apps_enabled: Writable = writable(false) -export const is_feature_multistream_enabled: Writable = writable(false) +export const is_feature_restream_enabled: Writable = writable(false) diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 87ee95f8..a33bb4fa 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -23,7 +23,7 @@ is_feature_video_responses_enabled, is_feature_affiliate_enabled, is_feature_apps_enabled, - is_feature_multistream_enabled + is_feature_restream_enabled } from '$lib/stores/remoteConfigStore' import { env } from '$env/dynamic/public' import { user_role } from '$lib/stores/userStore' @@ -50,7 +50,7 @@ $is_feature_video_responses_enabled = env.PUBLIC_FEATURE_VIDEO_RESPONSES === 'true' $is_feature_affiliate_enabled = env.PUBLIC_FEATURE_AFFILIATE === 'true' $is_feature_apps_enabled = env.PUBLIC_FEATURE_APPS === 'true' - $is_feature_multistream_enabled = env.PUBLIC_FEATURE_MULTISTREAM === 'true' + $is_feature_restream_enabled = env.PUBLIC_FEATURE_RESTREAM === 'true' await handleWebsocket() if (!$category_list.length) { $category_list = imageUrlsJson diff --git a/src/routes/channel/[channelId]/+page.svelte b/src/routes/channel/[channelId]/+page.svelte index 0ae1020b..027c1d50 100644 --- a/src/routes/channel/[channelId]/+page.svelte +++ b/src/routes/channel/[channelId]/+page.svelte @@ -271,9 +271,7 @@ }) } else { // for new users joining the channel - const liveInputs = await get( - `cloudflare/live-inputs?channelId=${$page.params.channelId}` - ) + const liveInputs = await get(`live-inputs?channelId=${$page.params.channelId}`) channel.videoItems = updateVideoItems([...activeGuests], liveInputs) } }