class Decidim::Meetings::MeetingIframeEmbedder
def transform_twitch_url(uri, request_host)
2. extract the request host
1. extract the video id from the third URL parameter
Twitch transformation consists on:
def transform_twitch_url(uri, request_host) _, param_name, video_id = *uri.path.split("/") return online_meeting_service_url if video_id.blank? || param_name != "videos" "https://player.twitch.tv/?video=#{video_id}&parent=#{request_host}" end