From aa428deccca8ce1555c4876f817765c28263856f Mon Sep 17 00:00:00 2001 From: Itrio <15737258+itsitrio@users.noreply.github.com> Date: Sat, 1 Jun 2024 16:57:04 -0700 Subject: [PATCH] Add a MoistDogTV Tab --- backend/templates/live.twig | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/backend/templates/live.twig b/backend/templates/live.twig index 382d490..f334d59 100644 --- a/backend/templates/live.twig +++ b/backend/templates/live.twig @@ -16,10 +16,18 @@ if (twitchEmbed) { twitchEmbed.pause(); } + if (moistEmbed) { + moistEmbed.pause(); + } + $('#html5video')[0].play(); } else if (currentTab === '#twitch') { $('#html5video')[0].pause(); + if (moistEmbed) { + moistEmbed.pause(); + } + if (twitchEmbed) { twitchEmbed.play(); @@ -31,6 +39,23 @@ autoplay: true }); } + } else if (currentTab === '#moist-dog') { + $('#html5video')[0].pause(); + + if (twitchEmbed) { + twitchEmbed.pause(); + } + + if (moistEmbed) { + moistEmbed.play(); + } else { + moistEmbed = new Twitch.Embed("moist-dog-embed", { + width: "100%", + height: 480, + channel: "moistdogtv", + autoplay: true + }); + } } }); }); @@ -53,7 +78,13 @@