Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
f4c3f324
Commit
f4c3f324
authored
Jun 09, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:企微录音mac调用
parent
449c3bb3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
src/common/js/wechatApi.js
+10
-2
src/modules/teach-tool/components/XMRecord.jsx
+8
-2
No files found.
src/common/js/wechatApi.js
View file @
f4c3f324
/*
* @Author: wufan
* @Date: 2021-05-11 10:21:37
* @LastEditors:
wufan
* @LastEditTime: 2021-06-0
2 16:51:26
* @LastEditors:
yuananting
* @LastEditTime: 2021-06-0
9 14:16:08
* @Description: 企业微信api
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
import
User
from
"@/common/js/user"
;
import
Service
from
"@/common/js/service"
;
import
Platform
from
"@/core/platform"
;
export
default
class
WechatApi
{
static
async
initConfig
(
params
=
{
isAgentConfig
:
false
,
url
:
""
})
{
...
...
@@ -29,6 +30,7 @@ export default class WechatApi {
"shareToExternalContact"
,
"selectExternalContact"
,
"selectEnterpriseContact"
,
'startRecord'
,
],
});
...
...
@@ -129,4 +131,10 @@ export default class WechatApi {
});
});
}
static
startRecord
()
{
if
(
Platform
.
isWorkWx
())
{
wx
.
startRecord
();
}
}
}
src/modules/teach-tool/components/XMRecord.jsx
View file @
f4c3f324
...
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Date: 2020-03-18 10:01:28
* @LastEditors: yuananting
* @LastEditTime: 2021-0
3-27 14:44:31
* @LastEditTime: 2021-0
6-09 14:20:59
* @Description: 录音组件
*/
...
...
@@ -12,6 +12,8 @@ import { Button, Modal } from "antd";
import
UploadOss
from
"@/core/upload"
;
import
{
RECORD_ERROR
}
from
"@/common/constants/academic"
;
import
AudioRecorder
from
"../components/audioRecord"
;
import
Platform
from
'@/core/platform'
;
import
WechatApi
from
"@/common/js/wechatApi"
;
import
"./XMRecord.less"
;
...
...
@@ -84,7 +86,10 @@ class XMRecord extends Component {
};
handleStartRecord
=
()
=>
{
navigator
.
mediaDevices
if
(
Platform
.
isWorkWx
())
{
// 企业微信
WechatApi
.
startRecord
();
}
else
{
navigator
.
mediaDevices
.
getUserMedia
({
audio
:
true
,
})
...
...
@@ -93,6 +98,7 @@ class XMRecord extends Component {
this
.
mMediaRecorder
.
start
();
this
.
handleCountTime
();
},
this
.
openDeviceFailure
);
}
};
onProcessData
=
(
audioData
)
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment