Adobe-Runtime-Support
Adobe-Runtime-Support copied to clipboard
[iOS] StageVideo animated "zoom out" effect on video start
Problem Description
StageVideo start video playback with "zoom out" effect for iOS devices.
So it breaks video playback UX for iOS.
Tested with multiple AIR versions, even with latest AIR 33.1.1.856 with multiple different iOS devices with different OS versions with different MP4 H.264 videos.
Same problem in all cases.
The same issues exists if you try to create similar application using Starling.
There is no such issue with VideoTexture. Cannot check with Video because of another issue: https://github.com/airsdk/Adobe-Runtime-Support/issues/211
There is no such issues with Windows, macOS and Android.
Tracker link: https://tracker.adobe.com/#/view/AIR-4198757
Steps to Reproduce
- Launch code below with any iOS device.
- Click anywhere on stage to start video playback.
Application example with sources and example of video attached. ios_stagevideo_zoom_out_bug.zip
package {
import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.events.NetStatusEvent;
import flash.net.NetStream;
import flash.net.NetConnection;
import flash.media.StageVideo;
import flash.geom.Rectangle;
public class IOSStageVideoZoomOutBug extends Sprite {
private var nc:NetConnection;
private var ns:NetStream;
public function IOSStageVideoZoomOutBug() {
stage.addEventListener(MouseEvent.CLICK, click);
}
private function click(e:MouseEvent):void {
trace("click");
nc = new NetConnection();
nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
nc.connect(null);
}
private function netStatusHandler(event:NetStatusEvent):void {
trace(event.info.code);
switch (event.info.code){
case "NetConnection.Connect.Success":
ns = new NetStream(nc);
ns.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
ns.client = {onMetaData:getMeta, onPlayStatus:onPlayStatus};
var sv:StageVideo = stage.stageVideos[0];
sv.viewPort = new Rectangle(0,0, 720, 480);
sv.attachNetStream(ns);
ns.play("video.mp4");
break;
case "NetStream.Play.StreamNotFound":
trace("Stream not found");
break;
}
}
private function getMeta(mdata:Object):void {
trace("metadata");
}
private function onPlayStatus(infoObject:Object):void {
trace("onPlayStatus", infoObject.code);
ns.seek(0);
}
}
}
Actual Result: Video start to play with "zoom out" animation effect:
https://user-images.githubusercontent.com/10899066/170976876-c69151c6-3652-4a98-afc9-f9242148428b.mp4
Expected Result: Video playback start without any animations.
Known Workarounds
none
*Video also doesn't work with MP4 H.264 videos for iOS: https://github.com/airsdk/Adobe-Runtime-Support/issues/211
*VideoTexture also have issue: https://github.com/airsdk/Adobe-Runtime-Support/issues/1939