Type: enum<int>

View Source

Identifies the type of media by a number and can contain one of these possible values:

  • 0 - NONE, no media has been loaded.

  • 1 - The media is an AUDIO track.

  • 2 - The media is a VIDEO.


import { MediaType } from '@vime-js/standard'
let isAudio = (player.mediaType === MediaType.AUDIO);

You don't need to do this because we've done it for you.

const isAudio = player.isAudio;