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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

2,373 次查看
Bhavana
Contributor II

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

标记 (1)
0 项奖励
回复
1 回复

1,360 次查看
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 项奖励
回复