iOS PWA Background Audio Support [closed] - ios

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 months ago.
Improve this question
While playing audio in Safari on iOS, it is possible to minimise Safari or lock the screen and the audio continues to play. However, if the site is installed to the HomeScreen as a PWA, minimising the PWA or locking the screen pauses the audio.
Is there any way to make playback continue in the background when in the iOS PWA?
The problem is described in detail here:
https://medium.com/prototyped/what-we-learned-about-pwas-and-audio-playback-10a01c6aecbd

It seems to have been a bug fixed in iOS 15.4
https://twitter.com/othermaciej/status/1491500338305667072
I just tried it and it appears to work fine!

As partial workaround for iOS - you can use this setting in manifest
"display": "minimal-ui"
When user click pwa app icon on home screen the Safari is opened, as result pwa is opened like web-site with address bar in Safari and playback in the background is working

This is the best way to not stop playing audio files on iPhones
Using this plugin you can play audio files in the background
Prevent display sleep and enable wake lock in all Android and iOS web browsers.
NoSleep.js

Related

Detect when App is Slide Over on top of running app on iPad

We have a WebRTC Swift 4.2 application using Google's native WebRTC code. We are having issues with Apple's App Slide Over Multitasking feature on iPads.
Issue:
What we are seeing is when our Application is running in a video call on an iPad as soon as another app is 'Slide Over' our app, our application stops using the video camera and microphone until the Slide Over app is closed. Once closed our application gets the microphone and camera back.
Expected Result:
Our application is still able to use the camera and microphone and the user is able to use both apps at the same time.
Questions:
Is there a setting we need to turn on to disallow Slide Over apps? If not is there a event we can subscribe to when the slide over happens so we can request camera and microphone access again?
What we have done:
We have set our application to require full screen in the project settings.
We have tried subscribing to the following events on the AppDelegate:
applicationDidEnterBackground, applicationWillResignActive, applicationDidBecomeActive. These events do fire once for the initial Slide over app open and close but not after consecutive Slide Overs with same app.
Turning on all Background mode capabilities. Has no effect.
On our ViewController.swift we have tried to subscribe to viewWillLayoutSubviews event. This event does not fire for apps opened with Slide Over.
Versions:
iOS 11.4.1
Swift 4.2
Xcode 10.1
I filed a bug report with Apple and they said,
"This sounds like expected behavior, given that only one foreground app is allowed at a time."

Video on safari in iOS (iPhone only) keeps opening after closing

I've got this little problem here.
I'm using the HTML5 video-tag on a website, and everytime I try to close it, it keeps re-opening.
This only happens on Safari on iOS, specifically on iPhone. There are no problems with other devices on iOS that I know of.
Website: http://boplancom.webhosting.be (in development)
On your iPhone, just tap the video to start playing, and then try to close it.
Problem was solved. It was a javascript issue where I played the video whenever it came into the viewport.

iOS split keyboard messes up cordova webview

I am working on a hybrid app using Cordova and Ionic the app works fine on all iOS devices except iPad that too with split key board
The problem i face is posted here you can see the image in the post.
I tried to do some research and found out this
Also on stack overflow I found out this preference in config see answer but this is not documented neither does it work
Please help
If you don't want the webView to scroll,
use this,
https://github.com/driftyco/ionic-plugin-keyboard
and in device ready,
cordova.plugins.Keyboard.disableScroll(true);

Xcode UIWebview background audio [duplicate]

This question already has answers here:
UIWebView: HTML5 audio pauses in iOS 6 when app enters background
(4 answers)
Closed 9 years ago.
I have a simple iPhone App that uses UIWebView to show a mobile site that I have that allows users to create a playlist and listen to it online. Since I am not familiar with IOS development I thought that if I created an app with UIWebview and embedding my site on there it would work. And it does work perfectly, but when the app is in background mode, it stops playing the music.
How can I make it keep playing in background mode, even when iphone is locked. Also to make it play when iPhone is muted. I have found other topics on this but I have never created an app before and I am just working on this one simple UIWebview app.
If some one can please tell me exactly on what file I need to add the code and in what part of the file.
Please not that in the App Info I already enables the audio in background for the background modes. But it still does not work.
Thank you
Please this below links. I think this will help you..
Continue playing audio from html5 player when in iOS background mode
UIWebView: HTML5 audio pauses in iOS 6 when app enters background
http://www.dforge.net/2013/02/18/uiwebview-muted-sound-in-ios6/

How to record the screen in iphone [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
hi am doing an app in iphone with camera integration.i am using an iphone 3gS for testing.
My client wants to see the app so he has asked me to send a video showing the complete workflow. Since the app uses camera i cant run the app on stimulator.
Is there any app for iphone which captures its screen.
i dont want to jailbreak my iphone
There's no way to natively record the screen on a non-jailbroken iPhone.
Two solutions occur to me:
Why not just use the simulator? It can't take photos, sure, but you can "rig" the code to pretend a photo was taken, when in fact you're using a dummy shot. Be sure to tell the client, and explain the workflow is the same.
You could use AirPlay mirroring. Turn on Airplay mirroring, which streams the entire iPhone screen, mirroring to a Mac server like http://www.airserverapp.com/. Then record the mirrored output. There is a little lag in this process, but it should work fine.
iOS 11 will finally allow screen recording.
Well, if the client must have a video, you could always record the actual device with a digital camera. I know this answer sounds like I'm mocking you, but I'm not...it might be the only way to record video from a non-jailbroken device.
Similar to #Adam Wright's second point. A "cleaner" way than actually using a digital camera may be to use Reflector to display your iOS device's screen on your Mac and then use one of the many free screen recording apps on Mac (e.g QuickTime Player) to record that section of the screen.
iTool is very good tool to record screen, all the professional guy use this, it has also more options just like itunes. Here is the link to download
http://itool.en.softonic.com/mac
Open QuickTime on your Mac and run the application on simulator. Select New Screen Recording from File option and select only selected area or full screen option to record a video. That's it!

Resources