Skip to main content
Back to plugins
@capgo/capacitor-jw-player
Tutorial
@capgo/capacitor-jw-player

JW Player

Embed JW Player for professional video streaming with ads and analytics support

Guide

Tutorial on JW Player

Using @capgo/capacitor-jw-player

Playes videos from jwplayer.com.

Install

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

What This Plugin Exposes

  • initialize - Initialize the JW Player.
  • play - Play a video.
  • pause - Pause the currently playing media.
  • resume - Resume the currently paused media.

Example Usage

initialize

Initialize the JW Player.

import { JwPlayer } from '@capgo/capacitor-jw-player';

await JwPlayer.initialize({} as { licenseKey: string; playerUrl?: string });

play

Play a video.

import { JwPlayer } from '@capgo/capacitor-jw-player';

await JwPlayer.play({} as { mediaUrl: string; mediaType: 'video' | 'playlist'; autostart?: boolean });

pause

Pause the currently playing media.

import { JwPlayer } from '@capgo/capacitor-jw-player';

await JwPlayer.pause();

resume

Resume the currently paused media.

import { JwPlayer } from '@capgo/capacitor-jw-player';

await JwPlayer.resume();

Full Reference

Keep going from Using @capgo/capacitor-jw-player

If you are using Using @capgo/capacitor-jw-player to plan native plugin work, connect it with @capgo/capacitor-jw-player for the implementation detail in @capgo/capacitor-jw-player, Getting Started for the implementation detail in Getting Started, Capgo Plugin Directory for the product workflow in Capgo Plugin Directory, Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, and Adding or Updating Plugins for the implementation detail in Adding or Updating Plugins.