feat(legacy): add aac/opus support to dashboard player (#2881)
### Description The Player on the dashbaord does not correctly play an AAC stream. The rewritng logic only takes into account the ogg format. Add rewriting from aac to m4a in the javascript calls so the player works. **This is a new feature**: AAC output currently only works with replacing liquidsoap, so technically this is a new feature. **I have updated the documentation to reflect these changes**: The dashboard player is not documented. The player widget works with AAC streams already. ### Testing Notes **What I did:** Swapped liquidsoap and reconfigured the default mp3 stream as AAC **How you can replicate my testing:** on ubuntu focal, drop in the upstream liquidsoap deb to enable aac, then configure the secondary output to use 128kbit aac instead of mp3. Restart the target, login to the dashboard and open the dashboard player. Both streams from the dropdown should work. --------- Co-authored-by: Thomas Göttgens <tgoettgens@mail.com> Co-authored-by: Jonas L <jooola@users.noreply.github.com>
This commit is contained in:
parent
f6d57d5f2d
commit
95283efc1f
|
@ -39,8 +39,10 @@
|
|||
$url = $streamData["${id}_public_url"];
|
||||
$type = $streamData["${id}_type"];
|
||||
$serverType = $streamData["${id}_output"];
|
||||
if ($type == "ogg")
|
||||
if ($type == "ogg" || $type == "opus")
|
||||
$type = "oga";
|
||||
if ($type == "aac")
|
||||
$type = "m4a";
|
||||
echo "setjPlayer('$url', '$type', '$serverType');";
|
||||
}
|
||||
?>
|
||||
|
@ -71,8 +73,10 @@
|
|||
$url = $streamData["${id}_public_url"];
|
||||
$type = $streamData["${id}_type"];
|
||||
$serverType = $streamData["${id}_output"];
|
||||
if ($type == "ogg")
|
||||
if ($type == "ogg" || $type == "opus")
|
||||
$type = "oga";
|
||||
if ($type == "aac")
|
||||
$type = "m4a";
|
||||
|
||||
$label = "(" . $streamData["${id}_host"] . ") " . $streamData["${id}_description"] . " - " . $streamData["${id}_bitrate"] . " kbit/s";
|
||||
echo sprintf("<option class='stream' value='%s' data-url='%s' data-type='%s' server-type='%s'>%s</option>", $id, $url, $type, $serverType, $label);
|
||||
|
|
Loading…
Reference in New Issue