Remove automatic playback in AudioPlayer constructor
This commit is contained in:
@@ -4,7 +4,6 @@ from typing import Callable
|
|||||||
class AudioPlayer:
|
class AudioPlayer:
|
||||||
def __init__(self, file_path: str, loop: bool = False):
|
def __init__(self, file_path: str, loop: bool = False):
|
||||||
self.current_stop_function: Callable[[], None] | None = None
|
self.current_stop_function: Callable[[], None] | None = None
|
||||||
self.play(file_path, loop)
|
|
||||||
def play(self, file_path: str, loop: bool = False):
|
def play(self, file_path: str, loop: bool = False):
|
||||||
"""Play the specified audio file, stopping any currently playing audio."""
|
"""Play the specified audio file, stopping any currently playing audio."""
|
||||||
self.stop() # Stop any currently playing audio
|
self.stop() # Stop any currently playing audio
|
||||||
|
|||||||
Reference in New Issue
Block a user