Autoplay is laggy. Do not know how to fix. Added button for manual play.

main
protsenkovi 8 months ago
parent b0e41e7b54
commit bb3f6ea614

@ -102,7 +102,8 @@
<body> <body>
<div id="cameras" style="display: flex; flex-direction: row;"> <div id="cameras" style="display: flex; flex-direction: row;">
<div id="camera_rgb" class="camera_block"> <div id="camera_rgb" class="camera_block">
<video id="video_rgb" autoplay="true" playsinline="true" class="camera_block" ></video> <button id="start_rgb" onclick="start_rgb()" class="camera_block">Play</button>
<video id="video_rgb" autoplay="false" playsinline="true" class="camera_block" ></video>
</div> </div>
</div> </div>
</body> </body>

@ -11,7 +11,7 @@ from aiortc import RTCPeerConnection, RTCSessionDescription
import cv2 import cv2
import json import json
import time import time
from datetime import datetime
ROOT = "./" ROOT = "./"
@ -64,6 +64,7 @@ async def answer_video(request):
return web.Response(text="Ok") return web.Response(text="Ok")
async def index(request): async def index(request):
print(f"{datetime.now()}, {request.remote}")
content = open(os.path.join(ROOT, "index.html"), "r").read() content = open(os.path.join(ROOT, "index.html"), "r").read()
return web.Response(content_type="text/html", text=content) return web.Response(content_type="text/html", text=content)

Loading…
Cancel
Save