网上播放.flv格式的二种程序

23 篇文章 0 订阅
13 篇文章 0 订阅

第一种:

1.    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="360" height="270" VIEWASTEXT>  

2.      

3.    <param name="movie" value="VideoUpload/vcastr22.swf">  

4.      

5.    <param name="quality" value="high">  

6.      

7.    <param name="allowFullScreen" value="true" />  

8.      

9.    <param name="IsAutoPlay" value="1" />  

10.    

11.  <param name="FlashVars" value="vcastr_file=<%=Content%>.flv&IsAutoPlay=1" />  

12.    

13.  <embed src="VideoUpload/vcastr22.swf" allowFullScreen="true" FlashVars="vcastr_file=<%=Content%>.flv&IsAutoPlay=1" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="360" height="270"></embed>  

14.    

15.  </object>  

 

第二种:

1.    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="400" height="400" id="FLVPlayer1">  

2.      

3.      <param name="movie" value="FLVPlayer_Progressive.swf" />  

4.      

5.      <param name="salign" value="lt" />  

6.      

7.      <param name="quality" value="high" />  

8.      

9.      <param name="scale" value="noscale" />  

10.    

11.    <param name="FlashVars" value="&MM_ComponentVersion=1&skinName=Clear_Skin_1&streamName=../19050b 3a -cfb6-4526-a778 -946a 3fedc2b1&autoPlay=false&autoRewind=false" />  

12.    

13.    <embed src="FLVPlayer_Progressive.swf" flashvars="&MM_ComponentVersion=1&skinName=Clear_Skin_1&streamName=../19050b 3a -cfb6-4526-a778 -946a 3fedc2b1&autoPlay=false&autoRewind=false" quality="high" scale="noscale" width="400" height="400" name="FLVPlayer1" salign="LT" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />  

14.  </object>  

 

<head></head>中加入

 

1.    <script type="text/javascript">   

2.      

3.    function MM_CheckFlashVersion(reqVerStr,msg){   

4.      

5.      with(navigator){   

6.      

7.        var isIE  = (appVersion.indexOf("MSIE") != -1 && userAgent.indexOf("Opera") == -1);   

8.      

9.        var isWin = (appVersion.toLowerCase().indexOf("win") != -1);   

10.    

11.      if (!isIE || !isWin){     

12.    

13.        var flashVer = -1;   

14.    

15.        if (plugins && plugins.length > 0){   

16.    

17.          var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";   

18.    

19.          desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;   

20.    

21.          if (desc == "") flashVer = -1;   

22.    

23.          else{   

24.    

25.            var descArr = desc.split(" ");   

26.    

27.            var tempArrMajor = descArr[2].split(".");   

28.    

29.            var verMajor = tempArrMajor[0];   

30.    

31.            var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");   

32.    

33.            var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;   

34.    

35.            flashVer =  parseFloat(verMajor + "." + verMinor);   

36.    

37.          }   

38.    

39.        }   

40.    

41.        // WebTV has Flash Player 4 or lower -- too low for video   

42.    

43.        else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 4.0;   

44.    

45.    

46.    

47.        var verArr = reqVerStr.split(",");   

48.    

49.        var reqVer = parseFloat(verArr[0] + "." + verArr[2]);   

50.    

51.       

52.    

53.        if (flashVer < reqVer){   

54.    

55.          if (confirm(msg))   

56.    

57.            window.location = "http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";   

58.    

59.        }   

60.    

61.      }   

62.    

63.    }    

64.    

65.  }   

66. </script>  

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值