Changing video quality based on device using MPMoviePlayer - ios

I used an MPMoviePlayer to play an .mp4 video within my app, which works fine. I tried my app on an Android device using Apportable but the video wasn't playing till I later realized that it was because the video quality was too high for the device. Is it possible to change the video quality (of an .mp4) based on the device running the app using MPMoviePlayer? If yes, how can this be done?

If you simply have one video that plays on iOS and one that plays on Android via Apportable, you could opt to simply have two files of the same name where one file is added to the project and attached to the iOS build target and the other is attached to the Apportable build target.

Related

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

Background music ducked when Unity3D game is launched

I'm developing a casual game for iOS with the Unity3D engine.
Whenever my game is launched, the background music being played on the device (e.g.: Spotify, iTunes, etc.) is ducked. This is undesired because my game does not have any fancy sound effects, I' like to allow my players to keep listening to their music in the 'normal' volume.
For testing purposes I created an empty project in Unity3D, ensuring the Override iPad Music setting is unchecked in the iOS Build Settings. This is enough to reproduce the audio ducking issue.
INFO:
Unity 5.4.x (also occurs with Unity 5.3.x)
Xcode 8
iOS 9 and iOS 10
Does anyone know how disable Unity3D's default audio ducking?
Add an Audio mixer to the output of your audio source. On the Audio mixer in the project tab, click the drop down then click on master. Finally increase the attenuation volume to a level your feel satisfied with. Then you are good to go.

ios uiWebView: jplayer plays mp3 in simulator but not on device

I created a simple app in Xcode 6 which wraps a uiWebView object to render the contents of a website. The website includes mp3s which sometime play automatically on load, using jplayer. I've set allowsInlineMediaPlayback = YES and mediaPlaybackRequiresUserAction = NO.
When I run the app through the simulator (xcode 6/iPad2/ios8) the sound plays fine. When I run the app through my iPad (8.1.2) the sound doesn't play, even in the cases where it's triggered by a user action. I've checked the mute button and volume controls. I've also checked the paths to the mp3s for case and it all looks ok.
Any ideas why this is working on the simulator but not the iPad?

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.

Qt Quick iOS: How to keep audio playing while app is in background

I’m developing a WebRadio application in qml for iOS devices with Qt 5.2. To play the audio stream I use the MediaPlayer type which works fine.
However, in iOS, when I switch to another application or go back to home (in other words when the app go to background) the sound stops, but I want it to continue playing.
I know how to do it in objective-C by activating the AVAudioSession and add the audio background mode the info.plist file.
But I really don't know how to do it in qml.
Can someone help ?
You can add the audio background mode to the info.plist file or via the capabilities tab in Xcode.

Resources