Getting Started
このプラグインのインストール手順とフルマークダウンガイドのセットアップ用の質問をコピーしてください。
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.
インストール
「インストール」のセクションbun add @capgo/capacitor-jw-playerbunx cap syncインポート
「インポート」のセクションimport { JwPlayer } from '@capgo/capacitor-jw-player';APIの概要
「APIの概要」のセクションinitialize
initializeセクションのタイトルJW Playerを初期化する
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.initialize({} as { licenseKey: string; playerUrl?: string });play
playセクションのタイトル動画を再生する
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.play({} as { mediaUrl: string; mediaType: 'video' | 'playlist'; autostart?: boolean });pause
pauseセクションのタイトル現在再生中のメディアを一時停止する
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.pause();resume
resumeセクションのタイトル一時停止したメディアを再開する
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.resume();現在再生中のメディアを停止
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.stop();seekTo
Section titled “seekTo”現在再生中のメディアを特定の位置まで進める
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.seekTo({} as { time: number });setVolume
Section titled “setVolume”音量を設定
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.setVolume({} as { volume: number });getPosition
Section titled “getPosition”メディアの現在位置を取得
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.getPosition();getState
Section titled “getState”現在のプレイヤー状態を取得する
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.getState();setSpeed
Section titled “setSpeed”再生速度を設定する
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.setSpeed({} as { speed: number });setPlaylistIndex
Section titled “setPlaylistIndex”プレイリスト内のアイテムを指定した位置に設定する
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.setPlaylistIndex({} as { index: number });loadPlaylist
Section titled “loadPlaylist”プレイリストを読み込む
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.loadPlaylist({} as { playlistUrl: string });loadPlaylistWithItems
loadPlaylistWithItemsのセクションアイテムを含むプレイリストを読み込む
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.loadPlaylistWithItems({} as { playlist: any[] });getAudioTracks
getAudioTracksのセクション利用可能なオーディオトラックを取得
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.getAudioTracks();getCurrentAudioTrack
getCurrentAudioTrackのセクション現在のオーディオトラックを取得
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.getCurrentAudioTrack();setCurrentAudioTrack
setCurrentAudioTrackのセクション現在のオーディオトラックを設定
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.setCurrentAudioTrack({} as { index: number });getCaptions
Section titled “getCaptions”キャプション/サブタイトルが利用可能なものを取得
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.getCaptions();getCurrentCaptions
Section titled “getCurrentCaptions”現在のキャプション/サブタイトルトラックを取得
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.getCurrentCaptions();setCurrentCaptions
Section titled “setCurrentCaptions”現在のキャプション/サブタイトルトラックを設定
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.setCurrentCaptions({} as { index: number });currentPlaylist
Section titled “currentPlaylist”現在のプレイリストを取得
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.currentPlaylist();真実の源
「真実の源」このページはプラグインの src/definitions.ts上流で公開されたAPIが変更された場合に再度同期を実行してください。
Getting Startedから続けてください
「Getting Startedから続けてください」あなたが Getting Started ダッシュボードとAPIの作業を計画する場合に接続してください。 native capabilityを使用するために@capgo/capacitor-jw-player Using @capgo/capacitor-jw-player native capabilityを使用するために@API/__CAPGO_KEEP_1__-jw-playerの概要 APIの実装詳細についてはOverviewの Introduction __CAPGO_KEEP_0__の実装詳細についてはIntroductionの APIのキー APIの実装詳細についてはAPI Keys、そして Devices __CAPGO_KEEP_0__の実装詳細についてはDevicesの