当前位置:网站首页>网页红警,如何将存入本地的音频转成可播放状态
网页红警,如何将存入本地的音频转成可播放状态
2022-07-21 12:55:00 【暮志未晚Webgl】
之前资源加载,我实现了将资源以ArrayBuffer的形式保存到的本地Indexeddb中,里面包含很多的音频文件,那么,如何将音频文件拿出以后,直接播放呢?
有两个方法可以实现:
- URL.createObjectURL(blob); 可以将blob二进制文件生成一个链接,aodio可以直接拿这个链接播放音乐。
- URL.revokeObjectURL(url) 可以将生成的链接释放掉,及时销毁链接以及引用的资源。
有了这两个方法,我就实现了,本地存储音频资源,并直接播放。
边栏推荐
- Eye of depth (XV) -- derivative
- Sdl2 concise tutorial (III): display pictures
- DRF -- users user module
- Shell foundation
- window10系统常用操作
- 振华风光半导体通过注册:年营收5亿 中国电子是实控人
- 配置.browserslistrc 做浏览器适配
- Vscode add include library
- July training (day 21) - heap (priority queue)
- [chestnut sugar GIS] how do individual users of Tencent conference change their names
猜你喜欢
DRF--users用户模块
文件上传基础详解
DRF--JWT2-用户认证-自定义控制simpjwt返回内容
颠覆认知!保研的方法竟然多达13种?
scratch成绩查询 电子学会图形化编程scratch等级考试四级真题和答案解析2022年6月
Example demonstration of "uncover the secrets of asp.net core 6 framework" [04]: Custom dependency injection framework
Ningmeng film and television passed the hearing: Tencent and mango cultural innovation are shareholders with an annual revenue of 1.2 billion
DRF -- users user module
eslint的命令行使用
Detailed explanation of the specific configuration method of FANUC robot user-defined alarm
随机推荐
基于SqlSugar的开发框架循序渐进介绍(12)-- 拆分页面模块内容为组件,实现分而治之的处理
Niuke.com released a new digital logic question bank! Will it lead to more volume in fpga/ic industry this year?!!
Musk uploaded that his brain was crazy, but neuralink was already a chicken feather
【板栗糖GIS】bat—如何对子文件中的数据进行批量重命名
云洲智能IPO被终止:年营收2.5亿亏1.3亿 曾拟募资15.5亿
Xuantai pharmaceutical passed the registration: it plans to raise 600million yuan, and Lianhe investment is the major shareholder
人类月球日 | 专访邹海洋:中国的航天梦,是信任与不辜负的故事
DRF -- users user module
《ASP.NET Core 6框架揭秘》实例演示[04]:自定义依赖注入框架
Codeforces Round #807 (Div. 2)
DRF--JWT2-用户认证-自定义控制simpjwt返回内容
从0写bootloader — Bootloader重定位APP
LeetCode-179-最大数
Command line use of eslint
[chestnut sugar GIS] ArcMap -- how to make text four Zhi of surface data
If there is out in PG function, returns setof record as is ignored$$
Symbol的使用,es6获取key值的新方法
July training (day 21) - heap (priority queue)
Geotools learning reference article
年中盘点 | 2022年,PaaS 再升级