124 lines
4.0 KiB
Plaintext
124 lines
4.0 KiB
Plaintext
<%@ page language="java" pageEncoding="UTF-8"%>
|
|
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" >
|
|
<head>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/node_modules/video/video-js.css"/>
|
|
<script src="<%=request.getContextPath()%>/node_modules/video/video.js"></script>
|
|
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/video/videojs-flash.min.js"></script>
|
|
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/video/videojs-contrib-hls.js"></script>
|
|
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
|
<script>
|
|
// var itemId = 0;
|
|
// function getVLC(name)
|
|
// {
|
|
// if (window.document[name])
|
|
// {
|
|
// return window.document[name];
|
|
// }
|
|
// if (navigator.appName.indexOf("Microsoft Internet")==-1)
|
|
// {
|
|
// if (document.embeds && document.embeds[name])
|
|
// return document.embeds[name];
|
|
// }
|
|
// else
|
|
// {
|
|
// return document.getElementById(name);
|
|
// }
|
|
// }
|
|
|
|
function doGo(mrl)
|
|
{
|
|
// var vlc = getVLC("vlc");
|
|
// itemId=vlc.playlist.add(mrl);
|
|
// vlc.playlist.playItem(itemId);
|
|
// document.getElementById("btn_stop").disabled = false;
|
|
|
|
// var src = mrl;
|
|
// var sourceDom = $("<source src=\""+ src +"\" type=\"application/x-mpegURL\">");
|
|
// $("#myVideo").append(sourceDom);
|
|
$('#source').attr("src",mrl);
|
|
}
|
|
|
|
$(window).load(function () {
|
|
|
|
// $.ajax({
|
|
// type:'POST',
|
|
// url:ext.contextPath+"/bim/BIMCamera/getList.do",
|
|
// data:"devicepass=${devicepass}",
|
|
// async: false,
|
|
// globle:false,
|
|
// error: function(){
|
|
// alert('数据处理错误!');
|
|
// return false;
|
|
// },
|
|
// success: function(data){
|
|
// console.log(data);
|
|
// doGo(data[0].interfaces);
|
|
// }
|
|
// });
|
|
|
|
// $.post(ext.contextPath + "/bim/BIMCamera/getList.do", {devicepass:'${devicepass}'}, function (data) {
|
|
// doGo(data[0].interfaces);
|
|
// }, 'json');
|
|
});
|
|
|
|
// function doPlay()
|
|
// {
|
|
// var vlc = getVLC("vlc");
|
|
// vlc.playlist.playItem(itemId);
|
|
// document.getElementById("btn_stop").disabled = false;
|
|
// document.getElementById("btn_play").disabled = true;
|
|
// }
|
|
|
|
// function doStop()
|
|
// {
|
|
// getVLC("vlc").playlist.stop();
|
|
// document.getElementById("btn_stop").disabled = true;
|
|
// document.getElementById("btn_play").disabled = false;
|
|
// }
|
|
|
|
// var myPlayer = videojs('myVideo');
|
|
// videojs("myVideo").ready(function(){
|
|
// var myPlayer = this;
|
|
// myPlayer.play();
|
|
// });
|
|
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<video id="myVideo" class="video-js vjs-default-skin vjs-big-play-centered"
|
|
controls="controls" muted="muted" autoplay="true" preload="auto" width="970" height="485" data-setup="">
|
|
<source id="source" src="${devicepass}" type="application/x-mpegURL">
|
|
</video>
|
|
<!-- <div>
|
|
<OBJECT classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" id="vlc"
|
|
codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab"
|
|
width="960" height="540" id="vlc" events="True">
|
|
<param name="MRL" value="" />
|
|
<param name="Src" value="" />
|
|
<param name="ShowDisplay" value="True" />
|
|
<param name="AutoLoop" value="False" />
|
|
<param name="AutoPlay" value="True" />
|
|
<param name="Time" value="True"/>
|
|
<EMBED pluginspage="http://www.videolan.org"
|
|
type="application/x-vlc-plugin"
|
|
version="VideoLAN.VLCPlugin.2"
|
|
width="960"
|
|
height="540"
|
|
text="Waiting for video"
|
|
name="vlc"
|
|
></EMBED>
|
|
</OBJECT>
|
|
</div>
|
|
<div>
|
|
<input type=button id="btn_play" value="播放 " onClick='doPlay();' disabled="true">
|
|
<input type=button id="btn_stop" value="停止" onClick='doStop();' disabled="true">
|
|
</div> -->
|
|
</body>
|
|
</html> |