Tryag File Manager
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
home
/
yanggyein
/
yanggyein
/
yanggyein
/
resources
/
views
/
item
/
Or
Select Your Path :
Upload File :
New :
File
Dir
/home/yanggyein/yanggyein/yanggyein/resources/views/item/vlc.blade.php
<HTML> <head> <link href="an.css" rel="stylesheet" type="text/css"> </head> <TITLE>VLC ActiveX</TITLE> <BODY> <TABLE ID="Table1"> <TR>URL ex. rtsp://192.168.1.2:554/AVStream1_1</TR> <TR><TD colspan="2"> URL: <INPUT size="90" id="targetTextField" value="" NAME="targetTextField"> <INPUT type=submit value="Go" onClick="doGo(document.getElementById('targetTextField').value);" ID="Submit1" NAME="Submit1"> </TD></TR> <TR><TD colspan="2"> <!-- Insert VideoLAN.VLCPlugin.2 activex control --> <OBJECT classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" codebase="http://downloads.videolan.org/pub/videolan/vlc/last/win32/axvlc.cab" width="100%" height="480" id="vlc" events="True" VIEWASTEXT> <param name="MRL" value="" /> <param name="ShowDisplay" value="True" /> <param name="AutoLoop" value="False" /> <param name="AutoPlay" value="False" /> <param name="Volume" value="50" /> <param name="StartTime" value="0" /> </OBJECT> </TD></TR> <TR><TD> <!-- Insert MSComctlLib.Slider.2 activex control --> <OBJECT classid="clsid:F08DF954-8592-11D1-B16A-00C0F0283628" width="540" height="20" id="slider" events="True"> <param name="TickStyle" value="3" /> <param name="Min" value="0" /> <param name="Max" value="0" /> <param name="Value" value="0" /> <param name="Enabled" value="False" /> </OBJECT> </TD><TD width="15%"> <DIV id="info" style="text-align:center">-:--:--/-:--:--</DIV> </TD></TR> <TR><TD colspan="2"> <INPUT type="button" id="PlayOrPause" value=" Play " onClick='doPlayOrPause();' NAME="PlayOrPause"> <INPUT type="button" value="Stop" onClick='doStop();' ID="Button1" NAME="Button1"> <INPUT type="button" value=" << " onClick='doPlaySlower();' ID="Button2" NAME="Button2"> <INPUT type="button" value=" >> " onClick='doPlayFaster();' ID="Button3" NAME="Button3"> <INPUT type="button" value="Show" onClick='document.getElementById("vlc").Visible = true;' ID="Button4" NAME="Button4"> <INPUT type="button" value="Hide" onClick='document.getElementById("vlc").Visible = false;' ID="Button5" NAME="Button5"> <INPUT type="button" id="VersionBut" value="Version" onClick='alert(document.getElementById("vlc").VersionInfo);' NAME="VersionBut"> <SPAN style="text-align:center">Volume:</SPAN> <INPUT type="button" value=" - " onClick='updateVolume(-10)' ID="Button6" NAME="Button6"> <SPAN id="volumeTextField" style="text-align: center">--</SPAN> <INPUT type="button" value=" + " onClick='updateVolume(+10)' ID="Button7" NAME="Button7"> <INPUT type="button" value="Mute" onClick='document.getElementById("vlc").audio.toggleMute();' ID="Button8" NAME="Button8"> </TD> </TR> </TABLE> <br> Pan / Tilt / Zoom<br> <input type="button" value=" Left " onMouseDown="Left();" onMouseUp="Stop();" OnMouseOut="Stop();"> <input type="button" value=" Right " onMouseDown="Right();" onMouseUp="Stop();" OnMouseOut="Stop();"> <input type="button" value=" Up " onMouseDown="Up();" onMouseUp="Stop();" OnMouseOut="Stop();"> <input type="button" value=" Down " onMouseDown="Down();" onMouseUp="Stop();" OnMouseOut="Stop();"> <input type="button" value=" Zoom_in " onMouseDown="Zoom_in();" onMouseUp="Stop();" OnMouseOut="Stop();"> <input type="button" value=" Zoom_out " onMouseDown="Zoom_out();" onMouseUp="Stop();" OnMouseOut="Stop();"> <iframe name="blank_frame" height="0"></iframe> <SCRIPT language="javascript"> <!-- function getIPAddress() { var str = document.getElementById('targetTextField').value; str = str.split ("//"); str = str[1].split ("/"); str = str[0].split (":"); return str[0]; } function Left() { window.open("http://" + getIPAddress() + ":80/api/ptz.cgi?PTZNumber=1&PanSpeed=-50", "blank_frame"); } function Right() { window.open("http://" + getIPAddress() + ":80/api/ptz.cgi?PTZNumber=1&PanSpeed=50", "blank_frame"); } function Up() { window.open("http://" + getIPAddress() + ":80/api/ptz.cgi?PTZNumber=1&TiltSpeed=50", "blank_frame"); } function Down() { window.open("http://" + getIPAddress() + ":80/api/ptz.cgi?PTZNumber=1&TiltSpeed=-50", "blank_frame"); } function Zoom_in() { window.open("http://" + getIPAddress() + ":80/api/ptz.cgi?PTZNumber=1&ZoomSpeed=70", "blank_frame"); } function Zoom_out() { window.open("http://" + getIPAddress() + ":80/api/ptz.cgi?PTZNumber=1&ZoomSpeed=-70", "blank_frame"); } function Stop() { window.open("http://" + getIPAddress() + ":80/api/ptz.cgi?PTZNumber=1&PanSpeed=0&TiltSpeed=0&ZoomSpeed=0", "blank_frame"); } var prevState = 0; var monitorTimerId = 0; var sliderScrolling = false; var ignoreSliderChange = false; function updateVolume(deltaVol) { var vlc = document.getElementById("vlc"); vlc.audio.volume += deltaVol; document.getElementById("volumeTextField").innerHTML = vlc.audio.volume+"%"; }; function formatTime(timeVal) { var timeHour = Math.round(timeVal / 1000); var timeSec = timeHour % 60; if( timeSec < 10 ) timeSec = '0'+timeSec; timeHour = (timeHour - timeSec)/60; var timeMin = timeHour % 60; if( timeMin < 10 ) timeMin = '0'+timeMin; timeHour = (timeHour - timeMin)/60; if( timeHour > 0 ) return timeHour+":"+timeMin+":"+timeSec; else return timeMin+":"+timeSec; }; function monitor() { var vlc = document.getElementById("vlc"); var newState = vlc.input.state; if( prevState != newState ) { if( newState == 0 ) { // current media has stopped onStop(); } else if( newState == 1 ) { // current media is openning/connecting onOpen(); } else if( newState == 2 ) { // current media is buffering data onBuffer(); } else if( newState == 3 ) { // current media is now playing onPlay(); } else if( vlc.input.state == 4 ) { // current media is now paused onPause(); } prevState = newState; } else if( newState == 3 ) { // current media is playing onPlaying(); } monitorTimerId = setTimeout("monitor()", 1000); }; /* actions */ function doGo(targetURL) { var vlc = document.getElementById("vlc"); var options = new Array(":vout-filter=deinterlace", ":deinterlace-mode=linear"); vlc.playlist.clear(); //vlc.playlist.add(targetURL, null, options); vlc.playlist.add(targetURL); vlc.playlist.play(); if( monitorTimerId == 0 ) { monitor(); } }; function doPlayOrPause() { var vlc = document.getElementById("vlc"); if( vlc.playlist.isPlaying ) { vlc.playlist.togglePause(); } else { vlc.playlist.play(); if( monitorTimerId == 0 ) { monitor(); } } }; function doStop() { document.getElementById("vlc").playlist.stop(); if( monitorTimerId != 0 ) { clearTimeout(monitorTimerId); monitorTimerId = 0; } onStop(); }; function doPlaySlower() { var vlc = document.getElementById("vlc"); vlc.input.rate = vlc.input.rate / 2; }; function doPlayFaster() { var vlc = document.getElementById("vlc"); vlc.input.rate = vlc.input.rate * 2; }; /* events */ function onOpen() { document.getElementById("info").innerHTML = "Opening..."; document.getElementById("PlayOrPause").value = "Pause"; }; function onBuffer() { document.getElementById("info").innerHTML = "Buffering..."; document.getElementById("PlayOrPause").value = "Pause"; }; function onPlay() { onPlaying(); document.getElementById("PlayOrPause").value = "Pause"; }; var liveFeedText = new Array("Live", "((Live))", "(( Live ))", "(( Live ))"); var liveFeedRoll = 0; function onPlaying() { if( ! sliderScrolling ) { var slider = document.getElementById("slider"); if( vlc.input.length > 0 ) { // seekable media slider.Enabled = true; slider.Max = slider.width; ignoreSliderChange = true; slider.Value = vlc.input.position*slider.width; ignoreSliderChange = false; document.getElementById("info").innerHTML = formatTime(vlc.input.time)+"/"+formatTime(vlc.input.length); } else { // non-seekable "live" media if( slider.Enabled ) { slider.Value = slider.Min; slider.Enabled = false; } liveFeedRoll = liveFeedRoll & 3; document.getElementById("info").innerHTML = liveFeedText[liveFeedRoll++]; } } }; function onPause() { document.getElementById("PlayOrPause").value = " Play "; }; function onStop() { if( slider.Enabled ) { slider.Value = slider.Min; slider.Enabled = false; } document.getElementById("info").innerHTML = "-:--:--/-:--:--"; document.getElementById("PlayOrPause").value = " Play "; }; //--> </SCRIPT> <SCRIPT language="JScript"> <!-- document.onreadystatechange=onVLCStateChange; function onVLCStateChange() { if( document.readyState == 'complete' ) { updateVolume(0); } }; function slider::Scroll() { var vlc = document.getElementById("vlc"); var slider = document.getElementById("slider"); var oldPos = vlc.input.position; var newPos = slider.Value/slider.width; if( (vlc.input.state == 3) && (oldPos != newPos) ) { vlc.input.position = newPos; slider.Text = formatTime(vlc.input.time); document.getElementById("info").innerHTML = slider.Text+"/"+formatTime(vlc.input.length); } sliderScrolling = true; }; function slider::Change() { var vlc = document.getElementById("vlc"); var slider = document.getElementById("slider"); var oldPos = vlc.input.position; var newPos = slider.Value/slider.width; if( sliderScrolling ) { sliderScrolling = false; } else if( !ignoreSliderChange && (vlc.input.state == 3) && (oldPos != newPos) ) { vlc.input.position = newPos; } }; //--> </SCRIPT> </BODY> </HTML>