Sha256: 101e40a55eee02a04b5f7af361b687b2d9c587a881885b13b12d1d5feb872109
Contents?: true
Size: 1.55 KB
Versions: 3
Compression:
Stored size: 1.55 KB
Contents
h1. Opentok OpenTok is a free set of APIs from TokBox that enables websites to weave live group video communication into their online experience. With OpenTok you have the freedom and flexibility to create the most engaging web experience for your users. OpenTok is currently available as a JavaScript and ActionScript 3.0 library. Check out http://www.tokbox.com/ and http://www.tokbox.com/opentok/tools/js/gettingstarted for more information. This is the official Opentok rubygem. h2. Installation To install using bundler, add Opentok to you @gemfile@ and run `bundle install`: <pre> gem 'opentok' </pre> To install as a regular gem just type `gem install opentok` h2. How it works h3. API-key and secret Request your api-key and secret at http://www.tokbox.com/opentok/tools/js/apikey. You can use the staging environment for testing. The gem uses this staging environment by default. h3. Create a session With the following code, you can generate a valid @session_id@. <pre> @api_key = 0 # should be a number @api_secret = '' # should be a string @location = 'localhost' # give Opentok a hint on where you are running your application @opentok = OpenTok::OpenTokSDK.new @api_key, @api_secret @session_id = @opentok.create_session(@host) </pre> h3. Create tokens With the generated session_id, you can start generating tokens for each user. <pre> @opentok.generate_token :session_id => "#{@session_id}" </pre> Typically you would create one @session_id@ and store it (in e.g. a setting) and share that @session_id@ between all users.
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
opentok-0.0.5 | README.textile |
opentok-0.0.4 | README.textile |
opentok-0.0.3 | README.textile |