File tree Expand file tree Collapse file tree 3 files changed +16
-8
lines changed
Expand file tree Collapse file tree 3 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " SpessaSynth" ,
3- "version" : " 4.1.3 " ,
3+ "version" : " 4.1.4 " ,
44 "type" : " module" ,
55 "private" : true ,
66 "scripts" : {
Original file line number Diff line number Diff line change 11/**
22 * Note to self: make sure to update this
33 */
4- export const WHATS_NEW : string [ ] = [ `GS/XG display dots support!` ] as const ;
4+ export const WHATS_NEW : string [ ] = [
5+ `GS/XG display dots support!` ,
6+ `Fixed RMIDI album art on Firefox!`
7+ ] as const ;
Original file line number Diff line number Diff line change @@ -1026,13 +1026,18 @@ export class SequencerUI {
10261026 type : "image/png"
10271027 } ) ;
10281028 } else {
1029- // Always saying that it's a jpeg works on chrome
1030- const pic = new Blob ( [ mid . rmidiInfo . picture . buffer ] , {
1031- type : "image/jpeg"
1032- } ) ;
1033- const url = URL . createObjectURL ( pic ) ;
1029+ // Base64 works more reliably than URL.createObjectURL on Firefox
1030+ const pictureArray = new Uint8Array (
1031+ mid . rmidiInfo . picture . buffer
1032+ ) ;
1033+ const base64 = btoa (
1034+ pictureArray . reduce (
1035+ ( data , byte ) => data + String . fromCharCode ( byte ) ,
1036+ ""
1037+ )
1038+ ) ;
10341039 artwork . push ( {
1035- src : url
1040+ src : `data:image/png;base64, ${ base64 } `
10361041 } ) ;
10371042 }
10381043
You can’t perform that action at this time.
0 commit comments