> For the complete documentation index, see [llms.txt](https://docs.chartbeat.com/cbp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chartbeat.com/cbp/tracking/mobile-app-sdks/react-native-sdk/video-tracking.md).

# Video Tracking

```
Chartbeat.trackVideo({
  viewId: '/video/123',
  title: 'My Video',
  thumbnail: 'https://cdn.example.com/thumb.jpg',
  duration: 300,
  playState: 'playing',
  engagedTime: 0,
  contentTime: 0,
  playerTime: 0,
});
```

<table><thead><tr><th width="186.7109375">Name</th><th>Description</th></tr></thead><tbody><tr><td>viewId</td><td>The path of your video. This is a unique identifier that should be used consistently on all pages/platforms where the video is loaded.</td></tr><tr><td>title</td><td>The title of the video.</td></tr><tr><td>thumbnail</td><td>The thumbnail of the video.</td></tr><tr><td>duration</td><td>The duration of the video (in seconds).</td></tr><tr><td>playState</td><td>The play state, 'playing', 'paused', 'complete', 'unplayed'</td></tr><tr><td>engagedTime</td><td>The total time (in seconds) the user has actively engaged with the video up to this point.</td></tr><tr><td>contentTime</td><td>The total time (in seconds) the video content has been consumed.</td></tr><tr><td>playerTime</td><td>The current position of the video playback (in seconds).</td></tr></tbody></table>

{% code overflow="wrap" %}

```
// Periodically update as playback progresses
Chartbeat.updateVideoPlayState(
  'playing',  // playState
  300,        // duration (s)
  12,         // engagedTime (s)
  45,         // contentTime (s)
  45          // playerTime (s)
);
```

{% endcode %}
