Skip to content

Commit

Permalink
fix(player): vimeo video freezes on loop when out of viewport
Browse files Browse the repository at this point in the history
closes #1245
  • Loading branch information
mihar-22 committed Jul 19, 2024
1 parent 12c5c3f commit 3de2980
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/vidstack/src/core/state/media-state-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,7 @@ export class MediaStateManager extends MediaPlayerController {
if (loop()) {
setTimeout(() => {
requestAnimationFrame(() => {
this._resetPlaybackIfNeeded(event);
this.dispatch('media-loop-request', { trigger: event });
});
}, 10);
Expand Down

0 comments on commit 3de2980

Please sign in to comment.