Skip to content

Commit

Permalink
Fix ID3 Decoding On PlayStation 4 (video-dev#6048)
Browse files Browse the repository at this point in the history
Excluding PS4 platform from TextDecoder use, because it is partially implemented there and does not return correct results.
  • Loading branch information
agajassi authored Dec 18, 2023
1 parent 8f275af commit 913a26e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/demux/id3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,12 @@ export const testables = {
let decoder: TextDecoder;

function getTextDecoder() {
// On Play Station 4, TextDecoder is defined but partially implemented.
// Manual decoding option is preferable
if (navigator.userAgent.includes('PlayStation 4')) {
return;
}

if (!decoder && typeof self.TextDecoder !== 'undefined') {
decoder = new self.TextDecoder('utf-8');
}
Expand Down

0 comments on commit 913a26e

Please sign in to comment.