raydash 2.0.3 → 2.0.4

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.
Files changed (3) hide show
  1. data/Readme +42 -27
  2. data/lib/raydash/version.rb +1 -1
  3. metadata +3 -3
data/Readme CHANGED
@@ -19,24 +19,18 @@ If you set the environment variables RAYDASH_USERID and RAYDASH_SECRET or use th
19
19
 
20
20
  This will generate the required configuration files to use Raydash
21
21
 
22
- 3) You now need to generate a model, which will call the Raydash API
23
- to generate tokens for your video streams. Optionally, you can create
24
- your own model, and call the API directly, but a generator is provided
25
- to make this easier. You can invoke the generator by calling
26
22
 
27
- rails g raydash:model [modelname]
28
-
29
- This model will represent a token. Each token can be used for both a
30
- record and playback stream control.
31
-
32
- 4) Create a controller for your app. For example, if you name the
33
- named the model 'video' you can create a new video with:
23
+ 4) Create a controller for your app. For example,
34
24
 
35
25
  def index()
36
- @video = Video.new()
37
- @video.save()
26
+ @token = Raydash.getToken()
38
27
  end
39
28
 
29
+ You may also set a customGroup for your token to track it. This can be done with:
30
+ Raydash.getToken("dummyblack","YOUR_CUSTOM_GROUP")
31
+
32
+ dummyblack is the default for pointing the token. You can also point the token to view existing token's stream.
33
+
40
34
  5) Add the proper header information to your layout. Often, this is
41
35
  app/views/layouts/application.html.erb. You will need add the
42
36
  following into the header:
@@ -48,10 +42,10 @@ a streaming ability, and a recording ability respectively.
48
42
 
49
43
  A sample view might look like:
50
44
 
51
- <%= videostream(@video.token,"video_in") %>
52
- <%= videorecord(@video.token,"video_out") %>
45
+ <%= videostream(@token,"video_in") %>
46
+ <%= videorecord(@token,"video_out") %>
53
47
 
54
- In this sample, @video.token specifies the token we are connecting to,
48
+ In this sample, @token specifies the token we are connecting to,
55
49
  and "video_in" and "video_out" are div ids.
56
50
 
57
51
 
@@ -62,20 +56,25 @@ able to load the page, and enable your camera. The streaming
62
56
  capabilities will also be enabled but the stream isn't connect to
63
57
  anything.
64
58
 
65
- 8) You can connect arbitrary tokens. This all handled on the
66
- server-end, and it can be done in real-time. So, create a new
67
- controller function such as:
59
+ 8) You can create new tokens, which point to existing tokens with:
68
60
 
69
- def connect_to()
70
- video=Model.find(params[:id1])
71
- otherVideo=Video.find(params[:id2])
72
- video.point_to(otherVideo.token)
61
+ Raydash.getToken(oldTokenName)
62
+
63
+ You can directly connect your token to a given token with:
64
+ def connect_token()
65
+ Raydash.getToken(params[:old_token])
73
66
  end
74
67
 
75
68
  with route
76
69
  '/videos/route/:id1/:id2' => 'YOUR_CONTROLLER#connect_to'
77
70
 
78
- When connect_to is called, it will point on stream at another stream
71
+ When connect_to is called, it will point on stream at another stream. This can be accomplished with:
72
+
73
+ raydash.changeStream(myToken,otherToken)
74
+
75
+ Note, this will only point it one way. If you want to point it the other way, you will also need to call:
76
+
77
+ raydash.changeStream(otherToken,myToken)
79
78
 
80
79
  == Helpers
81
80
  These can be used within any view you use the Raydash gem.
@@ -118,7 +117,7 @@ Changes the resolution and size of the video recording
118
117
 
119
118
  == Backend-API library
120
119
 
121
- === Raydash.getToken(streamName="")
120
+ === Raydash.getToken(streamName="",customGroup="")
122
121
  This function gets a token. A token is needed for every recording or
123
122
  viewing video box in the application.
124
123
 
@@ -126,7 +125,7 @@ streamName is an optional parameter that is another token created with
126
125
  this function. If specified, the display stream will show the stream
127
126
  from the call of that function
128
127
 
129
-
128
+ customGroup This is an optional parameter for tracking different tokens
130
129
  === Raydash.changeStream(output_token, input_token)
131
130
  The function re-points where a token is streaming from. We can
132
131
  dynamically change where any stream is pointing, dynamically. You can point to the input_token "dummyblack" to make the window totally black.
@@ -139,4 +138,20 @@ input_token refers to a videorecord that has been initialized with its stream
139
138
 
140
139
  === Raydash.getStreamInfo(token)
141
140
  Returns a hash-array with information about the token.
142
-
141
+
142
+ === Raydash.startRecord(token)
143
+ Starts recording for a given token
144
+
145
+ === Raydash.stopRecord(token,bucket)
146
+
147
+ token To stop recording for
148
+
149
+ bucket Amazon S3 bucket to put it into. Note, you must first call Raydash.setUserInfo to set the your amazon key and secret
150
+
151
+ === Raydash.setUserInfo(amazonKey,amazonSecret,callbackUrl="")
152
+
153
+ amazonKey Key for saving onto amazon s3. This key must have permissions to save to S3 buckets
154
+
155
+ amazonSecret The secret for the key
156
+
157
+ callbackUrl A calbackUrl for sending notifications on changes in streams
@@ -1,3 +1,3 @@
1
1
  module Raydash
2
- VERSION = "2.0.3"
2
+ VERSION = "2.0.4"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raydash
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
- - 3
10
- version: 2.0.3
9
+ - 4
10
+ version: 2.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Gershon Bialer