function update_input_net()
{
    var mrl = document.getElementById( 'input_mrl' );
    var type = radio_value( "input_net_type" );
    
    check_and_replace_int( 'input_net_udp_port', 1234 );
    check_and_replace_int( 'input_net_udpmcast_port', 1234 );

    mrl.value = "";

    if( type == "udp" )
    {
        mrl.value += "udp://";
        if( value( 'input_net_udp_port' ) )
            mrl.value += ":"+value( 'input_net_udp_port' );
    }
    else if( type == "udpmcast" )
    {
        mrl.value += "udp://@"+value( 'input_net_udpmcast_address');
        if( value( 'input_net_udpmcast_port' ) )
            mrl.value += ":"+value( 'input_net_udpmcast_port' );
    }
    else if( type == "http" )
    {
        var url = value( 'input_net_http_url' );
        if( url.substring(0,7) != "http://"
            && url.substring(0,8) != "https://"
            && url.substring(0,6) != "ftp://"
            && url.substring(0,6) != "mms://"
            && url.substring(0,7) != "mmsh://" )
            mrl.value += "http://";
        mrl.value += url;
    }
    else if( type == "rtsp" )
    {
        var url = value( 'input_net_rtsp_url' );
        if( url.substring(0,7) != "rtsp://" )
            mrl.value += "rtsp://";
        mrl.value += url;
    }

    remove_input_options( ':access-filter' );
    if( checked( "input_net_timeshift" ) )
        add_input_option( ":access-filter=timeshift" );
}
/* update the input MRL using data from the input network helper */
update the input MRL using data from the input network helper
update the input MRL using data from the input network helper
function update_input_net()
{
    var mrl = document.getElementById( 'input_mrl' );
    var type = radio_value( "input_net_type" );
    check_and_replace_int( 'input_net_udp_port', 1234 );
    check_and_replace_int( 'input_net_udpmcast_port', 1234 );
    mrl.value = "";
    if( type == "udp" )
    {
        mrl.value += "udp://";
        if( value( 'input_net_udp_port' ) )
            mrl.value += ":"+value( 'input_net_udp_port' );
    }
    else if( type == "udpmcast" )
    {
        mrl.value += "udp://@"+value( 'input_net_udpmcast_address');
        if( value( 'input_net_udpmcast_port' ) )
            mrl.value += ":"+value( 'input_net_udpmcast_port' );
    }
    else if( type == "http" )
    {
        var url = value( 'input_net_http_url' );
        if( url.substring(0,7) != "http://"
            && url.substring(0,8) != "https://"
            && url.substring(0,6) != "ftp://"
            && url.substring(0,6) != "mms://"
            && url.substring(0,7) != "mmsh://" )
            mrl.value += "http://";
        mrl.value += url;
    }
    else if( type == "rtsp" )
    {
        var url = value( 'input_net_rtsp_url' );
        if( url.substring(0,7) != "rtsp://" )
            mrl.value += "rtsp://";
        mrl.value += url;
    }
    remove_input_options( ':access-filter' );
    if( checked( "input_net_timeshift" ) )
        add_input_option( ":access-filter=timeshift" );
}
function update_input_net ( ) { var mrl = document . getElementById ( 'input_mrl' ) ; var type = radio_value ( "input_net_type" ) ; check_and_replace_int ( 'input_net_udp_port' , 1234 ) ; check_and_replace_int ( 'input_net_udpmcast_port' , 1234 ) ; mrl . value = "" ; if ( type == "udp" ) { mrl . value += "udp://" ; if ( value ( 'input_net_udp_port' ) ) mrl . value += ":" + value ( 'input_net_udp_port' ) ; } else if ( type == "udpmcast" ) { mrl . value += "udp://@" + value ( 'input_net_udpmcast_address' ) ; if ( value ( 'input_net_udpmcast_port' ) ) mrl . value += ":" + value ( 'input_net_udpmcast_port' ) ; } else if ( type == "http" ) { var url = value ( 'input_net_http_url' ) ; if ( url . substring ( 0 , 7 ) != "http://" && url . substring ( 0 , 8 ) != "https://" && url . substring ( 0 , 6 ) != "ftp://" && url . substring ( 0 , 6 ) != "mms://" && url . substring ( 0 , 7 ) != "mmsh://" ) mrl . value += "http://" ; mrl . value += url ; } else if ( type == "rtsp" ) { var url = value ( 'input_net_rtsp_url' ) ; if ( url . substring ( 0 , 7 ) != "rtsp://" ) mrl . value += "rtsp://" ; mrl . value += url ; } remove_input_options ( ':access-filter' ) ; if ( checked ( "input_net_timeshift" ) ) add_input_option ( ":access-filter=timeshift" ) ; }
update the input MRL using data from the input network helper
update the input MRL using data from the input network helper