hydra_source
Load an external image, video, camera, or screen stream into a Hydra slot so it can be used in any visual chain with src().
Instructions
Load an external image stream into s0–s3, then read it in any chain with src(s0).
kind: "image" target = an http(s) URL. It must allow cross-origin use (CORS) or WebGL cannot read it — the error says so. "video" target = an http(s) URL, same CORS rule; loops muted. "cam" target = camera index ("0"). The browser asks for permission: expect state "pending_permission" until someone at the machine clicks Allow, and check hydra_state rather than assuming. "screen" screen capture. Browsers only allow it from a click inside the page, so a remote call usually cannot start it; the error explains. "clear" release the slot.
Returns state: "live" (with the media's size), "pending_permission", or an error. It
waits up to four seconds for the source to actually deliver frames. Images and video
are loaded on mirrors too; cameras and screen capture are not (each would prompt).
Then: src(s0).kaleid(4).out(o1)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| slot | Yes | ||
| target | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |