No sound when playing video in ionic app on an iPhone device - ios

I have an ionic app that plays videos hosted on the internet. When testing the app on a web browser and in the iOS emulator the video plays with sound.
If I download the app onto my iPhone using X-Code the video plays but there is no sound!
Does anyone have an idea as to why the sound works on the emulator but not on the actual device? I have checked that youtube videos play ok with sound.

Ok, so I am clearly an idiot! The mute slider on my iPhone was turned on. Not sure though why this didn't mute youtube videos but did mute my app videos.

For those wondering why sound isn't working in the ionic view app for an iOS device, but it works in an iOS emulator like I was:
The ionic view app comes with a fixed set of cordova plugins. If your app needs a plugin which the ionic view app doesn't support thenyour app won't work in the ionic view app. The sound plugin I was using in my emulator wasn't supported in the ionic view app.
Edit: list of supported ionic view apps can be found here: http://docs.ionic.io/docs/view-usage

Related

Unable to play fairplay protected video in wkWebView on iOS 12.4.6

I'm switching my Cordova App from the UIWebView to the WKWebView.
The app needs to play videos protected with the Fairplay DRM, and everything was fine with the UIWebView. When using the WKWebView I'm not able to play the videos on a iPad mini 2 with iOS 12.4.6.
The problem is that the window.WebKitMediaKeys object does not exist, while it shows up in the iPad emulator using iOS 13.x.
I read here that there was a bug (already fixed) in the WKWebView, is it possible that the fix was not included in the latest iOS < 13 updates?

html5 video playback on iOS (iPhoneX)

Hey everyone,
we have a serious issue with a website where we have an html5 video on the landingpage. It's a muted autoplay 5second loop that is supposed to play as a background-video on the site.
Now … we have two persons testing it, with the exact same device.
iPhoneX with Google Chrome (caches cleared and tested on both devices with Incognito and without)
On my phone the autplay works just fine. Video plays in the background.
On my collegues iPhoneX (same build, bought at the same date, same iOS version, same Browser (caches cleared)) it does not play automatically. He get's the play-icon.
Any idea why?
Thanks,
Matt
For everyone looking into that. The reason is iOS Low-Power-Mode. in low power mode the videos do not automatically play.

Youtube Player Keep on buffering in IOS 9.3 built with react native

I Created Ios app with React native which plays youtube videos within the app. I am using webview and Youtube Iframe API to play youtube videos. The app is working fine in IOS tablet with Version 11 but it's not working in IOS tablet with Version 9.3, the player loads the video but it keeps on buffering the video.
Thanks in Advance

Background audio not work with Ionic3 + Videogular2 on iOS

I'm using Videogular2 in an Angular/Cordova/Ionic3 project, where I play mp3 audio live streams. All works good with mp3 and mp4, on browser and iOS simulator.
When the user Lock The Screen in iOS Device I expect that the audio continues to play in a background mode, but on IOS when the user Lock The Screen audio stop to play.
I've tested on XCODE 8 to set 'Capabilities' tab adding 'audio' parameter, I've added cordova-plugin-backgroundaudio to the project without success.
On iOS Simulator it works well, the problem occurs only on iOS Device.
Tested on iPhone 6 & iPad 3.
I'm using:
iOS 10.3.3
XCODE 8.3.3
Ionic 3.12.1
Videogular2 5.4.11
No one else used videogular2 on cordova/ionic?
In iOS app audio won't be playing in background when the device is locked. For that you have to enable the background mode for the app. I had faced the same issue in one of my application (I was using different audio plugin).
In order to enable background mode in iOS you can use below plugin
https://ionicframework.com/docs/native/background-mode/. When you start playing the audio you just need to call backgroundMode.enable() to keep it playing in background. When you leave the audio player page if want you can disable background mode to avoid unnecessarily keeping the background mode on by calling backgroundMode.disable().
Additionally you need to enable the background audio feature in xcode project settings as shown in below link.
https://koenig-media.raywenderlich.com/uploads/2016/09/BM-EnableAudioInBG.png

Cordova 3.5 iOS 8 Media Recording

I am using the ionic framework to record audio using the Media object. It was working fine but with recent iOS updates now after recording something and releasing the Media object, the sound is disabled in my app until I crash it. No sound will play form any other part of the app and the + - volume controls on the side of the phone produce no volume overlay. I don't understand enough about iOS to know what's going on.
Any help is appreciated.

Resources