Skip to main content
Back to plugins
@capgo/capacitor-mux-player
Tutorial
by github.com/Cap-go

Mux Player

Stream adaptive bitrate video with Mux player for optimized playback quality

Guide

Tutorial on Mux Player

Using @capgo/capacitor-mux-player

Native Mux Player SDK to play video on IOS and Android.

Install

bun add @capgo/capacitor-mux-player
bunx cap sync

What This Plugin Exposes

  • play - Launch the native Mux Player in fullscreen and begin playback.
  • dismiss - Dismiss the player if it is visible.
  • isActive - Returns whether the player is currently being displayed.

Example Usage

play

Launch the native Mux Player in fullscreen and begin playback.

import { MuxPlayer } from '@capgo/capacitor-mux-player';

await MuxPlayer.play({} as MuxPlayOptions);

dismiss

Dismiss the player if it is visible.

import { MuxPlayer } from '@capgo/capacitor-mux-player';

await MuxPlayer.dismiss();

isActive

Returns whether the player is currently being displayed.

import { MuxPlayer } from '@capgo/capacitor-mux-player';

await MuxPlayer.isActive();

Full Reference