-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhost.py
More file actions
37 lines (32 loc) · 1.12 KB
/
host.py
File metadata and controls
37 lines (32 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
__docformat__ = "google"
import webview
import backend as player
import time
def initialize():
player.initialize()
player.set_song(0)
player.set_volume(25)
def expose_functions():
window.expose(player.play_song)
window.expose(player.pause_song)
window.expose(player.change_song)
window.expose(player.get_song_current_time_in_milli_seconds)
window.expose(player.get_song_duration_in_milli_seconds)
window.expose(player.set_volume)
window.expose(player.get_current_time)
window.expose(player.get_song_duration)
window.expose(player.toggle_mute)
window.expose(player.get_meta)
window.expose(player.seek_song)
window.expose(player.playback_playlist)
window.expose(player.get_song_list)
window.expose(player.set_song)
window.expose(player.is_playing)
if __name__ == "__main__":
# window = webview.create_window("Emergence", "build/index.html", width=1800, height=960)
window = webview.create_window("Emergence", "build/index.html", width=1360, height=720)
initialize()
time.sleep(0.2)
expose_functions()
time.sleep(0.2)
webview.start(debug=True)