dascritch / cpu-audio

An audio WebComponent to provide timecoded links and other features to an audio tag
https://dascritch.github.io/cpu-audio/
GNU Lesser General Public License v3.0
24 stars 2 forks source link

Include specific JS code in themed build #132

Open dascritch opened 3 years ago

dascritch commented 3 years ago

It's quite easy : we already build a javascript to include CSS and HTML template in the ./make.sh system. We can see if we have a specific.js , include it in a document.addEventListener('CPU_ready', function, {once:true});

It won't have access to most of the private methods, but it may be enough.

dascritch commented 3 years ago

Watch out, as CPU_ready is triggered for EACH webcomponent started on the page. If you've got 3 players and 1 controller, you will get 4 calls.