Web demo: don't show scope on mobile browsers
This commit is contained in:
parent
4d158cba47
commit
83f32d337b
@ -156,12 +156,15 @@
|
||||
};
|
||||
let configValues = Object.assign({}, configValuesInitial);
|
||||
|
||||
// add scope, for fun
|
||||
let scope = await Scope(audioContext);
|
||||
scope.connect(audioContext.destination);
|
||||
let scopeFrame = scope.openInterface();
|
||||
scopeFrame.id = 'scope';
|
||||
document.body.appendChild(scopeFrame);
|
||||
let scope;
|
||||
if (!/Mobi|Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile/.test(navigator.userAgent)) {
|
||||
// add scope for fun, but only on desktop
|
||||
scope = await Scope(audioContext);
|
||||
scope.connect(audioContext.destination);
|
||||
let scopeFrame = scope.openInterface();
|
||||
scopeFrame.id = 'scope';
|
||||
document.body.appendChild(scopeFrame);
|
||||
}
|
||||
|
||||
// Drop zone
|
||||
document.body.ondragover = event => {
|
||||
@ -195,7 +198,7 @@
|
||||
stretch.disconnect();
|
||||
}
|
||||
stretch = await SignalsmithStretch(audioContext);
|
||||
stretch.connect(scope);
|
||||
stretch.connect(scope || audioContext.destination);
|
||||
await stretch.addBuffers(channelBuffers);
|
||||
controlValues.loopEnd = audioDuration;
|
||||
configChanged();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user