Class: KurentoController

Inherits:
ApplicationController
  • Object
show all
Defined in:
lib/generators/kurento_rails/templates/controllers/kurento_controller.rb

Instance Method Summary collapse

Instance Method Details

#broadcastObject

this allows a user to create a new stream. It probably should be role protected, but isn’t for now



9
10
11
# File 'lib/generators/kurento_rails/templates/controllers/kurento_controller.rb', line 9

def broadcast
  
end

#indexObject

this shows all currently active streams, then lets a user connect to one if they would like



4
5
6
# File 'lib/generators/kurento_rails/templates/controllers/kurento_controller.rb', line 4

def index
  @streams = KurentoRailsVideoStream.where(streaming: true)
end

#old_streamsObject

This lets a client look at all of the old streams that have been played, and watch whichever one they would like



19
20
21
# File 'lib/generators/kurento_rails/templates/controllers/kurento_controller.rb', line 19

def old_streams
  @streams = KurentoRailsVideoStream.where(streaming: false).order(updated_at: 'desc')
end

#receiveObject

this is just a simple alias



14
15
16
# File 'lib/generators/kurento_rails/templates/controllers/kurento_controller.rb', line 14

def receive
  redirect_to action: "index"
end