123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
- <meta charset="utf-8">
- <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
- <meta content="yes" name="apple-mobile-web-app-capable">
- <meta content="black" name="apple-mobile-web-app-status-bar-style">
- <meta content="telephone=no" name="format-detection">
- <!--<meta name="viewport" content="width=device-width, initial-scale=1">-->
- <link href="__PUBLIC__/wxapp/css/video-js.css" rel="stylesheet">
- <link href="__PUBLIC__/wxapp/css/jquery.mobile.min.css" rel="stylesheet">
- <script src="__PUBLIC__/wxapp/js/video.js"></script>
- <script src="__PUBLIC__/wxapp/js/jquery/jquery-1.8.3.min.js"></script>
- <script src="__PUBLIC__/wxapp/js/jquery.mobile.min.js"></script>
- <title>博华广场</title>
- </head>
- <body onload="show_cam('C59360333');">
- <div data-role="page" id="pageone" style="text-align: center;">
- <div data-role="header">
- <h1>博华广场</h1>
- </div>
- <h2 id="title">B1水泵房#1</h2>
- <div data-role="main" class="ui-content">
- <video id="my-video" style="color:black;width:320px;height:240px;margin: 5px auto 5px auto" class="video-js" controls autoplay="autoplay" preload="auto" x5-playsinline="" playsinline="" webkit-playsinline="" width="750" height="350" data-setup='{}'>
- <source src="http://47.103.74.123/hls/C59360333.m3u8" type="application/x-mpegURL">
- </video>
- <div style="height: 30px;"></div>
- <button style="margin:5px; width: 85%; height: 40px;" onclick="show_cam('C59360333');">B1水泵房#1</button>
- <button style="margin:5px; width: 85%; height: 40px;" onclick="show_cam('C59360332');">B1水泵房#2</button>
- <button style="margin:5px; width: 85%; height: 40px;" onclick="show_cam('C59360334');">28层水泵房#1</button>
- <button style="margin:5px; width: 85%; height: 40px;" onclick="show_cam('C60389215');">28层水泵房#2</button>
- </div>
- <div data-role="footer">
- </div>
- </div>
- <!--<table border="0" style=“border:0px solid #000; margin: 50px auto 10px auto; text-align: center; font-size:32pt;” width="100%">
- <tr style="height: 50px;">
- <td style="border: 0px solid #000;" width="50%">
- <button onclick="show_cam('C59360333');">B1水泵房#1</button>
- </td><td style="border: 0px solid #000">
- <button onclick="show_cam('C59360332');">B1水泵房#2</button>
- </td>
- </tr><tr style="height: 50px;">
- <td style="border: 0px solid #000;" width="50%">
- <button onclick="show_cam('C59360334');">28层水泵房#1</button>
- </td><td style="border: 0px solid #000">
- <button onclick="show_cam('C60389215');">28层水泵房#2</button>
- </td>
- </tr>
- </table>
- -->
- <script type="text/javascript" language="JavaScript">
- var options = {};
- var player = videojs('my-video',{
- bigPlayButton:true,
- textTrackDisplay:false,
- posterImage:false,
- errorDisplay:false
- });
- var close_dev = function(){
- var qry = {
- CMD:3,BODY:{
- DEVICE:$("#cam_sel").val(),
- ACTION:0
- }
- }
- var json_str = "queryJson:"+JSON.stringify(qry);
- $.ajax({
- url:"/demo.cgi",
- data:json_str,
- type:"POST",
- success:function(result){
- }
- });
- }
- var show_cam = function(id){
- player.pause();
- if(id=='C59360333')
- document.getElementById('title').innerHTML='B1水泵房#1';
- else if (id=='C59360332')
- document.getElementById('title').innerHTML='B1水泵房#2';
- else if (id=='C59360334')
- document.getElementById('title').innerHTML='28层水泵房#1';
- else if (id=='C60389215')
- document.getElementById('title').innerHTML='28层水泵房#2';
- open_dev();
- videojs('my-video',{
- bigPlayButton:true,
- textTrackDisplay:false,
- posterImage:false,
- errorDisplay:false
- },function(){
- this.src({
- src:"http://47.103.74.123/hls/"+id+".m3u8",
- type:"application/x-mpegURL"
- });
- this.play();
- });
- }
- var open_dev = function(){
- get_cam_video();
- }
- var get_cam_video = function(){
- var qry = {
- CMD:3,BODY:{
- DEVICE:$("#cam_sel").val(),ACTION:1
- }
- }
- var json_str = "queryJson:"+JSON.stringify(qry);
- $.ajax({
- url:"/demo.cgi",
- data:json_str,
- type:"POST",
- success:function(result){
-
- }
- });
- }
- var getList = function() {
- var qry = new Object();
- qry.CMD = 1;
- var json_str = "queryJson:"+JSON.stringify(qry);
- document.getElementById("cam_sel").innerHTML="";
- $.ajax({
- url:"/demo.cgi",
- data:json_str,
- timeout:1000,
- type:"POST",
- success:function(result){
- var ret = eval('('+result+')');
- if(ret.REPLY==1){
- if((ret.RESULT!=undefined)&&(ret.RESULT.CMD==1)&&(ret.RESULT.LIST!=undefined)){
- var sel = document.getElementById("cam_sel");
- for(var n=0;n<ret.RESULT.LIST.length;n++){
- var opt = document.createElement("option");
- opt.innerHTML = ret.RESULT.LIST[n].DEVICE;
- sel.appendChild(opt);
- }
- }
- }
- }
- });
- }
- var flashChecker = function() {
- var hasFlash = 0; //是否安装了flash
- var flashVersion = 0; //flash版本
- var isIE = /*@cc_on!@*/0; //是否IE浏览器
- if (isIE) {
- var swf = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
- if (swf) {
- hasFlash = 1;
- VSwf = swf.GetVariable("$version");
- flashVersion = parseInt(VSwf.split(" ")[1].split(",")[0]);
- }
- } else {
- if (navigator.plugins && navigator.plugins.length > 0) {
- var swf = navigator.plugins["Shockwave Flash"];
- if (swf) {
- hasFlash = 1;
- var words = swf.description.split(" ");
- for (var i = 0; i < words.length; ++i) {
- if (isNaN(parseInt(words[i]))) continue;
- flashVersion = parseInt(words[i]);
- }
- }
- }
- }
- return {f: hasFlash, v: flashVersion};
- }
- </script>
- </body>
- </html>
|