| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 488 人关注过本帖
标题:哪位高手可以帮我改下PLAY.ASP文件?可以实现全屏播放...
只看楼主 加入收藏
sixiao88
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2008-5-26
收藏
 问题点数:0 回复次数:1 
哪位高手可以帮我改下PLAY.ASP文件?可以实现全屏播放...
全部代码如下:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%option explicit%>
<!--#include file="Conn.asp"-->
<!--#include file="KS_Cls/KS.PublicCls.asp"-->
<!--#include file="KS_Cls/KS.RCls.asp"-->
<%
'****************************************************
' Software name:Kesion CMS 4.5
' Email: [email]service@[/email] . QQ:111394,9537636
' Web: [url]http://www.[/url] [url]http://www.[/url]
' Copyright (C) Kesion Network All Rights Reserved.
'****************************************************
Dim KSCls
Set KSCls = New player
KSCls.Kesion()
Set KSCls = Nothing

Class player
        Private KS, KSR,Maps
Public MovieUrl

Private Sub Class_Initialize()

End Sub

        Private Sub Class_Terminate()
  Call CloseConn()
  Set KS=Nothing
End Sub

Public Sub Kesion()
Dim FileExt,sqlstr,rs
SqlStr = "Select * From KS_U_ysoline where id="&request("id")&""
Set RS = Server.CreateObject("AdoDb.RecordSet")
RS.Open SqlStr, Conn, 1, 1
'response.write rs(1)&"<br>"
'response.write rs(16)&"<br>"
'MovieUrl=rs(16)
MovieUrl=LCase(Mid(rs(16), InStrRev(rs(16), "|") + 1))
'response.write movieurl&"<br>"
FileExt = LCase(Mid(MovieUrl, InStrRev(MovieUrl, ".") + 1))
   Select Case FileExt
  Case "wmv", "mpg", "asf", "mp3", "mpeg", "avi"
   call MediaPlayer()
  Case "flv"
   call FlashPlayer()
  Case "swf"
   call SwfPlayer()
  Case else
   call RealPlayer()
   End Select
End Sub

        Private Sub MediaPlayer()
with response
.write " <script language=""javascript"">"&vbcrlf
.write " function SetFullScreen()"&vbcrlf
.write " {"&vbcrlf
.write "  if (mediaPlayer.playState == 3){"&vbcrlf
.write "  alert(""还原窗口请按键盘左上角[ESC]"");"&vbcrlf
.write "  mediaPlayer.fullscreen=1;"&vbcrlf
.write " "&vbcrlf
.write " }else{"&vbcrlf
.write "  alert(""影片开始播放后才可以全屏播放."");"&vbcrlf
.write "  }"&vbcrlf
.write " }"&vbcrlf
.write " </script>"&vbcrlf
.write "<object classid=""clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6"" id=""mediaPlayer"" height=""100%"" width=""100%"">"&vbcrlf
        .write "  <param name=""AutoStart"" value=""-1"">"&vbcrlf
        .write "  <param name=""Balance"" value=""0"">"&vbcrlf
        .write "  <param name=""BaseURL"" value="""">"&vbcrlf
        .write "  <param name=""CaptioningID"" value>"&vbcrlf
        .write "  <param name=""CurrentPosition"" value=""-1"">"&vbcrlf
        .write "  <param name=""CurrentMarker"" value=""0"">"&vbcrlf
        .write "  <param name=""DefaultFrame"" value>"&vbcrlf
        .write "  <param name=""Enabled"" value=""-1"">"&vbcrlf
        .write "  <param name=""EnableContextMenu"" value=""0"">"&vbcrlf
        .write "  <param name=""fullScreen"" value=""0"">"&vbcrlf
        .write "  <param name=""InvokeURLs"" value=""-1"">"&vbcrlf
        .write "  <param name=""Mute"" value=""0"">"&vbcrlf
        .write "  <param name=""PlayCount"" value=""1"">"&vbcrlf
        .write "  <param name=""Rate"" value=""1"">"&vbcrlf
        .write "  <param name=""SAMILang"" value>"&vbcrlf
        .write "  <param name=""SAMIStyle"" value>"&vbcrlf
        .write "  <param name=""SAMIFileName"" value>"&vbcrlf
        .write "  <param name=""Volume"" value=""100"">"&vbcrlf
        .write "  <param name=""WindowlessVideo"" value=""0"">"&vbcrlf
        .write "  <param name=""uiMode"" value=""full"">"&vbcrlf
        .write "  <param name=""stretchToFit"" value=""1"">"&vbcrlf
        .write "  <param name=""enableErrorDialogs"" value=""0"">"&vbcrlf
.write "  <param name=""url"" value="""&movieurl&""">"&vbcrlf
        .write "</object>"&vbcrlf
end with
End Sub

        Private Sub FlashPlayer()
with response
.write "  <script type=""text/javascript"">"&vbcrlf
.write "  var swf_width=""100%"""&vbcrlf
.write "  var swf_height=""100%"""&vbcrlf
.write "  var texts=''"&vbcrlf
.write "  var files='"&movieurl&"'"&vbcrlf
.write "  document.write('<object classid=""clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"" codebase=""http://fpdownload.,0,0,0"" width=""'+ swf_width +'"" height=""'+ swf_height +'"">');"&vbcrlf
.write "  document.write('<param name=""movie"" value=""vcastr22.swf""><param name=""quality"" value=""high"">');"&vbcrlf
.write "  document.write('<param name=""menu"" value=""false""><param name=""allowFullScreen"" value=""true"" />');"&vbcrlf
.write "  document.write('<param name=""FlashVars"" value=""vcastr_file='+files+'&vcastr_title='+texts+'&IsAutoPlay=1"">');"&vbcrlf
.write "  document.write('<embed src=""vcastr22.swf"" allowFullScreen=""true"" FlashVars=""vcastr_file='+files+'&vcastr_title='+texts+'&IsAutoPlay=1"" menu=""false"" quality=""high"" width=""'+ swf_width +'"" height=""'+ swf_height +'"" type=""application/x-shockwave-flash"" pluginspage=""http://www. />'); "&vbcrlf
.write "  document.write('</object>');"&vbcrlf
.write "  </script>"&vbcrlf
end with
End Sub

        Private Sub SwfPlayer()
