Skip to content

Commit

Permalink
fix display: none bug
Browse files Browse the repository at this point in the history
Closes #202
  • Loading branch information
k-yle committed Jun 1, 2024
1 parent 6f31b51 commit 9caa675
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- fix: issue where the video was invisible (#202)

## 1.8.0 (2023-10-31)

- feat: update ffmpeg from v4.1 (2018) to v6.0 (2023) to support HEVC streams (#52, #81, #171, #235)
Expand Down
9 changes: 9 additions & 0 deletions browser/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@
lastRx = Date.now();
}
: undefined,

// MutationObserver doesn't always work, see #202
onSourceEstablished: (...args) => {
// eslint-disable-next-line no-param-reassign
options.canvas.style.display = originalDisplay;
resolve(player);
return options?.onSourceEstablished?.(...args);
},

...options,
});

Expand Down

0 comments on commit 9caa675

Please sign in to comment.