Initial commit: monorepo Match Live TV.

Rails API, app Flutter, infrastruttura Docker/MediaMTX, sito marketing e documentazione di deploy.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-26 17:45:37 +02:00
commit bba6df52c0
381 changed files with 20599 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
class DeviceState < ApplicationRecord
ROLES = %w[camera controller].freeze
belongs_to :stream_session
validates :device_role, inclusion: { in: ROLES }
validates :device_role, uniqueness: { scope: :stream_session_id }
def as_cable_payload
{
type: "device_state",
battery: battery_level,
network: network_type,
bitrate: current_bitrate,
fps: fps,
status: stream_session.status
}
end
end