小编use*_*680的帖子

视频调整Flash播放器的事件

我是所有这一切的新手,无法弄清楚当调整窗口大小或方向改变时如何调整我用于家庭媒体服务器的Flash播放器的大小.我将播放器大小基于视口的大小.我搜索并尝试了各种版本,但它们不起作用,这很可能是由于我缺乏知识.下面的大部分代码已经完成,我已经评论了我在这里添加的内容以供参考.

链接到示例

viewport.js(由我添加)

var width = $(window).width();
var height = $(window).height();
Run Code Online (Sandbox Code Playgroud)

HTML

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>Gizmo play_flash</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
 <script type="text/javascript" src="scripts/jwplayer.js"></script>
<script type="text/javascript" src="jquery/jquery.js"></script>
<script type="text/javascript" src="scripts/viewport.js"></script>
<noscript><meta http-equiv="refresh" content="2; URL=noscript.html"></noscript>
</head>

<body style="margin: 0; padding: 0; background-color: #000000">
<div id="outer">

    <div class="player_wrapper" style="width: 100%; height: 100%; margin:0px auto;">
        <div id="player">
            Loading the video player ...
        </div>
    </div>

    <script type="text/javascript"> …
Run Code Online (Sandbox Code Playgroud)

javascript jquery

8
推荐指数
1
解决办法
2万
查看次数

标签 统计

javascript ×1

jquery ×1