javascript - 如何在屏幕关闭或启动第二个时暂停音频标签
问题描述
我正在尝试在移动屏幕关闭或运行第二个音频标签时暂停音频。这是我的 html 代码的示例
<audio controls>
<source src="audio1.mp3">
Does not support the audio element.
</audio>
<audio controls>
<source src="audio2.mp3">
Does not support the audio element.
</audio>
不幸的是,我不知道如何让 EventListener 来检查上述情况。
解决方案
推荐阅读
- python - 根据两个numpy数组上的多个条件创建numpy数组
- ios - UIViewController 的字典属性被设置但在 viewDidLoad() 中为空
- javascript - Marklogic 异常处理
- go - 使用字符串访问 []byte 类型的结构字段
- java - 如何在 JUnit 中测试这样的复杂方法?
- java - “BufferedReader”与“java.io.BufferedReader”。有关系吗?
- python - 如何在 Keras LSTM 网络中使批量大小大于 1?
- ffmpeg - 从 VLC 中获取未压缩的 h.264 视频剪辑的最快和最可靠的方法
- macos - Mac OSX Docker Desktop alpine 容器无法与特定主机通信
- python - 带有请求模块的 ConnectionResetError 在异常内部引发异常,导致程序崩溃