Playing ogg (codec opus) audio in audio player in Ionic 5 - ios

I have some .ogg audio files hosted on cloud and wanted to play in a audio player. The next code works fine on Android but not in iOS:
<audio controls controlsList="nodownload">
<source src="<ogg_audio_url>" type="audio/ogg" />
</audio>
I'm using Ionic 5 with Capacitor. I tried to use some Cordova plugins, convert the file to base64, but no success. From what I've read in some forums, iOS does not support playback of audios in ogg format, requiring specific applications, is there any way to do this in an Ionic way, using a cordova plugin or similar?
Thanks in advance.

Try to use native audio plugin for better compatibility.
https://ionicframework.com/docs/native/native-audio

Related

Ionic cordova iOS 11 HTML audio component broken

i try to get the html5 audio working on ios with cordova.
<audio controls>
<source [src]="attachment.audioUrl" type="audio/mpeg">
</audio>
Working fine on Android or on all Web Browsers using ionic serve (Safari/Chrome, no problem). But get stuck on ios. Audiofile is played just once and during playback it says "Live broadcast". When finished, there is no way to get this file play another time but close the view and go back works fine.
Could this be an cordova issue or am I doing something wrong? I already tried different audio types and made sure, that they are correctly formatted. All working on other platforms but ios.
I am using cordova 8.0.0
and ionic 3.20.0
Thanks,
Karsten

Html5 audio player won't display in iOS app using meteor

I'm am trying to build a simple music app using meteor as my framework. I'm using html5 audio tags as my player. Everything works and displays completely fine in my browser but when testing on the iOS simulator all i get is a black screen with a giant gray play button that does not work.
I'm wondering if this is a meteor problem or if iOS limitations are too robust in order for the html5 audio player to display correctly.
If anyone knows the solution to this please help.
Thanks
I had the same issues with the html5 video element. I will share my findings for that as it sounds like the same issue for the audio tag.
iOS web app and Cordova
For iOS just add “webkit-playsinline” next to your audio tag as done below for video:
<video webkit-playsinline>
<source src="mySource.mp4" type="video/mp4">
</video>
Cordova
For a Meteor Cordova iOS app you also need to add the following to mobile-config.js to set the cordova config.xml settings:
App.setPreference('AllowInlineMediaPlayback', true);
You can read up some more about this on http://blog.blairvanderhoof.com/post/78586868260/getting-the-html5-video-tag-to-work-in-cordova-for
If that does not work you can go with the following cordova plugin which supports audio playback: http://plugins.cordova.io/#/package/org.apache.cordova.media
Example from the plugin docs:
var myMedia = new Media("http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3")
myMedia.play({ numberOfLoops: 2 })
Hope it helps.
Regards,
Riaan
HTML5 Audio is not supported on most mobile devices. Check out the documentation at: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio for more information. iOS does not support a lot of the new HTML5 Media elements and APIs at this point. The only mobile browser that supports HTML5 audio is Firefox Mobile. Hope this helps!

How to play webm file in iOS video player

I want to give support of webm file in iOS , but iOS doesn't support this format to play a video. i Even tried to play it through HTML5 video tag but safari doesn't support webm format in HTML5 video tag that means i also cant make it work through UIWebView. But i have seen an app that is supporting this format in their media player , that means there should be some way.
Thanks in advance for help!
Have you tried integrating MediaVLCKit by VLC?
As per VLC for an iOS device: The app claims to be able to play a veritable cornucopia of different video formats, including .mkv, .vob, .wmv, and WebM .
PFA link for VLC for iOS 2.5.1 which includes MediaVLCKit library as well.
Hope this works :)

Sound Manager 2 or JPlayer for Android and iOS

Can someone please advise me which one is better for Mobile App, targeting Android as well as iOS, using JQuery Mobile?
I need to run mp3 audios as well as rtmp live stream.
Thanks
MP3 audios will run good in both libraries but not RTMP live streams because RTMP protocol is flash based streaming.
Mobile webapp for iOS and Android will not play rtmp streams.
SoundManager 2 RTMP feature (needs Flash player 9): http://www.schillmania.com/projects/soundmanager2/doc/#smsound-serverurl

How to play mp4 in iOS Flex application

I'm developing a Flex application to iOS devices and I can't find a way to play mp4 video inside it...
I know it works with navigate to URL command but it's open browser and then the vieo player, which is not what I'm intending...
Thanks
If you work with audio and video streaming, one of the worst limitation of AIR 2.6 for iOS is that it is not possible to stream video encoded in H.264 (and audio in AAC) inside your AIR application. AIR 2.6 for iOS supports NetConnection and NetStream but can decode only Spark, VP6, MP3, NellyMoser and Speex formats. So no H.264 and no AAC.
I've tried play .flv video fine in flex app on iOS.

Resources