# Function: showVideo() (/jsdoc/pixi-vn/index/functions/showVideo)



\> **showVideo**(`alias`, `videoUrl?`, `options?`): `Promise`\<[`VideoSprite`](/jsdoc/pixi-vn/index/classes/VideoSprite)>

Defined in: [src/canvas/functions/video-utility.ts:69](https://github.com/DRincs-Productions/pixi-vn/blob/998c1a75c5978f24c0dc137af5f42b90b2803967/src/canvas/functions/video-utility.ts#L69)

Add and show a video in the canvas. This function is a combination of [addVideo](/jsdoc/pixi-vn/index/functions/addVideo).

Parameters [#parameters]

alias [#alias]

`string`

The unique alias of the video. You can use this alias to refer to this video

videoUrl? [#videourl]

`string`

The url of the video.

options? [#options]

[`VideoSpriteOptions`](/jsdoc/pixi-vn/index/interfaces/VideoSpriteOptions)

The options of the video.

Returns [#returns]

`Promise`\<[`VideoSprite`](/jsdoc/pixi-vn/index/classes/VideoSprite)>

A promise that is resolved when the video is loaded.

Throws [#throws]

when `videoUrl` is not provided and `alias` is not registered in the asset cache.

Example [#example]

```typescript
let video1 = showVideo("video1", "https://pixijs.com/assets/video1.mp4")
Assets.add({ alias: "video2", src: "https://pixijs.com/assets/video2.png" })
let video2 = showVideo("video2")
```
