feat: support Miruro provider tracks, proxies, and native embeds
This commit is contained in:
@@ -135,16 +135,19 @@ struct ConfigurationChecks {
|
||||
("video_provider = \"new-Host_2\"", "new-Host_2", ""),
|
||||
("caption_provider = \"moon\"", "", "moon"),
|
||||
("video_provider = \"sun\"\ncaption_provider = \"moon\"", "sun", "moon"),
|
||||
("video_provider = \"sun:dub\"\ncaption_provider = \"bee:ssub\"", "sun:dub", "bee:ssub"),
|
||||
("video_provider = \"new-Host_2:sub\"", "new-Host_2:sub", ""),
|
||||
("video_provider = \"\"\ncaption_provider = \"\"", "", ""),
|
||||
("video_provider = \"\(String(repeating: "a", count: 128))\"", String(repeating: "a", count: 128), "")
|
||||
] {
|
||||
try Data("[miruro]\n\(settings)\n".utf8).write(to: miruro)
|
||||
try require(try PlayerConfiguration.load(from: miruro)
|
||||
== PlayerConfiguration(miruroVideoProvider: video, miruroCaptionProvider: captions),
|
||||
"partial Miruro settings preserve omitted defaults and accept runtime provider names")
|
||||
"partial Miruro settings accept provider preferences and explicit provider:track choices")
|
||||
}
|
||||
for key in ["video_provider", "caption_provider"] {
|
||||
for name in ["with space", " sun", "sun ", "é", "host.name", "host/name", String(repeating: "a", count: 129)] {
|
||||
for name in ["with space", " sun", "sun ", "é", "host.name", "host/name", ":ssub", "sun:", "sun:auto",
|
||||
"sun:DUB", "sun:ssub:sub", "sun:sub ", String(repeating: "a", count: 129)] {
|
||||
try Data("[miruro]\n\(key) = \"\(name)\"\n".utf8).write(to: miruro)
|
||||
try requireLoadError(at: miruro, "invalid Miruro provider")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user