<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>ExpertCamJS</title>
<style type="text/css">
.video-container{
display: inline-block;
position: relative;
}
::cue {
font-family: cursive;
text-shadow: 2px 2px 2px black;
color:#fff;
background-color: rgba(255, 255, 255, 0);
}
</style>
</head>
<body>
<hr>
<h1 style="text-align:center;">Initialize with arguments and play local video with subtitle</h1>
<hr>
<div class="video-container">
<video preload="auto"></video>
</div>
<hr>
Open video and subtitle (multiselect, subtitle is optional, currently only srt is supported)
<hr>
<button type="button" onclick="openVideo();">Open</button>
<button type="button" onclick="goFullScreen();">Fullsreen</button>
<hr>
<script type="text/javascript" src="../js/expertcam.js"></script>
<script type="text/javascript">
var args = {
//path correction
noSignal: '/media/no_signal.png',
width: '100%',
height: '100%',
constraints: {
video: false,
audio: false
},
subTitleCoding: 'windows-1252'
};
var cam = new ExpertCamJS('video').init(args);
function openVideo(){
cam.playLocalVideo();
}
function goFullScreen(){
if(cam){
cam.toggleFullScreen();
}
}
</script>
</body>
</html>
|