forked from xiangyuecn/Recorder
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
93f9450
commit fef31a5
Showing
12 changed files
with
363 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# Recorder:recorder-core 用于html5录音 | ||
|
||
GitHub: [https://github.com/xiangyuecn/Recorder](https://github.com/xiangyuecn/Recorder),详细使用方法和支持请参考Recorder的GitHub仓库。 | ||
|
||
npm recorder这个名字已被使用,因此在Recorder基础上增加后缀-core,就命名为recorder-core,和Recorder核心文件同名。 | ||
|
||
@@Ref 编辑提醒@@ | ||
@@Ref 编辑提醒@@ | ||
@@Ref 编辑提醒@@ | ||
|
||
|
||
# 如何使用 | ||
|
||
**注意:[需要在https等安全环境下才能进行录音](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#Privacy_and_security)** | ||
|
||
## 【1】通过npm安装 | ||
``` | ||
npm install recorder-core | ||
``` | ||
|
||
## 【2】引入Recorder库 | ||
**方式一**:通过import/require引入 | ||
|
||
@@Ref README.ImportCode@@ | ||
|
||
**方式二**:使用script标签引入 | ||
|
||
这种方式和GitHub上的代码使用没有差别,请阅读[GitHub仓库](https://github.com/xiangyuecn/Recorder)获得更详细的使用文档。 | ||
``` html | ||
<script src="你项目中的路径/recorder-core.js"></script> <!--必须引入的录音核心--> | ||
<script src="你项目中的路径/engine/mp3.js"></script> <!--相应格式支持文件--> | ||
<script src="你项目中的路径/engine/mp3-engine.js"></script> <!--如果此格式有额外的编码引擎的话,也要加上--> | ||
|
||
<script src="你项目中的路径/extensions/waveview.js"></script> <!--可选的扩展支持项--> | ||
``` | ||
|
||
## 【3】调用录音 | ||
@@Ref README.Codes@@ | ||
|
||
|
||
## WaveView的调用方式 | ||
直接通过Recorder.WaveView调用即可,详细的使用请参考[GitHub仓库](https://github.com/xiangyuecn/Recorder)里面的README | ||
|
||
@@Ref README.WaveView.Codes@@ | ||
|
||
|
||
## RecordApp的调用方式 | ||
**方式一**:通过import/require引入 | ||
|
||
@@Ref RecordApp.README.ImportCode@@ | ||
|
||
**方式二**:使用script标签引入 | ||
|
||
这种方式和GitHub上的代码使用没有差别,请阅读[GitHub仓库内RecordApp](https://github.com/xiangyuecn/Recorder/tree/master/app-support-sample)获得更详细的使用文档。 | ||
``` html | ||
<!-- 可选的独立配置文件,参考上面import的解释 --> | ||
<script src="你的配置文件目录/native-config.js"></script> | ||
<script src="你的配置文件目录/ios-weixin-config.js"></script> | ||
|
||
<!-- 在需要录音功能的页面引入`app-support/app.js`文件即可。 | ||
app.js会自动加载Recorder和编码引擎文件,应确保app.js内BaseFolder目录的正确性。 | ||
(压缩时可以把所有支持文件压缩到一起,会检测到组件已自动加载) | ||
(**注意:需要在https等安全环境下才能进行录音**) --> | ||
<script src="你项目中的路径/app-support/app.js"></script> | ||
``` | ||
|
||
### 调用录音 | ||
@@Ref RecordApp.README.Codes@@ | ||
|
||
|
||
-------- | ||
> 以下文档为GitHub仓库内的README原文,可能更新不及时,请到[GitHub仓库](https://github.com/xiangyuecn/Recorder)内查看最新文档 | ||
@@Ref README.Raw@@ | ||
|
||
|
||
@@Remove Start@@ | ||
# 作者自用:本npm包如何编写提交 | ||
|
||
1. 运行根目录/src:npm start,进行文件copy | ||
2. 进入assets/npm-home/npm-files目录,进行提交 | ||
|
||
@@Remove End@@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[ | ||
{ | ||
"sha1": "2cdef7c21b86f2bac5d8cafd3ec7b4d170dcfddf", | ||
"time": "2019-12-1 13:37:01" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"name": "recorder-core", | ||
"version": "1.0.123456.9999", | ||
"description": "html5 js 录音 mp3 wav ogg webm amr 格式,支持pc和Android、ios部分浏览器、和Hybrid App(提供Android IOS App源码),微信也是支持的,提供H5版语音通话聊天示例", | ||
"homepage": "https://github.com/xiangyuecn/Recorder", | ||
"main": "src/recorder-core.js", | ||
"keywords": [ | ||
"recorder", | ||
"record", | ||
"录音", | ||
"h5录音", | ||
"html5", | ||
"mp3", | ||
"wav", | ||
"recording" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/xiangyuecn/Recorder.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/xiangyuecn/Recorder/issues" | ||
}, | ||
"author": "xiangyuecn", | ||
"license": "MIT" | ||
} |
Oops, something went wrong.