Copy link to clipboard
Copied
Hi there,
I'm pretty new to air development for iOS using Adobe animate CC.
I'm building an iPhone/iPad app that plays multiple videos through a landing screen. I've placed movie clips that play the transition animation and then need to start playing the video. I tried this with .flv and the below script works fine but the videos have a performance issue on iPad (I'm using GPU render mode), hence I want to use H.264 however I can't get it to work.
Here is the structure of my file,
- Frame 1 on root timeline has all the buttons for the videos
- Clicking a button plays gotoandStop to a keyframe label
- The keyframe has a movieclip (mc_vid1) that plays the transitional animation and loads the video inside another movieclip (mc_player) in it
.flv script
var vid:Video = new Video(1280, 720);
addChild(vid);
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
vid.attachNetStream(ns);
var listener:Object = new Object();
listener.onMetaData = function(evt:Object):void {};
ns.client = listener;
ns.play("Step02.flv");
Thanks in advance.
Copy link to clipboard
Copied
I think you have to use StageVideo for H.264
Getting started with Stage Video
From the paragraph starting "As a developer"
The H.264 codec is stage video's best friend;
Copy link to clipboard
Copied
You should look at using StageVideo. The syntax is almost identical, but you get the video played back with hardware decoding, solving the performance problem. Even this old article would get you going:
Getting started with Stage Video
Ha! I wrote that at the same time as yachts9999 was replying! We must both be right.
Copy link to clipboard
Copied
Thanks guys.
I tried to attempt this earlier but it looked little complex. Now as I know with your comments this is the right approach I'll give it a try again.