MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / is_video_source

Function is_video_source

packages/server/src/camera.rs:374–387  ·  view source on GitHub ↗
(value: &str)

Source from the content-addressed store, hash-verified

372}
373
374fn is_video_source(value: &str) -> bool {
375 if is_url(value) {
376 return true;
377 }
378 let ext = Path::new(value)
379 .extension()
380 .and_then(|value| value.to_str())
381 .unwrap_or("")
382 .to_ascii_lowercase();
383 matches!(
384 ext.as_str(),
385 "mp4" | "m4v" | "mov" | "qt" | "avi" | "mkv" | "webm" | "mpg" | "mpeg" | "3gp" | "3g2"
386 )
387}
388
389fn normalize_mirror(value: Option<&str>) -> Result<String, AppError> {
390 let normalized = value.unwrap_or("auto").trim().to_ascii_lowercase();

Callers 1

file_sourceFunction · 0.85

Calls 1

is_urlFunction · 0.85

Tested by

no test coverage detected