janus_gateway 0.0.14 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/README.md +34 -1
 - data/lib/janus_gateway/transport/websocket.rb +1 -0
 - data/lib/janus_gateway/version.rb +1 -1
 - metadata +3 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 6ea317eec80f95f86608e0dfbefd20daf539ca93
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 1f71d212cee640fba2e50565c7101e0f49d935fa
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: f02c94833d104e2fdc74b4d108e7b34883865d222df26d46810ba255f994f7272f6dae43ec4234db2d3d5d6f11db825ca6ebc1540d577d7f02b0f256c4b8c6e9
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 3d9245725745520b7e400e4e837ebbe4d81578c6679de4769231c9a3867dff17625745ad5f4e014409f75d24a8229c147646eea9a4b8c2e111ec51d9fd50b3c3
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -28,7 +28,20 @@ ws = JanusGateway::Transport::WebSocket.new('ws://localhost:8188/janus') 
     | 
|
| 
       28 
28 
     | 
    
         
             
            client = JanusGateway::Client.new(ws)
         
     | 
| 
       29 
29 
     | 
    
         
             
            ```
         
     | 
| 
       30 
30 
     | 
    
         | 
| 
       31 
     | 
    
         
            -
             
     | 
| 
      
 31 
     | 
    
         
            +
            The client's `connect` method should be called in an [EventMachine](https://github.com/eventmachine/eventmachine) context, for events to be emitted etc.
         
     | 
| 
      
 32 
     | 
    
         
            +
            You can call the `run` method to start an EventMachine (which will block the execution of the program):
         
     | 
| 
      
 33 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 34 
     | 
    
         
            +
            ws = JanusGateway::Transport::WebSocket.new('ws://localhost:8188/janus')
         
     | 
| 
      
 35 
     | 
    
         
            +
            client = JanusGateway::Client.new(ws)
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
            client.on(:open) do
         
     | 
| 
      
 38 
     | 
    
         
            +
              # We can start sending commands to the server now
         
     | 
| 
      
 39 
     | 
    
         
            +
            end
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
            client.run
         
     | 
| 
      
 42 
     | 
    
         
            +
            ```
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
      
 44 
     | 
    
         
            +
            Refer to the [Examples](#examples) section for a complete example of connecting to a server.
         
     | 
| 
       32 
45 
     | 
    
         | 
| 
       33 
46 
     | 
    
         
             
            ### Transports
         
     | 
| 
       34 
47 
     | 
    
         
             
            Client allows to use multiple, supported by Janus transportation layers. Currently the `WebSocket` transport is implemented and is the default.
         
     | 
| 
         @@ -132,6 +145,26 @@ Plugin resource supports `events` and `chaining` in the same way like `Janus` re 
     | 
|
| 
       132 
145 
     | 
    
         
             
            ##### List
         
     | 
| 
       133 
146 
     | 
    
         
             
            Endpoint allows to retrieve the list of current audio rooms.
         
     | 
| 
       134 
147 
     | 
    
         | 
| 
      
 148 
     | 
    
         
            +
            Examples
         
     | 
| 
      
 149 
     | 
    
         
            +
            --------
         
     | 
| 
      
 150 
     | 
    
         
            +
             
     | 
| 
      
 151 
     | 
    
         
            +
            Connect to the server using the WebSocket transport and create a session:
         
     | 
| 
      
 152 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 153 
     | 
    
         
            +
            ws = JanusGateway::Transport::WebSocket.new('ws://localhost:8188/janus')
         
     | 
| 
      
 154 
     | 
    
         
            +
            client = JanusGateway::Client.new(ws)
         
     | 
| 
      
 155 
     | 
    
         
            +
            client.on(:open) { puts 'client connected' }
         
     | 
| 
      
 156 
     | 
    
         
            +
            client.on(:close) { puts 'client disconnected' }
         
     | 
| 
      
 157 
     | 
    
         
            +
             
     | 
| 
      
 158 
     | 
    
         
            +
            client.on(:open) do
         
     | 
| 
      
 159 
     | 
    
         
            +
              session = JanusGateway::Resource::Session.new(client)
         
     | 
| 
      
 160 
     | 
    
         
            +
              session.on(:create) { puts 'session created' }
         
     | 
| 
      
 161 
     | 
    
         
            +
              session.on(:destroy) { puts 'session destroyed' }
         
     | 
| 
      
 162 
     | 
    
         
            +
              session.create
         
     | 
| 
      
 163 
     | 
    
         
            +
            end
         
     | 
| 
      
 164 
     | 
    
         
            +
             
     | 
| 
      
 165 
     | 
    
         
            +
            client.run
         
     | 
| 
      
 166 
     | 
    
         
            +
            ```
         
     | 
| 
      
 167 
     | 
    
         
            +
             
     | 
| 
       135 
168 
     | 
    
         
             
            Development
         
     | 
| 
       136 
169 
     | 
    
         
             
            -----------
         
     | 
| 
       137 
170 
     | 
    
         | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: janus_gateway
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.15
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Cargo Media
         
     | 
| 
         @@ -11,7 +11,7 @@ authors: 
     | 
|
| 
       11 
11 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       12 
12 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       13 
13 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       14 
     | 
    
         
            -
            date: 2016- 
     | 
| 
      
 14 
     | 
    
         
            +
            date: 2016-12-18 00:00:00.000000000 Z
         
     | 
| 
       15 
15 
     | 
    
         
             
            dependencies:
         
     | 
| 
       16 
16 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       17 
17 
     | 
    
         
             
              name: faye-websocket
         
     | 
| 
         @@ -186,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       186 
186 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       187 
187 
     | 
    
         
             
            requirements: []
         
     | 
| 
       188 
188 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       189 
     | 
    
         
            -
            rubygems_version: 2.5. 
     | 
| 
      
 189 
     | 
    
         
            +
            rubygems_version: 2.5.2
         
     | 
| 
       190 
190 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       191 
191 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       192 
192 
     | 
    
         
             
            summary: janus-gateway client
         
     |