You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Resolve infinite loading state in Safari with MSE and on-demand stream type (#1257)
Closesmuxinc/devextravaganza#190
### Problem
When using `prefer-playback="mse"` with `stream-type="on-demand"` on
`mux-player`, Safari experienced an infinite loading state.
## Changes
- Added `#hasLoaded` flag that is set to `true` when `loadstart` event
fires
- Only if the element has loaded return the storyboard URL, otherwise
return undefined
## Testing
When using `mux-player` with `prefer-playback="mse"` and
`stream-type="on-demand"` **in Safari**, the video now loads and plays
correctly without getting stuck. Try refreshing the page a couple of
times when testing this to make sure that there are no cache problems.
Code snippets to test:
HTML:
```html
<mux-player
stream-type="on-demand"
prefer-playback="mse"
playback-id="ihZa7qP1zY8oyLSQW9TS602VgwQvNdyIvlk9LInEGU2s"
/>
```
React:
```tsx
<MuxPlayer
streamType="on-demand"
preferPlayback="mse"
playbackId="ihZa7qP1zY8oyLSQW9TS602VgwQvNdyIvlk9LInEGU2s"
/>
```
0 commit comments