A group wants to stream videos, with the presenter selecting the movies to watch, controlling the play/pause, and seeking interesting moments. These events will be broadcast by the presenter: Choice of video
For example, for going to a video moment, on the instruction of the presenter, private function process_goto($data) { $moment = $data['moment]; $this->dispatchBrowserEvent('goto-moment', ['moment' => $moment]); }
For example, for going to a moment and for switching videos, Exit fullscreen mode #presenter-interface Presenter Interface
Play and pause on the video element are sent from Alpine.js using, Livewire.emit('play'); Livewire.emit('pause'); Exit fullscreen mode and when going to some moment in the video, Livewire.emit('seek', { 'moment': $this.refs.video.currentTime }); Exit fullscreen mode