Skip to content

Commit

Permalink
Recorder增加非浏览器环境支持,大幅精简编码器源码,重写并复活RecordApp(和老版本RecordApp不兼容)
Browse files Browse the repository at this point in the history
- 新增国际化多语言i18n支持
- 新增微信小程序Demo项目
- 新增uni-app Demo项目,和Recorder-UniCore组件
- 优化mp3编码器,源码精简掉一半
- 优化amr编码器,源码精简掉一半
- 优化ogg编码器,源码精简掉一半
- pcm、g711x、amr、ogg编码器提供实时编码支持(边录边转码)
  • Loading branch information
xiangyuecn committed Dec 1, 2023
1 parent 6105fc4 commit 2fd589c
Show file tree
Hide file tree
Showing 153 changed files with 49,440 additions and 52,466 deletions.
300 changes: 164 additions & 136 deletions QuickStart.html

Large diffs are not rendered by default.

361 changes: 221 additions & 140 deletions README.md

Large diffs are not rendered by default.

491 changes: 289 additions & 202 deletions app-support-sample/QuickStart.html

Large diffs are not rendered by default.

610 changes: 334 additions & 276 deletions app-support-sample/README.md

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions app-support-sample/demo_UniApp/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<script>
export default {
onLaunch: function() {
console.log('App Launch')
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>

<style>
/*每个页面公共css */
</style>
535 changes: 535 additions & 0 deletions app-support-sample/demo_UniApp/README.md

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions app-support-sample/demo_UniApp/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<script>
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
CSS.supports('top: constant(a)'))
document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<title></title>
<!--preload-links-->
<!--app-context-->
</head>
<body>
<div id="app"><!--app-html--></div>
<script type="module" src="/main.js"></script>
</body>
</html>
22 changes: 22 additions & 0 deletions app-support-sample/demo_UniApp/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
const app = createSSRApp(App)
return {
app
}
}
// #endif
72 changes: 72 additions & 0 deletions app-support-sample/demo_UniApp/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"name" : "RecordAppTest",
"appid" : "",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
/* 5+App特有相关 */
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
/* 模块配置 */
"modules" : {},
/* 应用发布信息 */
"distribute" : {
/* android打包配置 */
"android" : {
"permissions" : [
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>"
]
},
/* ios打包配置 */
"ios" : {
"privacyDescription" : {
"NSMicrophoneUsageDescription" : "录音功能需要访问麦克风"
}
},
/* SDK配置 */
"sdkConfigs" : {}
}
},
/* 快应用特有相关 */
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
"appid" : "",
"setting" : {
"urlCheck" : false
},
"usingComponents" : true
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "2"
}
7 changes: 7 additions & 0 deletions app-support-sample/demo_UniApp/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "recorder-demo_UniApp",
"version": "1.0.0",
"dependencies": {
"recorder-core": "*"
}
}
47 changes: 47 additions & 0 deletions app-support-sample/demo_UniApp/pages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path" : "pages/recTest/page_index",
"style" : {
"navigationBarTitleText": "RecordApp录音测试 - uni-app"
}
},
{
"path" : "pages/recTest/page_index2",
"style" : {
"navigationBarTitleText": "RecordApp新开页面index - uni-app"
}
},
{
"path" : "pages/recTest/main_recTest",
"style" : {
"navigationBarTitleText": "RecordApp新开页面main - uni-app"
}
},
{
"path" : "pages/recTest/page_i18n",
"style" : {
"navigationBarTitleText": "RecordApp国际化多语言 - uni-app"
}
},
{
"path" : "pages/recTest/page_nvue",
"style" : {
"navigationBarTitleText": "RecordApp nvue原生页面 - uni-app"
}
},
{
"path" : "pages/recTest/page_renderjsOnly",
"style" : {
"navigationBarTitleText": "RecordApp纯renderjs调用 - uni-app"
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"uniIdRouter": {}
}
Loading

0 comments on commit 2fd589c

Please sign in to comment.