- Inherits:
- Object
- Defined in:
- lib/opentok/streams.rb
Overview
A class for working with OpenTok streams. It includes methods for getting info about OpenTok streams, for setting layout classes for streams, and for muting streams.
Instance Method Summary
-
#all(session_id) ⇒ StreamList
Use this method to get information on all OpenTok streams in a session.
-
#disable_force_mute(session_id) ⇒ Object
Disables the active mute state of the session.
-
#find(session_id, stream_id) ⇒ Stream
Use this method to get information on an OpenTok stream.
-
#force_mute(session_id, stream_id) ⇒ Object
Force a specific stream connected to an OpenTok session to mute itself.
-
#force_mute_all(session_id, opts = {}) ⇒ Object
Force all streams connected to an OpenTok session (except for an optional list of streams), to mute published audio.
-
#layout(session_id, opts) ⇒ Object
Use this method to set the layout of a composed (archive or broadcast) OpenTok stream.
Instance Method Details
#all(session_id) ⇒ StreamList
Use this method to get information on all OpenTok streams in a session.
For example, you can call this method to get information about layout classes used by OpenTok streams. The layout classes define how the stream is displayed in the layout of a live streaming broadcast or a composed archive. For more information, see Assigning layout classes to streams in live streaming broadcasts and Customizing the video layout for composed archives.
#disable_force_mute(session_id) ⇒ Object
Disables the active mute state of the session. After you call this method, new streams published to the session will no longer have audio muted.
After you call the force_mute_all() method, any streams published after the call are published with audio muted. Call the disable_force_mute() method to remove the mute state of a session, so that new published streams are not automatically muted.
#find(session_id, stream_id) ⇒ Stream
Use this method to get information on an OpenTok stream.
For example, you can call this method to get information about layout classes used by an OpenTok stream. The layout classes define how the stream is displayed in the layout of a broadcast stream. For more information, see Assigning layout classes to streams in live streaming broadcasts and Customizing the video layout for composed archives.
#force_mute(session_id, stream_id) ⇒ Object
Force a specific stream connected to an OpenTok session to mute itself.
#force_mute_all(session_id, opts = {}) ⇒ Object
Force all streams connected to an OpenTok session (except for an optional list of streams), to mute published audio.
In addition to existing streams, any streams that are published after the call to this method are published with audio muted. You can remove the mute state of a session by calling the disable_force_mute() method.
This is an optional property. If you omit this property, all streams in the session will be muted.
#layout(session_id, opts) ⇒ Object
Use this method to set the layout of a composed (archive or broadcast) OpenTok stream.
For example, you can call this method to set the layout classes of an OpenTok stream. The layout classes define how the stream is displayed in the layout of a live streaming broadcast or a composed archive. For more information, see Assigning layout classes to streams in live streaming broadcasts and Customizing the video layout for composed archives.
For more information, see Layouthttps://tokbox.com/developer/rest/#change-stream-layout-classes-composed