mirror of
https://github.com/Monibuca/plugin-preview.git
synced 2025-12-24 13:38:02 +08:00
增加解除静音操作
This commit is contained in:
@@ -5,6 +5,20 @@
|
||||
<title>M7s Preview 预览</title>
|
||||
</head>
|
||||
<body>
|
||||
<a href="javascript:void 0" id="unmute">解除静音</a>
|
||||
<script src="jessibuca-pro.js"></script>
|
||||
<script>
|
||||
(function(){
|
||||
var ctx = new AudioContext();
|
||||
if(ctx.state == "running"){
|
||||
document.getElementById("unmute").style.display = "none";
|
||||
} else {
|
||||
ctx.onstatechange = ()=> {
|
||||
if(ctx.state == 'running'){
|
||||
document.getElementById("unmute").style.display = "none";
|
||||
}
|
||||
}}
|
||||
})()
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user