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 6533851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:10:45+00:00 2026-05-25T10:10:45+00:00

I am using AVPlayer to play a live stream from the Internet using the

  • 0

I am using AVPlayer to play a live stream from the Internet using the following code :

    NSString *u = @"http://192.192.192.192:8036";
NSURL *url = [NSURL URLWithString:u];
radiosound = [[AVPlayer alloc] initWithURL:url];
    [radiosound play]; 

And I have one button play :

[radiosound play]; 

and Pause :

[radiosound pause]; 

My issue is that I want to use only one button Play/Pause, but when I am using this code

if (radiosound.isPlaying) {         
    [radiosound pause]; 
} else {                
     [radiosound play]; 
}

My app crashes, because AVPlayer doesn´t recognize “isPlaying”.

Any tips?

  • 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-05-25T10:10:46+00:00Added an answer on May 25, 2026 at 10:10 am

    AVPlayer doesn’t have an isPlaying property. Use the rate property (0.0 means stopped, 1.0 playing).

    if (radiosound.rate == 1.0) {         
        [radiosound pause]; 
    } else {                
         [radiosound play]; 
    }
    

    You can look at the AVPlayer class reference here.

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

Sidebar

Related Questions

I am using AVPlayer to play an audio stream, and it's possible to keep
I am doing audio playback using the AVPlayer class from a remote URL. It
I would like to get an audio stream from URL and play it on
I'm successfully using AVPlayer to stream audio from a server and what I want
HI I'm using AVPlayer to play the video slowly frame by frame. I used
I have implemented audio playback using AVPlayer, playing a remote mp3 url. I want
Using Rails 3.2.0.rc2 and ruby 1.9.3p0 In app/views/requests/_form.html.erb I have the following code for
hi Friends I am using AVPlayer but in it I want to play .mov
I'm using AVPlayer to stream audio content delivered in two quality formats. The problem
Using the http://www.ifans.com/forums/showthread.php?t=132024 post from another question i am allowing the user to enter

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.