···9090{{ echo -}}await foundation.processor.search(){{- /echo -}}
9191 </code>
9292 </div>
9393-9494- <p>
9595- <small>Features:</small>
9696- </p>
9797- <ul style="margin-bottom: 0;">
9898- <li>
9999- <span>Fill the queue automatically <small>(infinite play)</small></span>
100100- <div class="list-description">
101101- <code>await foundation.features.fillQueueAutomatically()</code>
102102- </div>
103103- </li>
104104- <li>
105105- <span>Play audio from the queue</span>
106106- <div class="list-description">
107107- <code>await foundation.features.playAudioFromQueue()</code>
108108- </div>
109109- </li>
110110- <li>
111111- <span>Process inputs <small>(into tracks, etc)</small></span>
112112- <div class="list-description">
113113- <code>await foundation.features.processInputs()</code>
114114- </div>
115115- </li>
116116- <li>
117117- <span>Search through your collection</span>
118118- <div class="list-description" style="margin-bottom: 0;">
119119- <code>await foundation.features.searchThroughCollection()</code>
120120- </div>
121121- </li>
122122- </ul>
12393 </section>
1249412595 <section class="flex">
···136106 While you have the ability to do whatever you want in a custom facet, the existing facets are designed to work a certain way; so here's some things to keep in mind:
137107 </p>
138108 <ul>
139139- <li><span>In most cases you'll want to call <code>foundation.features.processInputs()</code> so that your audio files and streams actually show up.</span></li>
140109 <li><span>Most elements are configured in broadcast mode so they communicate across tabs. There are a few exceptions such as inputs, where we prefer parallelisation.</span></li>
141110 <li><span>You can use facets in combination with themes by adding the elements used in the theme to a group and then passing in the group name as a URL query parameter (eg. <code>group=facets</code>)</span></li>
142111 </ul>
···11+import foundation from "~/common/facets/foundation.js";
22+foundation.orchestrator.processTracks({ disableWhenReady: false });
-3
src/facets/examples/now-playing/index.inline.js
···11import foundation from "~/common/facets/foundation.js";
22import { effect } from "~/common/signal.js";
3344-await foundation.features.processInputs();
55-await foundation.features.fillQueueAutomatically();
66-74const output = await foundation.orchestrator.output();
85const queue = await foundation.engine.queue();
96
+5-9
src/facets/guide.vto
···1111 <h3>Getting started</h3>
12121313 <p>
1414- To use these facets, simply open whichever ones provide the functionality that you're looking for at a given moment. You can browse existing facets here and create one too. If you found something you like, you can save it to your list and adjust it if need be.
1414+ To get started you can browse existing facets here on these pages, find one you like and then either you click the link in the title in case it's an <strong>interface</strong>. Or, you save it to your collection by using the toggle if it's a <strong>feature</strong>, which will activate it.
1515 </p>
1616 <p>
1717- For example, say you want to play music; two options would be: (1) <a href="{{ ('themes/webamp/browser/facet/index.html') |> facetLoaderURL }}">browse</a> for a specific song and add it to the queue, or (2) <a href="{{ ('facets/tools/auto-queue/index.html') |> facetLoaderURL }}">automatically</a> add a bunch of shuffled songs to the queue. Next, you need a way to play the items you added to the queue. That's where a <a href="{{ ('themes/blur/artwork-controller/facet/index.html') |> facetLoaderURL }}">controller</a> could be used.
1717+ For example, say you want to play music; two options would be: (1) <a href="{{ ('themes/webamp/browser/facet/index.html') |> facetLoaderURL }}">browse</a> for a specific song and add it to the queue, or (2) <a href="{{ ('facets/playback/auto-queue/index.html') |> facetLoaderURL }}">automatically</a> add a bunch of shuffled songs to the queue. Next, you need a way to play the items you added to the queue. That's where a <a href="{{ ('themes/blur/artwork-controller/facet/index.html') |> facetLoaderURL }}">controller</a> could be used.
1818 </p>
1919 <p>
2020- <em>You might ask, why can't I do all of this in just one window? That's what <a href="themes/">themes</a> are for, if you need something more streamlined. If you however want a customised experience, or prefer certain interfaces for certain things, that's what facets are for.</em>
2020+ <em>You might ask, why can't I do all of this in just one window? That's what <a href="themes/">themes</a> are for, if you need something more streamlined. If you however want a customised experience, or prefer certain interfaces for certain things with an infinite number of optional features, that's what facets are for.</em>
2121 </p>
2222 <p>
2323- <small><i class="ph-fill ph-info"></i> Every facet has access to your audio collection and your user data, along with any other shared state.</small>
2323+ <small><i class="ph-fill ph-info"></i> Every facet has access to your audio collection and your user data, along with any other shared state, be mindful of which facets you're interacting with.</small>
2424 </p>
2525 </section>
2626···3232 </p>
33333434 <p>
3535- <strong>It provides every user the ability to choose what features and interface they want to layer on top of their data.</strong> The data flow goes like so:
3636- </p>
3737-3838- <p>
3939- <em>Data → Transformers → Solo components → Configurators → Orchestrators → Facets</em>
3535+ <strong>It provides every user the ability to choose what features and interface they want to layer on top of their data.</strong>
4036 </p>
41374238 <p>
+8
src/facets/misc/scrobble/index.inline.js
···11+import foundation from "~/common/facets/foundation.js";
22+import { effect } from "~/common/signal.js";
33+44+effect(() => {
55+ if (foundation.signals.engine.audio()) {
66+ foundation.orchestrator.scrobbleAudio();
77+ }
88+});