Implement video playing functions

This commit is contained in:
Siwat Sirichai 2022-10-26 12:44:58 +07:00
parent 7d1e9f9717
commit c572956e27
1 changed files with 10 additions and 6 deletions

View File

@ -2,6 +2,7 @@ import kuukar_nextion
class lcd:
def __init__(self) -> None:
self.nextion = kuukar_nextion.nextion()
self.nextion.send_command("page home")
def keke_uwu(self):
pass
@ -10,7 +11,7 @@ class lcd:
pass
def keke_hurt(self):
pass
self.play_video("keke_hurt")
def keke_died(self):
pass
@ -19,14 +20,17 @@ class lcd:
pass
def play_video(self,filename: str) -> None:
pass
self.nextion.send_command("page video_player")
self.nextion.send_command("video.path=\"sd0/"+filename+".video\"")
self.nextion.send_command("video.en=1")
def pause_video(self) -> None:
pass
self.nextion.send_command("video.en=2")
def resume_video(self) -> None:
pass
self.nextion.send_command("video.en=1")
def stop_video(self) -> None:
pass
self.nextion.send_command("video.en=0")
self.nextion.send_command("page home")