Hi team, I have a project that streams a browser f...
# server-api
s
Hi team, I have a project that streams a browser from backend to client, capturing screenshots via playwright. Unfortunately playwright only supports screenshots so I would have to send a stream of screenshots (30fps in my case). I was wondering if the data channel would be via the API call stream_bytes? Or would there be another approach I can do this to achieve lower latency, closer to video streaming?
r
When I have and agent share screens from playwright I do it as a screenshare instead of data channel.
s
@refined-appointment-81829 are you using playwright on a headless container? Wondering how screenshare works there
r
I have done headless before. Here is one example I put together a while back: https://github.com/yepher/livekit_info/tree/main/examples/browsing_agent
Probably needs to be updated to latest libraries
s
https://github.com/yepher/livekit_info/blob/main/examples/browsing_agent/browser_manager.py#L524-L547 ^ Seems like you are screenshotting and then transforming it to rgba