Skip to content

Commit

Permalink
testing out bunny.net for video hosting
Browse files Browse the repository at this point in the history
  • Loading branch information
limulus committed Jun 14, 2024
1 parent b654d1e commit 315222d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/video-on-demand/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<HTMLVideoElement>('video')!
videoEl.setAttribute('poster', `${vodUrl}/poster.jpeg`)
Expand Down

0 comments on commit 315222d

Please sign in to comment.