CMP中RTMP、WMP代理地址JAVASCRIPT协议用法
http://bbs.e1951.com/thread-322-1-1.html
rtmp、wmp格式节目列表需要JAVASCRIPT协议支持,只支持网页模式播放。
具体加载方法见:
RTMP代理地址写法。JAVASCRIPT协议用法。
http://bbs.cenfun.com/thread-20856-1-1.html
懒人,可以直接在您的播放器页面加入下面代码即可。
RTMP:
- <script language="javascript" type="text/javascript">
 - function rtmpPlay(url) {
 - var xmlhttp;
 - var ajaxUrl = 'http://cmp.e1951.com/tv/ajax.php?parse=' + url;
 - if (window.XMLHttpRequest) {
 - xmlhttp = new XMLHttpRequest();
 - }
 - else
 - {
 - xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
 - }
 - xmlhttp.onreadystatechange = function()
 - {
 - if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
 - {
 - var result = xmlhttp.responseText;
 - eval(result);
 - cmpo.item("rtmp", rtmp);
 - cmpo.item("src", src);
 - cmpo.sendEvent('view_play', true);
 - }
 - }
 - xmlhttp.open("GET", ajaxUrl, true);
 - xmlhttp.send();
 - }
 - </script>
 
WMP:
- <script language="javascript" type="text/javascript">
 - function wmpPlay(url) {
 - var xmlhttp;
 - var ajaxUrl = 'http://cmp.e1951.com/tv/wajax.php?parse=' + url;
 - if (window.XMLHttpRequest) {
 - xmlhttp = new XMLHttpRequest();
 - }
 - else
 - {
 - xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
 - }
 - xmlhttp.onreadystatechange = function()
 - {
 - if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
 - {
 - var result = xmlhttp.responseText;
 - eval(result);
 - cmpo.item("type", type);
 - cmpo.item("src", src);
 - cmpo.sendEvent('view_play', true);
 - }
 - }
 - xmlhttp.open("GET", ajaxUrl, true);
 - xmlhttp.send();
 - }
 - </script>
 
注意:
      ①JS文件内容不可修改,否则将会出错;
      ②JS放的位置为您CMP调用页面的底部即可。
      ③部分如果不能播放的话,那么请下载  ajax.php、wajax.php  两个文件放到您的 tv 文件夹中,并修改上述JS代码中
- var ajaxUrl = 'http://cmp.e1951.com/tv/wajax.php?parse=' + url;
 
对应文件的路径。
                    
                
                
            
        
浙公网安备 33010602011771号