.. _node-browser-input: ``BrowserInput`` ================ :bdg-primary:`source` :bdg-secondary-line:`extra: browser-input` Receive the messages that the web page hosting the pipeline hands over. :Node type: ``BrowserInput`` :Input: -- :Output: ``AudioPayload``, ``ImagePayload``, ``BytesPayload`` or ``ObjectPayload`` :Extra: ``browser-input`` .. code-block:: console $ pip install "juturna-nodes[browser-input]" The node runs only in a Pyodide Worker, with the browser transport of juturna. The host calls ``feed()`` with a message in the wire format of ``juturna.transport.browser._io`` (a JS object ``{kind, payload, meta}``), and the node puts the decoded message on its own queue. ``feed()`` blocks when the queue is full, so it must be invoked through ``.callPromising()``. How it works ------------ .. include:: browser_input.readme1.inc :parser: myst_parser.sphinx_ Arguments --------- .. include:: browser_input.readme2.inc :parser: myst_parser.sphinx_ Input message ------------- .. include:: browser_input.readme3.inc :parser: myst_parser.sphinx_ Output message -------------- .. include:: browser_input.readme4.inc :parser: myst_parser.sphinx_ License ------- .. include:: browser_input.readme5.inc :parser: myst_parser.sphinx_ Configuration ------------- Default node arguments, as defined in the node ``config.toml`` file. Any of them can be overridden in the node ``configuration`` of a pipeline. .. literalinclude:: ../../../../juturna_nodes/src/juturna/nodes/_browser_input/config.toml :language: toml Pipeline usage -------------- .. code-block:: json { "name": "browser_input", "type": "BrowserInput", "configuration": {} } Reference --------- .. autoclass:: juturna.nodes._browser_input.browser_input.BrowserInput :no-index: