在ASP.NET网站中实现带列表的视频播放(2)

视频播放模块代码:

< table cellspacing = " 0 "  cellpadding = " 4 "  width = " 100% "  border = " 0 " >
        
< tbody >
            
< tr >
                
< td style = " vertical-align: top; width: 70% " >
                    
< object  id = " pl "  style = " width: 100%; height: 519px "  classid = " clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6 "
                        viewastext
= "" >
                        
< param value = ""  name = " URL "   />
                        
< param value = " 1 "  name = " rate "   />
                        
< param value = " 0 "  name = " balance "   />
                        
< param value = " 0 "  name = " currentPosition "   />
                        
< param value = ""  name = " defaultFrame "   />
                        
< param value = " 1 "  name = " playCount "   />
                        
< param value = " -1 "  name = " autoStart "   />
                        
< param value = " 0 "  name = " currentMarker "   />
                        
< param value = " -1 "  name = " invokeURLs "   />
                        
< param value = ""  name = " baseURL "   />
                        
< param value = " 50 "  name = " volume "   />
                        
< param value = " 0 "  name = " mute "   />
                        
< param value = " full "  name = " uiMode "   />
                        
< param value = " 0 "  name = " stretchToFit "   />
                        
< param value = " 0 "  name = " windowlessVideo "   />
                        
< param value = " -1 "  name = " enabled "   />
                        
< param value = " -1 "  name = " enableContextMenu "   />
                        
< param value = " 0 "  name = " fullScreen "   />
                        
< param value = ""  name = " SAMIStyle "   />
                        
< param value = ""  name = " SAMILang "   />
                        
< param value = ""  name = " SAMIFilename "   />
                        
< param value = ""  name = " captioningID "   />
                        
< param value = " 0 "  name = " enableErrorDialogs "   />
                        
< param value = " 6482 "  name = " _cx "   />
                        
< param value = " 6350 "  name = " _cy "   />
                    
</ object >
                
</ td >
                
< td style = " vertical-align: top; width: 30% " >
                    播放列表
< br  />

                    
< script language = " javascript "  type = " text/javascript " >                      
                     
//  JScript 文件                
                     function loadXML(xmlFile)                    
                     
{                        
                         var xmlDoc;                        
                         
if(window.ActiveXObject)                        
                         
{                            
                             xmlDoc    
= new ActiveXObject('Microsoft.XMLDOM');                            
                             xmlDoc.async    
= false;                            
                             xmlDoc.load(xmlFile);                        
                         }
                        
                         
else if (document.implementation&&document.implementation.createDocument)
                         
{                            
                             xmlDoc    
= document.implementation.createDocument(''''null);                            
                             xmlDoc.load(xmlFile);                        
                         }
                        
                         
else                        
                         
{                            
                            
return null;                        
                         }
                                                
                     
return xmlDoc;                    
                     }
                   
                      
// 一个检查xml文件的函数                    
                      checkXMLDocObj  =  function(xmlFile)                    
                      
{                        
                          var xmlDoc    
= loadXML(xmlFile);                        
                          
if(xmlDoc==null)                        
                          
{                            
                              alert(
'您的浏览器不支持xml文件读取,于是本页面禁止您的操作,推荐使用IE5.0以上可以解决此问题!');
                              window.location.href
='/Index.aspx';                        
                          }
                        
                          
return xmlDoc;                    
                      }
                
                      function doo()                 
                      
{                     
                          
// 定义一个读取xml文件的对象                     
                          var xmlDoc    = checkXMLDocObj('http://s-sps:801/huojian.xml');                     
                          var name 
= new Array();                     
                          var url 
= new Array();                     
                          var sum
=xmlDoc.getElementsByTagName("pp").length;                     
                          
for(var i=0; i<sum; i++)                     
                          
{                          
                              url[i]
=xmlDoc.getElementsByTagName('media/pp')[i].getAttribute('url');                          
                              name[i]
=xmlDoc.getElementsByTagName('media/pp')[i].getAttribute('name');
                          }
                     
                          var str 
= new Array();                     
                          
for(var i=0; i<sum; i++)                     
                          
{                        
                              str[i]
="return play('"+url[i]+"')";                     
                          }
                     
                          document.write(
'<table border="0" cellpadding="0" cellspacing="0">');                     
                          
for(var i=0; i<sum; i++)                     
                          
{                         
                              var x 
= i+1;                         
                              document.write(
'<tr><td style="background-image: url(playbj.GIF);background-position:center;background-repeat:no-repeat; width:20px;height:24px; text-align:center;vertical-align:middle;" >'+x+'</td><td>');                        
                              document.write(
'<input id=Button1 type=button value='+name[i].toString()+' οnclick="'+str[i]+'" style="padding:2 0 0 2; border:0px;vertical-align:middle; background-color:#fff;text-align:left;">');                         
                              document.write(
'</td></tr>');                         
                              document.write(
'<tr><td style="height:1px;"><td><tr>');                     
                          }
                     
                          document.write(
'</table>');                                 
                     }
                 
                     function play(urlx)                        
                     
{                                                     
                          document.all.item(
"pl").url=urlx;                           
                          document.all.item(
"pl").controls.play();                                                   
                     }
                                    
                      doo();                  
                      
</ script >


                    
                
</ td >
            
</ tr >
            
< tr >
                
< td id = " _invisibleIfEmpty "  style = " display: none "  valign = " top "  width = " 100% "  colspan = " 2 "
                    name
= " _invisibleIfEmpty " >
                
</ td >
            
</ tr >

            
< script language = " javascript " >   if ( typeof (MSOLayout_MakeInvisibleIfEmpty)  ==   " function " {MSOLayout_MakeInvisibleIfEmpty();} </ script >

        
</ tbody >
    
</ table >
视频XML播放源码 三层结构之下的文章视频管理系统 对以前的视频XML进行更行,增加了简单视频列表列表视频管理及部署服务器上FLV不能播放等问题. 视频XML播放可以更快的查看视频 index.htm是视频播放页面 对应的XMLXML文件夹player.xml 采用VS2008+SQ2005 default.aspx是列表视频播放页 目录下的list1.xml 后台功能更新 后台添加admin 密码admin 网站常规管理: 基本设置 管理设置 简单视频列表: 简单视频进行管理 添加简单视频功能 列表视频功能管理: 添加列表视频 修改视频(这个传值过去绑定XML节点有点问题,待解决) 删除视频 栏目分类管理: 大类添加 小类添加 大类列表 小类列表 内容管理: 文章管理 文章添加 解决问题: 国内大多都是Win2003的主机,FLV格式文件上传服务器后不能播放,默认是没有指定输出FLV这种格式的虽然FTP里面可以看见,但无法通过http访问,也就无法播放了。 让IIS支持Flv的详细设置方法: IIS-->网站--->属性--->HTTP性能--->MIME类型--->新建: 扩展名:flv MIME类型:flv-application/octet-stream (我用这个方法就可以正常播放了……) 你必须设置一下内容 1:在“Web服务扩展”Active Server Pages,Internet 数据连接器,RPC代理服务扩展,以及在服务器端的包含文件都必须置为允许状况 2:“网站”-》属性-》主目录-》配置-》选项-》启动父路径 3:“网站”-》属性-》服务-》在隔离模式“以IIS5.0隔离模式运行WWW服务” 4:开始-》程序-》管理工具-》服务.找到RPC服务,双击-》登录-》允许服务与桌面交互 原来是net默认上传限制是4M, 超过则要在web.config配置: 需要在web.config 就可以解决
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值