Skip to content

Commit c6c4ea6

Browse files
albertocasagrandepre-commit-ci[bot]jeertmans
authored
fix(player): use absolute path for video files (#575)
* Fixed #574 - manim-slides player now uses absolute paths for video * Updated CHANGELOG.md * chore(fmt): auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Minor changes --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jérome Eertmans <[email protected]>
1 parent 3034ce0 commit c6c4ea6

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2525
- Update the template in the *Customize your RevealJS slides* section.
2626
[#565](https://github.com/jeertmans/manim-slides/pull/565)
2727

28+
(unreleased-fixed)=
29+
### Fixed
30+
31+
- Fixed black videos on macOS (Qt player) by forcing absolute paths for video files.
32+
[@albertocasagrande](https://github.com/albertocasagrande) [#575](https://github.com/jeertmans/manim-slides/pull/575)
33+
2834
(v5.5.2)=
2935
## [v5.5.2](https://github.com/jeertmans/manim-slides/compare/v5.5.1...v5.5.2)
3036

manim_slides/present/player.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ def playing_reversed_slide(self, playing_reversed_slide: bool) -> None:
390390
"""
391391

392392
def load_current_media(self, start_paused: bool = False) -> None:
393-
url = QUrl.fromLocalFile(str(self.current_file))
393+
url = QUrl.fromLocalFile(str(self.current_file.resolve(strict=True)))
394394
self.media_player.setSource(url)
395395

396396
if self.playing_reversed_slide:
@@ -475,7 +475,7 @@ def slide_changed_callback(self) -> None:
475475

476476
def preview_next_slide(self) -> None:
477477
if slide_config := self.next_slide_config:
478-
url = QUrl.fromLocalFile(str(slide_config.file))
478+
url = QUrl.fromLocalFile(str(slide_config.file.resolve(strict=True)))
479479
self.info.next_media_player.setSource(url)
480480
self.info.next_media_player.play()
481481

0 commit comments

Comments
 (0)