Skip to content

Commit e7182a4

Browse files
feat(present): add audio output (#382)
* feat(present): add audio output This PR adds the necessary audio output to the presenter mode, so it can play audio contained in video files, see #375. However, this does not fix the issue that slides do not contain audio by default, but should be solved by Manim, see #375 for updates on that topic. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix: PR number --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 1dbd2fd commit e7182a4

File tree

3 files changed

+32
-3
lines changed

3 files changed

+32
-3
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[bumpversion]
22
current_version = 5.1.3
33
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(-rc(?P<release>\d+))?
4-
serialize =
4+
serialize =
55
{major}.{minor}.{patch}-rc{release}
66
{major}.{minor}.{patch}
77
commit = True

CHANGELOG.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
<!-- start changelog -->
99

1010
(unreleased)=
11-
## [Unreleased](https://github.com/jeertmans/manim-slides/compare/v5.1.0...HEAD)
11+
## [Unreleased](https://github.com/jeertmans/manim-slides/compare/v5.1.3...HEAD)
12+
13+
(unreleased-added)=
14+
### Added
15+
16+
- Added audio output to `manim-slides present`.
17+
[#382](https://github.com/jeertmans/manim-slides/pull/382)
18+
19+
(v5.1.3)=
20+
## [v5.1.3](https://github.com/jeertmans/manim-slides/compare/v5.1.2...v5.1.3)
21+
22+
(v5.1.3-chore)=
23+
### Chore
24+
25+
- Fix link in documentation.
26+
[#368](https://github.com/jeertmans/manim-slides/pull/368)
27+
28+
- Warn users if not using recommended Qt bindings.
29+
[#373](https://github.com/jeertmans/manim-slides/pull/373)
30+
31+
(v5.1.2)=
32+
## [v5.1.2](https://github.com/jeertmans/manim-slides/compare/v5.1.1...v5.1.2)
33+
34+
(v5.1.2-chore)=
35+
### Chore
36+
37+
- Fix ReadTheDocs version flyout in iframes.
38+
[#367](https://github.com/jeertmans/manim-slides/pull/367)
1239

1340
(v5.1.1)=
1441
## [v5.1.1](https://github.com/jeertmans/manim-slides/compare/v5.1.0...v5.1.1)

manim_slides/present/player.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from qtpy.QtCore import Qt, QTimer, QUrl, Signal, Slot
66
from qtpy.QtGui import QCloseEvent, QIcon, QKeyEvent, QScreen
7-
from qtpy.QtMultimedia import QMediaPlayer
7+
from qtpy.QtMultimedia import QAudioOutput, QMediaPlayer
88
from qtpy.QtMultimediaWidgets import QVideoWidget
99
from qtpy.QtWidgets import (
1010
QHBoxLayout,
@@ -225,12 +225,14 @@ def __init__(
225225
self.icon = QIcon(":/icon.png")
226226
self.setWindowIcon(self.icon)
227227

228+
self.audio_output = QAudioOutput()
228229
self.video_widget = QVideoWidget()
229230
self.video_sink = self.video_widget.videoSink()
230231
self.video_widget.setAspectRatioMode(aspect_ratio_mode)
231232
self.setCentralWidget(self.video_widget)
232233

233234
self.media_player = QMediaPlayer(self)
235+
self.media_player.setAudioOutput(self.audio_output)
234236
self.media_player.setVideoOutput(self.video_widget)
235237
self.playback_rate = playback_rate
236238

0 commit comments

Comments
 (0)