Aller au contenu principal
Petanque Life

Streaming & Video Integrations

F14.14 6 fonctionnalités Planifié

En bref

Streaming & Video Integrations covers live and on-demand video for tournaments — YouTube Live and Twitch embeds for fan distribution, RTMP/RTMPS/SRT relay configurations for multi-destination fan-out with up to five sinks, a canonical StreamMetadata record with viewer stats, Vimeo for password-protectable replay archives, and Cloudflare Stream for first-party delivery with HMAC-signed HLS and DASH playback URLs and per-tenant ingest endpoints.

Comment ça fonctionne

YouTubeLiveEmbed stores name, channel_id, video_id, an api_key_ref to Key Vault, privacy (public/unlisted/private), a YouTubePlayerParams block (autoplay, mute, controls, loop, modest_branding, rel, fs, cc_load_policy), embed dimensions, responsive flag, allowed_domains, and an optional competition_id link; GET /{id}/embed produces the embed URL plus an iframe HTML snippet wrapped in a responsive 16:9 container, GET /{id}/validate sanity-checks video_id and channel_id formats, and a live-chat iframe URL is generated when live_chat_embed=true. TwitchEmbed mirrors the same shape with channel_name, video_id, collection_id, layout (video or video_with_chat), TwitchPlayerParams, parent_domains (mandatory because Twitch requires explicit parent allowlists), theme, and a chat embed URL when layout=video_with_chat. RtmpRelayConfig models multi-destination fan-out — name, status (draft, active, paused, error, decommissioned), ingest_protocol (rtmp, rtmps, srt), ingest_url, ingest_key_ref, up to five RtmpRelayDestination rows (name, platform, rtmp_url, stream_key_ref, enabled, bitrate_kbps, resolution), max_bitrate_kbps, transcoding_enabled, recording_enabled, and competition_id; URL validation enforces rtmp://, rtmps://, or srt:// schemes and lifecycle transitions are guarded with HTTP 409 on illegal moves.

StreamMetadata is the canonical reference per stream with title, stream_type (live, vod, clip), status (scheduled, live, ended, processing, available, error, archived), platform, platform_stream_id, platform_url, thumbnail_url, embed_url, competition_id, match_id, language, tags, scheduled_start_at, actual_start_at, ended_at, duration_seconds, StreamViewerStats (peak_concurrent computed via max-aggregation, total_views, average_watch_time_s, unique_viewers), and is_featured/is_public flags. VimeoReplay records archived video with vimeo_video_id, vimeo_uri, api_token_ref, privacy (anybody/nobody/password/unlisted/disable), password_ref, and embed cosmetics. CloudflareStreamConfig holds the live or on-demand mode, account_id_ref, api_token_ref, cf_stream_id, cf_live_input_id, RTMP/SRT/WebRTC ingest URLs, HLS/DASH playback URLs, a SignedUrlConfig (signing_key_ref, token_ttl_seconds, require_signed_urls), and CloudflareStreamAllowedOrigin entries; signed playback URLs are generated with HMAC-SHA256 over a JWT-style payload using the configured TTL.

Capacités clés

  • YouTubeLiveEmbed with responsive iframe and live-chat URL
  • TwitchEmbed with mandatory parent_domains and chat layout
  • RtmpRelayConfig with up to 5 destinations, transcoding, and recording
  • StreamMetadata as canonical reference with viewer stats and featured flags
  • VimeoReplay for on-demand archive with privacy and password protection
  • Cloudflare Stream live and on-demand with HLS/DASH and HMAC-signed playback URLs
  • Lifecycle guards (HTTP 409) on illegal status transitions

En pratique

A federation streams the national finals. Production runs OBS into a single ingest URL on RtmpRelayConfig; the platform fans out to YouTube, Twitch, and Cloudflare Stream simultaneously, recording is on, and transcoding adds a 720p ladder. StreamMetadata is created in scheduled, flips to live when the relay detects ingest, and starts collecting StreamViewerStats.

The federation's website embeds the YouTubeLiveEmbed with live_chat_embed=true so fans can chat. After the final, ended_at is stamped, the recording uploads to a VimeoReplay with privacy=unlisted and a 90-day archival window, and the website swaps the embed to point at the Vimeo URL — all without changing any layout code.

Fonctionnalités de ce sous-système

