Always against the limits!

Hi,

Looks like i’am always programming against the limits of the corona, some examples:

1ste We needed an app with custom video player controls, not supported by corona, but YES there was a custom build with the native video and YES we did the app and published it at an exhibition.

Second: Now we need to develop an app witch can stream audio from the internet, stop it, resume it etc… like some radio apps in the appstore. Also it needs to resume playback while the user pushes the home button, as they will have play and pause in the startbat (double home tap). So i was looking around in the API, and have found out that we can’t use audio.loadStream() as it doesn’t support external streaming. Looking around in the forum, and we found video can do the job. As video does the Job, it uses the audio/video player of the SDK, so we can’t do anything like custom buttons etc, or not even lay over other content.

As i thought video will work, native video would work also. Whaaa, NO it doesn’t work, we get the simulator to CRASH when we use a URL for example like this one (http://stream01.platform02.true.nl:8000/qdance-hard)

I hope that somebody could give us a possible solution, roadmap time for playing streams from the internet or give us a Why, why not supported ?

By the way one solution i didn’t test, witch probably works, is using a native web window where w’ll show HTML and layout the APP within the HTML, Naahhhh, not so smooth solution.

So, in short we need:

That’s why i meant limits, as for every project w’lll find limitations, probably we need to learn Objective-C Or C , i’ll hope not ?

PS. Or should we try reading and buffering the file ourself true the network api. Erhmm please not!

Thanks anyway for reading, hoping for a soon response.

Regards,
Jasper
[import]uid: 2734 topic_id: 28417 reply_id: 328417[/import]

Anyone :slight_smile: , probably corona labs staff ? [import]uid: 2734 topic_id: 28417 reply_id: 114727[/import]

Misschien moet ik in het Nederlands antwoord geven om sneller reactie te krijgen evenals iemand die Chinese vragen stelt :slight_smile: ? [import]uid: 2734 topic_id: 28417 reply_id: 114839[/import]

Does the old video player work with your audio stream or does that crash too?

We don’t have a roadmap for streaming audio. It’s kind of a hard problem in general, hard to make compatible with the performance goals we set for the current audio engine (low latency/high throughput), and made even harder to do cross platform.

Right now, Corona’s new audio API is OpenAL based. OpenAL works at a really low level and only knows about buffers of data; nothing about files or networks. Anything else, one has to write on top of. Files are fairly easy, but networks are hard because of disconnects, buffer under-runs, needed temporary storage, latency issues, etc.

There are higher level APIs that make (different) trade-offs for you that do the network playing, but we aren’t currently wrapping them because they didn’t meet our original requirements for performance, mixing, effects, etc). Even on Apple, there are half a dozen different APIs to choose from, some pure audio, some audio/video, and this doesn’t even account for Android and Windows.

If you want something that works today, then WebView or WebPopup might be your best solution. If you want to do some work and pay money, you can try to implement this feature in native APIs using Enterprise (yes, you will need Obj-C/C for iOS/Mac and Java/C for Android). If you want to do work, but not pay money and share the code (but have no guarantees), you can contribute a network stream interface for ALmixer (the open source library Corona’s OpenAL implementation is based on). As the author/maintainer of ALmixer, I would welcome a working network streaming patch for ALmixer. Probably the place to focus is to write a custom SDL_RWops adaptor for network streaming.

[import]uid: 7563 topic_id: 28417 reply_id: 114841[/import]

Hi for now in short (come back later):

  1. The old video player is working, yes, but with the video player always on top!
  2. The new native video player won’t work with streams.

[import]uid: 2734 topic_id: 28417 reply_id: 114844[/import]

If the old video player works but the new one doesn’t/crashes, then please file a bug with us about this. Emphasize this fact just to make sure it doesn’t get categorized as a feature request (seems like a regression).
[import]uid: 7563 topic_id: 28417 reply_id: 114863[/import]

Is there any update on this? I see that there is still no direct way to stream audio, but have any new workarounds developed?

The only “streaming” of audio/video is using media.playVideo() and even then streaming of audio is very dependent on the format of the data being streamed.

Rob

Thanks Rob, I’ll probably end up using a webpopup then.

Is there any update on this? I see that there is still no direct way to stream audio, but have any new workarounds developed?

The only “streaming” of audio/video is using media.playVideo() and even then streaming of audio is very dependent on the format of the data being streamed.

Rob

Thanks Rob, I’ll probably end up using a webpopup then.