はじめに
このプラグインのインストール手順とフルマークダウンガイドを含むセットアップの質問をコピーします。
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アシスタントセットアップを使用してプラグインをインストールできます。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.Manualセットアップを使用する場合は、以下のコマンドを実行してプラグインをインストールし、以下のプラットフォーム固有の指示に従ってください。
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
Section titled “再生”再生中停止したメディアを再開する
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.resume();再生中のメディアを停止する
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.stop();seekTo
Section titled “位置に進む”再生中のメディアを特定の位置に進む
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.seekTo({} as { time: number });setVolume
Section titled “音量を設定”音量のレベルを設定する
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.setVolume({} as { volume: number });getPosition
Section titled “位置を取得”メディアの現在位置を取得する
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.getPosition();getState
Section titled “現在の状態を取得”プレイヤーの現在の状態を取得する
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.getState();setSpeed
Section titled “再生速度を設定”再生速度を設定する
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.setSpeed({} as { speed: number });setPlaylistIndex
Section titled “プレイリストの現在位置を設定”プレイリストの現在のアイテムを指定されたインデックスで設定する
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
現在のプレイリスト現在のプレイリストを取得
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.currentPlaylist();真実の源
真実の源このページはプラグインの src/definitions.tsパブリック API がアップストリームで変更されたときに、再度同期を実行してください。
続けて、Getting Started
続けて、Getting Startedあなたが Getting Started ダッシュボードと API のオペレーションを計画するために使用している場合、 使用@capgo/capacitor-jw-player native機能のための@capgo/capacitor-jw-player APIの概要 APIの実装詳細 導入 __CAPGO_KEEP_0__のキー APIの実装詳細 for the implementation detail in API Keys, and ページを編集 前のページ