diff --git a/materialious/src/lib/components/thumbnail/VideoThumbnail.svelte b/materialious/src/lib/components/thumbnail/VideoThumbnail.svelte
index 4ef87838..080ba78d 100644
--- a/materialious/src/lib/components/thumbnail/VideoThumbnail.svelte
+++ b/materialious/src/lib/components/thumbnail/VideoThumbnail.svelte
@@ -15,15 +15,12 @@
VideoBase,
VideoWatchHistory
} from '$lib/api/model';
- import type { PlayerEvents } from '$lib/player';
import {
deArrowEnabledStore,
isAndroidTvStore,
playerSavePlaybackPositionStore,
playerState,
- rawMasterKeyStore,
- syncPartyConnectionsStore,
- syncPartyPeerStore
+ rawMasterKeyStore
} from '$lib/store';
import { relativeTimestamp } from '$lib/time';
import { queueGetWatchHistory } from '$lib/api/backend/historyPool';
@@ -49,12 +46,6 @@
let beenWatched: boolean = $state(false);
- syncPartyPeerStore.subscribe((peer) => {
- if (peer) {
- watchUrl.searchParams.set('sync', peer.id);
- }
- });
-
let progress: string | undefined = $state();
if (get(playerSavePlaybackPositionStore)) {
try {
@@ -136,22 +127,6 @@
function onVideoSelected() {
playerState.set(undefined);
-
- if ($syncPartyConnectionsStore) {
- const events = {
- events: [{ type: 'change-video', videoId: video.videoId }]
- } as PlayerEvents;
-
- if (playlistId) {
- events.events.unshift({
- type: 'playlist',
- playlistId: playlistId
- });
- }
- $syncPartyConnectionsStore.forEach((conn) => {
- conn.send(events);
- });
- }
}
diff --git a/materialious/src/lib/misc.ts b/materialious/src/lib/misc.ts
index 6af2c587..e5aa9b91 100644
--- a/materialious/src/lib/misc.ts
+++ b/materialious/src/lib/misc.ts
@@ -1,7 +1,6 @@
-import { goto, pushState } from '$app/navigation';
+import { goto } from '$app/navigation';
import { resolve } from '$app/paths';
import he from 'he';
-import type Peer from 'peerjs';
import { get } from 'svelte/store';
import { env } from '$env/dynamic/public';
import {
@@ -11,7 +10,6 @@ import {
feedCacheStore,
invidiousInstanceStore,
interfaceAndroidUseNativeShare,
- isAndroidTvStore,
playlistCacheStore,
rawMasterKeyStore,
searchCacheStore
@@ -26,7 +24,6 @@ import type {
VideoBase,
VideoWatchHistory
} from './api/model';
-import { page } from '$app/state';
import { Capacitor } from '@capacitor/core';
import { Share } from '@capacitor/share';
import { Clipboard } from '@capacitor/clipboard';
@@ -68,44 +65,6 @@ export function unsafeRandomItem(array: any[]): any {
return array[Math.floor(Math.random() * array.length)];
}
-export function setWindowQueryFlag(key: string, value: string) {
- page.url.searchParams.set(key, value);
- // eslint-disable-next-line svelte/no-navigation-without-resolve
- pushState(page.url, page.state);
-}
-
-export function removeWindowQueryFlag(key: string) {
- page.url.searchParams.delete(key);
- // eslint-disable-next-line svelte/no-navigation-without-resolve
- pushState(page.url, page.state);
-}
-
-let PeerInstance: typeof Peer;
-export interface PeerInstance {
- host: string;
- path: string;
- port: number;
-}
-
-export function determinePeerJsInstance(): PeerInstance {
- return {
- host: getPublicEnv('DEFAULT_PEERJS_HOST') || '0.peerjs.com',
- path: getPublicEnv('DEFAULT_PEERJS_PATH') || '/',
- port: getPublicEnv('DEFAULT_PEERJS_PORT') ? Number(getPublicEnv('DEFAULT_PEERJS_PORT')) : 443
- };
-}
-
-export async function peerJs(
- id: string,
- instance: PeerInstance = determinePeerJsInstance()
-): Promise