JW Player __CAPGO_KEEP_0__ リポジトリ
インストール手順とフルマークダウンガイドのセットアッププロンプトをコピーしてください。
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.
インストール
「インストール」というセクションAI-Assisted Setupを使用してプラグインをインストールできます。AIツールにCapgoスキルを追加するには、以下のコマンドを使用してください。
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins次に、以下のプロンプトを使用してください。
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-jw-player` plugin in my project.__CAPGO_KEEP_0__の場合、以下のコマンドを実行してプラグインをインストールし、下記のプラットフォーム固有の説明を参照してください。
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 });動画を再生する
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.play({} as { mediaUrl: string; mediaType: 'video' | 'playlist'; autostart?: boolean });現在再生中のメディアを一時停止する
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.pause();resume
Section titled “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
Section titled “loadPlaylistWithItems”アイテムを含むプレイリストを読み込む
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.loadPlaylistWithItems({} as { playlist: any[] });getAudioTracks
Section titled “getAudioTracks”利用可能なオーディオトラックを取得
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.getAudioTracks();getCurrentAudioTrack
Section titled “getCurrentAudioTrack”現在のオーディオトラックを取得
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.getCurrentAudioTrack();setCurrentAudioTrack
Section titled “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();ソース オブ トゥルース
Section titled “Source Of Truth”このページはプラグインから生成されています src/definitions.ts. upstream の API が変更されたときに再度 sync を実行してください。
Getting Started から続けてください。
Getting Started から続けてください。あなたが使用している場合 Getting Started ダッシュボードと API の作業を計画する場合に接続してください。 @capgo/capacitor-jw-player を使用 Using @capgo/capacitor-jw-player のネイティブ機能について API Overview API Overview の実装詳細について Introduction Introduction の実装詳細について API キー API キーとその実装詳細のための デバイス デバイスの実装詳細のための