Streaming from browser for which I should add vlc plugins to the browser -blog archive

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Streaming from browser for which I should add vlc plugins to the browser -blog archive

2,378 Views
Bhavana
Contributor II

Can anyone help me ...what is the procedure to add vlc plugins to the browser......

Tags (1)
0 Kudos
Reply
1 Reply

1,365 Views
BrilliantovKiri
Senior Contributor I

Bhavana, I think you find answer in google, please use control words VLC and ActiveX.

As example my code for JQuery:
/**
 * @brief       view RTSP-stream
 * @param[in]   target  output element
 * @param[in]   stream  stream type (H264, MJPEG, ...)
 * @return      nothing
 * @remarks now not work in InternetExplorer
 */
function runVLC(target, stream)
{
        var support = true
        var addr = 'rtsp://' + window.location.hostname + stream
        
    if ($.browser.msie) {
        $(target).html('<object type = "application/x-vlc-plugin" ' +
                            'version = "VideoLAN.VLCPlugin.2" ' +
                'classid = "clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" ' +
                'events = "True" id = "vlc"></object>')
        $(target + ' object').css({'width': '100%', 'height': '100%'})
    } else if ($.browser.mozilla || $.browser.webkit) {
        $(target).html('<embed type = "application/x-vlc-plugin" ' +
                                  'version = "VideoLAN.VLCPlugin.2" ' +
                                  'width = "100%" height = "100%" ' +
                                  'id = "vlc" text = "Please install VLC player">' +
                '</embed>')
    } else {
        support = false
                $(target).html('Not supported browser!')
    }
    
    if (support) {
        var vlc = document.getElementById('vlc')
        if (vlc) {
                var opt = new Array(':network-caching=300')
                
                try {
                        var id = vlc.playlist.add(addr, '', opt)
                        vlc.playlist.playItem(id)
                } catch (e) {
                        $(target).empty().html('<div id = "error">Error: ' + e +
                                                                '<br>URL: ' + addr + '</div>')
                }
        }
    }
}

0 Kudos
Reply