gpt4 book ai didi

flash - 如何在 iOs 的 Flash 应用程序中播放视频 (iPhone Packager)

转载 作者:行者123 更新时间:2023-11-28 17:47:23 25 4
gpt4 key购买 nike

阅读iphone packager's FAQ from Adobe Labs我读:

Can I play H.264 Video from Flash content on iOS? Yes. You can play H.264 video from Flash content by launching the content in the native iOS video player. You cannot play back H.264 content directly within the application.

问题很简单,如何在原生 IOS 视频播放器中播放 H264 内容?

最佳答案

import flash.net.NetConnection;
import flash.events.NetStatusEvent;
import flash.net.NetStream;
import flash.media.Video;

var nc:NetConnection = new NetConnection();
nc.connect(null);

var ns_url:String = "http://617.gp.selfip.biz/mov/001.flv";

var ns:NetStream = new NetStream(nc);
ns.client = this;
function onMetaData(info:Object):void{
trace(info.width, info.height, info.duration);
}
ns.play(ns_url);

var vid:Video = new Video();
vid.width = 360;
vid.height = 240;
addChild(vid);

vid.x = 0;
vid.y = 0;

vid.attachNetStream(ns);

关于flash - 如何在 iOs 的 Flash 应用程序中播放视频 (iPhone Packager),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4864140/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com