# CEContentProgressProvider

#### **Please implement all methods in this class otherwise InStream ad will not work properly or even not be served.**

## API Reference

| Public methods |                                                                                                                                                                                                                                                                        |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| NSTimeInterval | <p><a href="#getContentCurrentPosition">getContentCurrentPosition</a> <br> Please implement this function to provide progress of video content.<br><strong>Current position must be exclusively handled as user is seeking. Please refer to below detail.</strong></p> |
| NSTimeInterval | <p><a href="#getContentTotalDuration">getContentTotalDuration</a> <br> Please implement this function to provide  the duration of video content.</p>                                                                                                                   |
| BOOL           | <p><a href="#isContentPlayerReady">isContentPlayerReady</a> <br> Please implement this function to notify once video content player is ready.</p>                                                                                                                      |

## Public Methods

### getContentCurrentPosition <a href="#getcontentcurrentposition" id="getcontentcurrentposition"></a>

```
- (NSTimeInterval) getContentCurrentPosition
```

Please implement this function to provide the progress of video content that is playing. **Please read this carefully: During the time user is seeking video, APP should always return the progress time that user start seeking instead of the current time that user has sought to. Once user stop seeking, please return the progress time that user stopped at.** ![](https://1252529651-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LGU_q6Cp7glylaa3ogy%2F-LGU_uDXyKLpZsKhgGZa%2F-LGU_zzn0i7SLU0L6zd7%2Fseeking-intowow.png?generation=1530612155922770\&alt=media)

| Returns        |                                         |
| -------------- | --------------------------------------- |
| NSTimeInterval | Current progress time in NSTimeInterval |

### getContentTotalDuration <a href="#getcontenttotalduration" id="getcontenttotalduration"></a>

```
- (NSTimeInterval) getContentTotalDuration
```

Please implement this function to provide the duration of video content.

| Returns        |                                             |
| -------------- | ------------------------------------------- |
| NSTimeInterval | Duration of current video in NSTimeInterval |

### isContentPlayerReady <a href="#iscontentplayerready" id="iscontentplayerready"></a>

```
- (BOOL) isContentPlayerReady
```

Please implement this function to notify once video content player is ready.

| Returns |                                     |
| ------- | ----------------------------------- |
| BOOL    | `true` for ready, otherwise `false` |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://intowow.gitbook.io/crystalexpress-documentation-v3-x/ios-sdk/api-reference/ceinstreamad/cecontentprogressprovider.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
