# Play()

> Starts or resumes the playback of a video.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Video](/engine/6000.3/script-reference/unityengine/video.md)
* **Assembly:** UnityEngine.VideoModule

```csharp
public void Play()
```

### Remarks

If the video isn't prepared, this method will prepare the video before it starts playback, but playback won't be instant. To make playback instant, use [VideoPlayer.Prepare](/engine/6000.3/script-reference/unityengine/video/videoplayer/prepare.md) and wait for preparation to finish (when [VideoPlayer.prepareCompleted](/engine/6000.3/script-reference/unityengine/video/videoplayer/preparecompleted.md) fires), before you use this method.

If you use [VideoPlayer.Prepare](/engine/6000.3/script-reference/unityengine/video/videoplayer/prepare.md) and then play the video before preparation finishes, the VideoPlayer will finish preparation and then play the video.

Additional Resources: [VideoPlayer.isPlaying](/engine/6000.3/script-reference/unityengine/video/videoplayer/isplaying.md), [VideoPlayer.Pause](/engine/6000.3/script-reference/unityengine/video/videoplayer/pause.md), [VideoPlayer.started](/engine/6000.3/script-reference/unityengine/video/videoplayer/started.md).

### Examples

```csharp
using UnityEngine;
using UnityEngine.Video;

public class PlayExample : MonoBehaviour
{
    void Start()
    {
        // Get the VideoPlayer attached to this GameObject.
        // You need to attach a VideoPlayer component in the Inspector for this script to work. 
        var videoPlayer = GetComponent<VideoPlayer>();

        videoPlayer.Play();

    }
}
```
