We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3f4bda8 commit b20ac76Copy full SHA for b20ac76
Assets/Plugins/WebGL/WebTools/WebToolPlugins.jslib
@@ -172,10 +172,18 @@ var WebGlPlugins =
172
},
173
174
_Vibrate: function(durationInMs) {
175
+ if (!navigator.vibrate) {
176
+ console.warn("Vibration API is not supported in this browser.");
177
+ return;
178
+ }
179
navigator.vibrate(durationInMs);
180
181
182
_VibratePattern: function(durationsInMs, length) {
183
184
185
186
187
var pattern = [];
188
for (var i = 0; i < length; i++) {
189
pattern.push(HEAP32[(durationsInMs >> 2) + i]);
0 commit comments