Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8425501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:17:16+00:00 2026-06-10T04:17:16+00:00

I am showing media hierarchy in the table view. When I tap on a

  • 0

I am showing media hierarchy in the table view. When I tap on a song in the table view, it plays the song using MPMoviePlayerViewController. But when I click on the done button, the sound stops playing . I have created the following code:

        NSURL *songUrl=[operationControl getSong:stringId];
    mediaPlayerController = [[MPMoviePlayerViewController alloc] initWithContentURL:songUrl];
    [self presentModalViewController:mediaPlayerController animated:YES];
    [[mediaPlayerController moviePlayer] play];

I to want to browse the media hierarchy as well as play the song in the background. How can I achieve this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T04:17:17+00:00Added an answer on June 10, 2026 at 4:17 am

    You should start AVAudioSession and declare in main plist that your application plays music in background.

    in didFinishLaunchingWithOptions:

      // Setup audio session
      AVAudioSession *sharedSession = [AVAudioSession sharedInstance];
      [sharedSession setCategory:AVAudioSessionCategoryPlayback error:nil];
    

    in applicationDidBecomeActive:

      [sharedSession setActive:YES error:nil]; // FIXME: Error handling
    

    In main plist add: Required background modes – App plays audio

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Select only showing first character of option text in IE 9 Using click on
I am using media player to play list of songs.But after playing for several
When showing data from a mysql table on an php page does it have
When you click on the top most button it is suppose to draw a
I've uploaded my images using the WordPress Media Library. Permissions are set on the
I jave a strange issue, I'am using the mediaelement js media player to serve
Ok twitter might be great for social media but for a small app that
How do I stop my view from filling the entire screen and not showing
I am using the mediaelement.js component for showing only parts of the video. I've
I am using Android 4.03 on a Samsung Galaxy Nexus. The logs are showing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.