如何记录与Adobe AIR有时间限制的视频为iOS [英] How to record a time-limited video with Adobe AIR for iOS

查看:126
本文介绍了如何记录与Adobe AIR有时间限制的视频为iOS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想记录与Adobe AIR有时间限制的视频的iOS。

例如,我要实现以下功能。启动CameraUI的录制视频前开始一分钟的计时器。当超时事件一分钟后发生,停止录制视频,关闭CameraUI的观点和获得视频数据为止。

我有相关的几个问题。

  1. 如何停止从CameraUI的观点外录制的视频(在这种情况下,超时事件处理程序),然后关闭CemeraUI看法?据因为我知道,关闭CameraUI的看法,唯一的办法就是以preSS [使用视频]按钮,或从CameraUI的视图中的[取消]按钮。是否有可能从外部关闭它?

  2. 即使上面提到的第一个问题就解决了​​,那我怎么能得到的视频数据,到目前为止(在这种情况下,超时前的视频数据)。我知道,通常我们可以从完整的处理程序的MediaEvent参数MediaPromise对象,并从MediaPromise对象读取视频数据。但显然,在这种情况下,我们不能访问MediaPromise对象仅仅是因为完整的处理程序本身将不被执行,因为[使用视频]按钮不可pressed。

  3. 是否有可能增加一个秒表显示可能的剩余录音时间CameraUI的观点是开放的?看来,CameraUI的自动使用的全屏幕iOS设备(对我来说,iPad的),并没有多余的空间来显示秒表。

    是否有任何关于这三个问题的上述解决方案或解决方法?我真的AP preciate它,如果任何人有这个任何想法。先谢谢了。

解决方案

我从来没有与专门的视频在iOS上,所以我放下我的想法对这个问题,如果你觉得不好意思了也没用。

  1. 我想这是不可能的CameraUI的外面写的视频(除非你自己写ANE的那个),我认为这是一个不好的设计,为什么你需要一个?
  2. 在回答同1。
  3. 不可能(再次,除非你自己写ANE)添加在本机窗口的显示对象

在一般的,如果你想要更多的自由与视频工作的AIR,你可以通过三种方式做到这一点:

  1. 写你自己的ANE。
  2. 要流式处理,视频数据到自己的服务器,和做任何你想做的事情。
  3. 在最不可靠的方法,但你可以试试。有 FLVRecorder 的图书馆里,我从来没有尝试过,甚至不知道做它在所有的工作。或者你可以尝试自己的方法(为您节省上台位图与一些帧率,然后连接code到视频)。这只是建议,我不知道它会在所有的工作。

希望我的想法会有所帮助。

I am trying to record a time-limited video with Adobe AIR for iOS.

For example, I want to implement the following function. Start a one-minute timer before launching CameraUI to record video. When the timeout event happens after one minute, stop recording video, close the CameraUI view and obtain the video data so far.

I have several questions related to that.

  1. How to stop recording video from outside the CameraUI view(in this case, from the timeout event handler) and then close the CemeraUI view? As far as I know, to close the CameraUI view, the only way is to press the [Use Video] button or the [Cancel] button from inside the CameraUI view. Is it possible to close it from outside?

  2. Even if the first problem mentioned above is solved, then how can I get the video data so far(in this case, the video data before the timeout). I know that normally we can get a MediaPromise object from MediaEvent parameter of the complete handler, and read the video data from the MediaPromise object. But obviously in this case, we can not access the MediaPromise object just because the complete handler itself will not be executed since the [Use Video] button is not pressed.

  3. Is it possible to add a stopwatch to show possible remaining recording time when CameraUI view is open? It seems that the CameraUI automatically uses the full screen of iOS device(in my case, iPad) and there is no extra space to show the stopwatch.

    Are there any solutions or workarounds about the three problem above? I really appreciate it if anyone has any idea about this. Thanks in advance.

解决方案

I never worked with video specially on iOS, so I just putting down my thoughts on this issue, sorry if you find it useless.

  1. I suppose it's impossible to write video outside CameraUI (unless you write your own ANE for that), and I think it's a bad design why do you need that?
  2. Answer the same as 1.
  3. It impossible to add display objects at native windows (once again unless you write your own ANE)

In general if you want more freedom to work with video in AIR you can do it in three ways:

  1. Write you own ANE.
  2. To stream you video data to your own server, and do whatever you want with it.
  3. Least reliable way but you can try it. There is FLVRecorder library, I never tried it and even don't know does it work at all. Or you can try own approach (save you stage to bitmaps with some framerate and then encode it to video). It just suggestion I don't know will it work at all.

Hope my thoughts will help.

这篇关于如何记录与Adobe AIR有时间限制的视频为iOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