Select platform: [HTML5](https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/continuous-playback.md.txt "View this page for the HTML5 platform docs.") [Android](https://developers.google.com/interactive-media-ads/docs/sdks/android/client-side/continuous-playback.md.txt "View this page for the Android platform docs.") [iOS](https://developers.google.com/interactive-media-ads/docs/sdks/ios/client-side/continuous-playback.md.txt "View this page for the iOS platform docs.") [tvOS](https://developers.google.com/interactive-media-ads/docs/sdks/tvos/client-side/continuous-playback.md.txt "View this page for the tvOS platform docs.") The IMA SDK for Android allows for setting the continuous play context for an ads request. The `

setContinuousPlayback()` method notifies the SDK whether the player intends to continuously play the content videos one after another, similar to a TV broadcast. When set to `true`, the ads returned from the request are those designated by the ads server as suitable for continuous play. Not calling this method leaves the setting as unknown.

> [!NOTE]
> **Note:** Changing this setting has no impact on ad playback.

The following sample demonstrates how to set continuous play in an ads request.

```
AdsRequest request = mSdkFactory.createAdsRequest();
request.setAdTagUrl(adTagUrl);
request.setContinuousPlayback(true);
adsLoader.requestAds(request);
```
For those using the [Exoplayer-IMA extension](https://github.com/google/ExoPlayer/tree/release-v2/extensions/ima), version 2.13 or later, or the [BasicExample](https://github.com/googleads/googleads-ima-android/tree/master/BasicExample) which implements the extension, the following sample shows how to set continuous play.

```
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_my);

    playerView = findViewById(R.id.player_view);

    ImaAdsLoader.Builder builder = new ImaAdsLoader.Builder(this).setContinuousPlayback(true);
    adsLoader = builder.build();
}
```

## How continuous play differs from ad auto-play

The IMA SDK for Android also allows for setting whether the player will start playing automatically or wait for user action to begin playing. This is done using the `

setAdWillAutoPlay()` method. When set to `true`, the ads returned are those designated by the ads server as suitable for an auto-play environment.


This table details when to request ads for continuous play and auto-play, based on the video content
the ads are paired with.

| Video Content | Parameter for setContinuousPlayback() | Parameter for setAdWillAutoPlay() |
|---|---|---|
| A single content video that plays upon user interaction | `false` | `false` |
| A single content video that autoplays | `false` | `true` |
| A video playlist that plays the first video upon user interaction but autoplays the following videos | `true` | `false` |
| A video playlist that autoplays the first video and autoplays the following videos | `true` | `true` |