MCPcopy Index your code
hub / github.com/pyscript/pyscript / connect_to_device

Function connect_to_device

core/tests/manual/camera.py:19–22  ·  view source on GitHub ↗

Connect to the selected device.

(e)

Source from the content-addressed store, hash-verified

17
18@when("click", "#pick-device")
19async def connect_to_device(e):
20 """Connect to the selected device."""
21 device = devices[devicesSelect.value]
22 video.srcObject = await device.get_stream()
23
24
25@when("click", "#snap")

Callers

nothing calls this directly

Calls 1

get_streamMethod · 0.80

Tested by

no test coverage detected