[**CameraKit Web SDK v1.15.0**](../README.md)

***

[CameraKit Web SDK](../globals.md) / createVideoSource

# Function: createVideoSource()

> **createVideoSource**(`video`, `options`): [`CameraKitSource`](../classes/CameraKitSource.md)

Create a [CameraKitSource](../classes/CameraKitSource.md) from an
[HTMLVideoElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement).

## Parameters

### video

`HTMLVideoElement`

CameraKit performs best when the source video is 720p – arbitrary resolutions are supported, but very
high resolutions may not perform well.

### options

`Partial`\<[`VideoSourceOptions`](../interfaces/VideoSourceOptions.md)\> = `{}`

Options.

## Returns

[`CameraKitSource`](../classes/CameraKitSource.md)
