Commit 56a168ba authored by Brandon Brooks's avatar Brandon Brooks Committed by Jean-Baptiste Kempf

HTTP UI - Updates

This patch contains various updates to the new HTTP UI

Mobile views have only been tested on Android.

Update - Added EQ functionality
Update - Corrected rounding mistakes and EQ units
Update - Added Mobile EQ
Update - Added Mobile Flash View
Update - Minor Display Adjustments
Update - Revert Playlist.xml for backward compatability
Update - Added playlist_jstree.xml for UI usability
Update - Added Batch VLM Command interface
Update - Added VLM command error reporting
Update - Added functionality for future EQ merge into status.xml
Update - Modified Makefile.am to include new files
Update - Corrected main EQ button
Update - Modified author comments
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 88359db4
...@@ -248,118 +248,122 @@ EXTRA_DIST += \ ...@@ -248,118 +248,122 @@ EXTRA_DIST += \
lua/sd/metachannels.lua lua/sd/metachannels.lua
DIST_http_lua = \ DIST_http_lua = \
lua/http/.hosts \ lua/http/view.html \
lua/http/css/main.css \ lua/http/mobile.html \
lua/http/css/ui-lightness/jquery-ui-1.8.13.custom.css \
lua/http/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png \
lua/http/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png \
lua/http/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png \
lua/http/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png \
lua/http/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png \
lua/http/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png \
lua/http/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png \
lua/http/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png \
lua/http/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png \
lua/http/css/ui-lightness/images/ui-icons_222222_256x240.png \
lua/http/css/ui-lightness/images/ui-icons_228ef1_256x240.png \
lua/http/css/ui-lightness/images/ui-icons_ef8c08_256x240.png \
lua/http/css/ui-lightness/images/ui-icons_ffd27a_256x240.png \
lua/http/css/ui-lightness/images/ui-icons_ffffff_256x240.png \
lua/http/custom.lua \
lua/http/dialogs/.hosts \
lua/http/dialogs/browse \
lua/http/dialogs/browse_window.html \
lua/http/dialogs/create_stream.html \ lua/http/dialogs/create_stream.html \
lua/http/dialogs/footer \ lua/http/dialogs/equalizer_window.html \
lua/http/dialogs/input \
lua/http/dialogs/main \
lua/http/dialogs/mosaic \
lua/http/dialogs/mosaic_window.html \ lua/http/dialogs/mosaic_window.html \
lua/http/dialogs/offset_window.html \ lua/http/dialogs/batch_window.html \
lua/http/dialogs/playlist \ lua/http/dialogs/error_window.html \
lua/http/dialogs/sout \ lua/http/dialogs/browse_window.html \
lua/http/dialogs/.hosts \
lua/http/dialogs/stream_window.html \ lua/http/dialogs/stream_window.html \
lua/http/dialogs/vlm \ lua/http/dialogs/offset_window.html \
lua/http/favicon.ico \ lua/http/dialogs/stream_config_window.html \
lua/http/custom.lua \
lua/http/flash.html \ lua/http/flash.html \
lua/http/images/Audio-48.png \ lua/http/vlm.html \
lua/http/images/Back-48.png \ lua/http/images/loop.png \
lua/http/images/button_eject-48.png \
lua/http/images/button_ffw-48.png \
lua/http/images/button_first-48.png \
lua/http/images/button_full-48.png \
lua/http/images/button_help-48.png \
lua/http/images/button_last-48.png \
lua/http/images/button_pause-48.png \ lua/http/images/button_pause-48.png \
lua/http/images/button_play-48.png \ lua/http/images/speaker-32.png \
lua/http/images/button_rec-48.png \
lua/http/images/button_repeat-48.png \
lua/http/images/button_rew-48.png \
lua/http/images/button_stop-48.png \
lua/http/images/button_stream-48.png \
lua/http/images/delete.png \
lua/http/images/delete_small.png \
lua/http/images/eject.png \
lua/http/images/empty.png \
lua/http/images/Folder-48.png \
lua/http/images/fullscreen.png \ lua/http/images/fullscreen.png \
lua/http/images/help.png \ lua/http/images/vlc-48.png \
lua/http/images/info.png \ lua/http/images/prev.png \
lua/http/images/loop.png \ lua/http/images/play.png \
lua/http/images/Audio-48.png \
lua/http/images/empty.png \
lua/http/images/minus.png \ lua/http/images/minus.png \
lua/http/images/next.png \ lua/http/images/slider_right.png \
lua/http/images/Other-48.png \ lua/http/images/slider_point.png \
lua/http/images/pause.png \ lua/http/images/pause.png \
lua/http/images/play.png \ lua/http/images/speaker_mute.png \
lua/http/images/playlist.png \ lua/http/images/delete_small.png \
lua/http/images/playlist_small.png \ lua/http/images/snapshot.png \
lua/http/images/plus.png \ lua/http/images/Folder-48.png \
lua/http/images/prev.png \ lua/http/images/info.png \
lua/http/images/refresh.png \ lua/http/images/refresh.png \
lua/http/images/repeat.png \ lua/http/images/sout.png \
lua/http/images/reset.png \ lua/http/images/button_stop-48.png \
lua/http/images/sd.png \ lua/http/images/button_help-48.png \
lua/http/images/button-equalizer-48.png \
lua/http/images/button_ffw-48.png \
lua/http/images/sort.png \
lua/http/images/button_play-48.png \
lua/http/images/white_cross_small.png \
lua/http/images/button_full-48.png \
lua/http/images/shuffle.png \ lua/http/images/shuffle.png \
lua/http/images/slider_bar.png \ lua/http/images/Other-48.png \
lua/http/images/slider_left.png \ lua/http/images/button_repeat-48.png \
lua/http/images/slider_point.png \ lua/http/images/repeat.png \
lua/http/images/slider_right.png \
lua/http/images/snapshot.png \
lua/http/images/slow.png \ lua/http/images/slow.png \
lua/http/images/sort.png \ lua/http/images/slider_left.png \
lua/http/images/sout.png \ lua/http/images/help.png \
lua/http/images/speaker-32.png \
lua/http/images/speaker.png \
lua/http/images/speaker_mute.png \
lua/http/images/stop.png \ lua/http/images/stop.png \
lua/http/images/sd.png \
lua/http/images/speaker.png \
lua/http/images/button_first-48.png \
lua/http/images/button_stream-48.png \
lua/http/images/button_rew-48.png \
lua/http/images/button_rec-48.png \
lua/http/images/delete.png \
lua/http/images/Back-48.png \
lua/http/images/button_eject-48.png \
lua/http/images/Video-48.png \ lua/http/images/Video-48.png \
lua/http/images/vlc16x16.png \ lua/http/images/playlist_small.png \
lua/http/images/volume_down.png \ lua/http/images/eject.png \
lua/http/images/playlist.png \
lua/http/images/volume_up.png \ lua/http/images/volume_up.png \
lua/http/images/next.png \
lua/http/images/button_last-48.png \
lua/http/images/volume_down.png \
lua/http/images/slider_bar.png \
lua/http/images/vlc16x16.png \
lua/http/images/plus.png \
lua/http/images/white.png \ lua/http/images/white.png \
lua/http/images/white_cross_small.png \ lua/http/images/reset.png \
lua/http/index.html \ lua/http/mobile_equalizer.html \
lua/http/js/common.js \ lua/http/vlm_export.html \
lua/http/js/controlers.js \ lua/http/mobile_browse.html \
lua/http/js/functions.js \
lua/http/js/jquery-1.5.1.min.js \
lua/http/js/jquery.jstree.js \
lua/http/js/jquery-ui-1.8.13.custom.min.js \
lua/http/js/mosaic.js \
lua/http/js/vlm.js \
lua/http/mosaic.html \ lua/http/mosaic.html \
lua/http/requests/browse.xml \ lua/http/favicon.ico \
lua/http/requests/equalizer.xml \ lua/http/mobile_view.html \
lua/http/.hosts \
lua/http/requests/playlist.xml \ lua/http/requests/playlist.xml \
lua/http/requests/README.txt \
lua/http/requests/playlist_jstree.xml \
lua/http/requests/equalizer.xml \
lua/http/requests/browse.xml \
lua/http/requests/vlm_cmd.xml \
lua/http/requests/status.xml \ lua/http/requests/status.xml \
lua/http/requests/vlm.xml \ lua/http/requests/vlm.xml \
lua/http/requests/vlm_cmd.xml \ lua/http/index.html \
lua/http/requests/README.txt \ lua/http/css/ui-lightness/jquery-ui-1.8.13.custom.css \
lua/http/style.css \ lua/http/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png \
lua/http/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png \
lua/http/css/ui-lightness/images/ui-icons_ffffff_256x240.png \
lua/http/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png \
lua/http/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png \
lua/http/css/ui-lightness/images/ui-icons_222222_256x240.png \
lua/http/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png \
lua/http/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png \
lua/http/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png \
lua/http/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png \
lua/http/css/ui-lightness/images/ui-icons_ffd27a_256x240.png \
lua/http/css/ui-lightness/images/ui-icons_228ef1_256x240.png \
lua/http/css/ui-lightness/images/ui-icons_ef8c08_256x240.png \
lua/http/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png \
lua/http/css/main.css \
lua/http/iehacks.css \ lua/http/iehacks.css \
lua/http/view.html \ lua/http/js/jquery-1.5.1.min.js \
lua/http/vlm.html \ lua/http/js/functions.js \
lua/http/vlm_export.html lua/http/js/vlm.js \
lua/http/js/ui.js \
lua/http/js/common.js \
lua/http/js/jquery.jstree.js \
lua/http/js/controlers.js \
lua/http/js/jquery-ui-1.8.13.custom.min.js \
lua/http/js/mosaic.js \
lua/http/style.css
DIST_maemo = \ DIST_maemo = \
maemo/vlc_intf.rc \ maemo/vlc_intf.rc \
......
...@@ -90,6 +90,9 @@ body{ ...@@ -90,6 +90,9 @@ body{
#buttonSout{ #buttonSout{
background-image: url("../images/button_stream-48.png") ; background-image: url("../images/button_stream-48.png") ;
} }
#buttonEQ{
background-image: url("../images/button-equalizer-48.png") ;
}
#window_browse ol{ #window_browse ol{
list-style-type: none; list-style-type: none;
} }
...@@ -114,6 +117,18 @@ body{ ...@@ -114,6 +117,18 @@ body{
#window_create_stream table tr td{ #window_create_stream table tr td{
font-size: 11px; font-size: 11px;
} }
#window_equalizer div div{
text-align: center;
font-size: 11px;
padding: 0px;
}
.eqBand{
margin-bottom: 10px;
margin-top: 10px;
height: 400px;
font-size: 1.5em;
}
.footer{ .footer{
text-align: center; text-align: center;
font-size: 11px; font-size: 11px;
......
<script type="text/javascript">
$(function(){
$('#window_batch').dialog({
autoOpen: false,
width: 600,
modal: true,
buttons:{
"Send":function(){
var cmds = $('#batchCommand').val().split("\n");
for(var i=0;i<cmds.length;i++){
cmds[i] = cmds[i].replace(/^#.*$/,'\n');
}
cmds = cmds.join(";").replace(/\n/g,';').replace(/;+/g,';').replace(/^;/,'');
sendVLMCmd(cmds);
$(this).dialog('close');
},
"Cancel":function(){
$(this).dialog('close');
}
}
});
})
</script>
<div id="window_batch" title="VLM Batch Commands">
<textarea id="batchCommand" cols="50" rows="16">
#paste your VLM commands here
#separate commands with a new line or a semi-colon
</textarea>
</div>
\ No newline at end of file
<script language="javascript" type="text/javascript"> <script language="javascript" type="text/javascript">
var video_types = new Array('avi','mp4','wmv','mov','swf','vob','mkv','mpg');
var audio_types = new Array('mp3','wav');
var browse_target = 'default'; var browse_target = 'default';
function createElementLi(name,type,dir,ext){
var icon = type=="dir" && name=='..' ? 'Back-48.png' : (type=='dir' ? "Folder-48.png" : ($.inArray(ext,video_types)!=-1 ? "Video-48.png" : ($.inArray(ext,audio_types)!=-1 ? "Audio-48.png" : "Other-48.png")));
var open = type=="dir" ? "opendir='"+dir+"'" : (type=="file" ? "openfile='"+dir+"'" : "opendev='"+dir+"'");
var str = "<li class='system_icon ui-widget-content' "+open+" ><img src='images/"+icon+"' width='48px' height='48px' title='"+name+"' alt='"+name+"' style='border: none;background:none;'/><div style='font-size:10px;border:none;background:none;'>"+name+"</div></li>";
return str;
}
$(function(){ $(function(){
$('#window_browse').dialog({ $('#window_browse').dialog({
autoOpen: false, autoOpen: false,
width: 600, width: 600,
height: 650, height: 650,
modal: true, modal: true,
position: ['left','top'],
resizable: false, resizable: false,
buttons: { buttons: {
"Open":function(){ "Open":function(){
......
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
autoOpen: false, autoOpen: false,
width:800, width:800,
modal: true, modal: true,
position: ['left','top'],
buttons:{ buttons:{
"Create":function(){ "Create":function(){
var e = false; var e = false;
......
<script language="javascript" type="text/javascript">
var bands = new Array('60Hz','170Hz','310Hz','600Hz','1kHz','3kHz','6kHz','12kHz','14kHz','16kHz');
$(function(){
$('#window_equalizer').dialog({
autoOpen: false,
height: 650,
width: 500,
resizable: false,
buttons:{
"Reset":function(){
$('.eqBand').each(function(){
$(this).slider('value',0);
sendEQCmd({
command:'equalizer',
val: 0,
band: $(this).attr('id').substr(2)
})
});
},
"Close":function(){
$(this).dialog("close");
}
}
});
$('#preamp').slider({
min: -20,
max: 20,
step: 0.1,
range: "min",
animate: true,
stop: function(event,ui){
$('#preamp_txt').empty().append(ui.value+'dB');
sendEQCmd({
command:'preamp',
val: ui.value
})
},
slide: function(event,ui){
$('#preamp_txt').empty().append(ui.value+'dB');
}
});
});
</script>
<div id="window_equalizer" title="Graphical Equalizer">
<div style="margin: 5px 5px 5px 5px;">
<div>Preamp: <span id="preamp_txt">0dB</span></div>
</div>
<div style="margin: 5px 5px 10px 5px;">
<div id="preamp" style="font-size: 18px;"></div>
</div>
</div>
\ No newline at end of file
<script type="text/javascript">
$(function(){
$('#window_error').dialog({
autoOpen: false,
width:400,
modal: true,
buttons:{
"Close":function(){
$('#error_container').empty();
$(this).dialog('close');
}
}
});
})
</script>
<div id="window_error" title="Error!">
<div class="ui-state-error"><div class="ui-icon ui-icon-alert"></div></div>
<div id="error_container" class="ui-state-error"></div>
</div>
\ No newline at end of file
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
minWidth: 800, minWidth: 800,
minHeight: 500, minHeight: 500,
modal: true, modal: true,
position: ['left','top'],
buttons: { buttons: {
"Create": function() { "Create": function() {
$(this).dialog("close"); $(this).dialog("close");
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
$('#window_offset').dialog({ $('#window_offset').dialog({
autoOpen: false, autoOpen: false,
minWidth: 400, minWidth: 400,
position: ['left','top'],
buttons:{ buttons:{
"Close":function(){ "Close":function(){
$(this).dialog("close"); $(this).dialog("close");
......
<script type="text/javascript">
$(function(){
$('#window_stream_config').dialog({
autoOpen: false,
width:400,
modal: true,
buttons:{
"Okay":function(){
$('#player').empty();
$('#player').attr('href',$('#stream_protocol').val()+'://'+$('#stream_host').val()+':'+$('#stream_port').val()+'/'+$('#stream_file').val());
flowplayer("player", "http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf");
$(this).dialog('close');
},
"Cancel":function(){
$(this).dialog('close');
}
}
});
})
</script>
<div id="window_stream_config" title="Stream Input Configuration">
<table>
<tr>
<td>Protocol</td>
<td><input type="text" name="stream_protocol" id="stream_protocol" value="http" /></td>
</tr>
<tr>
<td>Host</td>
<td><input type="text" name="stream_host" id="stream_host" value="" /></td>
</tr>
<tr>
<td>Port</td>
<td><input type="text" name="stream_port" id="stream_port" value="8081" /></td>
</tr>
<tr>
<td>File</td>
<td><input type="text" name="stream_file" id="stream_file" value="stream.flv" /></td>
</tr>
</table>
</div>
\ No newline at end of file
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
autoOpen: false, autoOpen: false,
minWidth: 600, minWidth: 600,
minHeight: 430, minHeight: 430,
position: ['left','top'],
buttons:{ buttons:{
"Close":function(){ "Close":function(){
$(this).dialog("close"); $(this).dialog("close");
...@@ -21,7 +20,6 @@ ...@@ -21,7 +20,6 @@
$('#window_stream_config').dialog({ $('#window_stream_config').dialog({
autoOpen: false, autoOpen: false,
width:400, width:400,
position: ['left','top'],
modal: true, modal: true,
buttons:{ buttons:{
"Okay":function(){ "Okay":function(){
...@@ -44,6 +42,10 @@ ...@@ -44,6 +42,10 @@
$('#button_create_mosaic').click(function(){ $('#button_create_mosaic').click(function(){
$('#window_mosaic').dialog('open'); $('#window_mosaic').dialog('open');
return false; return false;
});
$('#button_refresh_streams').click(function(){
updateStreams();
return false;
}) })
$('#stream_host').val(stream_server); $('#stream_host').val(stream_server);
}); });
...@@ -67,6 +69,7 @@ ...@@ -67,6 +69,7 @@
<div id="button_create_mosaic" class="button icon ui-widget ui-state-default" title="Create Mosaic" opendialog="window_create_mosaiac"><span class="ui-icon ui-icon-calculator"></span></div> <div id="button_create_mosaic" class="button icon ui-widget ui-state-default" title="Create Mosaic" opendialog="window_create_mosaiac"><span class="ui-icon ui-icon-calculator"></span></div>
<div id="button_clear_streams" class="button icon ui-widget ui-state-default" title="Delete All Streams"><span class="ui-icon ui-icon-trash"></span></div> <div id="button_clear_streams" class="button icon ui-widget ui-state-default" title="Delete All Streams"><span class="ui-icon ui-icon-trash"></span></div>
<div id="button_config_streams" class="button icon ui-widget ui-state-default" title="Configure Stream Defaults"><span class="ui-icon ui-icon-wrench"></span></div> <div id="button_config_streams" class="button icon ui-widget ui-state-default" title="Configure Stream Defaults"><span class="ui-icon ui-icon-wrench"></span></div>
<div id="button_refresh_streams" class="button ui-widget ui-state-default ui-corner-all" title="Refresh Streams"><span class="ui-icon ui-icon-arrowrefresh-1-n"></span></div>
<div id="stream_info"> <div id="stream_info">
</div> </div>
......
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >
< index.html: VLC media player web interface - VLM
< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >
< Copyright (C) 2005-2006 the VideoLAN team
< $Id$
<
< Authors: Brandon Brooks <bwbrooks -at- archmageinc -dot- com>
<
< This program is free software; you can redistribute it and/or modify
< it under the terms of the GNU General Public License as published by
< the Free Software Foundation; either version 2 of the License, or
< (at your option) any later version.
<
< This program is distributed in the hope that it will be useful,
< but WITHOUT ANY WARRANTY; without even the implied warranty of
< MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
< GNU General Public License for more details.
<
< You should have received a copy of the GNU General Public License
< along with this program; if not, write to the Free Software
< Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<html> <html>
<head> <head>
<title>VLC media player - Web Interface</title> <title>VLC media player - Web Interface</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="favicon.ico" type="image/x-icon" rel="shortcut icon" />
<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript">
if(isMobile()){
window.location='mobile.html';
}
</script>
<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.13.custom.css" rel="stylesheet" /> <link type="text/css" href="css/ui-lightness/jquery-ui-1.8.13.custom.css" rel="stylesheet" />
<link type="text/css" href="css/main.css" rel="stylesheet" /> <link type="text/css" href="css/main.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.5.1.min.js"></script> <script type="text/javascript" src="js/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.13.custom.min.js"></script> <script type="text/javascript" src="js/jquery-ui-1.8.13.custom.min.js"></script>
<script type="text/javascript" src="js/jquery.jstree.js"></script> <script type="text/javascript" src="js/jquery.jstree.js"></script>
<script type="text/javascript" src="http://static.flowplayer.org/js/flowplayer-3.2.6.min.js"></script> <script type="text/javascript" src="http://static.flowplayer.org/js/flowplayer-3.2.6.min.js"></script>
<script type="text/javascript" src="js/common.js"></script> <script type="text/javascript" src="js/ui.js"></script>
<script type="text/javascript" src="js/controlers.js"></script> <script type="text/javascript" src="js/controlers.js"></script>
<script type="text/javascript"> <script type="text/javascript">
var pollStatus = true;
$(function(){ $(function(){
$('.button').hover(function(){$(this).addClass('ui-state-hover')},function(){$(this).removeClass('ui-state-hover')}); $('.button').hover(function(){$(this).addClass('ui-state-hover')},function(){$(this).removeClass('ui-state-hover')});
$('.button48').hover( $('.button48').hover(
function(){$(this).css({'filter':'alpha(opacity=50)','-moz-opacity':'0.5','-khtml-opacity': '0.5'})}, function(){$(this).css({'filter':'alpha(opacity=50)','-moz-opacity':'0.5','-khtml-opacity': '0.5'})},
function(){$(this).css({'filter':'alpha(opacity=100)','-moz-opacity':'1','-khtml-opacity': '1'})} function(){$(this).css({'filter':'alpha(opacity=100)','-moz-opacity':'1','-khtml-opacity': '1'})}
); );
$( "#seekSlider" ).slider({
range: "min",
value: 0,
min: 0,
max: 100,
stop: function( event, ui ) {
$( "#currentTime" ).empty();
$( "#currentTime" ).append( format_time(Math.round((ui.value/100)*$('#seekSlider').attr('totalLength'))) );
switch(current_que){
case 'main':
sendCommand({'command':'seek','val':Math.round((ui.value/100)*$('#seekSlider').attr('totalLength'))});
break;
case 'stream':
sendVLMCmd('control Current seek '+ui.value);
break;
}
}
});
$( "#volumeSlider" ).slider({
range: "min",
value: 50,
min: 0,
max: 100,
stop: function( event, ui ) {
$( "#currentVolume" ).empty();
$( "#currentVolume" ).append( ui.value+"%" );
sendCommand({
'command':'volume',
'val':Math.round(ui.value*5.12)
})
}
});
$('#buttonPlayList').click(function(){ $('#buttonPlayList').click(function(){
$('#libraryContainer').animate({ $('#libraryContainer').animate({
height: 'toggle' height: 'toggle'
...@@ -66,49 +59,23 @@ ...@@ -66,49 +59,23 @@
}) })
return false; return false;
}); });
$('#buttonEqualizer').click(function(){
updateEQ();
$('#window_equalizer').dialog('open');
return false;
})
$('#buttonOffsets').click(function(){ $('#buttonOffsets').click(function(){
$('#window_offset').dialog('open'); $('#window_offset').dialog('open');
}) return false;
});
$('#buttonBatch').click(function(){
$('#window_batch').dialog('open');
return false;
});
$('#buttonOpen').click(function(){ $('#buttonOpen').click(function(){
browse_target = 'default'; browse_target = 'default';
browse(); browse();
$('#window_browse').dialog('open'); $('#window_browse').dialog('open');
});
$('#buttonStop').click(function(){
switch(current_que){
case 'main':
sendCommand({'command' : 'pl_stop'})
break;
case 'stream':
sendVLMCmd('control Current stop');
break;
}
return false;
});
$('#buttonPlay').click(function(){
if($(this).attr('state')=='stopped'){
switch(current_que){
case 'main':
var id = $('.jstree-clicked','#libraryTree').length>0 ? $('.jstree-clicked','#libraryTree').first().parents().first().attr('id').substr(5) : current_id;
sendCommand({'command':'pl_play','id':id});
break;
case 'stream':
sendVLMCmd('control Current play');
flowplayer("player", "http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf");
break;
}
}else{
switch(current_que){
case 'main':
sendCommand({'command':'pl_pause'});
break;
case 'stream':
sendVLMCmd('control Current pause');
break;
}
}
return false; return false;
}); });
$('#buttonPrev').mousedown(function(){ $('#buttonPrev').mousedown(function(){
...@@ -137,10 +104,6 @@ ...@@ -137,10 +104,6 @@
intv = 0; intv = 0;
return false; return false;
}); });
$('#buttonFull').click(function(){
sendCommand({'command':'fullscreen'});
return false;
});
$('#buttonPlEmpty').click(function(){ $('#buttonPlEmpty').click(function(){
sendCommand({'command':'pl_empty'}) sendCommand({'command':'pl_empty'})
return false; return false;
...@@ -179,6 +142,7 @@ ...@@ -179,6 +142,7 @@
return false; return false;
}); });
$('#buttonStreams, #buttonStreams2').click(function(){ $('#buttonStreams, #buttonStreams2').click(function(){
updateStreams();
$('#window_streams').dialog('open'); $('#window_streams').dialog('open');
}); });
$('#buttonSout').click(function(){ $('#buttonSout').click(function(){
...@@ -195,12 +159,14 @@ ...@@ -195,12 +159,14 @@
$('#windowStreamConfirm').dialog({ $('#windowStreamConfirm').dialog({
autoOpen: false, autoOpen: false,
width:600, width:600,
position: ['left','top'],
modal: true, modal: true,
buttons:{ buttons:{
"Yes":function(){ "Yes":function(){
var file = $('[current="current"]','#libraryTree').length>0 ? decodeURIComponent($('[current="current"]','#libraryTree').first().attr('uri').substr(7)) : ($('.jstree-clicked','#libraryTree').length>0 ? decodeURIComponent($('.jstree-clicked','#libraryTree').first().parents().first().attr('uri').substr(7)) : ($('#plid_'+current_id).attr('uri') ? decodeURIComponent($('#plid_'+current_id).attr('uri').substr(7)) : false)); var file = $('[current="current"]','#libraryTree').length>0 ? decodeURIComponent($('[current="current"]','#libraryTree').first().attr('uri').substr(7)) : ($('.jstree-clicked','#libraryTree').length>0 ? decodeURIComponent($('.jstree-clicked','#libraryTree').first().parents().first().attr('uri').substr(7)) : ($('#plid_'+current_id).attr('uri') ? decodeURIComponent($('#plid_'+current_id).attr('uri').substr(7)) : false));
if(file){ if(file){
if($('#viewContainer').css('display')=='none'){
$('#buttonViewer').click();
}
var defaultStream = 'new Current broadcast enabled input "'+file+'" output #transcode{vcodec=FLV1,vb=4096,fps=25,scale=1,acodec=mp3,ab=512,samplerate=44100,channels=2}:std{access='+$('#stream_protocol').val()+',mux=ffmpeg{{mux=flv}},dst=0.0.0.0:'+$('#stream_port').val()+'/'+$('#stream_file').val()+'}'; var defaultStream = 'new Current broadcast enabled input "'+file+'" output #transcode{vcodec=FLV1,vb=4096,fps=25,scale=1,acodec=mp3,ab=512,samplerate=44100,channels=2}:std{access='+$('#stream_protocol').val()+',mux=ffmpeg{{mux=flv}},dst=0.0.0.0:'+$('#stream_port').val()+'/'+$('#stream_file').val()+'}';
sendVLMCmd('del Current;'+defaultStream+';control Current play'); sendVLMCmd('del Current;'+defaultStream+';control Current play');
$('#player').empty(); $('#player').empty();
...@@ -220,7 +186,6 @@ ...@@ -220,7 +186,6 @@
}); });
</script> </script>
</head> </head>
<body> <body>
<div align="center"> <div align="center">
<div id="mainContainer" align="center"> <div id="mainContainer" align="center">
...@@ -244,6 +209,8 @@ ...@@ -244,6 +209,8 @@
<div id="buttonViewer" class="button ui-widget ui-state-default ui-corner-all" title="Hide / Show Viewer" style="float: left;"><span class="ui-icon ui-icon-video"></span></div> <div id="buttonViewer" class="button ui-widget ui-state-default ui-corner-all" title="Hide / Show Viewer" style="float: left;"><span class="ui-icon ui-icon-video"></span></div>
<div id="buttonStreams" class="button ui-widget ui-state-default ui-corner-all" title="Manage Streams" style="float: left;"><span class="ui-icon ui-icon-script"></span></div> <div id="buttonStreams" class="button ui-widget ui-state-default ui-corner-all" title="Manage Streams" style="float: left;"><span class="ui-icon ui-icon-script"></span></div>
<div id="buttonOffsets" class="button ui-widget ui-state-default ui-corner-all" title="Track Synchronisation" style="float: left;"><span class="ui-icon ui-icon-transfer-e-w"></span></div> <div id="buttonOffsets" class="button ui-widget ui-state-default ui-corner-all" title="Track Synchronisation" style="float: left;"><span class="ui-icon ui-icon-transfer-e-w"></span></div>
<div id="buttonEqualizer" class="button ui-widget ui-state-default ui-corner-all" title="Equalizer" style="float: left;"><span class="ui-icon ui-icon-signal"></span></div>
<div id="buttonBatch" class="button ui-widget ui-state-default ui-corner-all" title="VLM Batch Commands" style="float: left;"><span class="ui-icon ui-icon-suitcase"></span></div>
</td> </td>
<td> <td>
<div style="margin-left:20px;"> <div style="margin-left:20px;">
...@@ -330,8 +297,7 @@ ...@@ -330,8 +297,7 @@
<?vlc <?vlc
current_page = "index" current_page = "index"
dialogs("browse_window.html","stream_window.html","create_stream.html","offset_window.html","mosaic_window.html"); dialogs("browse_window.html","stream_window.html","create_stream.html","offset_window.html","mosaic_window.html","equalizer_window.html","batch_window.html","error_window.html");
?> ?>
</body> </body>
</html> </html>
\ No newline at end of file
var intv = 0; var intv = 0;
var ccmd = ""; var ccmd = "";
var video_types = new Array('avi','mp4','wmv','mov','swf','vob','mkv','mpg');
var audio_types = new Array('mp3','wav');
var stream_server = window.location.hostname;
function format_time( s ){ function format_time( s ){
var hours = Math.floor(s/3600); var hours = Math.floor(s/3600);
var minutes = Math.floor((s/60)%60); var minutes = Math.floor((s/60)%60);
...@@ -36,3 +39,23 @@ function setIntv(){ ...@@ -36,3 +39,23 @@ function setIntv(){
} }
} }
} }
function convertHz(value){
if(value>=1000){
return Math.round(value/1000,2)+'kHz';
}else{
return Math.round(value,2)+'Hz';
}
}
function isMobile(){
var a = navigator.userAgent||navigator.vendor||window.opera;
if(/android|avantgo|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|e\-|e\/|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|xda(\-|2|g)|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))){
return true;
}
return false;
}
function createElementLi(name,type,dir,ext){
var icon = type=="dir" && name=='..' ? 'Back-48.png' : (type=='dir' ? "Folder-48.png" : ($.inArray(ext,video_types)!=-1 ? "Video-48.png" : ($.inArray(ext,audio_types)!=-1 ? "Audio-48.png" : "Other-48.png")));
var open = type=="dir" ? "opendir='"+dir+"'" : (type=="file" ? "openfile='"+dir+"'" : "opendev='"+dir+"'");
var str = "<li class='system_icon ui-widget-content' "+open+" ><img src='images/"+icon+"' width='48px' height='48px' title='"+name+"' alt='"+name+"' style='border: none;background:none;'/><div style='font-size:10px;border:none;background:none;'>"+name+"</div></li>";
return str;
}
\ No newline at end of file
...@@ -21,6 +21,7 @@ function updateStatus(){ ...@@ -21,6 +21,7 @@ function updateStatus(){
$('#currentSubtitleDelay').append(Math.round($('subtitledelay',data).text()*100)/100+'s'); $('#currentSubtitleDelay').append(Math.round($('subtitledelay',data).text()*100)/100+'s');
$('#seekSlider').attr('totalLength',$('length',data).text()); $('#seekSlider').attr('totalLength',$('length',data).text());
$('#buttonPlay').attr('state',$('state',data).text()); $('#buttonPlay').attr('state',$('state',data).text());
$('#buttonPlay').attr('mrl',$('[name="filename"]',data).text());
if($('state',data).text()=='playing'){ if($('state',data).text()=='playing'){
$('#buttonPlay').css({ $('#buttonPlay').css({
'background-image':'url("images/button_pause-48.png")' 'background-image':'url("images/button_pause-48.png")'
...@@ -60,29 +61,64 @@ function updateStatus(){ ...@@ -60,29 +61,64 @@ function updateStatus(){
'display':'block' 'display':'block'
}); });
}else if($('[name="artwork_url"]',data).text()==""){ }else if($('[name="artwork_url"]',data).text()==""){
$('#albumArt').css({ $('#albumArt').attr('src','images/vlc-48.png');
'visibility':'hidden',
'display':'none'
});
} }
if(pollStatus){
setTimeout( updateStatus, 1000 ); setTimeout( updateStatus, 1000 );
} }
}
$('band',data).each(function(){
var id = $(this).attr('id');
var freq = convertHz($(this).attr('freqency'));
var value = $(this).text() ? $(this).text() : 0;
if(!$('#eq_container'+id).length){
$('#window_equalizer').append('<div style="float:left;width:44px;" align="center" id="eq_container'+id+'"><div id="eq'+id+'_txt">'+value+'dB</div><div class="eqBand" id="eq'+id+'" style="font-size: 18px;"></div><div>'+freq+'</div></div>');
$('#eq'+id).slider({
min: -20,
max: 20,
step: 0.1,
range: "min",
value: value,
animate: true,
orientation: "vertical",
stop: function(event,ui){
$('#'+$(this).attr('id')+'_txt').empty().append(ui.value+'dB');
sendCommad({
command:'equalizer',
val: ui.value,
band: $(this).attr('id').substr(2)
})
},
slide: function(event,ui){
$('#'+$(this).attr('id')+'_txt').empty().append(ui.value+'dB');
}
});
}else{
$('#eq'+id).slider({value:value});
$('#eq'+id+'_txt').empty().append(Math.round(value*100)/100+'dB');
}
});
$('#preamp').slider('value',$('preamp',data).text());
$('#preamp_txt').empty().append(Math.round($('preamp',data).text()*100)/100+'dB');
}, },
error: function(jqXHR,status,error){ error: function(jqXHR,status,error){
setTimeout( updateStatus, 500 ); setTimeout( updateStatus, 500 );
} }
}); });
} }
function updatePlayList(){ function updatePlayList(){
$('#libraryTree').jstree('refresh',-1); $('#libraryTree').jstree('refresh',-1);
} }
function sendCommand(params){ function sendCommand(params,append){
if(current_que=='stream'){ if(current_que=='stream'){
$.ajax({ $.ajax({
url: 'requests/status.xml', url: 'requests/status.xml',
data: params, data: params,
success:function(data,status,jqXHR){ success:function(data,status,jqXHR){
if(append!=undefined){
eval(append);
}
updateStatus(); updateStatus();
updatePlayList(); updatePlayList();
} }
...@@ -91,20 +127,26 @@ function sendCommand(params){ ...@@ -91,20 +127,26 @@ function sendCommand(params){
if(params.plreload===false){ if(params.plreload===false){
$.ajax({ $.ajax({
url: 'requests/status.xml', url: 'requests/status.xml',
data: params data: params,
success:function(data,status,jqXHR){
if(append!=undefined){
eval(append);
}
}
}); });
}else{ }else{
$.ajax({ $.ajax({
url: 'requests/status.xml', url: 'requests/status.xml',
data: params, data: params,
success:function(data,status,jqXHR){ success:function(data,status,jqXHR){
if(append!=undefined){
eval(append);
}
updatePlayList(); updatePlayList();
} }
}); });
} }
} }
} }
function browse(dir){ function browse(dir){
dir = dir==undefined ? '~' : dir; dir = dir==undefined ? '~' : dir;
...@@ -112,6 +154,7 @@ function browse(dir){ ...@@ -112,6 +154,7 @@ function browse(dir){
url: 'requests/browse.xml', url: 'requests/browse.xml',
data:'dir='+encodeURIComponent(dir), data:'dir='+encodeURIComponent(dir),
success: function(data,status,jqXHR){ success: function(data,status,jqXHR){
var tgt = browse_target.indexOf('__')==-1 ? browse_target : browse_target.substr(0,browse_target.indexOf('__'));
$('#browse_elements').empty(); $('#browse_elements').empty();
$('element',data).each(function(){ $('element',data).each(function(){
if($(this).attr('type')=='dir' || $.inArray($(this).attr('name').substr(-3),video_types)!=-1 || $.inArray($(this).attr('name').substr(-3),audio_types)!=-1){ if($(this).attr('type')=='dir' || $.inArray($(this).attr('name').substr(-3),video_types)!=-1 || $.inArray($(this).attr('name').substr(-3),audio_types)!=-1){
...@@ -122,7 +165,6 @@ function browse(dir){ ...@@ -122,7 +165,6 @@ function browse(dir){
browse($(this).attr('opendir')); browse($(this).attr('opendir'));
}); });
$('[openfile]').dblclick(function(){ $('[openfile]').dblclick(function(){
var tgt = browse_target.indexOf('__')==-1 ? browse_target : browse_target.substr(0,browse_target.indexOf('__'));
switch(tgt){ switch(tgt){
case '#stream_input': case '#stream_input':
$(browse_target).val($(this).attr('openfile')); $(browse_target).val($(this).attr('openfile'));
...@@ -136,14 +178,39 @@ function browse(dir){ ...@@ -136,14 +178,39 @@ function browse(dir){
'float' : 'left' 'float' : 'left'
}); });
break; break;
case '#mobile':
break;
default: default:
sendCommand('command=in_play&input=file://'+encodeURIComponent($(this).attr('openfile'))); sendCommand('command=in_play&input=file://'+encodeURIComponent($(this).attr('openfile')));
break; break;
} }
$('#window_browse').dialog('close'); $('#window_browse').dialog('close');
}); });
$('[opendir]').click(function(){
switch(tgt){
case '#mobile':
browse($(this).attr('opendir'));
break;
default:
break;
}
});
$('[openfile]').click(function(){
switch(tgt){
case '#mobile':
sendCommand('command=in_play&input=file://'+encodeURIComponent($(this).attr('openfile')),"window.location='mobile.html'");
break;
default:
break;
}
});
switch(tgt){
case '#mobile':
break;
default:
$('[selectable]').selectable(); $('[selectable]').selectable();
break;
}
}, },
error: function(jqXHR,status,error){ error: function(jqXHR,status,error){
setTimeout('browse("'+dir+'")',1041); setTimeout('browse("'+dir+'")',1041);
...@@ -256,47 +323,113 @@ function updateStreams(){ ...@@ -256,47 +323,113 @@ function updateStreams(){
} }
setTimeout( updateStreams, 1000 ); setTimeout( updateStreams, 1000 );
} }
} }
}); });
} }
function sendVLMCmd(command){ function updateEQ(){
$.ajax({
url: 'requests/equalizer.xml',
success: function(data,status,jqXHR){
$('band',data).each(function(){
var id = $(this).attr('id');
var freq = convertHz($(this).attr('freqency'));
var value = $(this).text() ? $(this).text() : 0;
if(!$('#eq_container'+id).length){
$('#window_equalizer').append('<div style="float:left;width:44px;" align="center" id="eq_container'+id+'"><div id="eq'+id+'_txt">'+value+'dB</div><div class="eqBand" id="eq'+id+'" style="font-size: 18px;"></div><div>'+freq+'</div></div>');
$('#eq'+id).slider({
min: -20,
max: 20,
step: 0.1,
range: "min",
value: value,
animate: true,
orientation: "vertical",
stop: function(event,ui){
$('#'+$(this).attr('id')+'_txt').empty().append(ui.value+'dB');
sendEQCmd({
command:'equalizer',
val: ui.value,
band: $(this).attr('id').substr(2)
})
},
slide: function(event,ui){
$('#'+$(this).attr('id')+'_txt').empty().append(ui.value+'dB');
}
});
}else{
$('#eq'+id).slider({value:value});
$('#eq'+id+'_txt').empty().append(Math.round(value*100)/100+'dB');
}
});
$('#preamp').slider('value',$('preamp',data).text());
$('#preamp_txt').empty().append(Math.round($('preamp',data).text()*100)/100+'dB');
}
})
}
function sendVLMCmd(command,append){
var commands = command.split(';'); var commands = command.split(';');
if(commands.length>1){ if(commands.length>1){
sendBatchVLMCmd(command); sendBatchVLMCmd(command,append);
}else{ }else{
if(current_que=='main'){ if(current_que=='main'){
$.ajax({ $.ajax({
url: 'requests/vlm_cmd.xml', url: 'requests/vlm_cmd.xml',
data: 'command='+encodeURIComponent(command), data: 'command='+encodeURIComponent(command),
success: function(data,status,jqXHR){ success: function(data,status,jqXHR){
if($('error',data).text()){
$('#error_container').append('<div>'+$('error',data).text()+'</div>');
$('#window_error').dialog('open');
}
if(append!=undefined){
eval(append);
}
updateStreams(); updateStreams();
} }
}); });
}else{ }else{
$.ajax({ $.ajax({
url: 'requests/vlm_cmd.xml', url: 'requests/vlm_cmd.xml',
data: 'command='+encodeURIComponent(command) data: 'command='+encodeURIComponent(command),
success: function(data,status,jqXHR){
if($('error',data).text()){
$('#error_container').append('<div>'+$('error',data).text()+'</div>');
$('#window_error').dialog('open');
}
updateStreams();
}
}); });
} }
} }
} }
function sendBatchVLMCmd(command){ function sendBatchVLMCmd(command,append){
var commands = command.split(';'); var commands = command.split(';');
$.ajax({ $.ajax({
url: 'requests/vlm_cmd.xml', url: 'requests/vlm_cmd.xml',
data: 'command='+encodeURIComponent(commands.shift()), data: 'command='+encodeURIComponent(commands.shift()),
success:function(data,status,jqXHR){ success:function(data,status,jqXHR){
sendVLMCmd(commands.join(';')); if($('error',data).text()){
$('#error_container').append('<div>'+$('error',data).text()+'</div>');
$('#window_error').dialog('open');
}
sendVLMCmd(commands.join(';'),append);
}
});
}
function sendEQCmd(params){
$.ajax({
url: 'requests/equalizer.xml',
data: params,
success: function(data,status,jqXHR){
updateEQ();
} }
}); });
} }
$(function(){ $(function(){
$('#libraryTree').jstree({ $('#libraryTree').jstree({
"xml_data":{ "xml_data":{
"ajax":{ "ajax":{
"url" : "requests/playlist.xml" "url" : "requests/playlist_jstree.xml"
}, },
"xsl" : "nest" "xsl" : "nest"
}, },
...@@ -317,4 +450,5 @@ $(function(){ ...@@ -317,4 +450,5 @@ $(function(){
}); });
updateStatus(); updateStatus();
updateStreams(); updateStreams();
updateEQ();
}); });
$(function(){
$( "#seekSlider" ).slider({
range: "min",
value: 0,
min: 0,
max: 100,
stop: function( event, ui ) {
$( "#currentTime" ).empty().append( format_time(Math.round((ui.value/100)*$('#seekSlider').attr('totalLength'))) );
switch(current_que){
case 'main':
sendCommand({'command':'seek','val':Math.round((ui.value/100)*$('#seekSlider').attr('totalLength'))});
break;
case 'stream':
sendVLMCmd('control Current seek '+ui.value);
break;
}
}
});
$( "#volumeSlider" ).slider({
range: "min",
value: 50,
min: 0,
max: 100,
stop: function( event, ui ) {
$( "#currentVolume" ).empty().append( ui.value+"%" );
sendCommand({
'command':'volume',
'val':Math.round(ui.value*5.12)
})
}
});
$('#buttonStop').click(function(){
switch(current_que){
case 'main':
sendCommand({'command' : 'pl_stop'})
break;
case 'stream':
sendVLMCmd('control Current stop');
break;
}
return false;
});
$('#buttonPlay').click(function(){
if($(this).attr('state')=='stopped'){
switch(current_que){
case 'main':
var id = $('.jstree-clicked','#libraryTree').length>0 ? $('.jstree-clicked','#libraryTree').first().parents().first().attr('id').substr(5) : current_id;
sendCommand({'command':'pl_play','id':id});
break;
case 'stream':
sendVLMCmd('control Current play');
flowplayer("player", "http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf");
break;
}
}else{
switch(current_que){
case 'main':
sendCommand({'command':'pl_pause'});
break;
case 'stream':
sendVLMCmd('control Current pause');
break;
}
}
return false;
});
$('#buttonFull').click(function(){
sendCommand({'command':'fullscreen'});
return false;
});
$('#stream_host').val(stream_server);
})
\ No newline at end of file
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >
< mobile.html: VLC media player web interface - VLM
< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >
< Copyright (C) 2005-2006 the VideoLAN team
< $Id$
<
< Authors: Brandon Brooks <bwbrooks -at- archmageinc -dot- com>
<
< This program is free software; you can redistribute it and/or modify
< it under the terms of the GNU General Public License as published by
< the Free Software Foundation; either version 2 of the License, or
< (at your option) any later version.
<
< This program is distributed in the hope that it will be useful,
< but WITHOUT ANY WARRANTY; without even the implied warranty of
< MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
< GNU General Public License for more details.
<
< You should have received a copy of the GNU General Public License
< along with this program; if not, write to the Free Software
< Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<html>
<head>
<title>VLC media player - Web Interface</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width; user-scalable=no" />
<link href="favicon.ico" type="image/x-icon" rel="shortcut icon" />
<script type="text/javascript" src="js/common.js"></script>
<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.13.custom.css" rel="stylesheet" />
<link type="text/css" href="css/main.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.13.custom.min.js"></script>
<script type="text/javascript" src="js/jquery.jstree.js"></script>
<script type="text/javascript" src="http://static.flowplayer.org/js/flowplayer-3.2.6.min.js"></script>
<script type="text/javascript" src="js/ui.js"></script>
<script type="text/javascript" src="js/controlers.js"></script>
<script type="text/javascript">
var pollStatus = true;
$(function(){
$('#buttonPrev').click(function(){
sendCommand({'command':'pl_previous'});
return false;
});
$('#buttonNext').click(function(){
sendCommand({'command':'pl_next'});
return false;
});
$('#buttonOpen').click(function(){
window.location='mobile_browse.html';
});
$('#buttonEQ').click(function(){
window.location='mobile_equalizer.html';
});
$('#buttonSout').click(function(){
var file = decodeURIComponent($('#buttonPlay').attr('mrl'));
if(file){
var defaultStream = 'new Current broadcast enabled input "'+file+'" output #transcode{vcodec=FLV1,vb=4096,fps=25,scale=1,acodec=mp3,ab=512,samplerate=44100,channels=2}:std{access='+$('#stream_protocol').val()+',mux=ffmpeg{{mux=flv}},dst=0.0.0.0:'+$('#stream_port').val()+'/'+$('#stream_file').val()+'}';
sendVLMCmd('del Current;'+defaultStream+';control Current play','window.location="mobile_view.html"');
}
return false;
});
})
</script>
</head>
<body>
<div id="main">
<table width="100%" cellpadding="0" cellspacing="0" style="height:100%" border="0">
<tr>
<td valign="top" height="130px">
<img id="albumArt" src="/art" width="141px" height="130px" alt="Album Art" style="border:2px solid #000000;"/>
</td>
<td valign="top" width="125px" class="ui-widget-content" rowspan="2">
<div id="buttonOpen" class="button48 ui-corner-all" title="Open Media"></div>
<div id="buttonFull" class="button48 ui-corner-all" title="Full Screen"></div>
<div id="buttonEQ" class="button48 ui-corner-all" title="Equalizer"></div>
<div id="buttonSout" class="button48 ui-corner-all" title="Easy Stream"></div
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="2" valign="bottom" height="60px">
<div id="volumeSlider" title="Volume" style="width:98%; margin-left:10px; font-size:30px;"><img src="images/speaker-32.png" class="ui-slider-handle" alt="volume"/></div>
</td>
</tr>
<tr>
<td colspan="2" valign="bottom" height="20px">
<div id="mediaTitle" class="dynamic"></div>
</td>
</tr>
<tr>
<td id="controlButtons" colspan="2" valign="bottom" height="108px;" class="ui-widget-content">
<div align="center">
<div id="buttonPrev" class="button48 ui-corner-all" title="Previous"></div>
<div id="buttonPlay" class="button48 ui-corner-all" title="Play"></div>
<div id="buttonNext" class="button48 ui-corner-all" title="Next"></div>
<div id="buttonStop" class="button48 ui-corner-all" title="Stop"></div>
</div>
<div id="seekSlider" title="Seek Time" style="width:98%; margin-left:10px;font-size:30px;"></div>
<table width="100%">
<tr>
<td>
<div id="currentTime" class="dynamic">00:00:00</div>
</td>
<td>
<div id="totalTime" class="dynamic">00:00:00</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<?vlc
dialogs("stream_config_window.html");
?>
</body>
</html>
\ No newline at end of file
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >
< mobile_browse.html: VLC media player web interface - VLM
< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >
< Copyright (C) 2005-2006 the VideoLAN team
< $Id$
<
< Authors: Brandon Brooks <bwbrooks -at- archmageinc -dot- com>
<
< This program is free software; you can redistribute it and/or modify
< it under the terms of the GNU General Public License as published by
< the Free Software Foundation; either version 2 of the License, or
< (at your option) any later version.
<
< This program is distributed in the hope that it will be useful,
< but WITHOUT ANY WARRANTY; without even the implied warranty of
< MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
< GNU General Public License for more details.
<
< You should have received a copy of the GNU General Public License
< along with this program; if not, write to the Free Software
< Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<html>
<head>
<title>VLC media player - Web Interface</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width; user-scalable=no" />
<link href="favicon.ico" type="image/x-icon" rel="shortcut icon" />
<script type="text/javascript" src="js/common.js"></script>
<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.13.custom.css" rel="stylesheet" />
<link type="text/css" href="css/main.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.13.custom.min.js"></script>
<script type="text/javascript" src="js/jquery.jstree.js"></script>
<script type="text/javascript" src="http://static.flowplayer.org/js/flowplayer-3.2.6.min.js"></script>
<script type="text/javascript" src="js/controlers.js"></script>
<script type="text/javascript">
var pollStatus = false;
var browse_target = '#mobile';
$(function(){
browse();
})
</script>
</head>
<body>
<div id="window_browse" title="Media Browser">
<div>
<ol id='browse_elements' selectable="selectable">
<li>Play List</li>
</ol>
</div>
</div>
</body>
</html>
\ No newline at end of file
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >
< mobile_equalizer.html: VLC media player web interface - VLM
< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >
< Copyright (C) 2005-2006 the VideoLAN team
< $Id$
<
< Authors: Brandon Brooks <bwbrooks -at- archmageinc -dot- com>
<
< This program is free software; you can redistribute it and/or modify
< it under the terms of the GNU General Public License as published by
< the Free Software Foundation; either version 2 of the License, or
< (at your option) any later version.
<
< This program is distributed in the hope that it will be useful,
< but WITHOUT ANY WARRANTY; without even the implied warranty of
< MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
< GNU General Public License for more details.
<
< You should have received a copy of the GNU General Public License
< along with this program; if not, write to the Free Software
< Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<html>
<head>
<title>VLC media player - Web Interface</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width; user-scalable=no" />
<link href="favicon.ico" type="image/x-icon" rel="shortcut icon" />
<script type="text/javascript" src="js/common.js"></script>
<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.13.custom.css" rel="stylesheet" />
<link type="text/css" href="css/main.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.13.custom.min.js"></script>
<script type="text/javascript" src="js/jquery.jstree.js"></script>
<script type="text/javascript" src="http://static.flowplayer.org/js/flowplayer-3.2.6.min.js"></script>
<script type="text/javascript" src="js/controlers.js"></script>
<script language="javascript" type="text/javascript">
var pollStatus = false;
$(function(){
$('#preamp').slider({
min: -20,
max: 20,
step: 0.1,
range: "min",
animate: true,
stop: function(event,ui){
$('#preamp_txt').empty().append(ui.value+'dB');
sendEQCmd({
command:'preamp',
val: ui.value
})
},
slide: function(event,ui){
$('#preamp_txt').empty().append(ui.value+'dB');
}
});
});
</script>
</head>
<body>
<div id="window_equalizer" title="Graphical Equalizer">
<div style="margin: 5px 5px 5px 5px;">
<div>Preamp: <span id="preamp_txt">0dB</span></div>
</div>
<div style="margin: 5px 5px 10px 5px;">
<div id="preamp" style="font-size: 22px;"></div>
</div>
</div>
</body>
</html>
\ No newline at end of file
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >
< mobile_view.html: VLC media player web interface - VLM
< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >
< Copyright (C) 2005-2006 the VideoLAN team
< $Id$
<
< Authors: Brandon Brooks <bwbrooks -at- archmageinc -dot- com>
<
< This program is free software; you can redistribute it and/or modify
< it under the terms of the GNU General Public License as published by
< the Free Software Foundation; either version 2 of the License, or
< (at your option) any later version.
<
< This program is distributed in the hope that it will be useful,
< but WITHOUT ANY WARRANTY; without even the implied warranty of
< MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
< GNU General Public License for more details.
<
< You should have received a copy of the GNU General Public License
< along with this program; if not, write to the Free Software
< Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<html>
<head>
<title>VLC media player - Web Interface</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width; user-scalable=no" />
<link href="favicon.ico" type="image/x-icon" rel="shortcut icon"/>
<script type="text/javascript" src="js/common.js"></script>
<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.13.custom.css" rel="stylesheet" />
<link type="text/css" href="css/main.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.13.custom.min.js"></script>
<script type="text/javascript" src="js/jquery.jstree.js"></script>
<script type="text/javascript" src="http://static.flowplayer.org/js/flowplayer-3.2.6.min.js"></script>
<script type="text/javascript" src="js/controlers.js"></script>
<script type="text/javascript" src="js/ui.js"></script>
<script language="javascript" type="text/javascript">
var pollStatus = false;
$(function(){
$('#player').empty();
$('#player').attr('href',$('#stream_protocol').val()+'://'+$('#stream_host').val()+':'+$('#stream_port').val()+'/'+$('#stream_file').val());
flowplayer("player", "http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf");
});
</script>
</head>
<body>
<div id="player" style="width:100%;height:100%">
</div>
<?vlc
dialogs("stream_config_window.html");
?>
</body>
</html>
\ No newline at end of file
...@@ -24,7 +24,7 @@ vim:syntax=lua ...@@ -24,7 +24,7 @@ vim:syntax=lua
< Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. < Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> < - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
]] ?> ]] ?>
<root>
<?vlc <?vlc
--[[ --[[
function a(t,pre) function a(t,pre)
...@@ -42,17 +42,11 @@ function print_playlist(item) ...@@ -42,17 +42,11 @@ function print_playlist(item)
if item.flags.disabled then return end if item.flags.disabled then return end
if(item.children) then if(item.children) then
local name = vlc.strings.convert_xml_special_chars(item.name or "") local name = vlc.strings.convert_xml_special_chars(item.name or "")
if(name ~= "Undefined") then print('<node id="' ..tostring(item.id).. '" name="' ..tostring(name).. '" ro="' ..(item.flags.ro and "ro" or "rw").. '">')
print('<item id="plid_' ..tostring(item.id).. '" name="' ..tostring(name).. '" ro="' ..(item.flags.ro and "ro" or "rw").. '"><content><name>' ..name.. '</name></content>')
for _, child in ipairs(item.children) do
print_playlist(child)
end
print('</item>')
else
for _, child in ipairs(item.children) do for _, child in ipairs(item.children) do
print_playlist(child) print_playlist(child)
end end
end print('</node>')
else else
local name, path = vlc.strings.convert_xml_special_chars(item.name or "", item.path or "") local name, path = vlc.strings.convert_xml_special_chars(item.name or "", item.path or "")
local current_item = vlc.input.item() local current_item = vlc.input.item()
...@@ -63,7 +57,7 @@ function print_playlist(item) ...@@ -63,7 +57,7 @@ function print_playlist(item)
current = 'current="current"' current = 'current="current"'
end end
end end
print('<item id="plid_' ..tostring(item.id).. '" uri="' ..tostring(path).. '" name="' ..name.. '" ro="' ..(item.flags.ro and "ro" or "rw").. '" duration ="' ..math.floor(item.duration).. '" ' ..current.. ' ><content><name>' ..name.. '</name></content></item>') print('<leaf id="' ..tostring(item.id).. '" uri="' ..tostring(path).. '" name="' ..name.. '" ro="' ..(item.flags.ro and "ro" or "rw").. '" duration ="' ..math.floor(item.duration).. '" ' ..current.. ' />')
end end
end end
...@@ -82,4 +76,3 @@ end ...@@ -82,4 +76,3 @@ end
--a(p) --Uncomment to debug --a(p) --Uncomment to debug
print_playlist(p) print_playlist(p)
?> ?>
</root>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" standalone="yes" ?<?vlc print'>'?>
<?vlc --[[
vim:syntax=lua
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >
< playlist.xml: VLC media player web interface
< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >
< Copyright (C) 2005-2006 the VideoLAN team
< $Id$
<
< Authors: Antoine Cellerier <dionoea -at- videolan -dot- org>
<
< This program is free software; you can redistribute it and/or modify
< it under the terms of the GNU General Public License as published by
< the Free Software Foundation; either version 2 of the License, or
< (at your option) any later version.
<
< This program is distributed in the hope that it will be useful,
< but WITHOUT ANY WARRANTY; without even the implied warranty of
< MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
< GNU General Public License for more details.
<
< You should have received a copy of the GNU General Public License
< along with this program; if not, write to the Free Software
< Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
]] ?>
<root>
<?vlc
--[[
function a(t,pre)
local pre = pre or ""
for k,v in pairs(t) do
vlc.msg.err(pre..tostring(k).." : "..tostring(v))
if type(v) == "table" then
a(v,pre.." ")
end
end
end
--]]
function print_playlist(item)
if item.flags.disabled then return end
if(item.children) then
local name = vlc.strings.convert_xml_special_chars(item.name or "")
if(name ~= "Undefined") then
print('<item id="plid_' ..tostring(item.id).. '" name="' ..tostring(name).. '" ro="' ..(item.flags.ro and "ro" or "rw").. '"><content><name>' ..name.. '</name></content>')
for _, child in ipairs(item.children) do
print_playlist(child)
end
print('</item>')
else
for _, child in ipairs(item.children) do
print_playlist(child)
end
end
else
local name, path = vlc.strings.convert_xml_special_chars(item.name or "", item.path or "")
local current_item = vlc.input.item()
local current = ""
-- Is the item the one currently played
if(current_item ~= nil) then
if(vlc.input.item().uri(current_item) == path) then
current = 'current="current"'
end
end
print('<item id="plid_' ..tostring(item.id).. '" uri="' ..tostring(path).. '" name="' ..name.. '" ro="' ..(item.flags.ro and "ro" or "rw").. '" duration ="' ..math.floor(item.duration).. '" ' ..current.. ' ><content><name>' ..name.. '</name></content></item>')
end
end
local p
if _GET["search"] then
if _GET["search"] ~= "" then
_G.search_key = _GET["search"]
else
_G.search_key = nil
end
local key = vlc.strings.decode_uri(_GET["search"])
p = vlc.playlist.search(key)
else
p = vlc.playlist.get()
end
--a(p) --Uncomment to debug
print_playlist(p)
?>
</root>
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >
< view.html: VLC media player web interface - VLM
< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >
< Copyright (C) 2005-2006 the VideoLAN team
< $Id$
<
< Authors: Brandon Brooks <bwbrooks -at- archmageinc -dot- com>
<
< This program is free software; you can redistribute it and/or modify
< it under the terms of the GNU General Public License as published by
< the Free Software Foundation; either version 2 of the License, or
< (at your option) any later version.
<
< This program is distributed in the hope that it will be useful,
< but WITHOUT ANY WARRANTY; without even the implied warranty of
< MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
< GNU General Public License for more details.
<
< You should have received a copy of the GNU General Public License
< along with this program; if not, write to the Free Software
< Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>VLC media player - Flash Viewer</title> <title>VLC media player - Flash Viewer</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="favicon.ico" type="image/x-icon" rel="shortcut icon"/>
<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.13.custom.css" rel="stylesheet" /> <link type="text/css" href="css/ui-lightness/jquery-ui-1.8.13.custom.css" rel="stylesheet" />
<link type="text/css" href="css/main.css" rel="stylesheet" /> <link type="text/css" href="css/main.css" rel="stylesheet" />
<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js"></script>
<script type="text/javascript" src="http://static.flowplayer.org/js/flowplayer-3.2.6.min.js"></script> <script type="text/javascript" src="http://static.flowplayer.org/js/flowplayer-3.2.6.min.js"></script>
<script language="javascript" type="text/javascript"> <script language="javascript" type="text/javascript">
var stream_server = window.location.hostname;
$(function(){ $(function(){
$('#window_stream').resizable({ $('#window_stream').resizable({
minHeight: 300, minHeight: 300,
...@@ -22,27 +45,9 @@ ...@@ -22,27 +45,9 @@
}) })
} }
}); });
$('#window_stream_config').dialog({
autoOpen: false,
width:400,
position: ['left','top'],
modal: true,
buttons:{
"Okay":function(){
$('#player').empty();
$('#player').attr('href',$('#stream_protocol').val()+'://'+$('#stream_host').val()+':'+$('#stream_port').val()+'/'+$('#stream_file').val());
flowplayer("player", "http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf");
$(this).dialog('close');
},
"Cancel":function(){
$(this).dialog('close');
}
}
});
$('#button_stream_config').click(function(){ $('#button_stream_config').click(function(){
$('#window_stream_config').dialog('open'); $('#window_stream_config').dialog('open');
}); });
$('#stream_host').val(stream_server);
$('#player').empty(); $('#player').empty();
$('#player').attr('href',$('#stream_protocol').val()+'://'+$('#stream_host').val()+':'+$('#stream_port').val()+'/'+$('#stream_file').val()); $('#player').attr('href',$('#stream_protocol').val()+'://'+$('#stream_host').val()+':'+$('#stream_port').val()+'/'+$('#stream_file').val());
flowplayer("player", "http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf"); flowplayer("player", "http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf");
...@@ -68,25 +73,9 @@ ...@@ -68,25 +73,9 @@
<?vlc print(vlc.misc.version() .. " - Lua Web Interface - " .. vlc.misc.copyright()) ?> <?vlc print(vlc.misc.version() .. " - Lua Web Interface - " .. vlc.misc.copyright()) ?>
</div> </div>
</div> </div>
<div id="window_stream_config" title="Stream Input Configuration"> <?vlc
<table>
<tr> dialogs("stream_config_window.html");
<td>Protocol</td> ?>
<td><input type="text" name="stream_protocol" id="stream_protocol" value="http" /></td>
</tr>
<tr>
<td>Host</td>
<td><input type="text" name="stream_host" id="stream_host" value="" /></td>
</tr>
<tr>
<td>Port</td>
<td><input type="text" name="stream_port" id="stream_port" value="8081" /></td>
</tr>
<tr>
<td>File</td>
<td><input type="text" name="stream_file" id="stream_file" value="stream.flv" /></td>
</tr>
</table>
</div>
</body> </body>
</html> </html>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment