Skip to content

Commit 2fd589c

Browse files
committed
Recorder增加非浏览器环境支持,大幅精简编码器源码,重写并复活RecordApp(和老版本RecordApp不兼容)
- 新增国际化多语言i18n支持 - 新增微信小程序Demo项目 - 新增uni-app Demo项目,和Recorder-UniCore组件 - 优化mp3编码器,源码精简掉一半 - 优化amr编码器,源码精简掉一半 - 优化ogg编码器,源码精简掉一半 - pcm、g711x、amr、ogg编码器提供实时编码支持(边录边转码)
1 parent 6105fc4 commit 2fd589c

File tree

153 files changed

+49440
-52466
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+49440
-52466
lines changed

QuickStart.html

Lines changed: 164 additions & 136 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 221 additions & 140 deletions
Large diffs are not rendered by default.

app-support-sample/QuickStart.html

Lines changed: 289 additions & 202 deletions
Large diffs are not rendered by default.

app-support-sample/README.md

Lines changed: 334 additions & 276 deletions
Large diffs are not rendered by default.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<script>
2+
export default {
3+
onLaunch: function() {
4+
console.log('App Launch')
5+
},
6+
onShow: function() {
7+
console.log('App Show')
8+
},
9+
onHide: function() {
10+
console.log('App Hide')
11+
}
12+
}
13+
</script>
14+
15+
<style>
16+
/*每个页面公共css */
17+
</style>

app-support-sample/demo_UniApp/README.md

Lines changed: 535 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<script>
6+
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
7+
CSS.supports('top: constant(a)'))
8+
document.write(
9+
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
10+
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
11+
</script>
12+
<title></title>
13+
<!--preload-links-->
14+
<!--app-context-->
15+
</head>
16+
<body>
17+
<div id="app"><!--app-html--></div>
18+
<script type="module" src="/main.js"></script>
19+
</body>
20+
</html>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import App from './App'
2+
3+
// #ifndef VUE3
4+
import Vue from 'vue'
5+
import './uni.promisify.adaptor'
6+
Vue.config.productionTip = false
7+
App.mpType = 'app'
8+
const app = new Vue({
9+
...App
10+
})
11+
app.$mount()
12+
// #endif
13+
14+
// #ifdef VUE3
15+
import { createSSRApp } from 'vue'
16+
export function createApp() {
17+
const app = createSSRApp(App)
18+
return {
19+
app
20+
}
21+
}
22+
// #endif
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"name" : "RecordAppTest",
3+
"appid" : "",
4+
"description" : "",
5+
"versionName" : "1.0.0",
6+
"versionCode" : "100",
7+
"transformPx" : false,
8+
/* 5+App特有相关 */
9+
"app-plus" : {
10+
"usingComponents" : true,
11+
"nvueStyleCompiler" : "uni-app",
12+
"compilerVersion" : 3,
13+
"splashscreen" : {
14+
"alwaysShowBeforeRender" : true,
15+
"waiting" : true,
16+
"autoclose" : true,
17+
"delay" : 0
18+
},
19+
/* 模块配置 */
20+
"modules" : {},
21+
/* 应用发布信息 */
22+
"distribute" : {
23+
/* android打包配置 */
24+
"android" : {
25+
"permissions" : [
26+
"<uses-feature android:name=\"android.hardware.camera\"/>",
27+
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
28+
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
29+
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
30+
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
31+
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
32+
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
33+
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
34+
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
35+
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
36+
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>"
37+
]
38+
},
39+
/* ios打包配置 */
40+
"ios" : {
41+
"privacyDescription" : {
42+
"NSMicrophoneUsageDescription" : "录音功能需要访问麦克风"
43+
}
44+
},
45+
/* SDK配置 */
46+
"sdkConfigs" : {}
47+
}
48+
},
49+
/* 快应用特有相关 */
50+
"quickapp" : {},
51+
/* 小程序特有相关 */
52+
"mp-weixin" : {
53+
"appid" : "",
54+
"setting" : {
55+
"urlCheck" : false
56+
},
57+
"usingComponents" : true
58+
},
59+
"mp-alipay" : {
60+
"usingComponents" : true
61+
},
62+
"mp-baidu" : {
63+
"usingComponents" : true
64+
},
65+
"mp-toutiao" : {
66+
"usingComponents" : true
67+
},
68+
"uniStatistics" : {
69+
"enable" : false
70+
},
71+
"vueVersion" : "2"
72+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "recorder-demo_UniApp",
3+
"version": "1.0.0",
4+
"dependencies": {
5+
"recorder-core": "*"
6+
}
7+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
3+
{
4+
"path" : "pages/recTest/page_index",
5+
"style" : {
6+
"navigationBarTitleText": "RecordApp录音测试 - uni-app"
7+
}
8+
},
9+
{
10+
"path" : "pages/recTest/page_index2",
11+
"style" : {
12+
"navigationBarTitleText": "RecordApp新开页面index - uni-app"
13+
}
14+
},
15+
{
16+
"path" : "pages/recTest/main_recTest",
17+
"style" : {
18+
"navigationBarTitleText": "RecordApp新开页面main - uni-app"
19+
}
20+
},
21+
{
22+
"path" : "pages/recTest/page_i18n",
23+
"style" : {
24+
"navigationBarTitleText": "RecordApp国际化多语言 - uni-app"
25+
}
26+
},
27+
{
28+
"path" : "pages/recTest/page_nvue",
29+
"style" : {
30+
"navigationBarTitleText": "RecordApp nvue原生页面 - uni-app"
31+
}
32+
},
33+
{
34+
"path" : "pages/recTest/page_renderjsOnly",
35+
"style" : {
36+
"navigationBarTitleText": "RecordApp纯renderjs调用 - uni-app"
37+
}
38+
}
39+
],
40+
"globalStyle": {
41+
"navigationBarTextStyle": "black",
42+
"navigationBarTitleText": "uni-app",
43+
"navigationBarBackgroundColor": "#F8F8F8",
44+
"backgroundColor": "#F8F8F8"
45+
},
46+
"uniIdRouter": {}
47+
}

0 commit comments

Comments
 (0)