声音播放
This commit is contained in:
parent
6e1ff7fb56
commit
55094fc24d
|
|
@ -1168,6 +1168,24 @@
|
||||||
showPttResult("接口 getTempGroupId 不可用");
|
showPttResult("接口 getTempGroupId 不可用");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function playNativeAlert() {
|
||||||
|
if (window.android && window.android.playAlert) {
|
||||||
|
var count = parseInt(document.getElementById('alert-count').value) || 3;
|
||||||
|
var volume = parseFloat(document.getElementById('alert-volume').value) || 1.0;
|
||||||
|
window.android.playAlert(count, volume);
|
||||||
|
} else {
|
||||||
|
alert("播放提示音接口未就绪");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function stopNativeAlert() {
|
||||||
|
if (window.android && window.android.stopAlert) {
|
||||||
|
window.android.stopAlert();
|
||||||
|
} else {
|
||||||
|
alert("停止播放接口未就绪");
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue