Skip to main content
Inspiring
August 7, 2012
Question

consultation about a music app

  • August 7, 2012
  • 3 replies
  • 568 views

Hello everyone

I'm a flash developer, and I'm building an app that plays YouTube videos. Currently I'm doing my tests on android devices (android 2.2 and android 4).

I'm using stageWebView in order to display the videos (the embedded player won't play a lot of the videos, so I've decided not to use it).

One of the things I want this app to do is to keep playing the audio, event when the app is going to the background, and this is where I have a major problem - i have no control on the behaviour of the video/audio in background, it always stops.

I need your help in understanding  whether there's any way I can make this work with AIR. maybe a workaround, or is it even theoretical possible to make a service that runs in the background or any other solution. I need your input in order to make a decision - should i keep developing this app using AIR, or try my luck on other platforms.

Thank you very much in advanced

This topic has been closed for replies.

3 replies

Inspiring
August 15, 2012

Hey tomato,

Well right now people have found using StageWebView is the easiest way to load video but it's not the best because of the limited control you have over the player and the StageWebView object itself. But here are two options I can recommend:

1.) The Best but hard and costly: What you really need to do is create an Air Extension that uses the iOS native UIWebView. If you search these forums for iOS native video player you'll find a couple posts about it. Someone even has an ANE for sale around a $100 I think you can buy that will give you the functionality I think you need. However I do know that these things require you be building for specific Air versions and given the strides Adobe has made with Air 3.4 I'm anticipating most coporate ANE's will break when the next release comes out.

See this post about UIWebView and a link to buy the ANE

http://forums.adobe.com/message/4558629#4558629

2.) The dirty dirty quick way: I only know about this because I've been working with StageWebView last night and if you don't attach a stage properly or attach it within a movie clip you can get the video player playing the background with no video being displayed. Again this isn't a recommended way but I know sometimes people like investors need to see progress on things and this would be way to show it running. I have no idea about stopping the audio though, I'm assuming if you just dispose of the StageWebView object it will stop. Also you have no control over playback itself.


I hope this helps.

Inspiring
August 17, 2012

Thank you so much for your answer!

I've checked your first solution and it's not what I'm looking for. First of all my focus is on Android, and second - I need something to keep the audio playing while the app is going to the background. My problem was never communicating with the html, since I'm using stageWebViewBridge which works great.

About your second solution - well... I am familiar with that "solution", still, you've already said it, it's a dirty dirty one...

But still - thanks a lot for your response and effort. If you come up with any new idea, let me know!

Inspiring
August 15, 2012

anyone? any idea? something? lead? empathy?