video部分
<video preload="auto" controls="controls" width="100%">
<source src="rtmp://srs.hengyuanyunti.com/live/livestreamzclh13938416794" type='video/mp4'>
</video>
flash部分
<!DOCTYPE html>
<meta charset="utf-8">
<script type="text/javascript" src="flowplayer-3.2.8.min.js">
<script type="text/javascript" src="jquery-3.4.1.js">
<script type="text/javascript" src="jquery-3.4.1.min.js">
<script type="text/javascript" src="vue.js">
<title>恒远国创
.headerbar{
transform:rotate(180deg);
-ms-transform:rotate(180deg); /* Internet Explorer */
-moz-transform:rotate(180deg); /* Firefox */
-webkit-transform:rotate(180deg); /* Safari 和 Chrome */
-o-transform:rotate(180deg); /* Opera */
}
.headerbarA{
transform:rotate(0deg);
-ms-transform:rotate(0deg); /* Internet Explorer */
-moz-transform:rotate(0deg); /* Firefox */
-webkit-transform:rotate(0deg); /* Safari 和 Chrome */
-o-transform:rotate(0deg); /* Opera */
}
.icon{
width:300px;
height:300px;
background:red;
}
.iconA{
width:300px;
height:300px;
background:yellow;
transform:rotate(180deg);
-ms-transform:rotate(180deg); /* Internet Explorer */
-moz-transform:rotate(180deg); /* Firefox */
-webkit-transform:rotate(180deg); /* Safari 和 Chrome */
-o-transform:rotate(180deg); /* Opera */
}
<body onunload="goodbye()" >
<div id="app">
<a href="#" style="display:block;width:600px;height:1000px;margin:auto;" id="player" :class="headerbar">
<div style="position:absolute;top:50px;left:200px;">
<button @click="dianji" v-if="iconshou" style="width:100px;height:50px;font-size:20px;border-radius:25px;background:#1e71c4;color:white;cursor:pointer;"> 点击旋转
<button @click="dianjitwo" v-if="iconshoutwo" style="width:100px;height:50px;font-size:20px;border-radius:25px;background:#1e71c4;color:white;cursor:pointer;"> 点击旋转
///获取a页面传过来的参数
function getQueryVariable(variable)
{
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i
var pair = vars[i].split("=");
if(pair[0] == variable){return pair[1];}
}
// return(false);
}
console.log(getQueryVariable("registryCode"))
///获取a页面传过来的参数电梯注册吗
function getQueryString(name){
var reg =new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if(r!=null)return unescape(r[2]); return null;
}
// alert(getQueryString("registryCode"));
var BregistryCode =getQueryString("registryCode")
var deviceSnCode=getQueryString("deviceSnCode")
console.log(BregistryCode)
console.log(deviceSnCode)
// 真实环境
// http://shi.loudingsoft.com/ 47.105.217.114:8083 zhengshi.hengyuanyunti.com
// 测试环境
// http://tang.loudingsoft.com/ 47.104.182.59:8082 ceshi.hengyuanyunti.com
window.onbeforeunload=function(e){
var e = window.event||e;
e.returnValue=("确定离开当前页面吗?");
$.ajax({
//正式环境
url:"http://zhengshi.hengyuanyunti.com:8083/hengyuaniot-lift/controlCamera",
//测试环境
// url:"http://ceshi.hengyuanyunti.com:8082/hengyuaniot-lift/controlCamera",
type:"post",
// params:data,
data:
JSON.stringify({
snCode:deviceSnCode,
status:0
}),
contentType:"application/json",
dataType:"json",
success:function (res) {
console.log(res)
}
})
}
// 真实环境
// http://shi.loudingsoft.com/ 47.105.217.114:8083 zhengshi.hengyuanyunti.com
// 测试环境
// http://tang.loudingsoft.com/ 47.104.182.59:8082 ceshi.hengyuanyunti.com
///获取验证码
$.ajax({
//真实环境
url:"http://zhengshi.hengyuanyunti.com:8083/hengyuaniot-lift/getLiftByRegistryCode",
//测试环境
// url:"http://ceshi.hengyuanyunti.com:8082/hengyuaniot-lift/getLiftByRegistryCode",
type:"GET",
data:{
registryCode:BregistryCode
},
contentType:"text/html;charset=utf8",
dataType:"json",
success:function (res) {
console.log(res)
var monitorUrl=res.result.monitorUrl
console.log(monitorUrl)
// this.result=monitorUrl
//
flowplayer("player", "flowplayer-3.2.18.swf",{
clip: {
url: monitorUrl,
provider:'rtmp',
live:true,
},
plugins: {
rtmp: {
url:'flowplayer.rtmp-3.2.8.swf',
netConnectionUrl: monitorUrl
}
}
});
//
console.log(monitorUrl)
}
})
// flowplayer("player", "flowplayer-3.2.18.swf",{
// clip: {
// url: 'rtmp://srs.hengyuanyunti.com/live/livestreamzclh18518016094',
// provider: 'rtmp',
// live: true,
// },
// plugins: {
// rtmp: {
// url: 'flowplayer.rtmp-3.2.8.swf',
// netConnectionUrl: 'rtmp://srs.hengyuanyunti.com/live/livestreamzclh18518016094'
// }
// }
// });
//获取窗口的宽度
if (document.body.clientWidth <1) {
console.log('网少很帅')
// 里面调用接口
// $.ajax({
// url:"http://47.104.182.59:8082/hengyuaniot-lift/controlCamera",
// type:"post",
// // params:data,
// data:{
// snCode:deviceSnCode,
// status:0
// },
// contentType:"application/json",
// dataType:"json",
// success:function (res) {
// console.log(res)
//
// }
// })
}
//窗口大小改变
$(window).resize(function(){
// alert("窗体大小改变了!");
console.log("窗体大小改变了!")
location.reload()
});
$(document).ready(function () {
// findAllDepts(); //页面加载完成就执行该方法
// console.log(document.body.clientWidth)
});
var vm =new Vue({
el:'#app',
// 选项
data: {
newTodoText:'888888',
headerbar:"headerbar",
icon:"icon",
iconshou:true,
iconshoutwo:false,
},
methods:{
dianji(){
//180du
this.headerbar="headerbar"
this.iconshou=false
this.iconshoutwo=true
// this.iconshou=!this.iconshou
},
dianjitwo(){
this.headerbar="headerbarA"
this.iconshou=true
this.iconshoutwo=false
}
}
})