我们的公司网站 http://www.lta.org.uk/有 JW 5.9 Player 。我们正在尝试更新代码以支持 IOS 和其他移动设备。我将非常感谢对我做错了什么的一些见解。我是一名具有 HTML/CSS 知识的设计师,对这些开发内容一无所知!再次感谢。
当前位于http://www.lta.org.uk/的实时站点(在 ios 中不起作用)使用以下代码:
<div id="Flash"></div>
<script type="text/javascript">
var flashvars = {
"file": "<%= this.File %>",
"image": "<%= this.PreviewImage %>",
"autostart": "<%= this.AutoStart%>",
"skin": "<%= this.Skin%>",
"dock": "true",
"controlbar.position": "bottom",
"stretching": "fill"
<%if(!String.IsNullOrEmpty(PlaylistPath)){%>
,"playlist": "right",
"playlist.thumbs": "false",
"playlistsize": "172",
"playlistfile": "<%=PlaylistPath%>"
<%}else if(!System.String.IsNullOrEmpty(this.File) && this.File.Contains("yospace.com")){%>
,"provider": "video"
<%}%>
};
var params = {
"allowfullscreen": "<%=this.AllowFullScreen%>",
"allowscriptaccess": "always",
"wmode": "transparent"
};
var attributes = {
"id": "<%=this.ClientID%>",
"name": "<%=this.ClientID%>"
};
swfobject.embedSWF("/swf/LTA-player.swf", "<%=DivMediaPlayer.ClientID%>", "<%=Width%>", "<%=Height%>", "9", "false", flashvars, params, attributes);
</script>
</div>
我已经对其进行了更新,希望可以在 ios 中使用:
<div id="Flash"></div>
<script type="text/javascript" src="/javascript/jwplayer.js"></script>
<script type="text/javascript">
if(swfobject.hasFlashPlayerVersion("1"))
{
console.log('flash');
var flashvars = {
"file": "<%= this.File %>",
"image": "<%= this.PreviewImage %>",
"autostart": "<%= this.AutoStart%>",
"skin": "<%= this.Skin%>",
"dock": "true",
"controlbar.position": "bottom",
"stretching": "fill"
<%if(!String.IsNullOrEmpty(PlaylistPath)){%>
,"playlist": "right",
"playlist.thumbs": "false",
"playlistsize": "172",
"playlistfile": "<%=PlaylistPath%>"
<%}else if(!System.String.IsNullOrEmpty(this.File) && this.File.Contains("yospace.com")){%>
,"provider": "video"
<%}%>
};
var params = {
"allowfullscreen": "<%=this.AllowFullScreen%>",
"allowscriptaccess": "always",
"wmode": "transparent"
};
var attributes = {
"id": "<%=this.ClientID%>",
"name": "<%=this.ClientID%>"
};
swfobject.embedSWF("/swf/LTA-player.swf", "<%=DivMediaPlayer.ClientID%>", "<%=Width%>", "<%=Height%>", "9", "false", flashvars, params, attributes);
}
else
{
jwplayer("<%=DivMediaPlayer.ClientID%>").setup({
flashplayer: "/swf/lta-jwplayer.swf",
file: "<%= this.File %>",
image: "<%= this.PreviewImage %>",
height: "<%=Height%>",
controlbar: "bottom",
width: "<%=Width%>",
autostart: "<%= this.AutoStart%>",
skin: "<%= this.Skin%>",
id: "<%=this.ClientID%>",
name: "<%=this.ClientID%>",
dock: 'true',
<%if(!String.IsNullOrEmpty(PlaylistPath)){%>
playlist: "right",
playlist.thumbs: "false",
playlistsize: "172",
playlistfile: "<%=PlaylistPath%>"
<%}else if(!System.String.IsNullOrEmpty(this.File) && this.File.Contains("yospace.com")){%>
provider: "video"
<%}%>
});
}
</script>
</div>