当前位置:网站首页>flutter 音乐 录音 播放 audioplayers
flutter 音乐 录音 播放 audioplayers
2022-06-30 15:50:00 【小红花~】
注意场景 :
AudioPlayer audioPlayer = AudioPlayer();
注意 : 以前都是 audioPlayer.play("这里是路径");
现在 1.0.0 开始
audioPlayer.play("这里是资源 而不能是字符串"),
改完 await audioPlayer?.play(UrlSource("这里是路径 : 例如 xxxx.mp3"));
播放状态监听 audioPlayer?.onPlayerStateChanged.listen((PlayerState statue) {
.....
});
播放位置监听: audioPlayer.onPositionChanged.listen((event) { });
播放完成 : playerCompletion = audioPlayer?.onPlayerComplete.listen((event) {
});
停止播放: audioPlayer.stop();
暂停播放: audioPlayer.pause();
恢复播放:audioPlayer.resume();
销毁:audioPlayer.dispose();
边栏推荐
- Mathematical modeling for war preparation 35 time series prediction model
- CGR 21 (D,E,F)
- OpenCV中LineTypes各枚举值(LINE_4 、LINE_8 、LINE_AA )的含义
- nichenet实战silicosis
- Sub chain cross technology source level exploration: an overview of xcvm
- Deep learning - (2) several common loss functions
- 泰山OFFICE技术讲座:同一行不同字号的字如何对齐绘制
- 将 EMQX Cloud 数据通过公网桥接到 AWS IoT
- How to connect the Internet Reading Notes - Summary
- TCP Socket与TCP 连接
猜你喜欢

数据安全合规之后,给风控团队带来了新的问题
![[activity registration] it's your turn to explore the yuan universe! I will be waiting for you in Shenzhen on July 2!](/img/cf/6fc5f7cafbdc5e165eb119b9b41cd9.jpg)
[activity registration] it's your turn to explore the yuan universe! I will be waiting for you in Shenzhen on July 2!

华为帐号多端协同,打造美好互联生活

八大基本排序(详解)

flutter自定义组件

JS Es5 can also create constants?

Mysql8 NDB cluster installation and deployment

Etcd教程 — 第八章 Etcd之Compact、Watch和Lease API

ssh工具 pyqt

Etcd tutorial - Chapter 9 etcd implementation of distributed locks
随机推荐
声网自研传输层协议 AUT 的落地实践丨Dev for Dev 专栏
补充材料 supplementary
Home office discussion on the experience of remote assistance to quickly improve efficiency | community essay solicitation
Data mining knowledge points sorting (final review version)
[Demo] 循环写文件
A scheduled task deletes data at a specified time
【JVM】一文带你了解JVM中的垃圾回收机制(GC)——内含图解
[200 opencv routines] 215 Drawing approximate ellipse based on polyline
Compile u-boot source code for stm32p157 development board
CMakeLists 基础
“推广+搞笑剧情”,如何碰撞出爆款的火花?
Consolidate entry-C basic variables and constants
Mathematical modeling for war preparation 34-bp neural network prediction 2
simpleITK读取nii遇到ITK only supports orthonormal direction cosines的错误
CGR 21 (D,E,F)
将 EMQX Cloud 数据通过公网桥接到 AWS IoT
STL教程7-set、pair对组和仿函数
TCP Socket与TCP 连接
Nichenet actual silicosis
geo 读取单细胞csv表达矩阵 单细胞 改列名 seurat