vidstack / player

UI components and hooks for building video/audio players on the web. Robust, customizable, and accessible. Modern alternative to JW Player and Video.js.
https://vidstack.io
MIT License
1.89k stars 114 forks source link

Can't start video with YouTube provider when autoplay request fails #1325

Open DerStimmler opened 3 days ago

DerStimmler commented 3 days ago

Current Behavior:

When I enable autoPlay, use the HLS provider and reload a page with a video on it, the autoplay request fails as expected because of the browsers autoplay policy. Also corresponding events are triggered and errors are written to the console. image But it's still possible to click on the play button to start the video manually.

However when I use the YouTube provider, again the autoplay request fails but no events are triggered nor something is written to console. Also the player stays in the loading state and I can't click the play button to start the video manually.

Expected Behavior:

YouTube provider should have same behavior like HLS provider when autoplay fails. It should still be possible to start the video manually.

Steps To Reproduce:

  1. Enable autoplay
  2. Set a YouTube video as player source
  3. Reload the page

Environment:

DerStimmler commented 3 days ago

maybe related to #1316