视频文件通过Mobile上的.net应用程序在播放器中播放 [英] vedio file play in player through .net application on Mobile

查看:64
本文介绍了视频文件通过Mobile上的.net应用程序在播放器中播放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我已经为图库创建了Web应用程序.当我们在gridview中单击imgebutton缩略图,然后在jw播放器上播放视频时,所有数据都将绑定到gridview控件中.在所有浏览器中都可以正常工作,但在移动设备中却存在问题.当我们在手机中打开图库的网址并单击gridview的缩略图时,播放器不可见,但所有绑定的数据均可见.这是因为我在linkbutton click事件上使用了此代码:-

Hi All,

I have created web application for gallery. All data bind in gridview control when we click imgebutton thmbnail in gridview then play video on jw player. It''s working fine in all browser But problem in mobile. when we open url of gallery in mobile and click on thumbnail of gridview then player is not visible but all binded data are visible.It''s for I have use this code on linkbutton click event:-

Dim lnkbtn As LinkButton = DirectCast(sender, LinkButton)
Dim gr As GridViewRow = DirectCast(lnkbtn.NamingContainer, GridViewRow)
Dim lbl1 As Label = DirectCast(gr.FindControl("lblPrimary"), Label)
        Dim strvideo As String = lbl1.Text

        ClientScript.RegisterStartupScript([GetType](), "hyt", "<script>javascript:initPlayer('" + strvideo + "')</script>")




.aspx页面的此代码
< script type ="text/javascript" src ="http:www.tataworld.com/scripts/swfobject.js"></script>




this code for .aspx page
<script type="text/javascript" src="http:www.tataworld.com/scripts/swfobject.js"></script>

<script type="text/javascript">

        function deletePlayer(theWrapper, thePlaceholder, thePlayerId) {

            swfobject.removeSWF(thePlayerId);

            var tmp = document.getElementById(theWrapper);

            if (tmp) { tmp.innerHTML = "<div id=" + thePlaceholder + "></div>"; }

        }
        function createPlayer(thePlaceholder, thePlayerId, theFile, theWidth, theHeight) {

            var flashvars = {

                file: theFile,

                autostart: "true",
                theWidth:480,
                theHeight:270
//                 skin: "http://s0-www.ltvimg.com/v3_5_5/assets/skins/glow/glow.zip",

//            stretching: "fill"

            }

            var params = {

                allowfullscreen: "true",

                allowscriptaccess: "always"

            }

            var attributes = {

                id: thePlayerId,

                name: thePlayerId

            }

            swfobject.embedSWF("Player/JwPlayer/player.swf", thePlaceholder, theWidth, theHeight, "9.0.115", false, flashvars, params, attributes);

        }
        function initPlayer(theFile)
        {

            deletePlayer('wrapper', 'placeholder1', 'player1');

            createPlayer('placeholder1', 'player1', theFile, 480, 270);
        }

function showHideComment()
{
if(document.getElementById('dvcomment')!= null)
        {
    if(document.getElementById('dvcomment').style.display=="none")
    {
       document.getElementById('dvcomment').style.display="block";
    }
   }
}
function showHideOnLoad()
{
if(document.getElementById('dvcomment')!= null)
        {

       document.getElementById('dvcomment').style.display="none";

     }

}

    </script>




我可以为这个问题做些什么.请帮帮我.

非常感谢..




What i can do for this issue. please help me.

Many Many Thanks in Advance..

推荐答案

您还没有提到要用于测试的移动平台.并非所有手机都支持Flash Player.

安装支持它的Flash Player并进行测试.

https://play.google.com/store/apps/details? id = com.adobe.flashplayer& hl = zh_CN [ ^ ]
You have not mentioned the mobile platform you are using for testing. Not all mobiles support the flash player.

Install the flash player which supports it and test.

https://play.google.com/store/apps/details?id=com.adobe.flashplayer&hl=en[^]


这篇关于视频文件通过Mobile上的.net应用程序在播放器中播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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