From c39bdbcee8968fe7c7d3c3fb74e9c8aa823ffe39 Mon Sep 17 00:00:00 2001 From: Karl Lingiah Date: Thu, 17 Aug 2023 13:43:27 +0100 Subject: [PATCH] DEVX-6823/DEVX-7080/DEVX-6829/DEVX-6830: Broadcast and Dial updates (#266) * DEVX-6823: updating comments for Sip#dial * DEVX-7080: adding hasAudio & hasVideo to Broadcast * DEVX-6829: adding maxBitRate property to Broadcast * DEVX-6830: adding hlsStatus to Broadcast * Bumping patch version * Updating changelog --- CHANGES.md | 4 ++++ lib/opentok/broadcast.rb | 15 +++++++++++++++ lib/opentok/broadcasts.rb | 16 ++++++++++++---- lib/opentok/sip.rb | 14 ++++++++------ lib/opentok/version.rb | 2 +- 5 files changed, 40 insertions(+), 11 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index fef6abd..e181390 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,7 @@ +# 4.7.1 + +* Updates docs comments for `Broadcasts` and `Sip` [#266](https://github.com/opentok/OpenTok-Ruby-SDK/pull/266) + # 4.7.0 * Adds support for the End-to-end encryption (E2EE) feature [#259](https://github.com/opentok/OpenTok-Ruby-SDK/pull/259) diff --git a/lib/opentok/broadcast.rb b/lib/opentok/broadcast.rb index 97d2bd5..c50ed64 100644 --- a/lib/opentok/broadcast.rb +++ b/lib/opentok/broadcast.rb @@ -19,6 +19,15 @@ module OpenTok # @attr [int] updated_at # For this start method, this timestamp matches the createdAt timestamp. # + # @attr [int] maxBitRate + # The maximum bitrate for the broadcast stream(s), in bits per second. + # + # @attr [boolean] hasAudio + # The broadcast has audio enabled + # + # @attr [boolean] hasVideo + # The broadcast has video enabled + # # @attr [string] resolution # The resolution of the broadcast: either "640x480" (SD landscape, the default), "1280x720" (HD landscape), # "1920x1080" (FHD landscape), "480x640" (SD portrait), "720x1280" (HD portrait), or "1080x1920" (FHD portrait). @@ -33,6 +42,12 @@ module OpenTok # You can include HLS, RTMP, or both as broadcast streams. If you include RTMP streaming, # you can specify up to five target RTMP streams (or just one). # The (:hls) property is set to an empty [Hash] object. The HLS URL is returned in the response. + # The `hlsStatus` property is set to one of the following: + # - "connecting" — The OpenTok server is in the process of starting transcoders. This is the initial state. + # - "ready" — The OpenTok server has succesfully initialized but the CDN is not consuming media. + # - "live" — The OpenTok server has succesfully initialized and the CDN is consuming media. + # - "ended" — The source stream has ended. If DVR is enabled and pre-recorded media is requested, then the status will transition to "live". + # - "error" — There is an error in the OpenTok platform. # The (:rtmp) property is set to an [Array] of Rtmp [Hash] properties. # For each RTMP stream, specify (:serverUrl) for the RTMP server URL, # (:streamName) such as the YouTube Live stream name or the Facebook stream key), diff --git a/lib/opentok/broadcasts.rb b/lib/opentok/broadcasts.rb index e93b311..18699b3 100644 --- a/lib/opentok/broadcasts.rb +++ b/lib/opentok/broadcasts.rb @@ -37,12 +37,16 @@ def initialize(client) # If you do not specify an initial layout type, the broadcast uses the best fit # layout type. # - # @option options [String] :multiBroadcastTag (Optional) Set this to support multiple broadcasts for the same session simultaneously. - # Set this to a unique string for each simultaneous broadcast of an ongoing session. Note that the `multiBroadcastTag` value is *not* included - # in the response for the methods to {https://tokbox.com/developer/rest/#list_broadcasts list live streaming broadcasts} and - # {https://tokbox.com/developer/rest/#get_info_broadcast get information about a live streaming broadcast}. + # @option options [String] :multiBroadcastTag (Optional) Set this to support multiple broadcasts for the same session simultaneously. + # Set this to a unique string for each simultaneous broadcast of an ongoing session. Note that the `multiBroadcastTag` value is *not* included + # in the response for the methods to {https://tokbox.com/developer/rest/#list_broadcasts list live streaming broadcasts} and + # {https://tokbox.com/developer/rest/#get_info_broadcast get information about a live streaming broadcast}. # {https://tokbox.com/developer/guides/broadcast/live-streaming#simultaneous-broadcasts See Simultaneous broadcasts}. # + # @option options [int] maxBitRate + # The maximum bitrate for the broadcast stream(s), in bits per second. + # The minimum value is 100,000 and the maximum is 6,000,000. + # # @option options [int] maxDuration # The maximum duration for the broadcast, in seconds. The broadcast will automatically stop when # the maximum duration is reached. You can set the maximum duration to a value from 60 (60 seconds) to 36000 (10 hours). @@ -95,6 +99,10 @@ def initialize(client) # on {https://tokbox.com/developer/guides/archive-broadcast-layout/#stream-prioritization-rules stream prioritization rules}. # Important: this feature is currently available in the Standard environment only. # + # @option options [Boolean] :hasAudio Whether the broadcast has audio (default `true`) + # + # @option options [Boolean] :hasVideo Whether the broadcast has video (default `true`) + # # @return [Broadcast] The broadcast object, which includes properties defining the broadcast, # including the broadcast ID. # diff --git a/lib/opentok/sip.rb b/lib/opentok/sip.rb index 592213e..22506ae 100644 --- a/lib/opentok/sip.rb +++ b/lib/opentok/sip.rb @@ -38,13 +38,15 @@ class Sip # @option opts [true, false] :secure Whether the media must be transmitted # encrypted (​true​) or not (​false​, the default). # @option opts [true, false] :video Whether the SIP call will include - # video (​true​) or not (​false​, the default). With video included, the SIP - # client's video is included in the OpenTok stream that is sent to the - # OpenTok session. The SIP client will receive a single composed video of - # the published streams in the OpenTok session. + # video (​true​) or not (​false​, the default). With video included, the SIP + # client's video is included in the OpenTok stream that is sent to the + # OpenTok session. The SIP client will receive a single composed video of + # the published streams in the OpenTok session. # @option opts [true, false] :observe_force_mute Whether the SIP end point - # observes {https://tokbox.com/developer/guides/moderation/#force_mute force mute moderation} - # (true) or not (false, the default). + # observes {https://tokbox.com/developer/guides/moderation/#force_mute force mute moderation} + # (true) or not (false, the default). + # @option opts [Array] :streams An array of stream IDs for streams to include in the SIP call. + # If you do not set this property, all streams in the session are included in the call. def dial(session_id, token, sip_uri, opts) response = @client.dial(session_id, token, sip_uri, opts) end diff --git a/lib/opentok/version.rb b/lib/opentok/version.rb index be1ffff..faf23df 100644 --- a/lib/opentok/version.rb +++ b/lib/opentok/version.rb @@ -1,4 +1,4 @@ module OpenTok # @private - VERSION = '4.7.0' + VERSION = '4.7.1' end