Do I understand that you imported the test case UIPlayer_badURL.aia, selected the URL ("https://streaming.live365.com/a28600") from the selection list using btn "Select URL" and then tapped the btn "Play" and the WKUL radio station was not played?
Hmmm...this URL works for me on API 26 as well as API 35...
Let me more briefly state my question/problem:
An app consisting of a single Player component and the following block works on Android 8 (API 26) (plays KDFC) but does NOT work on Android 15 (API 35), nor does it execute the Screen1.Error_Occurred, Player.PlayerError or raise a runtime error.... it becomes unresponsive.
If possible I would like to know why and whether or not I can fix/work around it. If not, how can the condition/error be "trapped" to avoid setting the source to a URL that will make the app unresponsive.
I hope that is clearer than my original post.
Any ideas? Perhaps the logcat output for this simplified case will reveal the problem...
Here is a single component, single block project that illustrates the issue. It works on API 26 and becomes unresponsive on API 35: PlayAudioStream.aia (1.6 KB)
It contains a Player component and the single block shown above.
This is an AAC stream (more precisely: AAC+ or HE-AAC at 96 kbps), as delivered by StreamTheWorld (a popular provider for radio stations like KDFC FM). AAC is a more efficient compression format than MP3, but it has known compatibility issues in App Inventor:
The Player component generally supports AAC, but not always AAC+ (enhanced AAC), especially for high-bitrate streams or specific encodings. It still works on older Android versions (< API 29) because the MediaPlayer implementation is more tolerant.
ExoPlayer (in Kodular) works seamlessly with all streaming formats.
My URL is a standard MP3 stream. MP3 has been fully supported by Android's MediaPlayer since version 4.4 (KitKat). There are no buffering issues, and compatibility is independent of the Android version. Therefore, it runs flawlessly on all Android versions (Android > 4.3).
... this really helps me understand what to expect...as it turns out, I do not really need this particular station (KDFC) to work in my app (which focuses on live sports events). But as I select and add stations to my app I should watch for these extended AAC formats... if I continue to use the standard Player component.
How can I tell whether or not the AAC stream is AAC+ or HE-AAC?
Frequently I have choices as to which URL in a .pls file to use or even which station to select for my app, but I do not know how to tell what the precise format is.
What about the Audio Player extension by @Taifun? Do you think it would also have problems with some ACC streams?
Can you tell me more about this one: (AudioExoPlayer)? Is it available?
I am also concerned about recovery at runtime from making the error of attempting to set the source to an incompatible format.... Perhaps one of these implementations will do a better job of trapping the error so that the app does not become unresponsive.
@Anke, thanks again for continuing the discussion!
Nothing as far as I know - I like the K-ExoPlayer's selection of events (according to the docs here: "ExoPlayer - Kodular Docs") - includes OtherPlayer... events.
I gather you would recommend AudioExoPlayer over the Kodular ExoPlayer (1.0.5), correct? care to comment on specific issues with K-ExoPlayer for audio streams (other than what is written in the post above from Feb 2020)? I certainly like the fact that @Patryk_F's AudioExoPlayer seems to be currently under development/maintenance.
You're talking about two different components. Kodular has a built-in ExoPlayer component; you're showing its documentation. However, to use it, you need to build your app in Kodular, not AppInventor. In that case, you'll need to seek help from the Kodular community. @Anke is talking about the ExoPlayer extension. The documentation for the extension is included in the Kodular community thread where you downloaded the extension. This extension will never be updated, and if something stops working, you'll have to rebuild the app again. My extension is built on a newer version of the ExoPlayer library, which is included in Media3. If you're missing a function or block, I can add it.
Hmmm....
When I paste "https://streaming.live365.com/a28600" (without the quotes)
into Chrome on my phone (and Windows PC) it plays the WKUL station stream...
In what regard does it "not work" in my browser???