App-MHFS
view release on metacpan or search on metacpan
share/public_html/static/music_worklet_inprogress/player/mhfsplayer.js view on Meta::CPAN
unlock();
};
that.queuetracks = async function(tracknames) {
const unlock = await that.USERMUTEX.lock();
that._queuetracks(tracknames);
unlock();
};
that.playtracks = async function(tracknames) {
const unlock = await that.USERMUTEX.lock();
await that._playtracks(tracknames);
unlock();
};
that.prev = async function() {
const unlock = await that.USERMUTEX.lock();
await that._prev();
unlock();
};
that.next = async function() {
const unlock = await that.USERMUTEX.lock();
await that._next();
unlock();
};
that.seek = async function(time) {
const unlock = await that.USERMUTEX.lock();
await that._seek(time);
unlock();
};
that.pborderchange = async function(pbstate) {
const unlock = await that.USERMUTEX.lock();
await that._pborderchanged(pbstate);
unlock();
};
that.getarturl = function(track) {
// already determined art > already download art from the gui mapped to the same url > art mapped to the same folder path > the default CD image (embedded below)
return track.md.artbloburl || that.guiarturl[that.gui.getarturl(track.md.trackname)] || that.foldermap.GetArt(track.md.trackname) || that.cdimage;
};
that.getmediametadata = function(track) {
return track.md.mediametadata ?? { title : track.md.trackname };
};
// start the audio pump
PumpAudio();
return that;
};
export default MHFSPlayer;
// CD image svg below
// By derex99 - Own work, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=3836116
CDIMAGE = `<?xml version="1.0" encoding="UTF-8"?>
<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="128px" height="128px" viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve">
<defs>
<filter id="Gaussian_Blur">
<feGaussianBlur in="SourceGraphic" stdDeviation="3"/>
</filter>
<filter id="Gaussian_Blur2">
<feGaussianBlur in="SourceGraphic" stdDeviation="1"/>
</filter>
</defs>
<g id="Layer_3" opacity="0.6">
<g>
<path d="M63.063,8.67c-30.427,0-55.092,24.666-55.092,55.092c0,30.428,24.666,55.093,55.092,55.093 c30.428,0,55.092-24.665,55.092-55.093C118.155,33.335,93.491,8.67,63.063,8.67z M63.063,79.033 c-7.609,0-13.777-6.168-13.777-13.776c0-7.609,6.168-1...
</g>
</g>
<g id="Layer_3_copy">
<g>
<path fill="#E5E5E5" stroke="#858585" stroke-width="0.5" d="M61.5,6.466c-30.427,0-55.092,24.666-55.092,55.092 c0,30.428,24.666,55.092,55.092,55.092c30.428,0,55.092-24.664,55.092-55.092C116.592,31.132,91.928,6.466,61.5,6.466z M61.5,76.83c-7.6...
</g>
</g>
<g id="Layer_1">
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="56.686" y1="13.9155" x2="66.353" y2="109.582">
<stop offset="0" style="stop-color:#CCCCCC"/>
<stop offset="1" style="stop-color:#A1A6A8"/>
</linearGradient>
<path fill="url(#SVGID_1_)" d="M61.5,8.389c-29.365,0-53.17,23.805-53.17,53.17s23.805,53.17,53.17,53.17 s53.17-23.805,53.17-53.17S90.865,8.389,61.5,8.389z M61.5,76.297c-7.344,0-13.297-5.953-13.297-13.296S54.156,49.705,61.5,49.705 c7.343,0,13.2...
</g>
<g>
<g>
<defs>
<path id="SVGID_2_" d="M61.5,8.389c-29.365,0-53.17,23.805-53.17,53.17s23.805,53.17,53.17,53.17s53.17-23.805,53.17-53.17 S90.865,8.389,61.5,8.389z M61.5,76.297c-7.344,0-13.297-5.953-13.297-13.296S54.156,49.705,61.5,49.705 c7.343,0,13.297...
</defs>
<clipPath id="SVGID_3_">
<use xlink:href="#SVGID_2_" overflow="visible"/>
</clipPath>
<polygon opacity="0.5" clip-path="url(#SVGID_3_)" fill="#FF3D45" points="152.237,72.892 61.5,64.288 -29.238,72.892 -29.238,55.687 61.5,64.288 152.237,55.687 " style="filter:url(#Gaussian_Blur)"/>
<polygon opacity="0.5" clip-path="url(#SVGID_3_)" fill="#E0FFFF" points="-10.94,127.093 61.184,63.012 75.678,-32.375 133.301,-1.077 61.184,63.012 46.678,158.391 " style="filter:url(#Gaussian_Blur)"/>
<polygon clip-path="url(#SVGID_3_)" fill="#FFFFFF" points="0.146,133.114 61.182,63.011 86.764,-26.354 122.215,-7.099 61.182,63.011 35.592,152.368 " style="filter:url(#Gaussian_Blur)"/>
<polygon opacity="0.5" clip-path="url(#SVGID_3_)" fill="#FF8000" points="144.783,84.571 61.5,64.288 -24.111,60.02 -21.784,44.008 61.5,64.288 147.11,68.559 " style="filter:url(#Gaussian_Blur)"/>
<polygon opacity="0.5" clip-path="url(#SVGID_3_)" fill="#FFFF00" points="137.329,96.25 61.5,64.288 -18.984,47.148 -14.329,32.329 61.5,64.288 141.984,81.431 " style="filter:url(#Gaussian_Blur)"/>
<polygon opacity="0.5" clip-path="url(#SVGID_3_)" fill="#5EFF00" points="129.875,107.929 61.5,64.288 -13.857,34.276 -6.875,20.65 61.5,64.288 136.857,94.303 " style="filter:url(#Gaussian_Blur)"/>
<polygon opacity="0.5" clip-path="url(#SVGID_3_)" fill="#00D3DF" points="122.421,119.608 61.5,64.289 -8.73,21.403 0.58,8.97 61.5,64.289 131.731,107.175 " style="filter:url(#Gaussian_Blur)"/>
<polygon opacity="0.5" clip-path="url(#SVGID_3_)" fill="#0012DF" points="114.967,131.287 61.501,64.289 -3.604,8.532 8.034,-2.708 61.501,64.289 126.605,120.047 " style="filter:url(#Gaussian_Blur)"/>
<polygon opacity="0.5" clip-path="url(#SVGID_3_)" fill="#6B476B" points="107.513,142.967 61.501,64.289 1.523,-4.34 15.488,-14.387 61.501,64.289 121.479,132.919 " style="filter:url(#Gaussian_Blur)"/>
</g>
</g>
</g>
<g id="Layer_2">
<g>
<path opacity="0.22" fill="#636363" stroke="#000000" stroke-width="0.25" d="M61.5,46.661c-9.024,0-16.34,7.315-16.34,16.34 c0,9.024,7.315,16.339,16.34,16.339S77.84,72.024,77.84,63C77.84,53.976,70.524,46.661,61.5,46.661z M61.5,68.316 c-2.986,0-...
</g>
<circle opacity="0.5" fill="none" stroke="#505050" stroke-width="0.25" cx="61.5" cy="62.88" r="10.693"/>
<ellipse opacity="0.3" fill="none" stroke="#505050" stroke-width="0.25" cx="61.5" cy="62.88" rx="6.788" ry="6.667"/>
</g>
</svg>`;
( run in 0.536 second using v1.01-cache-2.11-cpan-f56aa216473 )