Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-xcmg-vue-app
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xugong
hls-xcmg-vue-app
Commits
80ee1c9b
Commit
80ee1c9b
authored
Dec 16, 2019
by
李晓兵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
''
parent
be12c4bc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
3 deletions
+54
-3
main.js
src/main.js
+2
-2
body-check.vue
src/pages/contractSigning/body-check.vue
+45
-0
hlsUtil.js
src/scripts/hlsUtil.js
+7
-1
No files found.
src/main.js
View file @
80ee1c9b
...
...
@@ -59,8 +59,8 @@ import Jpush from './scripts/jpushService'
import
Jmessage
from
'./scripts/jmessageService'
// if (process.env.CONFIG_ENV === 'uat') {
//
const VConsole = require('vconsole')
//
new VConsole() // eslint-disable-line
const
VConsole
=
require
(
'vconsole'
)
new
VConsole
()
// eslint-disable-line
// }
Vue
.
use
(
componentInstall
)
...
...
src/pages/contractSigning/body-check.vue
View file @
80ee1c9b
...
...
@@ -88,6 +88,51 @@ export default {
}
hlsUtil
.
captureVideo
(
onSuccess
,
onError
)
},
/* vm.videoCapture = function () {
document.addEventListener("deviceready", function () {
var options = {};
//平台判断
if (ionic.Platform.isAndroid()) {
options = {
//quality: 1, //0代表低质量压缩,1代表高质量压缩
duration: 5 * 60 * 1000, //控制视频录制长度,当到达这个长度也会停止录制,单位:毫秒
audioBitRate: -2, //视频比特率
audioChannels: 1, //声道数量
audioSampleRate: -2, //采样率
videoBitRate: -4, //音频比特率
maxFileLength: 50, //mb 录制的最大文件大小
videoFrameRate: 24, //帧数 一秒内多少个画面,画面越少越卡,但是文件大小也越小
maxQuality: "MAX_480P" //录频分辨率
};
} else if (ionic.Platform.isIOS()) {
options = {
quality: 1, //0代表低质量压缩,1代表高质量压缩
duration: 120 //控制视频录制长度,当到达这个长度也会停止录制,单位:秒
};
}
navigator.device.capture.captureVideo(onSuccess, onFail, options);
function onSuccess(mediaFiles) {
var mediaFile = mediaFiles[0];
alert("录制成功!" + ",文件名:" + mediaFile.name + ",文件大小:" + mediaFile.size +
",localURL地址:" + mediaFile.localURL + ",fullPath地址:" + mediaFile.fullPath);
if (mediaFile.size > (1024 * 1024 * 50)) {
defer.reject('录制失败,视频大小不能超过50M!');
} else {
mediaFile.desc = 'media';
//alert(mediaFile);
}
}
function onFail(message) {
alert('录制失败' + message);
}
}, false);
};*/
succesCall
()
{
// 录制成功后进行检测
let
vm
=
this
let
url
=
process
.
env
.
ocrPath
+
'/baidu/ocr/videoFaceliveness'
...
...
src/scripts/hlsUtil.js
View file @
80ee1c9b
...
...
@@ -311,8 +311,14 @@ export default {
* 录制视频
*/
captureVideo
:
function
(
onSuccess
,
onError
){
var
option
=
{
//本设置录制的视频尺寸为10s 4-5mb,清晰度较好
duration
:
10
*
1000
,
//10s
cameraDirection
:
window
.
MediaCapture
.
CAMERA_FRONT
}
if
(
typeof
onSuccess
===
'function'
&&
typeof
onError
===
'function'
)
{
navigator
.
device
.
capture
.
captureVideo
(
onSuccess
,
onError
,
{
duration
:
15
}
);
navigator
.
device
.
capture
.
captureVideo
(
onSuccess
,
onError
,
option
);
}
else
{
window
.
hlsPopup
.
showLongBottom
(
'参数有误!'
)
}
...
...
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