class SignalingChannel < ApplicationCable::Channel
  def subscribed
    stream_for VideoRoom.new(id: params[:id])
  end

  def signal(data)
    broadcast_to(VideoRoom.new(id: params[:id]), data)
  end
end
