{"id":19845476,"url":"https://github.com/opentok/opentok-ruby-sdk","last_synced_at":"2025-05-16T07:05:27.966Z","repository":{"id":3453288,"uuid":"4506899","full_name":"opentok/OpenTok-Ruby-SDK","owner":"opentok","description":"OpenTok Server SDK for Ruby","archived":false,"fork":false,"pushed_at":"2025-03-23T02:48:43.000Z","size":1025,"stargazers_count":110,"open_issues_count":11,"forks_count":119,"subscribers_count":60,"default_branch":"main","last_synced_at":"2025-05-10T06:06:02.204Z","etag":null,"topics":["opentok","opentok-ruby-sdk","ruby","sdk","tokbox"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opentok.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-05-31T11:30:55.000Z","updated_at":"2025-02-07T15:39:40.000Z","dependencies_parsed_at":"2024-01-03T13:32:02.271Z","dependency_job_id":"979b7b24-69af-433b-9c51-fcfa4c39f474","html_url":"https://github.com/opentok/OpenTok-Ruby-SDK","commit_stats":{"total_commits":443,"total_committers":42,"mean_commits":"10.547619047619047","dds":0.7720090293453725,"last_synced_commit":"bd5a5b2505d4ba935026a68070d11781915b4922"},"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentok%2FOpenTok-Ruby-SDK","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentok%2FOpenTok-Ruby-SDK/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentok%2FOpenTok-Ruby-SDK/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentok%2FOpenTok-Ruby-SDK/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opentok","download_url":"https://codeload.github.com/opentok/OpenTok-Ruby-SDK/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254485060,"owners_count":22078767,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["opentok","opentok-ruby-sdk","ruby","sdk","tokbox"],"created_at":"2024-11-12T13:08:01.410Z","updated_at":"2025-05-16T07:05:22.950Z","avatar_url":"https://github.com/opentok.png","language":"Ruby","readme":"# OpenTok Ruby SDK\n\n![Coverage Status](https://github.com/opentok/OpenTok-Ruby-SDK/workflows/CI/badge.svg)\n[![codecov](https://codecov.io/gh/opentok/OpenTok-Ruby-SDK/branch/master/graph/badge.svg)](https://codecov.io/gh/opentok/opentok-ruby-sdk)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)\n\n\u003cimg src=\"https://assets.tokbox.com/img/vonage/Vonage_VideoAPI_black.svg\" height=\"48px\" alt=\"Tokbox is now known as Vonage\" /\u003e\n\nThe OpenTok Ruby SDK provides methods for:\n\n* Generating [sessions](https://tokbox.com/developer/guides/create-session/) and\n  [tokens](https://tokbox.com/developer/guides/create-token/) for\n  [OpenTok](https://www.vonage.com/communications-apis/video/) applications\n* Working with OpenTok [archives](https://tokbox.com/developer/guides/archiving)\n* Working with OpenTok [live streaming broadcasts](https://tokbox.com/developer/guides/broadcast/live-streaming/)\n* Working with OpenTok [SIP interconnect](https://tokbox.com/developer/guides/sip)\n* [Sending signals to clients connected to a session](https://tokbox.com/developer/guides/signaling/)\n* [Disconnecting clients from sessions](https://tokbox.com/developer/guides/moderation/rest/)\n* [Forcing clients in a session to disconnect or mute published audio](https://tokbox.com/developer/guides/moderation/)\n* Working with OpenTok [Experience Composers](https://tokbox.com/developer/guides/experience-composer)\n* Working with OpenTok [Audio Connector](https://tokbox.com/developer/guides/audio-connector)\n\n## Note!\n\nThis library is designed to work with the Tokbox/OpenTok platform, part of the Vonage Video API. If you are looking to use the Vonage Video API and using the Vonage Customer Dashboard, you will want to install the [Vonage Server SDK for Ruby](https://github.com/Vonage/vonage-ruby-sdk), which includes support for the Vonage Video API.\n\nNot sure which exact platform you are using? Take a look at [this guide](https://api.support.vonage.com/hc/en-us/articles/10817774782492).\n\nIf you are using the Tokbox platform, do not worry! The Tokbox platform is not going away, and this library will continue to be updated. While we encourage customers to check out the new Unified platform, there is no rush to switch. Both platforms run the exact same infrastructure and capabilities, with the main difference is a unified billing interface and easier access to [Vonage’s other CPaaS APIs](https://www.vonage.com/communications-apis/).\n\nIf you are new to the Vonage Video API, head on over to the [Vonage Customer Dashboard](https://dashboard.vonage.com) to sign up for a developer account and check out the [Vonage Server SDK for Ruby](https://github.com/Vonage/vonage-ruby-sdk). \n\n## Installation\n\n### Bundler (recommended):\n\nBundler helps manage dependencies for Ruby projects. Find more info here: \u003chttp://bundler.io\u003e\n\nAdd this gem to your `Gemfile`:\n\n```ruby\ngem \"opentok\", \"~\u003e 4.0.0\"\n```\n\nAllow bundler to install the change.\n\n```\n$ bundle install\n```\n\n### RubyGems:\n\n```\n$ gem install opentok\n```\n\n## Usage\n\n### Initializing\n\nLoad the gem at the top of any file where it will be used. Then initialize an `OpenTok::OpenTok`\nobject with your OpenTok API key and API secret.\n\n```ruby\nrequire \"opentok\"\n\nopentok = OpenTok::OpenTok.new api_key, api_secret\n```\n\n#### Initialization Options\n\n**Custom Timeout**\n\nYou can specify a custom timeout value for HTTP requests when initializing a new `OpenTok::OpenTok`\nobject:\n\n```ruby\nrequire \"opentok\"\n\nopentok = OpenTok::OpenTok.new api_key, api_secret, :timeout_length =\u003e 10\n```\n\nThe value for `:timeout_length` is an integer representing the number of seconds to wait for an HTTP\nrequest to complete. The default is set to 2 seconds.\n\n**UA Addendum**\n\nYou can also append a custom string to the `User-Agent` header value for HTTP requests when initializing a new `OpenTok::OpenTok`\nobject:\n\n```ruby\nrequire \"opentok\"\n\nopentok = OpenTok::OpenTok.new api_key, api_secret, :ua_addendum =\u003e 'FOO'\n```\n\nThe above would generate a `User-Agent` header something like this:\n\n```\nUser-Agent: OpenTok-Ruby-SDK/4.6.0-Ruby-Version-3.1.2-p20 FOO\n```\n\n### Creating Sessions\n\nTo create an OpenTok Session, use the `OpenTok#create_session(properties)` method.\nThe `properties` parameter is an optional Hash used to specify the following:\n\n- Whether the session uses the [OpenTok Media\n  Router](https://tokbox.com/developer/guides/create-session/#media-mode),\n  which is required for some OpenTok features (such as archiving)\n\n- A location hint for the OpenTok server.\n\n- Whether the session is automatically archived.\n\nThe `session_id` method of the returned `OpenTok::Session` instance is useful to\nget a sessionId that can be saved to a persistent store (such as a database).\n\n```ruby\n# Create a session that will attempt to transmit streams directly between clients.\n# If clients cannot connect, the session uses the OpenTok TURN server:\nsession = opentok.create_session\n\n# A session that will use the OpenTok Media Server:\nsession = opentok.create_session :media_mode =\u003e :routed\n\n# A session with a location hint:\nsession = opentok.create_session :location =\u003e '12.34.56.78'\n\n# A session with automatic archiving (must use the routed media mode):\nsession = opentok.create_session :archive_mode =\u003e :always, :media_mode =\u003e :routed\n\n# A session with end-to-end encryption (must use the routed media mode):\nsession = opentok.create_session :e2ee =\u003e true, :media_mode =\u003e :routed\n\n# Store this sessionId in the database for later use:\nsession_id = session.session_id\n```\n\n### Generating Tokens\n\nOnce a Session is created, you can start generating Tokens for clients to use when connecting to it.\nYou can generate a token either by calling the `opentok.generate_token(session_id, options)` method,\nor by calling the `Session#generate_token(options)` method on the instance after creating it. The\n`options` parameter is an optional Hash used to set the role, expire time, and connection data of\nthe Token. For layout control in archives and broadcasts, the initial layout class list of streams\npublished from connections using this token can be set as well.\n\n```ruby\n## Generate a Token from just a session_id (fetched from a database)\ntoken = opentok.generate_token session_id\n\n# Generate a Token by calling the method on the Session (returned from createSession)\ntoken = session.generate_token\n\n# Set some options in a token\ntoken = session.generate_token({\n    :role        =\u003e :moderator,\n    :expire_time =\u003e Time.now.to_i+(7 * 24 * 60 * 60), # in one week\n    :data        =\u003e 'name=Johnny',\n    :initial_layout_class_list =\u003e ['focus', 'inactive']\n});\n```\n\n### Working with Streams\n\nUse this method to get information for an OpenTok stream or for all streams in a session.\nFor example, you can call this method to get information about layout classes used by an\nOpenTok stream.\n\nTo get information of a specific stream in a session, call\n`opentok.streams.find(session_id, stream_id)`. The return object is a `Stream` object and\nyou can access various stream properties as shown in the following example (using RSpec notations):\n\n```ruby\nexpect(stream).to be_an_instance_of OpenTok::Stream\nexpect(stream.videoType).to eq 'camera'\nexpect(stream.layoutClassList.count).to eq 1\nexpect(stream.layoutClassList.first).to eq \"full\"\n```\n\nTo get information on all streams in a session, call `opentok.streams.all(session_id)`.\nThe return value is a `StreamList` object:\n\n```ruby\nexpect(all_streams).to be_an_instance_of OpenTok::StreamList\nexpect(all_streams.total).to eq 2\nexpect(all_streams[0].layoutClassList[1]).to eq \"focus\"\n```\n\n### Working with Archives\n\nYou can only archive sessions that use the OpenTok Media Router\n(sessions with the media mode set to routed).\n\nYou can start the recording of an OpenTok Session using the `opentok.archives.create(session_id, options)` method. This will return an `OpenTok::Archive` instance. The parameter `options` is an\noptional Hash used to set the `has_audio`, `has_video`, and `name` options. Note that you can\nonly start an Archive on a Session that has clients connected.\n\n```ruby\n# Create an Archive\narchive = opentok.archives.create session_id\n\n# Create a named Archive\narchive = opentok.archives.create session_id :name =\u003e \"Important Presentation\"\n\n# Create an audio-only Archive\narchive = opentok.archives.create session_id :has_video =\u003e false\n\n# Store this archive_id in the database for later use\narchive_id = archive.id\n```\n\nSetting the `:output_mode` option to `:individual` setting causes each stream in the archive\nto be recorded to its own individual file:\n\n```ruby\narchive = opentok.archives.create session_id :output_mode =\u003e :individual\n```\n\nThe `:output_mode =\u003e :composed` setting (the default) causes all streams in the archive to be\nrecorded to a single (composed) file.\n\nFor composed archives you can set the resolution of the archive, either \"640x480\"\n(SD landscape, the default), \"1280x720\" (HD landscape), \"1920x1080\" (FHD landscape),\n\"480x640\" (SD portrait), \"720x1280\" (HD portrait), or \"1080x1920\" (FHD portrait).\nThe `resolution` parameter is optional and could be included in the options\nhash (second argument) of the `opentok.archives.create()` method.\n\n```ruby\nopts = {\n    :output_mode =\u003e :composed,\n    :resolution =\u003e \"1280x720\"\n}\n\narchive = opentok.archives.create session_id, opts\n```\n\nTo customize the initial layout of composed archives, you can use the `:layout` option.\nSet this to a hash containing two keys: `:type` and `:stylesheet`. Valid values for\n`:type` are \"bestFit\" (best fit), \"custom\" (custom), \"horizontalPresentation\"\n(horizontal presentation), \"pip\" (picture-in-picture), and \"verticalPresentation\"\n(vertical presentation)). If you specify a \"custom\" layout type, set the `:stylesheet`\nkey to the stylesheet (CSS). (For other layout types, do not set the `:stylesheet` key.)\n\n```ruby\nopts = {\n    :output_mode =\u003e :composed,\n    :resolution =\u003e \"1280x720\",\n    :layout =\u003e {\n      :type =\u003e \"custom\",\n      :stylesheet =\u003e \"stream:last-child{display: block;margin: 0;top: 0;left: 0;width: 1px;height: 1px;}stream:first-child{display: block;margin: 0;top: 0;left: 0;width: 100%;height: 100%;}\"\n    }\n}\n\narchive = opentok.archives.create session_id, opts\n```\n\nIf you do not specify an initial layout type, the archive uses the best fit\nlayout type. For more information, see [Customizing the video layout for composed\narchives](https://tokbox.com/developer/guides/archiving/layout-control.html).\n\nYou can stop the recording of a started Archive using the `opentok.archives.stop_by_id(archive_id)`\nmethod. You can also do this using the `Archive#stop()` method.\n\n```ruby\n# Stop an Archive from an archive_id (fetched from database)\nopentok.archives.stop_by_id archive_id\n\n# Stop an Archive from an instance (returned from opentok.archives.create)\narchive.stop\n```\n\nTo get an `OpenTok::Archive` instance (and all the information about it) from an `archive_id`, use\nthe `opentok.archives.find(archive_id)` method.\n\n```ruby\narchive = opentok.archives.find archive_id\n```\n\nTo delete an Archive, you can call the `opentok.archives.delete_by_id(archive_id)` method or the\n`delete` method of an `OpenTok::Archive` instance.\n\n```ruby\n# Delete an Archive from an archive_id (fetched from database)\nopentok.archives.delete_by_id archive_id\n\n# Delete an Archive from an Archive instance (returned from archives.create, archives.find)\narchive.delete\n```\n\nYou can also get a list of all the Archives you've created (up to 1000) with your API Key. This is\ndone using the `opentok.archives.all(options)` method. The parameter `options` is an optional Hash\nused to specify an `:offset` and `:count` to help you paginate through the results. This will return\nan instance of the `OpenTok::ArchiveList` class.\n\n```ruby\narchive_list = opentok.archives.all\n\n# Get an specific Archive from the list\narchive_list[i]\n\n# Get the total number of Archives for this API Key\n$total = archive_list.total\n```\n\nNote that you can also create an automatically archived session, by passing in `:always`\nas the `:archive_mode` property of the `options` parameter passed into the\n`OpenTok#create_session()` method (see \"Creating Sessions,\" above).\n\nYou can set the [layout](https://tokbox.com/developer/rest/#change_composed_archive_layout) of an archive:\n\n```ruby\nopts = { :type =\u003e \"verticalPresentation\" }\nopentok.archives.layout(archive_id, opts)\n```\n\nThe hash `opts` has two entries:\n\n- The `type` is the layout type for the archive. Valid values are \"bestFit\" (best fit)\n  \"custom\" (custom), \"horizontalPresentation\" (horizontal presentation),\n  \"pip\" (picture-in-picture), and \"verticalPresentation\" (vertical presentation)).\n\n- If you specify a \"custom\" layout type, set the `stylesheet` property.\n  (For other layout types, do not set the stylesheet property.)\n\nSee [Customizing the video layout for composed archives](https://tokbox.com/developer/guides/archiving/layout-control.html)\nfor more details.\n\nYou can set the initial layout class for a client's streams by setting the layout option when you\ncreate the token for the client, using the `opentok.generate_token` method. And you can also change\nthe layout classes of a stream as follows:\n\n```ruby\nstreams_list = {\n    :items =\u003e [\n        {\n            :id =\u003e \"8b732909-0a06-46a2-8ea8-074e64d43422\",\n            :layoutClassList =\u003e [\"full\"]\n        },\n        {\n            :id =\u003e \"8b732909-0a06-46a2-8ea8-074e64d43423\",\n            :layoutClassList =\u003e [\"full\", \"focus\"]\n        }\n    ]\n}\nresponse = opentok.streams.layout(session_id, streams_list)\n```\n\nFor more information on setting stream layout classes, see the\n[Changing the composed archive layout classes for an OpenTok\nstream](https://tokbox.com/developer/rest/#change-stream-layout-classes-composed).\n\nPlease keep in mind that the `streams.layout` method applies to archive and broadcast streams only.\n\nFor more information on archiving, see the\n[OpenTok archiving](/developer/guides/archiving/) developer guide.\n\n### Signaling\n\nYou can send a signal using the `opentok.signals.send(session_id, connection_id, opts)` method.\nIf `connection_id` is nil or an empty string, then the signal is send to all valid connections in\nthe session.\n\nAn example of `opts` field can be as follows:\n\n```ruby\nopts = { :type =\u003e \"chat\",\n         :data =\u003e \"Hello\"\n}\n```\n\nThe maximum length of the `type` string is 128 bytes, and it must contain only letters\n(A-Z and a-z), numbers (0-9), '-', '\\_', and '~'.\n\nThe `data` string must not exceed the maximum size (8 kB).\n\nThe `connection_id` and `opts` parameter are jointly optional by default. Hence you can also\nuse `opentok.signals.send(session_id)`\n\nFor more information on signaling, see the\n[OpenTok Signaling](https://tokbox.com/developer/guides/signaling/js/) programming guide.\n\n### Broadcasting\n\nYou can broadcast your streams to a HLS or RTMP servers.\n\nTo successfully start broadcasting a session, at least one publishing client must be connected to\nthe session.\n\nThe live streaming broadcast can target one HLS endpoint and up to five RTMP servers simultaneously\nfor a session.\n\nYou can only start live streaming for sessions that use the OpenTok Media Router (with the\nmedia mode set to routed). You cannot use live streaming with sessions that have the media mode set\nto relayed.\n\nTo create a HLS only broadcast:\n\n```ruby\nopts = {\n  :outputs =\u003e {\n      :hls =\u003e {}\n  }\n}\nbroadcast = opentok.broadcasts.create(session_id, opts)\n\n# HLS + RTMP\nopts = {\n   :outputs =\u003e {\n       :hls =\u003e {},\n       :rtmp =\u003e [\n           {\n               :id =\u003e \"myOpentokStream\",\n               :serverUrl =\u003e \"rtmp://x.rtmp.youtube.com/live123\",\n               :streamName =\u003e \"66c9-jwuh-pquf-9x00\"\n           }\n       ]\n   }\n}\nbroadcast = opentok.broadcasts.create(session_id, opts)\n```\n\nThe returned Broadcast object has information about the broadcast, like id, sessionId , projectId,\ncreatedAt, updatedAt, resolution, status, and a Hash of broadcastUrls. The broadcastUrls\nconsists of an HLS URL and an array of RTMP objects. The RTMP objects resembles the `rtmp` value\nin `opts` in the example above.\n\nFor more information on broadcast, see the\n[OpenTok Broadcast guide](https://tokbox.com/developer/rest/#start_broadcast) programming guide.\n\nTo get information about a broadcast stream\n\n```ruby\nmy_broadcast = opentok.broadcasts.find broadcast_id\n```\n\nThe Broadcast object returned has properties describing the broadcast, like id, sessionId,\nprojectId, createdAt, updatedAt, resolution, status, and a Hash of broadcastUrls. The broadcastUrls\nconsists of an HLS URL and an array of RTMP objects. The RTMP objects resembles the `rtmp` value\nin `opts` in the example above.\n\nTo stop a broadcast:\n\n```ruby\n my_broadcast = opentok.broadcasts.stop broadcast_id\n\n # stop at a broadcast object level too\n #\n my_broadcast = opentok.broadcasts.find broadcast_id\n ret_broadcast =  my_broadcast.stop\n\n # Both the above returned objects has the \"broadcastUrls\" property as a nil value and the status\n # property value is \"stopped\"\n```\n\nTo change the layout of a broadcast dynamically\n\n```ruby\nopentok.broadcasts.layout(started_broadcast_id, {\n        :type =\u003e \"verticalPresentation\"\n    })\n\n  # On an object level\n   my_broadcast = opentok.broadcasts.find broadcast_id\n   my_broadcast.layout(\n             :type =\u003e 'pip',\n             )\n\n   # the returned value is true if successful\n```\n\nThe hash above has two entries.\n\n- The `type` is the layout type for the archive. Valid values are \"bestFit\" (best fit),\n  \"custom\" (custom), \"horizontalPresentation\" (horizontal presentation),\n  \"pip\" (picture-in-picture), and \"verticalPresentation\" (vertical presentation).\n\n- If you specify a \"custom\" layout type, set the `stylesheet` property. (For other layout types,\n  do not set the stylesheet property.)\n\nRefer to [Customizing the video layout for composed\narchives](https://tokbox.com/developer/guides/archiving/layout-control.html)\nfor more details.\n\nYou can also change the layout of an individual stream dynamically. Refer to\n[working with Streams](#working-with-streams).\n\n### Force disconnect\n\nYou can cause a client to be forced to disconnect from a session by using the\n`opentok.connections.forceDisconnect(session_id, connection_id)` method.\n\n### Forcing clients in a session to mute published audio\n\nYou can force the publisher of a specific stream to stop publishing audio using the\n`opentok.streams.force_mute(session_id, stream_id)` method.\n\nYou can force the publisher of all streams in a session (except for an optional list of streams)\nto stop publishing audio using the `opentok.streams.force_mute_all(session_id, opts)`\nmethod. You can then disable the mute state of the session by calling the\n`opentok.streams.disable_force_mute(session_id)` method.\n\nFor more information, see\n[Muting the audio of streams in a session](https://tokbox.com/developer/guides/moderation/#force_mute).\n\n### Initiating a SIP call\n\nYou can initiate a SIP call using the `opentok.sip.dial(session_id, token, sip_uri, opts)` method.\nThis requires a SIP URL. You will often need to pass options for authenticating to the SIP provider\nand specifying encrypted session establishment.\n\n```ruby\nopts = { \"auth\" =\u003e { \"username\" =\u003e sip_username,\n                     \"password\" =\u003e sip_password },\n         \"secure\" =\u003e \"true\"\n}\nresponse = opentok.sip.dial(session_id, token, \"sip:+15128675309@acme.pstn.example.com;transport=tls\", opts)\n```\n\nFor more information on SIP Interconnect, see the\n[OpenTok SIP Interconnect](https://tokbox.com/developer/guides/sip/) developer guide.\n\n### Working with Experience Composers\n\nYou can start an [Experience Composer](https://tokbox.com/developer/guides/experience-composer)\nby calling the `opentok.renders.start(session_id, options)` method.\n\nYou can stop an Experience Composer by calling the `opentok.renders.stop(render_id, options)` method.\n\nYou can get information about Experience Composers by calling the `opentok.renders.find(render_id)`\nand `opentok.renders.list(options)` methods.\n\n### Working with Audio Connector\n\nYou can start an [Audio Connector](https://tokbox.com/developer/guides/audio-connector) WebSocket\nby calling the `opentok.websocket.connect()` method.\n\n## Samples\n\nThere are three sample applications included in this repository. To get going as fast as possible, clone the whole\nrepository and read the README in each of the sample directories:\n\n- [HelloWorld](sample/HelloWorld/README.md)\n- [Archiving](sample/Archiving/README.md)\n- [Broadcast](sample/Broadcast/README.md)\n\n## Documentation\n\nReference documentation is available at \u003chttp://www.tokbox.com//opentok/libraries/server/ruby/reference/index.html\u003e.\n\n## Requirements\n\nYou need an OpenTok API key and API secret, which you can obtain by logging into your\n[Vonage Video API account](https://tokbox.com/account).\n\nThe OpenTok Ruby SDK requires Ruby 2.1.0 or greater.\n\n## Release Notes\n\nSee the [Releases](https://github.com/opentok/opentok-ruby-sdk/releases) page for details\nabout each release.\n\n### Important changes since v2.2.0\n\n**Changes in v4.0.0:**\n\nThe SDK adds support for Ruby v2.7 and now requires Ruby v2.1.0 or higher.\nFor Ruby v2.0.0 please continue to use the OpenTok Ruby SDK v3.0.0.\nFor Ruby v1.9.3 please continue to use the OpenTok Ruby SDK v2.5.0.\n\n**Changes in v3.0.0:**\n\nThe SDK now now requires Ruby v2.0.0 or higher. For Ruby v1.9.3 please continue to use the\nOpenTok Ruby SDK v2.5.0.\n\n**Changes in v2.2.2:**\n\nThe default setting for the `create_session()` method is to create a session with the media mode set\nto relayed. In previous versions of the SDK, the default setting was to use the OpenTok Media Router\n(media mode set to routed). In a relayed session, clients will attempt to send streams directly\nbetween each other (peer-to-peer); if clients cannot connect due to firewall restrictions, the\nsession uses the OpenTok TURN server to relay audio-video streams.\n\n**Changes in v2.2.0:**\n\nThis version of the SDK includes support for working with OpenTok archives.\n\nNote also that the `options` parameter of the `OpenTok.create_session()` method has a `media_mode`\nproperty instead of a `p2p` property.\n\nSee the reference documentation\n\u003chttp://www.tokbox.com/opentok/libraries/server/ruby/reference/index.html\u003e and in the\ndocs directory of the SDK.\n\n## Development and Contributing\n\nInterested in contributing? We :heart: pull requests! See the [Development](DEVELOPING.md) and\n[Contribution](CONTRIBUTING.md) guidelines.\n\n## Getting Help\n\nWe love to hear from you so if you have questions, comments or find a bug in the project, let us know! You can either:\n\n- Open an issue on this repository\n- See \u003chttps://support.tokbox.com/\u003e for support options\n- Tweet at us! We're [@VonageDev on Twitter](https://twitter.com/VonageDev)\n- Or [join the Vonage Developer Community Slack](https://developer.nexmo.com/community/slack)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopentok%2Fopentok-ruby-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopentok%2Fopentok-ruby-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopentok%2Fopentok-ruby-sdk/lists"}