1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
* Copyright 2025 Security Union LLC
*
* Licensed under either of
*
* * Apache License, Version 2.0
* (http://www.apache.org/licenses/LICENSE-2.0)
* * MIT license
* (http://opensource.org/licenses/MIT)
*
* at your option.
*
* Unless you explicitly state otherwise, any contribution intentionally
* submitted for inclusion in the work by you, as defined in the Apache-2.0
* license, shall be dual licensed as above, without any additional terms or
* conditions.
*/
use crateis_firefox;
use VideoCodec;
pub static AUDIO_CODEC: &str = "opus"; // https://www.w3.org/TR/webcodecs-codec-registry/#audio-codec-registry
// VP8 codec string - used for Firefox (software VP9 is slow)
pub static VIDEO_CODEC_VP8: &str = "vp8";
// VP9 codec string - used for Chrome/Edge/Safari (often hardware accelerated)
pub static VIDEO_CODEC_VP9: &str = "vp09.00.10.08"; // profile 0, level 1.0, bit depth 8
/// Returns the appropriate video codec string based on the browser.
/// Firefox uses VP8 (software VP9 is too slow), others use VP9.
/// Returns the VideoCodec enum value based on the browser.
// H.264 - requires description field in decoder config (SPS/PPS)
// pub static VIDEO_CODEC_H264: &str = "avc1.42001E"; // H.264 Baseline, Level 3.0
// AV1 - commented out because it is not as fast as vp9.
// pub static VIDEO_CODEC_AV1: &str = "av01.0.01M.08";
pub const AUDIO_CHANNELS: u32 = 1u32;
pub const AUDIO_SAMPLE_RATE: u32 = 48000u32;
pub const RSA_BITS: usize = 1024;
use MediaType;
pub static SUPPORTED_MEDIA_TYPES: & = &;