Allowing background music to play while VLCKit plays a video stream

iOS, iPad, iPhone, tvOS specific usage questions
PlasmaUK
New Cone
New Cone
Posts: 6
Joined: 14 Aug 2020 13:32

Allowing background music to play while VLCKit plays a video stream

Postby PlasmaUK » 29 Mar 2022 21:54

In an app I am writing using VLCKit as the video component I would like to be able to listen to background music, like from Apple Music / Amazon Music etc etc while my App displays a streamed video. Is there an option I can send to the player when initialising it to allow this?

I have tried a couple of things, like when my app launches I tell AVFramework that I want to play ambient sounds..

Code: Select all

do { try AVAudioSession.sharedInstance().setCategory(AVAudioSession.Category.ambient) try AVAudioSession.sharedInstance().setActive(true) } catch let error as NSError { print(error) }
Currently whenever I start a stream with VLC it pauses the music playing in the background, even if I have the stream volume set to 0.
When I stop the VLC Stream the music begins to play again, does anyone know if this is possible?

Thanks in advance for any help!

Return to “VLC for iOS, iPadOS and Apple TV”

Who is online

Users browsing this forum: No registered users and 16 guests