Skip to main content

hang/catalog/
priority.rs

1//! Default delivery priorities for hang tracks.
2
3/// Delivery priorities for each hang track kind.
4#[derive(Clone, Copy, Debug, Eq, PartialEq)]
5#[non_exhaustive]
6pub struct Priorities {
7	/// Catalog track priority.
8	pub catalog: i8,
9	/// Text (caption/subtitle) track priority.
10	pub text: i8,
11	/// Audio track priority.
12	pub audio: i8,
13	/// Video track priority.
14	pub video: i8,
15}
16
17/// Default delivery priorities for hang tracks, with higher values sent first.
18///
19/// All of them sit above 0, the unset default, so hang media outranks a track that never set
20/// a priority. Text sits just below the catalog and above audio/video: cues are tiny and accessibility-critical,
21/// so they should never be starved behind a media backlog.
22pub const PRIORITY: Priorities = Priorities {
23	catalog: 100,
24	text: 90,
25	audio: 80,
26	video: 60,
27};