C#asp.net中的视频播放器 [英] Video Player in C# asp.net

查看:66
本文介绍了C#asp.net中的视频播放器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

param name =filenamevalue =<%#Eval(VideoName,〜/ VideoUploads / {0})%>



窗口媒体播放器无法检测到要播放的文件。存储视频的文件夹位于VideoUploads中,路径为VideoName。



以上值=是否有问题?

解决方案

试试这个:



 <   html  >  

< head >

< / head >

< body >

< object classid = clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6 id = Player1 width = 424 height = 379 >

< param name = 网址 value < span class =code-keyword> = http://localhost/Music.wmv >

< param name = http:// path_to_the_video >

< param name = AutoStart value = 1 >

< param name = ShowControls value = 1 >

< param name = ShowStatusBar value = 1 >

< param name = ShowDisplay = 1 >

< param < span class =code-attribute>
name = stretchToFit value = 1 >

< embed type = application / x-mplayer2



pluginspage = http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/



width = 424 height = 379 src = http://localhost/Music.wmv



filename = http://localhost/Music.wmv autostart = 1 showcontrols = 1 showstatusbar = 1 showdisplay = 1 >

< / embed >

< / param > < / param > < ; / param > < / param > < / param > < < span class =code-leadattribute> / param > < / param > < / object >

< / body >

< / html >


param name ="filename" value="<%# Eval("VideoName","~/VideoUploads/{0}") %>"

the window media player could not detect the file to play. The folder where the video is stored is in VideoUploads and the path is VideoName.

Is there anything wrong with the above value="" ?

解决方案

try this:

<html>

<head>

</head>

<body>

<object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" id="Player1" width="424" height="379">

        <param name="URL" value="http://localhost/Music.wmv">

        <param name="http://path_to_the_video">

        <param name="AutoStart" value="1">

        <param name="ShowControls" value="1">

        <param name="ShowStatusBar" value="1">

        <param name="ShowDisplay" value="1">

        <param name="stretchToFit" value="1">

        <embed type="application/x-mplayer2"



pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/" 



width="424" height="379" src="http://localhost/Music.wmv"



filename="http://localhost/Music.wmv" autostart="1" showcontrols="1" showstatusbar="1" showdisplay="1">

</embed>

</param></param></param></param></param></param></param></object>

</body>

</html>


这篇关于C#asp.net中的视频播放器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