Tungsten v0.1.0 Tungsten.CDP.Cast View Source

Cast

A domain for interacting with Cast, Presentation API, and Remote Playback API functionalities.

Link to this section Summary

Link to this section Functions

Link to this function

disable(session, parameters \\ %{}, options \\ []) View Source
disable(GenServer.server(), map(), Tungsten.Connection.exec_options()) ::
  {:ok, map()} | {:error, term()}

Cast.disable

Stops observing for sinks and issues.

Link to this function

enable(session, parameters \\ %{}, options \\ []) View Source
enable(
  GenServer.server(),
  %{optional(:presentation_url) => String.t()},
  Tungsten.Connection.exec_options()
) :: {:ok, map()} | {:error, term()}

Cast.enable

Starts observing for sinks that can be used for tab mirroring, and if set, sinks compatible with |presentationUrl| as well. When sinks are found, a |sinksUpdated| event is fired. Also starts observing for issue messages. When an issue is added or removed, an |issueUpdated| event is fired.

Link to this function

set_sink_to_use(session, parameters, options \\ []) View Source
set_sink_to_use(
  GenServer.server(),
  %{sink_name: String.t()},
  Tungsten.Connection.exec_options()
) :: {:ok, map()} | {:error, term()}

Cast.setSinkToUse

Sets a sink to be used when the web page requests the browser to choose a sink via Presentation API, Remote Playback API, or Cast SDK.

Link to this function

start_tab_mirroring(session, parameters, options \\ []) View Source
start_tab_mirroring(
  GenServer.server(),
  %{sink_name: String.t()},
  Tungsten.Connection.exec_options()
) :: {:ok, map()} | {:error, term()}

Cast.startTabMirroring

Starts mirroring the tab to the sink.

Link to this function

stop_casting(session, parameters, options \\ []) View Source
stop_casting(
  GenServer.server(),
  %{sink_name: String.t()},
  Tungsten.Connection.exec_options()
) :: {:ok, map()} | {:error, term()}

Cast.stopCasting

Stops the active Cast session on the sink.