player icon indicating copy to clipboard operation
player copied to clipboard

Alpine Integration

Open mihar-22 opened this issue 2 years ago • 2 comments

A Alpine JS integration would be really cool. The idea here is exposing the media remote and state to Alpine via the store. This would enable devs to create an entire media player with only HTML.

<media-player x-data="player"> 
  <button aria-label="Play" x-on:pointerup="remote.togglePaused($event.target)">
    <media-icon type="play" x-show="paused"></media-icon>
    <media-icon type="pause" x-show="!paused"></media-icon>    
  </button>
</media-player>

mihar-22 avatar Feb 08 '23 04:02 mihar-22

Would be great, for class bindings/stylings or setting up playlists with source changes, media sync as well. I'll be checking back in again with vidstack in a week or so and happy to provide some feedback then if there is something I can contribute.

josh-tt avatar Feb 08 '23 06:02 josh-tt