class KurentoController < ApplicationController # this shows all currently active streams, then lets a user connect to one if they would like def index @streams = KurentoRailsVideoStream.where(streaming: true) end # this allows a user to create a new stream. It probably should be role protected, but isn't for now def broadcast end # this is just a simple alias def receive redirect_to action: "index" end # This lets a client look at all of the old streams that have been played, and watch whichever one they would like def old_streams @streams = KurentoRailsVideoStream.where(streaming: false).order(updated_at: 'desc') end private def stream_params params.permit :id, :pipeline, :file_url, :sender_rtc, :viewer_rtc, :hub, :streaming, :name end end