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-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.
설치
설치란bun add @capgo/capacitor-mux-playerbunx cap syncImport
__CAPGO_KEEP_0__을 가져오기import { MuxPlayer } from '@capgo/capacitor-mux-player';API 개요
API 개요play
__CAPGO_KEEP_0__fullscreen 모드에서 원시 Mux Player를 시작하고 재생을 시작합니다.
import { MuxPlayer } from '@capgo/capacitor-mux-player';
await MuxPlayer.play({} as MuxPlayOptions);dismiss
__CAPGO_KEEP_0__를 닫기__CAPGO_KEEP_0__가 표시되면 플레이어를 닫습니다.
import { MuxPlayer } from '@capgo/capacitor-mux-player';
await MuxPlayer.dismiss();isActive
__CAPGO_KEEP_0__ 활성화현재 플레이어가 표시되고 있는지 여부를 반환합니다.
import { MuxPlayer } from '@capgo/capacitor-mux-player';
await MuxPlayer.isActive();타입 참조
타입 참조MuxPlayOptions
MuxPlayOptionsexport 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
MuxPlayerEventsexport 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.tsAPI이 업스트림에서 변경될 때 다시 싱크를 실행하세요.
시작부터 계속하기
시작부터 계속하기 섹션Capgo를 사용 중이라면 시작하기 API 대시보드와 API 연산을 계획하기 위해, API를 연결하세요. capgo/capacitor-mux-player를 사용하는 @capgo/capacitor-mux-player capgo-mux-player를 사용하는 @capgo/capacitor-mux-player의 원시 기능 API 개요 API 개요의 구현 세부 사항 소개 소개의 구현 세부 사항 API 키 implementation 세부 사항은 API 키에 있습니다. 기기 implementation 세부 사항은 Devices에 있습니다.