-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DEVX-5446 Implement Force Mute feature #233
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@superchilled These methods do not relate to OpenTok connections. They relate to sessions and streams. (You mute streams in a session, not connections.) I propose that we should have the following two methods:
opentok.sessions.forceMuteAll(session_id, opts)
opentok.streams.forceMute(session_id, stream_id,opts)
I'm not a Ruby expert, so please let me know if this makes sense.
@jeffswartz ah, ok. I think I confused connections and streams. In that case, based on the current implementation, I think it would make more sense to define both methods in the Implementing Let me know if you're happy for both these methods to be in the |
# Force all streams connected to an OpenTok session to mute themselves. | ||
# | ||
# @param [String] session_id The session ID of the OpenTok session. | ||
# @param [Hash] opts An optional hash defining options for muting action. For example: | ||
# @option opts [true, false] :active Whether streams published after this call, in | ||
# addition to the current streams in the session, should be muted (true) or not (false). | ||
# @option opts [Array] :excluded_streams The stream IDs for streams that should not be muted. | ||
# This is an optional property. If you omit this property, all streams in the session will be muted. | ||
# @example | ||
# { | ||
# "active": true, | ||
# "excluded_streams": [ | ||
# "excludedStreamId1", | ||
# "excludedStreamId2" | ||
# ] | ||
# } | ||
# | ||
def force_mute_all(session_id, opts = {}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At first, I didn't think the force_mute_all()
method should be in the Streams class, since it applies to all streams in a session, not to a specific stream. But i don't know where else to put it. We don't have an OpenTok::Sessions object. So, I think including it in the Streams class is fine. (Sorry for rambling.)
Description
Implements the force mute feature, either for an individual stream or for all streams in a session. Two methods have been added, one for each of these actions.
Motivation and Context
It implements a feature in the SDK which has already been added to the API.
How Has This Been Tested?
Example Output or Screenshots (if appropriate):
Types of changes
Checklist: