Iniziare
Copia un prompt 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.
Installazione
Sezione intitolata “Installazione”bun add @capgo/capacitor-jw-playerbunx cap syncImportazione
Sezione intitolata “Importazione”import { JwPlayer } from '@capgo/capacitor-jw-player';API Panoramica
Sezione intitolata “API Panoramica”initialize
Sezione intitolata “inizializza”Inizia 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 });Ferma il media in corso
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.pause();Ripristina il media sospeso
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.resume();Ferma la media in corso di riproduzione
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.stop();Cerca una posizione specifica nella media in corso di riproduzione
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.seekTo({} as { time: number });setVolume
Sezione intitolata “impostaVolume”Imposta il livello di volume
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.setVolume({} as { volume: number });getPosition
Sezione intitolata “ottieniPosizione”Ottieni la posizione corrente della media
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.getPosition();getState
Sezione intitolata “getState”Ottieni lo stato attuale del giocatore
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 “loadPlaylist”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 “impostaTracciaAudioCorrente”Imposta la traccia audio corrente
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.setCurrentAudioTrack({} as { index: number });getCaptions
Sezione intitolata “getCaptions”Ottieni le disponibili didascalie/sottotitoli
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.getCaptions();getCurrentCaptions
Sezione intitolata “getCurrentCaptions”Ottieni il tracciato di didascalie/sottotitoli corrente
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.getCurrentCaptions();setCurrentCaptions
Sezione intitolata “setCurrentCaptions”Imposta il tracciato di didascalie/sottotitoli corrente
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.setCurrentCaptions({} as { index: number });currentPlaylist
Sezione intitolata “currentPlaylist”Ottieni la playlist corrente
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.currentPlaylist();Fonte di Verità
Sezione intitolata “Fonte di Verità”Questa pagina è generata dal plugin’s src/definitions.ts. Riavvia la sincronizzazione quando il pubblico API cambia upstream.
Continua da Inizia con l'installazione
Sezione intitolata “Continua da Inizia con l'installazione”Se stai utilizzando Inizia con l'installazione per pianificare il dashboard e le API operazioni, connettilo con Utilizza @capgo/capacitor-jw-player per la capacità nativa in Utilizza @capgo/capacitor-jw-player, API Overview per i dettagli di implementazione in API Overview, Introduzione per i dettagli di implementazione in Introduzione, API Chiavi per i dettagli di implementazione in API Chiavi, e Dispositivi per i dettagli di implementazione in Dispositivi.