1 /*****************************************************************************
2 * vlm.js: VLC media player web interface
3 *****************************************************************************
4 * Copyright (C) 2005-2006 the VideoLAN team
7 * Authors: Antoine Cellerier <dionoea -at- videolan -dot- org>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22 *****************************************************************************/
24 /* replace quotes and spaces by underscores */
25 function addunderscores( str ){ return str.replace(/\'|\"| /g, '_'); }
27 /**********************************************************************
28 * Input dialog functions
29 *********************************************************************/
31 function vlm_input_edit( dest )
33 document.getElementById( 'input_dest' ).value = dest;
37 function vlm_input_change()
39 document.getElementById( value( 'input_dest' ) ).value = value( 'input_mrl' );
41 document.getElementById( value( 'input_dest' ) ).focus();
44 function vlm_output_edit( dest )
46 document.getElementById( 'sout_dest' ).value = dest;
50 function vlm_output_change()
52 document.getElementById( value( 'sout_dest' ) ).value = value( 'sout_mrl' ).substr(6); /* substr <-> remove :sout= */
54 document.getElementById( value( 'sout_dest' ) ).focus();
57 function hide_vlm_add()
59 document.getElementById( 'vlm_add_broadcast' ).style.display = 'none';
60 document.getElementById( 'vlm_add_vod' ).style.display = 'none';
61 document.getElementById( 'vlm_add_schedule' ).style.display = 'none';
62 document.getElementById( 'vlm_add_other' ).style.display = 'none';
65 function toggle_schedule_date()
67 if( checked( 'vlm_schedule_now' ) )
69 disable( 'vlm_schedule_year' );
70 disable( 'vlm_schedule_month' );
71 disable( 'vlm_schedule_day' );
72 disable( 'vlm_schedule_hour' );
73 disable( 'vlm_schedule_minute' );
74 disable( 'vlm_schedule_second' );
78 enable( 'vlm_schedule_year' );
79 enable( 'vlm_schedule_month' );
80 enable( 'vlm_schedule_day' );
81 enable( 'vlm_schedule_hour' );
82 enable( 'vlm_schedule_minute' );
83 enable( 'vlm_schedule_second' );
87 function toggle_schedule_repeat()
89 if( checked( 'vlm_schedule_repeat' ) )
91 enable( 'vlm_schedule_period_year' );
92 enable( 'vlm_schedule_period_month' );
93 enable( 'vlm_schedule_period_day' );
94 enable( 'vlm_schedule_period_hour' );
95 enable( 'vlm_schedule_period_minute' );
96 enable( 'vlm_schedule_period_second' );
97 enable( 'vlm_schedule_repeat_times' );
101 disable( 'vlm_schedule_period_year' );
102 disable( 'vlm_schedule_period_month' );
103 disable( 'vlm_schedule_period_day' );
104 disable( 'vlm_schedule_period_hour' );
105 disable( 'vlm_schedule_period_minute' );
106 disable( 'vlm_schedule_period_second' );
107 disable( 'vlm_schedule_repeat_times' );
111 function vlm_schedule_type_change( name )
113 var act = document.getElementById( 'vlm_elt_' + name + '_action' ).value;
114 var itemname = document.getElementById( 'vlm_elt_' + name + '_name' );
115 var opt = document.getElementById( 'vlm_elt_' + name + '_opt' );
116 if( act == "play" || act == "pause" || act == "stop" )
118 itemname.style.display = "";
119 opt.style.display = "none";
121 else if( act == "seek" )
123 itemname.style.display = "";
124 opt.style.display = "";
128 itemname.style.display = "none";
129 opt.style.display = "";
133 function update_vlm_add_broadcast()
135 var cmd = document.getElementById( 'vlm_command' );
137 if( value( 'vlm_broadcast_name' ) )
139 cmd.value = "new " + addunderscores( value( 'vlm_broadcast_name' ) )
142 if( checked( 'vlm_broadcast_enabled' ) )
144 cmd.value += " enabled";
147 if( checked( 'vlm_broadcast_loop' ) )
149 cmd.value += " loop";
152 if( value( 'vlm_broadcast_input' ) )
154 cmd.value += " input " + value( 'vlm_broadcast_input' );
157 if( value( 'vlm_broadcast_output' ) )
159 cmd.value += " output " + value( 'vlm_broadcast_output' );
168 function update_vlm_add_vod()
170 var cmd = document.getElementById( 'vlm_command' );
172 if( value( 'vlm_vod_name' ) )
174 cmd.value = "new " + addunderscores( value( 'vlm_vod_name' ) )
177 if( checked( 'vlm_vod_enabled' ) )
179 cmd.value += " enabled";
182 if( value( 'vlm_vod_input' ) )
184 cmd.value += " input " + value( 'vlm_vod_input' );
187 if( value( 'vlm_vod_output' ) )
189 cmd.value += " output " + value( 'vlm_vod_output' );
198 function update_vlm_add_schedule()
200 var cmd = document.getElementById( 'vlm_command' );
202 check_and_replace_int( 'vlm_schedule_year', '0000' );
203 check_and_replace_int( 'vlm_schedule_month', '00' );
204 check_and_replace_int( 'vlm_schedule_day', '00' );
205 check_and_replace_int( 'vlm_schedule_hour', '00' );
206 check_and_replace_int( 'vlm_schedule_minute', '00' );
207 check_and_replace_int( 'vlm_schedule_second', '00' );
208 check_and_replace_int( 'vlm_schedule_period_year', '0000' );
209 check_and_replace_int( 'vlm_schedule_period_month', '00' );
210 check_and_replace_int( 'vlm_schedule_period_day', '00' );
211 check_and_replace_int( 'vlm_schedule_period_hour', '00' );
212 check_and_replace_int( 'vlm_schedule_period_minute', '00' );
213 check_and_replace_int( 'vlm_schedule_period_second', '00' );
215 if( value( 'vlm_schedule_name' ) )
217 cmd.value = "new " + addunderscores( value( 'vlm_schedule_name' ) ) + " schedule";
219 if( checked( 'vlm_schedule_enabled' ) )
221 cmd.value += " enabled";
224 if( checked( 'vlm_schedule_now' ) )
226 cmd.value += " date now";
230 cmd.value += " date " + value( 'vlm_schedule_year' ) + "/" + value( 'vlm_schedule_month' ) + "/" + value( 'vlm_schedule_day' ) + '-' + value( 'vlm_schedule_hour' ) + ':' + value( 'vlm_schedule_minute' ) + ':' + value( 'vlm_schedule_second' );
233 if( checked( 'vlm_schedule_repeat' ) )
235 cmd.value += " period " + value( 'vlm_schedule_period_year' ) + "/" + value( 'vlm_schedule_period_month' ) + "/" + value( 'vlm_schedule_period_day' ) + '-' + value( 'vlm_schedule_period_hour' ) + ':' + value( 'vlm_schedule_period_minute' ) + ':' + value( 'vlm_schedule_period_second' );
237 if( value( 'vlm_schedule_repeat_times' ) != 0 )
239 cmd.value += " repeat " + (value( 'vlm_schedule_repeat_times' ) - 1 );
250 function update_vlm_add_other()
252 var cmd = document.getElementById( 'vlm_command' );
256 function clear_vlm_add()
258 document.getElementById( 'vlm_command' ).value = "";
259 document.getElementById( 'vlm_broadcast_name' ).value = "";
260 document.getElementById( 'vlm_vod_name' ).value = "";
263 function clear_children( elt )
266 while( elt.hasChildNodes() )
267 elt.removeChild( elt.firstChild );
270 function create_button( caption, action )
272 var link = document.createElement( "input" );
273 link.setAttribute( 'type', 'button' );
274 link.setAttribute( 'onclick', action );
275 link.setAttribute( 'value', caption );
278 function create_option( caption, value )
280 var opt = document.createElement( 'option' );
281 opt.setAttribute( 'value', value );
282 opt.appendChild( document.createTextNode( caption ) );
286 function parse_vlm_cmd()
288 if( req.readyState == 4 )
290 if( req.status == 200 )
292 var vlm_answer = req.responseXML.documentElement;
293 var error_tag = vlm_answer.getElementsByTagName( 'error' )[0];
294 var vlme = document.getElementById( 'vlm_error' );
295 clear_children( vlme );
296 if( error_tag.hasChildNodes() )
298 vlme.appendChild( document.createTextNode( 'Error: ' + error_tag.firstChild.data ) );
299 vlme.style.color = "#f00";
303 vlme.appendChild( document.createTextNode( 'Command succesful (' + value( 'vlm_command' ) + ') ' ) );
304 vlme.style.color = "#0f0";
307 vlme.appendChild( create_button( 'clear', 'clear_children( document.getElementById( "vlm_error" ) );' ) );
314 function parse_vlm_elements()
316 if( req.readyState == 4 )
318 if( req.status == 200 )
320 var vlmb = document.getElementById( 'vlm_broadcast_list' );
321 var vlmv = document.getElementById( 'vlm_vod_list' );
322 var vlms = document.getElementById( 'vlm_schedule_list' );
324 clear_children( vlmb );
325 clear_children( vlmv );
326 clear_children( vlms );
328 answer = req.responseXML.documentElement;
330 var elt = answer.firstChild;
334 if( elt.nodeName == "broadcast" || elt.nodeName == "vod" )
336 var nb = document.createElement( 'div' );
337 nb.setAttribute( 'class', 'list_element' );
338 if( elt.nodeName == "broadcast" )
340 vlmb.appendChild( nb );
344 vlmv.appendChild( nb );
346 var nbname = document.createElement( 'b' );
347 nbname.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) );
348 nb.appendChild( nbname );
350 var link = document.createElement( 'input' );
351 link.setAttribute( 'type', 'button' );
352 if( elt.getAttribute( 'enabled' ) == 'yes' )
354 nb.appendChild( document.createTextNode( " enabled " ) );
355 link.setAttribute( 'onclick', 'vlm_disable("'+elt.getAttribute( 'name' ) + '");' );
356 link.setAttribute( 'value', "Disable" );
360 nb.appendChild( document.createTextNode( " disabled " ) );
361 link.setAttribute( 'onclick', 'vlm_enable("'+elt.getAttribute( 'name' ) + '");' );
362 link.setAttribute( 'value', "Enable" );
364 nb.appendChild( link );
366 if( elt.nodeName == "broadcast" )
368 link = document.createElement( 'input' );
369 link.setAttribute( 'type', 'button' );
370 if( elt.getAttribute( 'loop' ) == 'yes' )
372 nb.appendChild( document.createTextNode( " loop " ) );
374 link.setAttribute( 'onclick', 'vlm_unloop("'+elt.getAttribute( 'name' ) + '");' );
375 link.setAttribute( 'value', "Un-loop" );
379 nb.appendChild( document.createTextNode( " play once " ) );
381 link.setAttribute( 'onclick', 'vlm_loop("'+elt.getAttribute( 'name' ) + '");' );
382 link.setAttribute( 'value', "Loop" );
384 nb.appendChild( link );
386 if( elt.getAttribute( 'enabled' ) == 'yes' )
388 nb.appendChild( document.createTextNode( " " ) );
389 nb.appendChild( create_button( 'Play', 'vlm_play("'+elt.getAttribute('name')+'");' ) );
392 nb.appendChild( document.createTextNode( " " ) );
393 nb.appendChild( create_button( 'Pause', 'vlm_pause("'+elt.getAttribute('name')+'");' ) );
395 nb.appendChild( document.createTextNode( " " ) );
396 nb.appendChild( create_button( 'Stop', 'vlm_stop("'+elt.getAttribute('name')+'");' ) );
399 nb.appendChild( document.createTextNode( " " ) );
400 nb.appendChild( create_button( 'Delete', 'vlm_delete("'+elt.getAttribute( 'name' ) + '");' ) );
402 var list = document.createElement( "ul" );
404 /* begin input list */
405 var item = document.createElement( "li" );
406 list.appendChild( item );
407 item.appendChild( document.createTextNode( "Inputs: " ) );
408 var text = document.createElement( "input" );
409 text.setAttribute( 'type', 'text' );
410 text.setAttribute( 'size', '40' );
411 text.setAttribute( 'id', 'vlm_elt_'+elt.getAttribute('name')+'_input' );
412 item.appendChild( text );
413 item.appendChild( document.createTextNode( ' ' ) );
414 item.appendChild( create_button( 'Edit', 'vlm_input_edit("vlm_elt_'+elt.getAttribute('name')+'_input");') );
415 item.appendChild( document.createTextNode( ' ' ) );
416 item.appendChild( create_button( 'Add input', 'vlm_add_input("'+elt.getAttribute('name')+'",document.getElementById("vlm_elt_'+elt.getAttribute('name')+'_input").value );' ) );
418 var inputs = elt.getElementsByTagName( 'input' );
419 if( inputs.length > 0 )
421 var ilist = document.createElement( "ol" );
422 ilist.setAttribute( 'start', '0' );
423 item.appendChild( ilist );
424 for( i = 0; i < inputs.length; i++ )
426 var item = document.createElement( "li" );
427 item.appendChild( document.createTextNode( inputs[i].firstChild.data + " " ) );
428 item.appendChild( create_button( "Delete", 'vlm_delete_input("' + elt.getAttribute( 'name' ) + '", '+(i+1)+' );' ) );
429 ilist.appendChild( item );
432 /* end of input list */
435 var item = document.createElement( "li" );
436 outputelt = elt.getElementsByTagName( 'output' )[0];
437 if( outputelt.hasChildNodes() )
439 output = outputelt.firstChild.data;
445 item.appendChild( document.createTextNode( 'Output: ' ) );
446 var text = document.createElement( "input" );
447 text.setAttribute( 'type', 'text' );
448 text.setAttribute( 'id', 'vlm_elt_'+elt.getAttribute('name')+'_output' );
449 text.setAttribute( 'value', output );
450 item.appendChild( text );
452 item.appendChild( document.createTextNode( ' ' ) );
454 item.appendChild( create_button( 'Edit', 'vlm_output_edit("vlm_elt_'+elt.getAttribute('name')+'_output");' ) );
455 item.appendChild( document.createTextNode( ' ' ) );
456 item.appendChild( create_button( 'Change output', 'vlm_output("'+elt.getAttribute( 'name' )+ '",document.getElementById("vlm_elt_'+elt.getAttribute( 'name' )+'_output").value);' ) );
457 list.appendChild( item );
460 /* begin options list */
461 var item = document.createElement( "li" );
462 list.appendChild( item );
463 item.appendChild( document.createTextNode( "Options: " ) );
465 var text = document.createElement( "input" );
466 text.setAttribute( 'type', 'text' );
467 text.setAttribute( 'size', '40' );
468 text.setAttribute( 'id', 'vlm_elt_'+elt.getAttribute('name')+'_option' );
469 item.appendChild( text );
470 item.appendChild( document.createTextNode( ' ' ) );
471 item.appendChild( create_button( 'Add option', 'vlm_option("'+elt.getAttribute('name')+'",document.getElementById("vlm_elt_'+elt.getAttribute('name')+'_option").value );' ) );
473 var options = elt.getElementsByTagName( 'option' );
474 if( options.length > 0 )
476 var olist = document.createElement( "ul" );
477 item.appendChild( olist );
478 for( i = 0; i < options.length; i++ )
480 var item = document.createElement( "li" );
481 item.appendChild( document.createTextNode( options[i].firstChild.data ) );
482 olist.appendChild( item );
488 var instances = elt.getElementsByTagName( 'instance' );
489 if( instances.length > 0 )
491 var item = document.createElement("li");
492 var ilist = document.createElement("ul");
493 list.appendChild( item );
494 item.appendChild(document.createTextNode("Instances:"));
495 item.appendChild( ilist );
496 for( i = 0; i < instances.length; i++ )
498 var iname = instances[i].getAttribute( 'name' );
499 var istate = instances[i].getAttribute( 'state' );
500 var iposition = Number( instances[i].getAttribute( 'position' ) * 100);
501 var itime = Math.floor( instances[i].getAttribute( 'time' ) / 1000000);
502 var ilength = Math.floor( instances[i].getAttribute( 'length' ) / 1000000);
503 var irate = instances[i].getAttribute( 'rate' );
504 var ititle = instances[i].getAttribute( 'title' );
505 var ichapter = instances[i].getAttribute( 'chapter' );
506 var iseekable = instances[i].getAttribute( 'seekable' );
508 var item = document.createElement( "li" );
509 item.appendChild( document.createTextNode( iname + ": " + istate + " " + (iposition.toFixed(2)) + "%" + " " + format_time( itime ) + "/" + format_time( ilength ) ) );
510 ilist.appendChild( item );
513 /* end of instances list */
515 nb.appendChild( list );
518 else if( elt.nodeName == "schedule" )
520 var nb = document.createElement( 'div' );
521 nb.setAttribute( 'class', 'list_element' );
522 vlms.appendChild( nb );
524 var nbname = document.createElement( 'b' );
525 nbname.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) );
526 nb.appendChild( nbname );
528 var link = document.createElement( 'input' );
529 link.setAttribute( 'type', 'button' );
530 if( elt.getAttribute( 'enabled' ) == 'yes' )
532 nb.appendChild( document.createTextNode( " enabled " ) );
533 link.setAttribute( 'onclick', 'vlm_disable("'+elt.getAttribute( 'name' ) + '");' );
534 link.setAttribute( 'value', "Disable" );
538 nb.appendChild( document.createTextNode( " disabled " ) );
539 link.setAttribute( 'onclick', 'vlm_enable("'+elt.getAttribute( 'name' ) + '");' );
540 link.setAttribute( 'value', "Enable" );
542 nb.appendChild( link );
544 nb.appendChild( document.createTextNode( " " ) );
545 nb.appendChild( create_button( "Delete", 'vlm_delete("'+elt.getAttribute( 'name' ) + '");' ) );
547 var list = document.createElement( 'ul' );
549 var item = document.createElement( 'li' );
550 item.appendChild( document.createTextNode( "Date: " + elt.getAttribute( 'date' ) ) );
551 list.appendChild( item );
553 var item = document.createElement( 'li' );
554 item.appendChild( document.createTextNode( "Period (in seconds): " + elt.getAttribute( 'period' ) ) );
555 list.appendChild( item );
557 var item = document.createElement( 'li' );
558 if( elt.getAttribute( 'repeat' ) == -1 )
560 item.appendChild( document.createTextNode( "Number of repeats left: for ever" ) );
564 item.appendChild( document.createTextNode( "Number of repeats left: " + elt.getAttribute( 'repeat' ) ) );
566 list.appendChild( item );
568 var commands = elt.getElementsByTagName( 'command' );
569 for( i = 0; i < commands.length; i++ )
571 var item = document.createElement( "li" );
572 item.appendChild( document.createTextNode( "Command: " + commands[i].firstChild.data + " " ) );
573 list.appendChild( item );
576 var item = document.createElement( 'li' );
577 var sel = document.createElement( 'select' );
578 sel.setAttribute( 'id', 'vlm_elt_'+elt.getAttribute('name')+'_action' );
579 sel.setAttribute( 'onchange', 'vlm_schedule_type_change("'+elt.getAttribute('name')+'");');
580 sel.appendChild( create_option( 'play', 'play' ) );
581 sel.appendChild( create_option( 'pause', 'pause' ) );
582 sel.appendChild( create_option( 'stop', 'stop' ) );
583 sel.appendChild( create_option( 'seek', 'seek' ) );
584 sel.appendChild( create_option( '(other)', '' ) );
585 item.appendChild( sel );
587 item.appendChild( document.createTextNode( " " ) );
588 var text = document.createElement( 'input' );
589 text.setAttribute( 'type', 'text' );
590 text.setAttribute( 'id', 'vlm_elt_'+elt.getAttribute('name')+'_name' );
591 text.setAttribute( 'size', '10' );
592 text.setAttribute( 'value', '(name)' );
593 text.setAttribute( 'onfocus', 'if( this.value == "(name)" ) this.value = "";' );
594 text.setAttribute( 'onblur', 'if( this.value == "" ) this.value = "(name)";' );
595 item.appendChild( text );
597 item.appendChild( document.createTextNode( " " ) );
598 text = document.createElement( 'input' );
599 text.setAttribute( 'type', 'text' );
600 text.setAttribute( 'id', 'vlm_elt_'+elt.getAttribute('name')+'_opt' );
601 text.setAttribute( 'size', '30' );
602 text.setAttribute( 'value', '(options)' );
603 text.setAttribute( 'onfocus', 'if( this.value == "(options)" ) this.value = "";' );
604 text.setAttribute( 'onblur', 'if( this.value == "" ) this.value = "(options)";' );
605 item.appendChild( text );
606 item.appendChild( document.createTextNode( " " ) );
607 item.appendChild( create_button( "Append command", 'vlm_schedule_append("' + elt.getAttribute( 'name' ) + '");') );
609 list.appendChild( item );
611 nb.appendChild( list );
612 vlm_schedule_type_change( elt.getAttribute('name') );
615 elt = elt.nextSibling;
621 function vlm_cmd( cmd )
623 loadXMLDoc( 'requests/vlm_cmd.xml?command='+cmd.replace(/\#/g, '%23'), parse_vlm_cmd );
626 function vlm_get_elements( )
628 loadXMLDoc( 'requests/vlm.xml', parse_vlm_elements );
631 /* helper functions */
633 function vlm_disable( name )
635 document.getElementById( 'vlm_command' ).value = "setup "+name+" disabled";
636 vlm_cmd( value( 'vlm_command' ) );
639 function vlm_enable( name )
641 document.getElementById( 'vlm_command' ).value = "setup "+name+" enabled";
642 vlm_cmd( value( 'vlm_command' ) );
645 function vlm_loop( name )
647 document.getElementById( 'vlm_command' ).value = "setup "+name+" loop";
648 vlm_cmd( value( 'vlm_command' ) );
651 function vlm_unloop( name )
653 document.getElementById( 'vlm_command' ).value = "setup "+name+" unloop";
654 vlm_cmd( value( 'vlm_command' ) );
657 function vlm_play( name )
659 document.getElementById( 'vlm_command' ).value = "control "+name+" play";
660 vlm_cmd( value( 'vlm_command' ) );
663 function vlm_pause( name )
665 document.getElementById( 'vlm_command' ).value = "control "+name+" pause";
666 vlm_cmd( value( 'vlm_command' ) );
669 function vlm_stop( name )
671 document.getElementById( 'vlm_command' ).value = "control "+name+" stop";
672 vlm_cmd( value( 'vlm_command' ) );
675 function vlm_delete( name )
677 document.getElementById( 'vlm_command' ).value = "del "+name;
678 vlm_cmd( value( 'vlm_command' ) );
681 function vlm_delete_input( name, num )
683 document.getElementById( 'vlm_command' ).value = "setup "+name+" inputdeln "+num;
684 vlm_cmd( value( 'vlm_command' ) );
687 function vlm_add_input( name, input )
689 document.getElementById( 'vlm_command' ).value = "setup "+name+" input "+input;
690 vlm_cmd( value( 'vlm_command' ) );
693 function vlm_output( name, output )
695 document.getElementById( 'vlm_command' ).value = "setup "+name+" output "+output;
696 vlm_cmd( value( 'vlm_command' ) );
699 function vlm_option( name, option )
701 document.getElementById( 'vlm_command' ).value = "setup "+name+" option "+option;
702 vlm_cmd( value( 'vlm_command' ) );
705 function vlm_batch( batch )
708 var commands = batch.split( '\n' );
709 for( i = 0; i < commands.length; i++ )
711 document.getElementById( 'vlm_command' ).value = commands[i];
712 vlm_cmd( value( 'vlm_command' ) );
716 function vlm_schedule_append( name )
718 var act = document.getElementById( 'vlm_elt_' + name + '_action' ).value;
719 document.getElementById( 'vlm_command' ).value = "setup " + name + " append ";
721 var itemname = document.getElementById( 'vlm_elt_' + name + '_name' ).value;
722 if( itemname == "(name)" ) itemname = "";
724 var opt = document.getElementById( 'vlm_elt_' + name + '_opt' ).value;
725 if( opt == "(options)" ) opt = "";
729 document.getElementById( 'vlm_command' ).value += opt;
733 document.getElementById( 'vlm_command' ).value += 'control ' + itemname + " " + act + " " + opt;
735 vlm_cmd( value( 'vlm_command' ) );
739 vlm_cmd( value( 'vlm_command' ) );