with response
.write "  <script type=""text/javascript"">"&vbcrlf
.write "  document.write('<object classid=""clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"" codebase=""http://fpdownload.,0,0,0"" width=""100%"" height=""100%"">');"&vbcrlf
.write "  document.write('<param name=""movie"" value="""&MovieUrl&"""><param name=""quality"" value=""high"">');"&vbcrlf
.write "  document.write('<embed src="""&movieurl&""" quality=""high"" width=""100%"" height=""100%"" type=""application/x-shockwave-flash"" pluginspage=""http://www. />');"&vbcrlf
.write "  document.write('</object>');"&vbcrlf
.write "  </script>"&vbcrlf
end with
End Sub

        Private Sub RealPlayer()
with response
.write "  <SCRIPT language=javascript>"&vbcrlf
.write "   function SetFullScreen()"&vbcrlf
.write "   {"&vbcrlf
.write "     if (document.RealPlayer.GetPlayState()==3){"&vbcrlf
.write "    alert(""还原窗口窗口请按键盘左上角[ESC]"");"&vbcrlf
.write "    document.RealPlayer.SetFullScreen();"&vbcrlf
.write "     }else{"&vbcrlf
.write "    alert(""影片开始播放后才可以全屏播放."");"&vbcrlf
.write "     }"&vbcrlf
.write "   }"&vbcrlf
.write "  </SCRIPT>"&vbcrlf
.write "  <OBJECT id=""RealPlayer"" name=""RealPlayer"" height=100% width=100% classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA VIEWASTEXT>"&vbcrlf
.write "  <PARAM NAME=""AUTOSTART"" VALUE=""1"">"&vbcrlf
.write "  <PARAM NAME=""CONTROLS"" VALUE=""ImageWindow"">"&vbcrlf
.write "  <PARAM NAME=""PREFETCH"" VALUE=""0"">"&vbcrlf
.write "  <PARAM NAME=""LOOP"" VALUE=""0"">"&vbcrlf
.write "  <Param name='SRC' value='"&movieurl&"'>"&vbcrlf
.write "  <Param name=""CONSOLE"" value=""one"">"&vbcrlf
.write "  </OBJECT>"&vbcrlf
.write "  <OBJECT id=CONTROLS height=60 width=100% classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA VIEWASTEXT>"&vbcrlf
.write "  <Param name=""CONTROLS"" value=""ControlPanel,StatusBar"">"&vbcrlf
.write "  <Param name=""CONSOLE"" value=""one"">"&vbcrlf
.write "  </OBJECT>"&vbcrlf
end with
End Sub

End Class
%>
      这段代码在播放REALPLAY影片时候没有全屏播放的按钮,不能全屏...
      我想在用RealPlayer播放器播放影片的时候,播放器上可以出现全屏按钮,点它就可以全屏播放。开始页面是窗口形式,可以实现吗?
搜索更多相关主题的帖子: PLAY quot ASP 文件 
2008-05-26 21:17
multiple1902
Rank: 8Rank: 8
等 级:贵宾
威 望:42
帖 子:4881
专家分:671
注 册:2007-2-9
收藏
得分:0 
好多发帖=1的家伙问问题之前不晓得思考过没有……关于这个控件的使用我不熟,但我肯定具体的使用是与你提供的代码关系不大的,而且我确定你应该在网上见过有满足你要求的播放器页面,而且我确定你应该会查看源代码。
2008-05-26 21:52
快速回复:哪位高手可以帮我改下PLAY.ASP文件?可以实现全屏播放...
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.027769 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved