Code Monkey home page Code Monkey logo

Comments (5)

DZamataev avatar DZamataev commented on August 31, 2024

+1

from streamingkit.

tumtumtum avatar tumtumtum commented on August 31, 2024

It will only work on devices not on the simulator. I'm tidying a whole lot of things which includes documentation. Let me see how much time I have this weekend.

Cheers.

from streamingkit.

DZamataev avatar DZamataev commented on August 31, 2024

Ok, thanks! For now i've managed to accomplish the easy way.
in application delegate, - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions call

[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];
[[AVAudioSession sharedInstance] setActive: YES error: nil];

and set UIBackgroundModes key in app-info.plist file for audio like so:
http://d.pr/i/aRCh
(add the key to infoplist and name it as following)

what you get is music keeps playing after the application goes background. Nothing more. No controls in Control Center or so. However they are useful and i will try to implement it too. Interactions with OS from the app is always weird. Happened to perform it in Windows Phone - also bad experience. So that comprehensive documentation would be brilliant. Thanks!

from streamingkit.

DZamataev avatar DZamataev commented on August 31, 2024

@ilan1990 @tumtumtum BTW my project which makes use of your great AudioPlayer is here https://github.com/DZamataev/wos.ru_iOS
feel free to grab pieces of code because thats for it's open. I've just managed to handle all the AVAudioSession notifications which provided me to handle headphones unplugging and playback interruption by the other applications while in background. That's nice and is not deprecated as old AudioSession (C api) is.

from streamingkit.

tumtumtum avatar tumtumtum commented on August 31, 2024

Here you go: https://github.com/tumtumtum/StreamingKit/wiki/Background-Audio

from streamingkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.