Closed dascritch closed 3 years ago
Or may be using node cloning ? https://developer.mozilla.org/fr/docs/Web/API/Node/cloneNode
May be we just need a new attribute on <cpu-controller>
: <cpu-controller persistent>
...
Or estimate this controller will always be persistent, instead of <cpu-audio>
may be removed at any moment ?
Make some room to addPlane() on <audio>
even from <Cpu-controller>
It WON'T be optional, but mandatory : simpler code, simpler handling for the integrator. I've got an idea the re-tweak switchControllerTo()
Playlist system musty be reworked. Or may be create an add-on for persistent playlist, instead of dom based playlist
Playlist should have another structure, more in a kind of history playlist. If cpu-audio with ID not anymore in the DOM, if globalController, create a new audio with stored data, but we will have lot of issues due to source/tracks features.
Let's rethink that before writing
We have a player
<cpu-audio>
and a global controller<cpu-controller>
webcomponents. Both works perfectly on static pages. But in a Single Page Application where we would browse among pages while listening to a sound, we may lose everything into the articles (so the players) and the<cpu-controller>
will have nothing.So we should modify internals so that i f a page has a
<cpu-controller>
:<cpu-controller>
will create a shadow<audio>
tag<audio>
declared into the<cpu-audio>
<cpu-audio>
destruction.Perhaps we should create a new webcomponent, a
<cpu-persistent>
? The main problem is that a third-part javascript will lose access to the playing<audio>
tag's API.What would be the best scenario ?
<audio>
into<cpu-controller>
?