video
This commit is contained in:
84
static/html/aliplayer copy.html
Normal file
84
static/html/aliplayer copy.html
Normal file
@@ -0,0 +1,84 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="IE=edge">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />
|
||||
<title>Aliplayer Online Settings</title>
|
||||
<script type="text/javascript" src="https://js.cdn.aliyun.dcloud.net.cn/dev/uni-app/uni.webview.1.5.1.js"></script>
|
||||
|
||||
<script src="./vue.js"></script>
|
||||
<!-- <script src="./textData.js"></script> -->
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
var viewWidth = window.screen.width;
|
||||
if (viewWidth < 768) {
|
||||
//document.write('<meta name="viewport" content="width=device-width,initial-scale=1, minimum-scale=1.0, maximum-scale=1, user-scalable=no, minimal-ui">');
|
||||
} else {
|
||||
document.write('<style>@media screen and (min-width: 768px) and (max-width: 1199px) {html {zoom: 0.8;}}</style>');
|
||||
}
|
||||
</script>
|
||||
<link rel="stylesheet"
|
||||
href="https://g.alicdn.com/apsara-media-box/imp-web-player/2.24.1/skins/default/aliplayer-min.css" />
|
||||
<script type="text/javascript" charset="utf-8"
|
||||
src="https://g.alicdn.com/apsara-media-box/imp-web-player/2.24.1/aliplayer-min.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app">
|
||||
<div class="prism-player" id="player-con" style="width: 100%;height: 200px;"></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
// 在引用依赖的文件后,需要在 HTML 中监听 UniAppJSBridgeReady 事件触发后,才能安全调用 uni 的 API。
|
||||
document.addEventListener('UniAppJSBridgeReady', function () {
|
||||
uni.getEnv(function (res) {
|
||||
console.log('获取当前环境:' + JSON.stringify(res));
|
||||
});
|
||||
});
|
||||
|
||||
// HTML 接受APP发送过来的消息 (H5端)
|
||||
window.addEventListener('message', e => {
|
||||
console.log(e, 'HTML 接受APP发送过来的消息 (H5端)');
|
||||
app.dataList = JSON.parse(e.data.data).navigation
|
||||
console.log(app.dataList, '+++++++++');
|
||||
}, false)
|
||||
|
||||
|
||||
// HTML 接受APP发送过来的消息 (APP端)
|
||||
function requestData(data) {
|
||||
console.log(JSON.stringify(data), 'HTML 接受APP发送过来的消息 (APP端)');
|
||||
app.dataList = data.navigation // 赋值
|
||||
}
|
||||
|
||||
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
textTip: "提示信息",
|
||||
dataList: []
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
onShow() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
94
static/html/aliplayer.html
Normal file
94
static/html/aliplayer.html
Normal file
@@ -0,0 +1,94 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>本地网页</title>
|
||||
<style type="text/css">
|
||||
.btn {
|
||||
display: block;
|
||||
margin: 20px auto;
|
||||
padding: 5px;
|
||||
background-color: #007aff;
|
||||
border: 0;
|
||||
color: #ffffff;
|
||||
height: 40px;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.btn-red {
|
||||
background-color: #dd524d;
|
||||
}
|
||||
|
||||
.btn-yellow {
|
||||
background-color: #f0ad4e;
|
||||
}
|
||||
|
||||
.desc {
|
||||
padding: 10px;
|
||||
color: #999999;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p class="desc">web-view 组件加载本地 html 示例,仅在 App 环境下生效。点击下列按钮,跳转至其它页面。</p>
|
||||
<div class="btn-list">
|
||||
<button class="btn" type="button" data-action="navigateTo">navigateTo</button>
|
||||
<button class="btn" type="button" data-action="redirectTo">redirectTo</button>
|
||||
<button class="btn" type="button" data-action="navigateBack">navigateBack</button>
|
||||
<button class="btn" type="button" data-action="reLaunch">reLaunch</button>
|
||||
<button class="btn" type="button" data-action="switchTab">switchTab</button>
|
||||
</div>
|
||||
<p class="desc" id="lizhao">网页向应用发送消息。注意:小程序端应用会在此页面后退时接收到消息。</p>
|
||||
<div class="btn-list">
|
||||
<button class="btn btn-red" type="button" id="postMessage">postMessage</button>
|
||||
</div>
|
||||
<!-- uni 的 SDK -->
|
||||
<script type="text/javascript" src="https://unpkg.com/@dcloudio/uni-webview-js@0.0.1/index.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
window.handleMessage=function(data){
|
||||
alert('传来的参数'+data)
|
||||
}
|
||||
document.addEventListener('UniAppJSBridgeReady', function() {
|
||||
|
||||
document.querySelector('.btn-list').addEventListener('click', function(evt) {
|
||||
var target = evt.target;
|
||||
if (target.tagName === 'BUTTON') {
|
||||
var action = target.getAttribute('data-action');
|
||||
switch (action) {
|
||||
case 'switchTab':
|
||||
uni.switchTab({
|
||||
url: '/pages/tabBar/API/API'
|
||||
});
|
||||
break;
|
||||
case 'reLaunch':
|
||||
uni.reLaunch({
|
||||
url: '/pages/tabBar/API/API'
|
||||
});
|
||||
break;
|
||||
case 'navigateBack':
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
break;
|
||||
default:
|
||||
uni[action]({
|
||||
url: '/pages/component/button/button'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
document.querySelector("#postMessage").addEventListener('click', function() {
|
||||
uni.postMessage({
|
||||
data: {
|
||||
action: 'message888888'
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
45
static/html/textData.js
Normal file
45
static/html/textData.js
Normal file
@@ -0,0 +1,45 @@
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
textTip:"提示信息",
|
||||
dataList:[]
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
onShow() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
// var player = new Aliplayer({
|
||||
// "id": "player-con",
|
||||
// "vid": "d0c8e6d23e5f71ef81714531858c0102",
|
||||
// "accessKeyId": "STS.NTuhvLy2bynHUatJbci5eaPz5",
|
||||
// "securityToken": "CAISwgJ1q6Ft5B2yfSjIr5fAI8z4lO1DzqyjV0fFrmI2ZbpJjpXR1zz2IHhMdHFuB+4YsP41lWtS7f8alqJvRoRZXkHfdsp36MzsHLA8gNCT1fau5Jko1beDewHKeT+ZsebWZ+LmNqS/Ht6md1HDkAJq3LL+bk/Mdle5MJqP+/EFA8oQUlv6F00kYu1bPQx/ssQXGGLMPPK2SH7Qj3HXEVBjt3gX6wo9y9zmnJXAtUaG1Qalmr5M9tyuGPX+MZkwZqUYesyuwel7epDG1CNt8BVQ/M909vccoWef4I/DXQcLuUTdabGNqscAMgh1fK8+Fr7vNBB7d2X80Aa6tfMUq34lVYk9O0xUlFQqV0TCU6ovuoKM/1JX7+gpfvTOV/+7+kpvCikgLwgpMPFKCRxrQicnUVK3ROLZvj6DDGitIx3sErloufIdGoABg14fbHq5iPyBiyCCJhvTdAK2iOmHt2WjJYqK9yaGfsUgWPsDZTaWWZ2mTfm+sSBACuomuaM1vkG52exc21DDZ1cQrd+MBfEluJHOKWyGf0z7+ywUiSnctOl+NZxVWc13zbRbES5prVhyY37FkIRdRE3qPZaoTgyjzNf5xV3TEmIgAA==",
|
||||
// "accessKeySecret": "63Rw3pp2TCP2TSomv3KAxpVvWRaCCGcLvBRiwPef1Zsb",
|
||||
// "region": "cn-shanghai",
|
||||
// "format": "mp4",
|
||||
// "mediaType": "video",
|
||||
// "width": "100%",
|
||||
// "height": "500px",
|
||||
// "autoplay": true,
|
||||
// "isLive": false,
|
||||
// "rePlay": false,
|
||||
// "playsinline": true,
|
||||
// "preload": true,
|
||||
// "controlBarVisibility": "hover",
|
||||
// "useH5Prism": true
|
||||
// }, function (player) {
|
||||
// console.log("The player is created");
|
||||
// }
|
||||
// );
|
||||
|
||||
|
||||
11932
static/html/vue.js
Normal file
11932
static/html/vue.js
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user