Copy link to clipboard
Copied
I have been tasked to write an app for our company iOS devices. This will be my very first iOS app. Since I have been using Flex/AIR to develop desktop applications for the past few years, I thought I would ask whether I can use the same toolset to achieve the following:
Copy link to clipboard
Copied
I see that you renamed the topic, which may have been a bad idea, I think that most of what you're asking for can't be done in AIR at all, but I would love to be wrong! With your new title you may only get comments from people who are interested in Flex.
Copy link to clipboard
Copied
Most, if not all of this is possible with AIR, it's just complex and not easily explained to a beginner.
You can definitely access the camera on iOS using AIR.
var camera:Camera = Camera.getCamera();
var video=new Video();
video.attachCamera(camera);
this.addChild(video);
You can "record" video by capturing bitmapdata from the stage, and saving it into a blob, which you then convert into an image sequence. I've done this before, with only about 20 fps on mobile.
To make notes, you would capture user input and draw a line using the graphics class. This would be included in the image sequence because you are taking bitmapdata from the whole stage, not just the camera.
You can save the image seqence to the applicationstoragedirectory, and play back the sequences using a Bitmap object and hot swapping the bitmapdata at your desired frame rate.
Copy link to clipboard
Copied
Your approach would be a lot of storage space, and wouldn't really be a normal video. Would it have sound for example? Do you know of a way in AIR to take your blob and save the video to the camera roll, and an MP4?
Copy link to clipboard
Copied
Agreed, definitely a storage hog, and probably a resource mammoth just the same. I don't know how much space ByteArray.compress will save you, but it would make a difference. You can save the audio using a similar approach, with SoundMixer.computeSpectrum and saving the ByteArray to a blob. Using a blob for both audio and video works well in this case, because RandomReado wants the content only to be playable in his application. He can load the blobs back into the app and read the chunks of data piece by piece.
Otherwise, to save it as an MP4, you will need to encode the data somehow, something I have never done without using a 3rd party library or ANE.