ページ/エリア: Capgo マーケティング ウェブサイト。役割: ショート UI ラベルまたはナビゲーション アイテム。見つける場所: コンポーネント GlobalInfrastructure.astro、ページ observe.astro。メッセージ キー `cta_start_free` (CTA Start Free)。| ページ/エリア: Capgo マーケティング ウェブサイト。役割: ショート UI ラベルまたはナビゲーション アイテム。見つける場所: コンポーネント Hero.astro、コンポーネント HowItWorks.astro。メッセージ キー `hero_cta_try_free` (Hero CTA Try Free)。
このプラグインのインストール手順とフルマークダウンガイドをコピーします。
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-mux-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/mux-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 セットアップを使用してプラグインをインストールできます。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-mux-player` plugin in my project.手動セットアップを好みますか?その場合、以下のコマンドを実行し、下記のプラットフォーム固有の手順に従ってプラグインをインストールしてください。
bun add @capgo/capacitor-mux-playerbunx cap syncImport
インポートimport { MuxPlayer } from '@capgo/capacitor-mux-player';API まとめ
APIガイドplay
「再生」Mux Playerをフルスクリーンで起動し、再生を開始します。
import { MuxPlayer } from '@capgo/capacitor-mux-player';
await MuxPlayer.play({ playbackId: 'playback-id-123' });dismiss
「閉じる」をタイトルにしたセクションプレイヤーが表示されている場合に閉じます。
import { MuxPlayer } from '@capgo/capacitor-mux-player';
await MuxPlayer.dismiss();isActive
「isActive」をタイトルにしたセクションプレイヤーが現在表示されているかどうかを返します。
import { MuxPlayer } from '@capgo/capacitor-mux-player';
const result = await MuxPlayer.isActive();console.log(result);MuxPlayOptions
「MuxPlayOptions」をタイトルにしたセクションexport interface MuxPlayOptions { /** * The playback ID of the asset you want to stream. */ playbackId: string; /** * Provide a JSON web token generated for signed playback policies. */ playbackToken?: string; /** * Provide a JSON web token generated for DRM playback policies. */ drmToken?: string; /** * Override the default Mux playback domain (e.g. `stream.example.com`). */ customDomain?: string; /** * Auto-play when the player becomes visible. Defaults to true. */ autoPlay?: boolean; /** * Start playback from the provided time (in seconds). */ startTime?: number; /** * Provide a poster image URL to display before playback begins. */ poster?: string; /** * Provide a custom title to surface in native player chrome when available. */ title?: string; /** * Provide a subtitle or description to surface in native player chrome when available. */ subtitle?: string; /** * Set to true to keep the video muted when playback starts. */ muted?: boolean; /** * Mux Data environment key used for analytics. If omitted, the SDK default is used. */ environmentKey?: string; /** * Provide an explicit player name for analytics. Defaults to a generated name. */ playerName?: string; /** * Enable smart caching when the underlying SDK supports it. */ enableSmartCache?: boolean; /** * Enable verbose logging in native SDKs where available. */ debug?: boolean;}MuxPlayerEvents
「MuxPlayerEvents」をタイトルにしたセクションexport interface MuxPlayerEvents { /** * Fired when the underlying player is ready to begin playback. */ ready: { playerName?: string }; /** * Fired when playback starts or resumes. */ play: void; /** * Fired when playback pauses. */ pause: void; /** * Fired when playback ends. */ ended: void; /** * Fired when an unrecoverable error occurs. */ error: { message: string }; /** * Fired when the fullscreen player is closed. */ playerDismissed: void;
/** * Get the native Capacitor plugin version * * @returns {Promise<{ id: string }>} an Promise with version for this device * @throws An error if the something went wrong */ getPluginVersion(): Promise<{ version: string }>;}真実の源
「真実の源」このページはプラグインの src/definitions.tsパブリック API がアップストリームで変更されたときは、再度同期を実行してください。
始めから始める
「始めから始める」Capacitor を使用している場合 始めから始める ダッシュボードと API の作業を計画するには、Capacitor を使用してください。 Capacitor を使用して @capgo/capacitor-mux-player を使用 Capacitor を使用して @capgo/capacitor-mux-player を使用して、native capability を使用します。 API API の実装詳細 Introduction 実装詳細 API キー API Keys の実装詳細、 Devices デバイス