Appcelerator的钛:如何录制视频? [英] Appcelerator Titanium: how to record video?
问题描述
如何记录Appcelerator的钛视频并存储在特定位置?
How to record video in Appcelerator Titanium and store in a specific location ?
我使用的是Android 2.3.6的设备。
I am using an Android 2.3.6 device.
这要点: https://gist.github.com/832488 似乎并不工作建议/预期。它开始视频拍摄意图
This gist: https://gist.github.com/832488 does not seem to work as suggested / expected. It starts the video capture intent
VAR意图= Titanium.Android.createIntent({行动:android.media.action.VIDEO_CAPTURE'});
为 activityForResult
,但在回调
Titanium.Android.currentActivity.startActivityForResult(意向,功能(E){...});
永远不会被调用,没有在code通知的出现,视频存储在某些默认位置。
is never called, none of notifications in code appear and the video is stored in some default location.
该应用程序的KitchenSink没有任何视频为例[Android的],只有一个摄像头例如code。它有一个<一个href=\"https://github.com/appcelerator-developer-relations/KitchenSink/blob/06d3f89623597981fa1b7dc0bab5bf65e61fc29d/Resources/ui/common/phone/record_video.js\"相对=nofollow> record_video 为Android视频采集模块,但它只是设法捕捉的画面。行
The KitchenSink app does not have any video example[for Android], only a camera example code. It does have a record_video module for android video capture but it only manages to capture a picture. The line
mediaTypes:Titanium.Media.MEDIA_TYPE_VIDEO,
似乎并不奏效
任何帮助是AP preciated。谢谢你。
Any help is appreciated. Thanks.
推荐答案
原来,它的全部语境的发挥。
It turns out that its all a 'context' play.
在发现<一个理由href=\"http://developer.appcelerator.com/question/137709/startactivityforresult-and-callback-function-problem#244265\" rel=\"nofollow\">http://developer.appcelerator.com/question/137709/startactivityforresult-and-callback-function-problem#244265
- 真正的问题是在Android中使用的重量级窗口通过,这意味着一个新的JavaScript上下文中的SDK。
- 当你从一个TabGroup内打开一个新窗口始终是创建一个重量级的窗口。
所以,在要点: https://gist.github.com/832488 的作品,给相机不从tabgroup推出之内(内部)。
So, the gist at: https://gist.github.com/832488 works, given that the camera is not launched from within (inside) of a tabgroup.
这篇关于Appcelerator的钛:如何录制视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!