updated with audio
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from kivy.config import Config
|
||||
Config.set('kivy', 'video', 'ffpyplayer') # Set ffpyplayer as the video provider
|
||||
Config.set('kivy', 'video', 'ffpyplayer')
|
||||
Config.set('ffpyplayer', 'audio', 'on') # Enable audio
|
||||
|
||||
from kivy.app import App
|
||||
from kivy.uix.screenmanager import ScreenManager, Screen # Import ScreenManager and Screen for managing screens
|
||||
@@ -13,7 +14,7 @@ from kivy.animation import Animation # Import Animation for fade effects
|
||||
import os # Import os for file and directory operations
|
||||
import json # Import json for handling JSON data
|
||||
import datetime # Import datetime for timestamping logs
|
||||
import subprocess
|
||||
import subprocess
|
||||
|
||||
# Import functions from python_functions.py
|
||||
from python_functions import load_playlist, download_media_files, clean_unused_files
|
||||
@@ -165,6 +166,7 @@ class MediaPlayer(Screen):
|
||||
# Set the video source and start playback
|
||||
self.video_player.source = file_path
|
||||
self.video_player.state = 'play' # Start playing the video
|
||||
self.video_player.audio = True # Enable audio playback
|
||||
self.video_player.opacity = 1 # Ensure the video is fully visible
|
||||
self.image_display.opacity = 0 # Hide the image display
|
||||
|
||||
|
||||
Reference in New Issue
Block a user