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.
インストール
InstallYou can use our AI-Assisted Setup to install the plugin. Add the Capgo skills to your AI tool using the following command:
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.コピー
bun add @capgo/capacitor-jw-playerbunx cap syncコピー
インポートimport { JwPlayer } from '@capgo/capacitor-jw-player';API オーバービュー
API オーバービューのセクションinitialize
initializeのセクションJW プレーヤーを初期化する
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();stop
一時停止現在再生中のメディアを一時停止
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.stop();seekTo
一時停止現在再生中のメディアの特定の位置に進む
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.seekTo({} as { time: number });setVolume
一時停止音量を設定
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.setVolume({} as { volume: number });getPosition
現在の位置を取得現在のメディアの位置を取得する
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.getPosition();getState
getStateのセクション現在のプレイヤーの状態を取得する
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.getState();setSpeed
setSpeedのセクション再生速度を設定する
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.setSpeed({} as { speed: number });setPlaylistIndex
setPlaylistIndexのセクションプレイリストの現在のアイテムを指定されたインデックスで設定する
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.setPlaylistIndex({} as { index: number });loadPlaylist
loadPlaylistのセクションLoad a playlist
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.loadPlaylist({} as { playlistUrl: string });loadPlaylistWithItems
Section titled “loadPlaylistWithItems”Load a playlist with items
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.loadPlaylistWithItems({} as { playlist: any[] });getAudioTracks
Section titled “getAudioTracks”Get available audio tracks
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.getAudioTracks();getCurrentAudioTrack
Section titled “getCurrentAudioTrack”Get the current audio track
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
キャプションを取得する利用可能なキャプション/字幕を取得
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.getCaptions();getCurrentCaptions
現在のキャプション/字幕トラックを取得コピー
import { JwPlayer } from '@capgo/capacitor-jw-player';
await JwPlayer.getCurrentCaptions();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」から続けてくださいCapgo を使用している場合 「Getting Started」から続けてください ダッシュボードと API のオペレーションを計画するには、Capgo を接続してください。 Capgo の @capgo/capacitor-jw-player を使用 @capgo/capacitor-jw-playerのネイティブ機能について APIの概要 @APIの概要の実装詳細について 導入 導入の実装詳細について @APIのキー @APIのキーに関する実装詳細、そして デバイス デバイスの実装詳細について