From 315222d889d79ec63a1908d14be0f915bbf1cf23 Mon Sep 17 00:00:00 2001 From: Eric McCarthy Date: Thu, 13 Jun 2024 21:04:12 -0700 Subject: [PATCH] testing out bunny.net for video hosting --- src/video-on-demand/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/video-on-demand/index.ts b/src/video-on-demand/index.ts index d611e18..7f7f119 100644 --- a/src/video-on-demand/index.ts +++ b/src/video-on-demand/index.ts @@ -76,7 +76,9 @@ export class VideoOnDemand extends HTMLElement { connectedCallback() { const vod = this.getAttribute('vod') if (!vod) throw new Error('Attribute "vod" is required') - const vodUrl = `https://vod.limulus.net/${vod}` + const vodUrl = window.sessionStorage.getItem('bunny') + ? `https://vod-limulus-net.b-cdn.net/${vod}` + : `https://vod.limulus.net/${vod}` const videoEl = this.shadowRoot!.querySelector('video')! videoEl.setAttribute('poster', `${vodUrl}/poster.jpeg`)