From 3e69d272deb3f8e0b57dce4b0f54e5f698d78cea Mon Sep 17 00:00:00 2001 From: Brian <18603393+brian6932@users.noreply.github.com> Date: Sat, 3 Feb 2024 15:53:23 -0500 Subject: [PATCH] Add `platform` to `PERMITTED_INCOMING_KEYS` --- src/main.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index 7068d7b..187faae 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,5 @@ use std::borrow::Cow; -use std::collections::HashMap; +use std::collections::{HashMap, HashSet}; use std::net::{IpAddr, SocketAddr}; #[cfg(feature = "tls")] use std::path::PathBuf; @@ -364,19 +364,20 @@ pub(crate) async fn process(pd: ProcessData, state: &LState) -> AppResult Result { - const PERMITTED_INCOMING_KEYS: [&str; 11] = [ + let PERMITTED_INCOMING_KEYS: HashSet<&str> = HashSet::from([ "player_backend", // mediaplayer "playlist_include_framerate", // true "reassignments_supported", // true - "supported_codecs", // avc1, usually. sometimes vp09,avc1 + "supported_codecs", // av1,h265,h264 "cdm", // wv - "player_version", // 1.20.0 + "player_version", // 1.24.0-rc.1.3 "fast_bread", // true; related to low latency mode "allow_source", // true "allow_audio_only", // true "warp", // true; https://github.com/kixelated/warp-draft "transcode_mode", // cbr_v1 - ]; + "platform", // web + ]); let mut url = Url::parse(&pd.sid.get_url())?; // set query string automatically using non-identifying parameters