ソースを参照

新增模块:音视频处理

yangdingli 3 年 前
コミット
ebc7ee072e

+ 1 - 0
show-server/src/main/resources/server-page.xml

@ -47,6 +47,7 @@
47 47
    <action name="sensorListener" template="template/webapp/plugins/sensor.html"/><!--传感器相关-->
48 48
    <action name="envSwitch" template="template/webapp/plugins/envSwitch.html"/><!--环境切换-->
49 49
    <action name="shortVideoPlatform" template="template/webapp/plugins/shortVideoPlatform.html"></action>
50
    <action name="VideoPro" template="template/webapp/plugins/videoPro.html"></action>
50 51
    <action name="labelVideo" template="template/webapp/plugins/label-video.html"></action>
51 52
    <action name="videoAdd" template="template/webapp/plugins/video-add.html"></action>
52 53
    <action name="videoSearch" template="template/webapp/plugins/video-search.html"></action>

+ 35 - 0
show-server/src/main/webapp/biz/js/plugins/videoPro.js

@ -0,0 +1,35 @@
1
require([ "ipuMobile", "jcl" ], function(IpuMobile, $) {
2
	$(function() {
3
		var videoPath;
4
5
		$("#record").click(function() {
6
			var json = {"pen":"1"};
7
			var params = JSON.stringify(json);
8
			IpuMobile.videoProShoot(params, function(path) {
9
				if (path) {
10
					videoPath = path;
11
					IpuMobile.tip(videoPath);
12
					$("#hiddenContent").show();
13
				}
14
			});
15
		});
16
17
		$("#edit").click(function() {
18
			if (!videoPath) {
19
				IpuMobile.tip("先录制一个视频再编辑");
20
				return
21
			}
22
			var json = {"path":videoPath};
23
			var params = JSON.stringify(json);
24
			IpuMobile.videoProEdit(params, function(path) {
25
				if (path) {
26
					videoPath = path;
27
					IpuMobile.tip(videoPath);
28
					$("#hiddenContent").show();
29
				}
30
			});
31
			
32
		});
33
34
	});
35
});

+ 8 - 0
show-server/src/main/webapp/ipu/frame/mobile/expand-mobile.js

@ -741,6 +741,14 @@ define(["require", "jcl"], function (require, Wade) {
741 741
        // 显示滑块验证
742 742
        storageCallback("showSliderVerify", callback);
743 743
        execute("showSliderVerify", [params], err);
744
      }, videoProShoot: function (params, callback, err) {
745
        // 跳转沙盒文件浏览器
746
        storageCallback("openVideoShoot", callback);
747
        execute("openVideoShoot", [params], err);
748
      }, videoProEdit: function (params, callback, err) {
749
        // 跳转沙盒文件浏览器
750
        storageCallback("openVideoEdit", callback);
751
        execute("openVideoEdit", [params], err);
744 752
      }
745 753
    };
746 754
  })();

+ 4 - 0
show-server/src/main/webapp/template/webapp/plugins/index-list.html

@ -189,6 +189,10 @@
189 189
			<div class="ipu-icon mdi mdi-file-video"></div>
190 190
			<p>短视频平台</p>
191 191
		</li>
192
		<li data-action="VideoPro">
193
			<div class="ipu-icon mdi mdi-file-video"></div>
194
			<p>音视频处理</p>
195
		</li>
192 196
193 197
		<li data-action="LifeCycle">
194 198
			<div class="ipu-icon mdi mdi-file-video"></div>

+ 47 - 0
show-server/src/main/webapp/template/webapp/plugins/videoPro.html

@ -0,0 +1,47 @@
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<title>音视频处理</title> {%>template/common/Head.html%}
5
<script type="text/javascript" src="biz/js/plugins/videoPro.js"></script>
6
</head>
7
<body>
8
9
	<div class="ipu-flex-row ipu-flex-vertical">
10
		<div class="ipu-flex-col">
11
			<header class="ipu-toolbar">
12
				<h1 class="ipu-toolbar-title">音视频处理</h1>
13
				<a class="ipu-fn-left page-back" href="javascript:;"> <i
14
					class="ipu-icon mdi mdi-chevron-left"></i>
15
				</a>
16
			</header>
17
		</div>
18
19
		<div class="ipu-flex-col ipu-flex-col-auto">
20
			<div class="ipu-flex-content">
21
				<div class="page-content">
22
23
					<div class="demo-item">
24
						<div class="demo-title">录制</div>
25
						<div class="demo-body">
26
							<div class="demo-content">弹出一个录制界面</div>
27
							<div class="demo-content">
28
								<button class="ipu-btn ipu-btn-highlight" id="record">录制</button>
29
							</div>
30
						</div>
31
					</div>
32
33
					<div class="demo-item ipu-fn-hide" id="hiddenContent">
34
						<div class="demo-title">编辑</div>
35
						<div class="demo-body">
36
							<div class="demo-content">弹出一个编辑界面</div>
37
							<div class="demo-content">
38
								<button class="ipu-btn ipu-btn-highlight" id="edit">编辑</button>
39
							</div>
40
						</div>
41
					</div>
42
				</div>
43
			</div>
44
		</div>
45
	</div>
46
</body>
47
</html>