Skip to content

Commit

Permalink
example/pyqtvlc.py aesthetics (#286)
Browse files Browse the repository at this point in the history
* init audio with non_zero value (pyqt5vlc.py)
* add shortcuts to example/pyqt5vlc.py
  • Loading branch information
sykacek authored Nov 3, 2024
1 parent e5d62f7 commit 564f63d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion examples/pyqt5vlc.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def __init__(self, master=None):

# Create an empty vlc media player
self.mediaplayer = self.instance.media_player_new()
self.mediaplayer.audio_set_volume(50)

self.create_ui()
self.is_paused = False
Expand Down Expand Up @@ -104,8 +105,13 @@ def create_ui(self):

# Add actions to file menu
open_action = QtWidgets.QAction("Load Video", self)
close_action = QtWidgets.QAction("Close App", self)
open_shortcut = QtGui.QKeySequence(QtGui.QKeySequence.StandardKey.Open)
open_action.setShortcut(open_shortcut)
file_menu.addAction(open_action)

close_action = QtWidgets.QAction("Close App", self)
close_shortcut = QtGui.QKeySequence(QtGui.QKeySequence.StandardKey.Close)
close_action.setShortcut(close_shortcut)
file_menu.addAction(close_action)

open_action.triggered.connect(self.open_file)
Expand Down

0 comments on commit 564f63d

Please sign in to comment.