Added embed support
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
export let audioMode = false;
|
||||
export let player: MediaPlayerElement;
|
||||
export let isSyncing: boolean = false;
|
||||
export let isEmbed: boolean = false;
|
||||
|
||||
let src: PlayerSrc = [];
|
||||
let categoryBeingSkipped = '';
|
||||
@@ -279,9 +280,11 @@
|
||||
{/if}
|
||||
</media-player>
|
||||
|
||||
<div class="snackbar" id="sponsorblock-alert">
|
||||
<span
|
||||
>{$_('skipping')}
|
||||
<span class="bold" style="text-transform: capitalize;">{categoryBeingSkipped}</span></span
|
||||
>
|
||||
</div>
|
||||
{#if !isEmbed}
|
||||
<div class="snackbar" id="sponsorblock-alert">
|
||||
<span
|
||||
>{$_('skipping')}
|
||||
<span class="bold" style="text-transform: capitalize;">{categoryBeingSkipped}</span></span
|
||||
>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
+1
-1
@@ -2,8 +2,8 @@
|
||||
import { goto } from '$app/navigation';
|
||||
import { page } from '$app/stores';
|
||||
import PageLoading from '$lib/PageLoading.svelte';
|
||||
import { authStore } from '$lib/store';
|
||||
import { onMount } from 'svelte';
|
||||
import { authStore } from '../../store';
|
||||
|
||||
// Auth response handling for Desktop
|
||||
onMount(() => {
|
||||
+1
-1
@@ -5,12 +5,12 @@
|
||||
import PlaylistThumbnail from '$lib/PlaylistThumbnail.svelte';
|
||||
import Thumbnail from '$lib/Thumbnail.svelte';
|
||||
import { cleanNumber, getBestThumbnail } from '$lib/misc';
|
||||
import { activePageStore, authStore } from '$lib/store';
|
||||
import { Capacitor } from '@capacitor/core';
|
||||
import { onMount } from 'svelte';
|
||||
import { _ } from 'svelte-i18n';
|
||||
import InfiniteLoading, { type InfiniteEvent } from 'svelte-infinite-loading';
|
||||
import { get } from 'svelte/store';
|
||||
import { activePageStore, authStore } from '../../../store';
|
||||
|
||||
export let data;
|
||||
|
||||
+1
-1
@@ -3,12 +3,12 @@
|
||||
import type { VideoPlay } from '$lib/Api/model';
|
||||
import PageLoading from '$lib/PageLoading.svelte';
|
||||
import VideoList from '$lib/VideoList.svelte';
|
||||
import { activePageStore, synciousStore } from '$lib/store';
|
||||
import { error } from '@sveltejs/kit';
|
||||
import { onMount } from 'svelte';
|
||||
import { _ } from 'svelte-i18n';
|
||||
import InfiniteLoading, { type InfiniteEvent } from 'svelte-infinite-loading';
|
||||
import { get } from 'svelte/store';
|
||||
import { activePageStore, synciousStore } from '../../store';
|
||||
|
||||
activePageStore.set('history');
|
||||
|
||||
+1
-1
@@ -3,10 +3,10 @@
|
||||
import type { PlaylistPageVideo } from '$lib/Api/model.js';
|
||||
import VideoList from '$lib/VideoList.svelte';
|
||||
import { cleanNumber, unsafeRandomItem } from '$lib/misc.js';
|
||||
import { activePageStore, playlistSettingsStore } from '$lib/store';
|
||||
import { Capacitor } from '@capacitor/core';
|
||||
import { onMount } from 'svelte';
|
||||
import { _ } from 'svelte-i18n';
|
||||
import { activePageStore, playlistSettingsStore } from '../../../store';
|
||||
|
||||
export let data;
|
||||
|
||||
+1
-1
@@ -1,8 +1,8 @@
|
||||
<script lang="ts">
|
||||
import { deletePersonalPlaylist, getPersonalPlaylists, postPersonalPlaylist } from '$lib/Api';
|
||||
import PlaylistThumbnail from '$lib/PlaylistThumbnail.svelte';
|
||||
import { activePageStore } from '$lib/store';
|
||||
import { _ } from 'svelte-i18n';
|
||||
import { activePageStore } from '../../store';
|
||||
|
||||
export let data;
|
||||
|
||||
+1
-1
@@ -4,9 +4,9 @@
|
||||
import PageLoading from '$lib/PageLoading.svelte';
|
||||
import PlaylistThumbnail from '$lib/PlaylistThumbnail.svelte';
|
||||
import Thumbnail from '$lib/Thumbnail.svelte';
|
||||
import { activePageStore } from '$lib/store';
|
||||
import { _ } from 'svelte-i18n';
|
||||
import InfiniteLoading, { type InfiniteEvent } from 'svelte-infinite-loading';
|
||||
import { activePageStore } from '../../../store';
|
||||
|
||||
export let data;
|
||||
|
||||
+1
-1
@@ -1,9 +1,9 @@
|
||||
<script lang="ts">
|
||||
import { getFeed } from '$lib/Api/index.js';
|
||||
import VideoList from '$lib/VideoList.svelte';
|
||||
import { activePageStore } from '$lib/store';
|
||||
import { _ } from 'svelte-i18n';
|
||||
import InfiniteLoading, { type InfiniteEvent } from 'svelte-infinite-loading';
|
||||
import { activePageStore } from '../../store';
|
||||
|
||||
export let data;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import VideoList from '$lib/VideoList.svelte';
|
||||
import { activePageStore } from '../../store';
|
||||
import { activePageStore } from '$lib/store';
|
||||
|
||||
export let data;
|
||||
|
||||
+6
-6
@@ -16,11 +16,6 @@
|
||||
import Thumbnail from '$lib/Thumbnail.svelte';
|
||||
import { cleanNumber, getBestThumbnail, numberWithCommas, unsafeRandomItem } from '$lib/misc';
|
||||
import type { PlayerEvents } from '$lib/player';
|
||||
import type { DataConnection } from 'peerjs';
|
||||
import { onDestroy, onMount } from 'svelte';
|
||||
import { _ } from 'svelte-i18n';
|
||||
import { get } from 'svelte/store';
|
||||
import type { MediaPlayerElement } from 'vidstack/elements';
|
||||
import {
|
||||
activePageStore,
|
||||
authStore,
|
||||
@@ -32,7 +27,12 @@
|
||||
playlistSettingsStore,
|
||||
syncPartyConnectionsStore,
|
||||
syncPartyPeerStore
|
||||
} from '../../../store';
|
||||
} from '$lib/store';
|
||||
import type { DataConnection } from 'peerjs';
|
||||
import { onDestroy, onMount } from 'svelte';
|
||||
import { _ } from 'svelte-i18n';
|
||||
import { get } from 'svelte/store';
|
||||
import type { MediaPlayerElement } from 'vidstack/elements';
|
||||
|
||||
export let data;
|
||||
|
||||
@@ -8,4 +8,4 @@
|
||||
let player: MediaPlayerElement;
|
||||
</script>
|
||||
|
||||
<Player bind:player {data} />
|
||||
<Player bind:player isEmbed={true} {data} />
|
||||
|
||||
Reference in New Issue
Block a user