Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Eyeson

Build Status

eyeson ruby sdk for service app implementation

Installation

Add this line to your application's Gemfile:

gem 'eyeson'

And then execute:

$ bundle install

Configuration

Eyeson.configure do |config|
  config.api_key      = 'YOUR_API_KEY'
  config.api_endpoint = 'https://api.eyeson.team'
end

Receive webhooks for specific events

Eyeson::Webhook.create!(
  url: url, # Webhooks will be sent to this URL
  types: [] # supported types: 'room', 'team', 'user', 'presentation', 'broadcast', 'file'
)

Meeting reference

Join a meeting room

Puts a user to a (specific) meeting room.

If no arbitrary ids are given, random ids will be generated.

room = Eyeson::Room.join(id:   'ARBITRARY_ID',     # optional, e.g. to join a specific room
                         name: 'DISPLAY_NAME',     # optional
                         user: {
                        	 id:     'ARBITRARY_ID', # optional, e.g. your internal user_id
                        	 name:   'DISPLAY_NAME', # required!
                        	 avatar: 'IMAGE_URL'     # optional
                         })

The meeting room will be available immediately:

# Temporary access key - only valid for current session:
# access_key = room.access_key

redirect_to room.url

Upload a presentation file from remote URL

Uploads and converts any external stored PDF file for presentation.

Eyeson::FileUpload.new(access_key).upload_from('FILE_URL')

Start a live broadcast (YouTube only at the moment)

Eyeson::Broadcast.new(access_key).create(
  platform:   'youtube',
  stream_url: 'YOUTUBE_STREAM_URL' # see YouTube documentation on how to get a stream url.
)

Stop specific broadcast

Eyeson::Broadcast.new(access_key).destroy(
  platform: 'youtube'
)

Stop all broadcasts

Eyeson::Broadcast.new(access_key).destroy_all

Send a message into meeting chat

Eyeson::Message.new(access_key).create(
  type:    'chat',
  content: 'YOUR_MESSAGE'
)

Insert an image into video

Eyeson::Layer.new(access_key).create(
  file:   FILE, # either file or url must be provided!
  url:    URL,  # either file or url must be provided!
  index:  1,    # (optional) use 1 (default) to set as foreground image and -1 to set as background image
  layout: nil   # (optional) currently supported: 'auto' (meeting participants will be arranged automatically), 'fixed' (meeting participants will be rendered at the bottom of the video, so your background content can be fully displayed.)
)

Get download URL of a specific recording

It is assumed that the recording_id is known (e.g. from a webhook request).

recording = Eyeson::Recording.find(recording_id)
redirect_to recording.url

License

The gem is available as open source under the terms of the MIT License.

About

eyeson team package for ruby

Resources

License

Packages

No packages published

Languages