Closed neosin closed 3 years ago
@neosin Were you able to figure it out? I need a similar solution for below code.
import eel
import subprocess
@eel.expose
def init_infra():
clone_command = "git clone <url>"
try:
subprocess.check_call(clone_command,shell=True)
#? Capture STDOUT async and pass to a js function below
# eel.rec_output(stdout) #js function
except subprocess.CalledProcessError as e:
print(e.output)
I would like to pass a video stream from python via stdout to a video.js player embedded in an html page in eel.
How do I pass the stdout on the javascript side to the player? I would like to be able to start/stop/pause the stdout stream.
Are there any examples available of how to accomplish such a task? thank you