首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

在线视频在本地可以运行,但传到服务器上就运行不了。小弟我是以流的形式传送数据。

2012-02-27 
在线视频在本地可以运行,但传到服务器上就运行不了。。我是以流的形式传送数据。。在线视频在本地可以运行,但

在线视频在本地可以运行,但传到服务器上就运行不了。。我是以流的形式传送数据。。
在线视频在本地可以运行,但传到服务器上就运行不了。。我是以流的形式传送数据。。
代码如下。。
页面1.asp的代码:
<object   classid= "clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6 "   id= "WMP "   width= "390 "   height= "326 "   viewastext>
    <param   name= "AudioStream "   value= "TRUE "   />
    <param   name= "AutoSize "   value= "TRUE "   />
    <param   name= "AutoStart "   value= "TRUE "   />
    <param   name= "AnimationAtStart "   value= "TRUE "   />
    <param   name= "AllowScan "   value= "TRUE "   />
    <param   name= "AllowChangeDisplaySize "   value= "TRUE "   />
    <param   name= "AutoRewind "   value= "FALSE "   />
    <param   name= "Balance "   value= "FALSE "   />
    <param   name= "BaseURL "   value= " "   />
    <param   name= "BufferingTime "   value= "5 "   />
    <param   name= "CaptioningID "   value= " "   />
    <param   name= "ClickToPlay "   value= "TRUE "   />
    <param   name= "CursorType "   value= "FALSE "   />
    <param   name= "CurrentPosition "   value= "TRUE "   />
    <param   name= "CurrentMarker "   value= "FALSE "   />
    <param   name= "DefaultFrame "   value= " "   />
    <param   name= "DisplayBackColor "   value= "FALSE "   />
    <param   name= "DisplayForeColor "   value= "16777215 "   />
    <param   name= "DisplayMode "   value= "FALSE "   />
    <param   name= "DisplaySize "   value= "FALSE "   />
    <param   name= "Enabled "   value= "TRUE "   />
    <param   name= "EnableContextMenu "   value= "TRUE "   />
    <param   name= "EnablePositionControls "   value= "TRUE "   />
    <param   name= "EnableFullScreenControls "   value= "FALSE "   />
    <param   name= "EnableTracker "   value= "TRUE "   />


    <param   name= "URL "   value= "2.asp ">


    <param   name= "InvokeURLs "   value= "TRUE "   />
    <param   name= "Language "   value= "TRUE "   />
    <param   name= "Mute "   value= "FALSE "   />
    <param   name= "PlayCount "   value= "1 "   />
    <param   name= "PreviewMode "   value= "FALSE "   />
    <param   name= "Rate "   value= "1 "   />


    <param   name= "SAMILang "   value= " "   />
    <param   name= "SAMIStyle "   value= " "   />
    <param   name= "SAMIFileName "   value= " "   />
    <param   name= "SelectionStart "   value= "TRUE "   />
    <param   name= "SelectionEnd "   value= "TRUE "   />
    <param   name= "SendOpenStateChangeEvents "   value= "TRUE "   />
    <param   name= "SendWarningEvents "   value= "TRUE "   />
    <param   name= "SendErrorEvents "   value= "TRUE "   />
    <param   name= "SendKeyboardEvents "   value= "FALSE "   />
    <param   name= "SendMouseClickEvents "   value= "FALSE "   />
    <param   name= "SendMouseMoveEvents "   value= "FALSE "   />
    <param   name= "SendPlayStateChangeEvents "   value= "TRUE "   />
    <param   name= "ShowCaptioning "   value= "FALSE "   />
    <param   name= "ShowControls "   value= "TRUE "   />
    <param   name= "ShowAudioControls "   value= "TRUE "   />
    <param   name= "ShowDisplay "   value= "TRUE "   />
    <param   name= "ShowGotoBar "   value= "TRUE "   />
    <param   name= "ShowPositionControls "   value= "TRUE "   />
    <param   name= "ShowStatusBar "   value= "TRUE "   />
    <param   name= "ShowTracker "   value= "TRUE "   />
    <param   name= "stretchToFit "   value= "-1 "   />
    <param   name= "TransparantAtStart "   value= "FALSE "   />
    <param   name= "VideoBorderWidth "   value= "FALSE "   />
    <param   name= "VideoBorderColor "   value= "FALSE "   />
    <param   name= "VideoBorder3D "   value= "FALSE "   />
    <param   id= "volumn "   name= "Volume "   value= "200 ">
    <param   name= "WindowlessVideo "   value= "FALSE "   />
</object>


页面2.asp的代码如下:
<%
Response.buffer   =   True '开启缓存
Response.ContentType   =   "audio/x-pn-realaudio "     '设置浏览器按照audio/x-pn-realaudio解析输出数据
Dim   objStream
Set   objStream   =   Server.CreateObject( "ADODB.Stream ") '创建ADODB.stream对象
objStream.Type   =   1                 '以二进制读取模式
objStream.Open
objStream.LoadFromFile   server.mappath( "ban.wmv ")   '读取文件
Response.binarywrite   objStream.Read     '以二进制的方式输出response.Flush()                       '边缓存边输出


Session( "afon ")=false     '重新设置session为FALSE
objStream.Close
Set   objStream   =   Nothing     '关闭和销毁对象
%>


[解决办法]
运行不了,肯定有出错提示.

大家部分是因为 服务器可以禁用了 Adodb.Stream 组件
[解决办法]
最好是把出错信息弄上来瞧瞧~! 不过你的在线视频?~ 电影网站?` 还是类似 土豆 还是 偶偶 之类的网站?~?~


[解决办法]
N久以前我倒是弄过流媒体服务器~! 玩过一段时间~!

热点排行