js动态显示vlc视频直播

使用框架angularjs jquery js bootstarp

首先使用页面布局,然后在js  onload中引用 js方法 把视频vlc 放入div中

divDin+= '<object id="vlc"';
											divDin+= vhtml;
											divDin+= ' width="'+widthObject+'" height="'+heightObject+'" events="True" pluginspage="http://www.videolan.org" codebase="http://downloads.videolan.org/pub/videolan/vlc-webplugins/2.0.6/npapi-vlc-2.0.6.tar.xz">';
											divDin+= "<param name='mrl' value='rtsp://"+deviceObject.deviceCode+"/stream1'  />"
											divDin+="<param name='autoplay' value='true' />";
											divDin+="<param name='controls' value='false' />";
											
											divDin+="<embed type='application/x-vlc-plugin' ";
											divDin+= "pluginspage='http://www.videolan.org' ";
											divDin+= ' width="'+widthObject+'" height="'+heightObject+'" '
											divDin+=" src = 'rtsp://"+deviceObject.deviceCode+"/stream1' controls='false'>";
											divDin+="</embed>  ";
											
											divDin+='</object>';

  直接生成html字符段,然后放入到div中

posted on 2018-07-03 16:18  谢皓宇  阅读(516)  评论(0编辑  收藏  举报

导航