diff options
author | trizen <trizen@protonmail.com> | 2020-07-19 17:52:59 +0300 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2020-07-27 21:32:23 -0500 |
commit | d180970af29e19c35cde5242adb4df41c1a85e9d (patch) | |
tree | 8eb6aefe4bd9fec3d5926e0d9522789bd1a38985 | |
parent | 620d2991c79e2066f3ca7537c488da3124dd6a26 (diff) | |
download | fair-viewer-d180970af29e19c35cde5242adb4df41c1a85e9d.tar.lz fair-viewer-d180970af29e19c35cde5242adb4df41c1a85e9d.tar.xz fair-viewer-d180970af29e19c35cde5242adb4df41c1a85e9d.zip |
Use the ".opus" extension for audio streams.
Signed-off-by: Jesús <heckyel@hyperbola.info>
-rw-r--r-- | lib/WWW/FairViewer/Utils.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/WWW/FairViewer/Utils.pm b/lib/WWW/FairViewer/Utils.pm index 06ea9d9..852d870 100644 --- a/lib/WWW/FairViewer/Utils.pm +++ b/lib/WWW/FairViewer/Utils.pm @@ -80,10 +80,11 @@ From a string like 'video/webm;+codecs="vp9"', it returns 'webm'. sub extension { my ($self, $type) = @_; $type =~ /\bflv\b/i ? q{flv} - : $type =~ /\bwebm\b/i ? q{webm} + : $type =~ /\bopus\b/i ? q{opus} : $type =~ /\b3gpp?\b/i ? q{3gp} : $type =~ m{^video/(\w+)} ? $1 : $type =~ m{^audio/(\w+)} ? $1 + : $type =~ /\bwebm\b/i ? q{webm} : q{mp4}; } |