Skip to content

Commit

Permalink
Merge pull request #1499 from canalplus/fix/chrome-hevc-check-hev
Browse files Browse the repository at this point in the history
Treat codecs beginning with `hev1` as hevc
  • Loading branch information
peaBerberian authored Aug 14, 2024
2 parents b7e6d44 + 8a4c7c2 commit f8f932f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/utils/are_codecs_compatible.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ function areCodecsCompatible(a: string, b: string): boolean {
if (codecsA === "" || codecsB === "") {
return false;
}
if (codecsA.split(".")[0] !== codecsB.split(".")[0]) {
let initialPartA = codecsA.split(".")[0];
initialPartA = initialPartA === "hev1" ? "hvc1" : initialPartA;
let initialPartB = codecsB.split(".")[0];
initialPartB = initialPartB === "hev1" ? "hvc1" : initialPartB;
if (initialPartA !== initialPartB) {
return false;
}
return true;
Expand Down

0 comments on commit f8f932f

Please sign in to comment.