Inizia
Copia una richiesta di configurazione con i passaggi di installazione e la guida markdown completa per questo plugin.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-jw-player`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/jw-player/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
Installa
Sezione intitolata “Installa”bun add @capgo/capacitor-jw-playerbunx cap syncImporta
Sezione intitolata “Importa”import { JwPlayer } from '@capgo/capacitor-jw-player';API Panoramica
Sezione intitolata “API Panoramica”initialize
Sezione intitolata “Inizializza”Inizializza il JW Player
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.initialize({} as { licenseKey: string; playerUrl?: string });Gioca un video
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.play({} as { mediaUrl: string; mediaType: 'video' | 'playlist'; autostart?: boolean });Pausa i media in corso
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.pause();Riprendi i media attualmente sospesi
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.resume();Ferma i media attualmente in riproduzione
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.stop();Scegli una posizione specifica nei media attualmente in riproduzione
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.seekTo({} as { time: number });setVolume
Sezione intitolata “imposta volume”Imposta il livello di volume
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.setVolume({} as { volume: number });getPosition
Sezione intitolata “getPosition”Ottieni la posizione corrente nel media
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.getPosition();getState
Sezione intitolata “getState”Ottieni lo stato del lettore corrente
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.getState();setSpeed
Sezione intitolata “setSpeed”Imposta la velocità di riproduzione
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.setSpeed({} as { speed: number });setPlaylistIndex
Sezione intitolata “setPlaylistIndex”Imposta l'elemento corrente nella playlist tramite indice
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.setPlaylistIndex({} as { index: number });loadPlaylist
Sezione intitolata “caricaPlaylist”Carica una playlist
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.loadPlaylist({} as { playlistUrl: string });loadPlaylistWithItems
Sezione intitolata “caricaPlaylistConElementi”Carica una playlist con elementi
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.loadPlaylistWithItems({} as { playlist: any[] });getAudioTracks
Sezione intitolata “ottenereTracceAudio”Ottenere le tracce audio disponibili
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.getAudioTracks();getCurrentAudioTrack
Sezione intitolata “ottenereTracciaAudioCorrente”Ottenere la traccia audio corrente
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.getCurrentAudioTrack();setCurrentAudioTrack
Sezione intitolata “setCurrentAudioTrack”Imposta il tracciato audio corrente
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.setCurrentAudioTrack({} as { index: number });getCaptions
Sezione intitolata “getCaptions”Ottenere le disponibili didascalie/sottotitoli
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.getCaptions();getCurrentCaptions
Sezione intitolata “getCurrentCaptions”Ottenere il tracciato corrente di didascalie/sottotitoli
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.getCurrentCaptions();setCurrentCaptions
Sezione intitolata “setCurrentCaptions”Imposta il tracciato corrente di didascalie/sottotitoli
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.setCurrentCaptions({} as { index: number });currentPlaylist
Sezione intitolata “currentPlaylist”Ottieni l'elenco musicale corrente
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.currentPlaylist();Fonte di Verità
Sezione intitolata “Fonte di Verità”Questa pagina è generata dal plugin e src/definitions.tsRiepiloga la sincronizzazione quando le informazioni pubbliche API cambiano nell'area upstream.