如何强制全屏播放视频?

发布于 2024-10-25 02:50:28 字数 188 浏览 1 评论 0原文

我需要知道如何强制以全屏模式播放视频?

在大多数情况下,全屏是 ActionScript 的一个功能,由用户操作(如鼠标单击或双击)触发。

另一种方法是强制在移动设备本机播放器中播放视频,就像 YouTube 那样。我不知道这种方法是如何实现的。

希望在您的支持下,能够更清楚地了解这件事。

克里斯

I need to know how it's possible to force playing a video in fullscreen mode?

Fullscreen is in most of the cases a function by ActionScript and is triggerd with a user action, like mouse click or double click.

The other way is to force playing a video in the mobile devices native player, like youtube does. I have no clue how this approach is realized.

Hope to understand this thing a bit more clearer with your support.

chris

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

怪我闹别瞎闹 2024-11-01 02:50:28

您可以使用以下命令告诉 Flash 阶段进入全屏视图:

stage.displayState = "fullScreen";

它仅在独立模式下工作。

要使其在浏览器中工作,您必须将具有“true”值的“allowFullScreen”参数传递给 Flash。

要在移动设备中全屏显示,我相信您必须使用

FSCommand("fullscreen", "true"); 方法调用。

如果您使用的是 SWFObject,则可以轻松添加 allowedFullScreen 参数。

SWFObject -2:

<script type="text/javascript">
   var so = new SWFObject("movie.swf", "mymovie", "400", "400", "8", "#336699");
   so.addParam("wmode", "opaque");
   so.addParam("allowScriptAccess", "sameDomain");
   so.addParam("allowFullScreen", "true");
   so.write("flashcontent");
</script>

SWFObject 2+:

<script type="text/javascript">
var wl = new Object();
wl.flashvars = {};
wl.params = {
    allowScriptAccess: "sameDomain",
    allowFullScreen: "true",
    wmode: "opaque"
};
wl.attributes = {};

swfobject.embedSWF("movie.swf", "flashcontent", "400", "400", "8", "swf/expressInstall.swf", wl.flashvars, wl.params, wl.attributes);
</script>

我希望它有帮助,祝你好运

you can tell the Flash stage to go to fullscreen view with this command:

stage.displayState = "fullScreen";

It will work in standalone mode only.

To make it work in the browsers you have to pass the "allowFullScreen" parameter with a "true" value to Flash.

To go fullscreen in mobile devices I believe you have to use the

FSCommand("fullscreen", "true"); method call.

If you are using SWFObject the you can add the allowFullScreen param easily.

SWFObject -2:

<script type="text/javascript">
   var so = new SWFObject("movie.swf", "mymovie", "400", "400", "8", "#336699");
   so.addParam("wmode", "opaque");
   so.addParam("allowScriptAccess", "sameDomain");
   so.addParam("allowFullScreen", "true");
   so.write("flashcontent");
</script>

SWFObject 2+:

<script type="text/javascript">
var wl = new Object();
wl.flashvars = {};
wl.params = {
    allowScriptAccess: "sameDomain",
    allowFullScreen: "true",
    wmode: "opaque"
};
wl.attributes = {};

swfobject.embedSWF("movie.swf", "flashcontent", "400", "400", "8", "swf/expressInstall.swf", wl.flashvars, wl.params, wl.attributes);
</script>

I hope it helps, good luck
Rob

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文