Open Tastyep opened 5 years ago
sorry , I can't run the program in the first line: TypeError: init() missing 1 required positional argument: 'source'
player1 = OMXPlayer(Video1,dbus_name='org.mpris.MediaPlayer2.anyName') player2 = OMXPlayer(Video2,dbus_name='org.mpris.MediaPlayer2.anyName2') player2.pause() sleep(player2.duration()) player2.play()
player1 = OMXPlayer(Video1,dbus_name ='org.mpris.MediaPlayer2.anyName') player2 = OMXPlayer(Video2,dbus_name ='org.mpris.MediaPlayer2.anyName2') player2.pause() sleep(player2.duration()) player2 。玩()
playerN = ... MAX_N?
Feature
Description
Add a default constructor to the OMXPlayer object and allow the user to pass options to the load() method.
Example use case
The example is extremely simplified, the videos should not be played in a loop like this and I don't expect the load() method to be blocking. The idea is simply to not have to recreate a player object every time a video needs to be played.