# isPlaying

> Returns whether the AudioSource is currently playing an AudioResource (Read Only).

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.AudioModule

```csharp
public bool isPlaying { get; }
```

### Remarks

AudioSource.isPlaying returns true if the [AudioSource](/engine/6000.7/script-reference/unityengine/audiosource.md) is playing any [AudioResource](/engine/6000.7/script-reference/unityengine/audio/audioresource.md), such as [AudioClip](/engine/6000.7/script-reference/unityengine/audioclip.md) or AudioRandomContainer. This includes if you use PlayOneShot() or if you play a video or timeline track through the AudioSource.

**Note:** [\_isPlaying](/engine/6000.7/script-reference/unityengine/audiosource/isplaying.md) returns false when `AudioSource.Pause()` is called. If you use `AudioSource.Play()` back again, it returns true.

**Note:** If you use [AudioSource.PlayDelayed](/engine/6000.7/script-reference/unityengine/audiosource/playdelayed.md) to play your clip, AudioSource.isPlaying returns true during the delay.

### Examples

```csharp
 // When the audio component has stopped playing, play otherClip.
 // Remember to assign an AudioClip in the Inspector.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour
{
    public AudioClip otherClip;
    AudioSource audioSource;

    void Start()
    {
        audioSource = GetComponent<AudioSource>();
    }

    void Update()
    {
        if (!audioSource.isPlaying)
        { 
            audioSource.clip = otherClip;
            audioSource.Play();
        }
    }
}
```
