视频在本地主机中播放,但不在我的服务器中播放 [英] video plays in localhost but not in my server

查看:363
本文介绍了视频在本地主机中播放,但不在我的服务器中播放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是lakshmana rao,我的网站上有这样的源代码播放器控件,例如

Hi this is lakshmana rao, my web having a player control of source code like this

<object classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" id="player" 

            style="position:absolute; top: 195px; left: 802px; height: 300px; width: 450px;">
        <param name="url" value="<%=mySrc %>" />
        <param name="src" value="<%=mySrc %>" />
        <param name="showcontrols" value="true" />
        <param name="autostart" value="true" />
        <!--[if !IE]>-->
        <object type="video/x-ms-wmv" data="<%=mySrc %>" width="450" height="300">
            <param name="src" value="<%=mySrc %>" />
            <param name="autostart" value="true" />
            <param name="controller" value="true" />
        </object>
        <!--<![endif]-->
    </object>



我的按钮事件就是这样



and my button event is like this

public string mySrc; 

protected void GridView1_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
    {
         string filename;
        DataTable dtable = mes.select(GridView1.DataKeys[e.NewSelectedIndex].Values[0].ToString());
        if (dtable.Rows.Count > 0)
        {
            filename = dtable.Rows[0].ItemArray[2].ToString();
            mySrc =Server.MapPath("~/messages/" + filename.ToString());
        }
    }




这是我的代码;当我在localhost中运行该代码时,此代码将播放我选择的视频,但在我的服务器中不会​​,并且不会出现错误.没有启动缓冲,就像打开媒体........"然后停止一样.谁能指导我使用




this is code i have; this code plays my selected video when i runt it in localhost but in my server it doesn''t and no error will come. no buffering is started it goes like this "opening media..........." then stopped. Can any one guide me in this

推荐答案

播放器出现,但实际视频却没有出现吗?如果是这样,很可能出于某些原因"src"值不正确.查看|可以在网页上找到源代码,并查看视频应该放在哪里.
Does the player show up, but the actual video never does? If so, most likely the "src" value is not correct for some reason. Do a View | Source on the web page and see where it thinks the video should be sitting.


您好,这些内容本身很难回答,但是这里有一些帮助调试:

1)在浏览器中查看视频时,请检查页面中呈现的视频的来源
2)确保服务器文件夹具有正确的权限
3)在尝试访问文件时,使用FireFox中的Firebug或IE中的开发人员工具查看是否存在任何网络问题

希望这有助于您朝正确的方向前进.

干杯.
Hi, these ones are tough for an ''answer'' per se, but here''s some help to debug:

1) Check the source of the video as it''s rendered in the page when you view it in the browser
2) Make sure the server folder has the right permissions
3) Use Firebug in FireFox or Developer Tools in IE to see if there are any network problems when trying to access the file

Hope this helps to get you in the right direction.

Cheers.


这篇关于视频在本地主机中播放,但不在我的服务器中播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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