Highlighted

Can I use Flex/AIR to achieve these results for iOS app?

Participant ,
Dec 16, 2015

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:

  • Access rear-facing camera
  • Control video recording (i.e. record, pause and stop)
  • Make notes while recording video and still able to see the video output
  • Save video recording to local device
  • Play video recording from local device via the app only (cannot access via Camera Roll)
  • Send video recording(s) to remote server when company Wi-Fi is detected
TOPICS
Development

Views

229

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Can I use Flex/AIR to achieve these results for iOS app?

Participant ,
Dec 16, 2015

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:

  • Access rear-facing camera
  • Control video recording (i.e. record, pause and stop)
  • Make notes while recording video and still able to see the video output
  • Save video recording to local device
  • Play video recording from local device via the app only (cannot access via Camera Roll)
  • Send video recording(s) to remote server when company Wi-Fi is detected
TOPICS
Development

Views

230

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Dec 16, 2015 0
Adobe Community Professional ,
Dec 16, 2015

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 16, 2015 0
Explorer ,
Dec 16, 2015

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 16, 2015 0
Adobe Community Professional ,
Dec 16, 2015

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?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 16, 2015 0
gperry91 LATEST
Explorer ,
Dec 16, 2015

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 16, 2015 0