Use Vidstack on an Astro Page #1569
Unanswered
nicolatroehler
asked this question in
Q&A
Replies: 2 comments
-
I managed to implement it like this after trying a bunch of things: ---
import 'vidstack/player/styles/default/theme.css'
import 'vidstack/player/styles/default/layouts/video.css'
const { src, title, poster } = Astro.props
---
<script>
import 'vidstack/player'
import 'vidstack/player/layouts/default'
import 'vidstack/player/ui'
</script>
<media-player title={title} src={src} volume={0.2} controls={false} playsInline>
<media-provider>
<media-poster class="vds-poster" src={poster}></media-poster>
</media-provider>
<media-video-layout></media-video-layout>
</media-player> But i don't think is the intended way though |
Beta Was this translation helpful? Give feedback.
0 replies
-
Here's mine:
My JavaScript has a lot of stuff because I'm mainly generating the M3U8 playlists on-the-fly. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to get Vidstack to work as a web component for Astro. This is my code so far, but it's not rendering anything. Does anyone have vidstack implemented successfully on an Astro Page?
Beta Was this translation helpful? Give feedback.
All reactions