-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
188 lines (181 loc) · 7.06 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="bundle.css" />
<title>Audio Orchestration Template</title>
</head>
<body>
<div id="app"></div>
<script src="main.bundle.js"></script>
<script>
// This config object is generated by Audio Orchestrator and will be replaced on export or
// preview. Defaults, documentation, and additional settings can be found in src/config.js.
const config = {
// Set the type and endpoint for your synchronisation server. See the Readme file for how
// to set this up. The first example is for a public cloud-sync server that will connect
// via secure websockets on the standard HTTPS port:
// SYNC_ENDPOINT: { type: 'cloud-sync', hostname: 'cloudsync.example.com' },
// The second example is for a local server that uses plain websockets on a specific port:
// SYNC_ENDPOINT: { type: 'cloud-sync', hostname: '127.0.0.1', port: 9001 },
// The default in the template repository uses the experimental peerjs sync adapter, which
// defaults to a public server but also accepts options as in https://peerjs.com/docs.html.
SYNC_ENDPOINT: {
type: 'peerjs',
},
// This is the contentId of the first sequence to play.
INITIAL_CONTENT_ID: 'loop',
// This object describes the structure of the experience by listing all available content
// sequences, their descriptions, and links between them.
SEQUENCE_URLS: [
{
contentId: 'loop',
url: 'audio/clicks-and-tone/loop.json',
hold: false,
skippable: true,
// Show the joining instructions overlay during this sequence.
instructions: true,
// You can set a sequence to automatically follow the first choice listed below once
// this many aux devices have been connected.
transitionOnMinNumberOfAuxDevices: 3,
next: [
{
contentId: 'main',
label: 'Hidden default choice',
// The 'hidden' flag hides the button associated with this choice. It might be used
// as a hidden default choice, or as a debug tool (e.g. by having short cuts only
// visible during development).
hidden: true,
},
{
contentId: 'main',
label: 'Go left',
},
{
contentId: 'main',
label: 'Go right',
},
{
contentId: 'main',
label: 'Look around you some more',
},
{
contentId: 'main',
label: 'Main content',
// The 'thumbnail' flag shows this choice in a separate block, pulling an image and
// URL from the entry for the sequence referred to by the contentId.
thumbnail: true,
},
],
},
{
contentId: 'main',
url: 'audio/clicks-and-tone/sequence.json',
hold: true,
skippable: false,
next: [
{
contentId: 'main',
label: 'Listen Again',
},
],
// A sequence that is used in a choice with the thumbnail flag should have these
// additional properties to set the image, text labels, and duration in seconds.
// If they are defined, the image, title, and subtitle will also be shown in the
// player instead of the default while this sequence is playing.
sequenceImage: 'images/sequence-example-image.jpg',
sequenceImageAlt: 'the audio orchestrator default image with a blue colour filter applied',
sequenceTitle: 'Main sequence',
sequenceSubtitle: 'More tone and clicks',
duration: 30.0,
},
],
// This object describes any user interface controls that should appear on the devices,
// including their allocation behaviours.
CONTROLS: [
{
controlId: 'radio-buttons',
controlName: 'Radio buttons',
controlType: 'radio',
controlDefaultValues: ['none'],
controlParameters: {
options: [
{ value: 'foo', label: 'Foo' },
{ value: 'bar', label: 'Bar' },
{ value: 'other', label: 'Other' },
],
},
controlBehaviours: [
{ behaviourType: 'spread' },
{ behaviourType: 'allowedEverywhere' },
],
},
{
controlId: 'checkboxes',
controlName: 'Checkboxes',
controlType: 'checkbox',
controlDefaultValues: ['foo', 'bar'],
controlParameters: {
options: [
{ value: 'foo', label: 'Foo' },
{ value: 'bar', label: 'Bar' },
{ value: 'other', label: 'Other' },
],
},
controlBehaviours: [
{ behaviourType: 'spread' },
{ behaviourType: 'allowedEverywhere' },
],
},
{
controlId: 'slider',
controlName: 'Slider',
controlType: 'range',
controlDefaultValues: [0],
controlParameters: {
min: -1.0,
max: 1.0,
step: 0.1,
},
controlBehaviours: [
{ behaviourType: 'spread' },
{ behaviourType: 'allowedEverywhere' },
],
},
{
controlId: 'counter-button',
controlName: 'Counter button',
controlType: 'counter',
controlDefaultValues: [0],
controlParameters: {
step: 1,
label: 'Shuffle',
},
controlBehaviours: [
{ behaviourType: 'spread' },
{ behaviourType: 'allowedEverywhere' },
],
},
],
DEBUG_UI: true,
DEVICE_DEBUG_UI: true,
CALIBRATION_SEQUENCE_URL: 'audio/calibration/sequence.json',
TEXT_TITLE: 'Title',
TEXT_SUBTITLE: 'Subtitle',
TEXT_INTRODUCTION: 'Introduction',
TEXT_START_LABEL: 'Start new session',
TEXT_JOIN_LABEL: 'Join existing session',
TEXT_ONBOARDING_TITLE: 'Connect devices',
TEXT_ONBOARDING_DESCRIPTION: 'Share the link or scan the QR code to connect your phones, tablets, or laptops.',
PLAYER_IMAGE_URL: 'images/orchestrator-default-image.jpg',
PLAYER_IMAGE_ALT: 'Audio Orchestrator default image',
};
// Instantiate the React app to render into the #app div:
initOrchestrationTemplate(document.getElementById('app'), config);
</script>
<noscript>
This page requires JavaScript to be enabled.
</noscript>
</body>
</html>