diff --git a/src/remote-room.ts b/src/remote-room.ts index a7dcd55..8240481 100644 --- a/src/remote-room.ts +++ b/src/remote-room.ts @@ -1,6 +1,7 @@ import { get as getStore, writable, type Updater, type Writable } from 'svelte/store'; import { ref, onValue, get, child, update, type DatabaseReference } from 'firebase/database'; import { database } from './firebase'; +import videoExample from './video-example'; export interface RemoteRoomRaw { url: string; @@ -30,7 +31,7 @@ export class RemoteRoom implements Writable { initRoom = initSnapshot.val(); } else { initRoom = { - url: '', + url: videoExample(), paused: true, time: 0, isLocalMode: false, diff --git a/src/video-example.ts b/src/video-example.ts new file mode 100644 index 0000000..a0cf914 --- /dev/null +++ b/src/video-example.ts @@ -0,0 +1,12 @@ +const videos = [ + "https://youtu.be/8Ddhxl2omFc", + "https://youtu.be/XIv97tIImz8", + "https://youtu.be/ARP7zFYUvdg", + "https://youtu.be/W971JmpqWxM", + "https://youtu.be/emrL_OG-br0", + "https://youtu.be/3FE77v-Kclw", +]; + +export default function (): string { + return videos[Math.floor(Math.random() * videos.length)]; +}