简体   繁体   English

在Android 4.0.4(冰淇淋三明治)上,Flash全屏视频在人像模式下出现拉伸

[英]Flash fullscreen video appearing stretched in portrait mode on Android 4.0.4 (Ice Cream Sandwich)

I noticed that when I tried playing a Flash video in fullscreen mode on a Galaxy Nexus S running Android 4.0.4 (ICS), if I were in portrait mode, the video would appear stretched vertically. 我注意到,当我尝试在运行Android 4.0.4(ICS)的Galaxy Nexus S上以全屏模式播放Flash视频时,如果我处于纵向模式,该视频将显示为垂直拉伸。

I tried setting a specific width and height for the video: 我尝试为视频设置特定的宽度和高度:

this.m_player.setActualSize(640, 360);

The weird thing is that when the player first goes fullscreen in portrait mode, it will always appear stretched, but if I rotate to landscape and then rotate back to portrait mode again, the player will be the size that I specified. 奇怪的是,当播放器首次在人像模式下进入全屏显示时,它将始终处于拉伸状态,但是如果我旋转到横向,然后再次旋转回肖像模式,则播放器将达到我指定的尺寸。 So it seems like the player is ignoring any specific size I set for it when the player first loads. 因此,似乎播放器正在忽略播放器首次加载时为它设置的任何特定大小。

Has anyone experienced this on a Samsung Galaxy Nexus S phone running Android before? 以前有人在运行Android的Samsung Galaxy Nexus S手机上体验过吗? Is there a workaround for this behavior? 是否有解决此问题的方法?

I'm more of a Javascript person so I'm not overly familiar with Actionscript, but it would be great to know that I'm not the only person that has seen this behavior with Flash videos on Android. 我比较喜欢Java语言,所以我对Actionscript不太熟悉,但是很高兴知道我不是唯一在Android的Flash视频中看到这种行为的人。

Okay, so it turns out that simply adding the following to the Flash embed code will make it render only in landscape mode, preventing it from switching to portrait mode and appearing "stretched." 好的,事实证明,将以下内容添加到Flash嵌入代码中将使其仅在横向模式下呈现,从而阻止其切换到纵向模式并显示为“拉伸”。

For some reason setting the fullScreenAspectRatio in the AS3 code itself did not seem to work, but this did: 由于某些原因,在AS3代码本身中设置fullScreenAspectRatio似乎不起作用,但这确实可以:

<param name="fullScreenAspectRatio" value="landscape">

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM