# 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/efc9536feda21bc17c50370f5e35fd8d8d88843a/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)>

This function returns an [VideoSprite](/jsdoc/pixi-vn/index/classes/VideoSprite) that you can use to manipulate the component.

## Throws [#throws]

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

## Example [#example]

```ts
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")
```
