diff --git a/frontend/src/components/CourseCard.vue b/frontend/src/components/CourseCard.vue index fcd5bfec..83a601f5 100644 --- a/frontend/src/components/CourseCard.vue +++ b/frontend/src/components/CourseCard.vue @@ -6,7 +6,7 @@ >
{{ course.title }}
@@ -100,7 +100,7 @@ -
+
diff --git a/frontend/src/components/StreamEmbed.vue b/frontend/src/components/StreamEmbed.vue index b425e6b0..fcae5fe5 100644 --- a/frontend/src/components/StreamEmbed.vue +++ b/frontend/src/components/StreamEmbed.vue @@ -92,8 +92,14 @@ const embedUrl = computed(() => { if (!props.channel) return '' if (props.platform === 'twitch') { - const parent = window.location.hostname - return `https://player.twitch.tv/?channel=${props.channel}&parent=${parent}&autoplay=false` + // Twitch requires parent= for every domain the embed runs on. + // Collect unique hostnames: current + localhost fallback + const hosts = new Set() + hosts.add(window.location.hostname || 'localhost') + // Always include localhost so dev server works too + hosts.add('localhost') + const parentParams = [...hosts].map(h => `parent=${h}`).join('&') + return `https://player.twitch.tv/?channel=${props.channel}&${parentParams}&autoplay=false` } if (props.platform === 'youtube') {