6
ID Status Fonctionnalités
F14.14.01 Livré YouTube Live embed — YouTubeLiveEmbed-samling tenant-scopad med name/channel_id/video_id/api_key_ref/privacy (public/unlisted/private)/player_params (YouTubePlayerParams autoplay/mute/controls/loop/modest_branding/rel/fs/cc_load_policy)/embed_width/embed_height/responsive/allowed_domains/competition_id/live_chat_embed/enabled; CRUD /youtube-embeds/ med filtrering enabled/competition_id; GET /{id}/embed genererar embed-URL och iframe-HTML med responsiv 16:9 container; GET /{id}/validate validerar konfiguration (video_id/channel_id-format); live chat iframe-URL vid live_chat_embed=true ✅ PL-F1414
F14.14.02 Livré Twitch embed — TwitchEmbed-samling tenant-scopad med name/channel_name/video_id/collection_id/layout (video/video_with_chat)/player_params (TwitchPlayerParams autoplay/muted/allow_fullscreen/time)/parent_domains (obligatorisk)/embed_width/embed_height/responsive/competition_id/theme (dark/light)/enabled; CRUD /twitch-embeds/ med filtrering enabled/competition_id; GET /{id}/embed genererar embed-URL med parent-domain-säkerhet; GET /{id}/validate validerar channel_name-format och parent_domains; chat-embed-URL vid layout=video_with_chat ✅ PL-F1414
F14.14.03 Livré RTMP relay-konfiguration — RtmpRelayConfig-samling tenant-scopad med name/status (draft/active/paused/error/decommissioned)/ingest_protocol (rtmp/rtmps/srt)/ingest_url/ingest_key_ref/destinations[RtmpRelayDestination name/platform/rtmp_url/stream_key_ref/enabled/bitrate_kbps/resolution] (max 5)/max_bitrate_kbps/transcoding_enabled/recording_enabled/competition_id; CRUD /rtmp-relays/ med filtrering status/competition_id; livscykel activate/pause/decommission med statusvakter (409); URL-validering (rtmp://rtmps://srt://) ✅ PL-F1414
F14.14.04 Livré Stream metadata API — StreamMetadata-samling tenant-scopad med title/stream_type (live/vod/clip)/status (scheduled/live/ended/processing/available/error/archived)/platform/platform_stream_id/platform_url/thumbnail_url/embed_url/competition_id/match_id/language/tags[]/scheduled_start_at/actual_start_at/ended_at/duration_seconds/viewer_stats (StreamViewerStats peak_concurrent/total_views/average_watch_time_s/unique_viewers)/is_featured/is_public; CRUD /stream-metadata/ med filtrering stream_type/status/platform/competition_id/is_featured/is_public; livscykel start/end/available/archive med statusvakter; viewer-stats endpoint med peak_concurrent max-beräkning ✅ PL-F1414
F14.14.05 Livré Vimeo för on-demand replay — VimeoReplay-samling tenant-scopad med name/status (draft/uploading/transcoding/available/error/archived)/vimeo_video_id/vimeo_uri/api_token_ref/privacy (anybody/nobody/password/unlisted/disable)/password_ref/embed_responsive/embed_width/embed_height/embed_autoplay/embed_loop/embed_title/embed_byline/embed_portrait/embed_color/allowed_domains/competition_id/match_id/duration_seconds/file_size_bytes/download_enabled; CRUD /vimeo-replays/ med filtrering status/competition_id; livscykel available/archive; GET /{id}/embed genererar Vimeo embed-URL med parametrar; GET /{id}/validate kontrollerar video_id/api_token/password ✅ PL-F1414
F14.14.06 Livré Cloudflare Stream för egen leverans — CloudflareStreamConfig-samling tenant-scopad med name/status (draft/ready/live_input_created/connected/disconnected/error/decommissioned)/mode (live/on_demand)/account_id_ref/api_token_ref/cf_stream_id/cf_live_input_id/rtmp_url/rtmp_key_ref/srt_url/webrtc_url/playback_hls_url/playback_dash_url/signed_url_config (SignedUrlConfig signing_key_ref/token_ttl_seconds/require_signed_urls)/allowed_origins[CloudflareStreamAllowedOrigin]/recording_enabled/require_signed_urls/max_duration_seconds/competition_id; CRUD /cloudflare-streams/ med filtrering status/mode/competition_id; livscykel activate/create-live-input/decommission; HMAC-SHA256 signed playback URL-generering med konfigurerbar TTL ✅ PL-F1414

Parties prenantes qui ont besoin de ce sous-système

Apparaît dans 2 analyses de parties prenantes