__CAPGO_KEEP_3__

기다리지 마세요

GitHub

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-mux-player` plugin in my project.

만약 Manual Setup을 선호한다면, 다음 명령어를 실행하고 아래의 플랫폼별 지침을 따르세요.

터미널 창
bun add @capgo/capacitor-mux-player
bunx cap sync
import { MuxPlayer } from '@capgo/capacitor-mux-player';

API 개요

API 개요

__CAPGO_KEEP_0__

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();

플레이어가 현재 표시되고 있는지 여부를 반환합니다.

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

MuxPlayer이벤트
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이 업스트림에서 변경될 때 다시 싱크를 실행하세요.

Getting Started에서 계속

Getting Started에서 계속 섹션

이 플러그인을 사용하는 경우 시작하기 계획 대시보드 및 API 운영을 위해 @capgo/capacitor-Mux 플레이어 사용 Using @capgo/capacitor-mux-player API 개요 Capgo API 개요에 대한 구현 세부 정보를 참조하십시오. 소개 Capgo __CAPGO_KEEP_0__에 대한 구현 세부 정보를 참조하십시오. API 키 Capgo API 키에 대한 구현 세부 정보를 참조하십시오, 그리고 장치 Capgo __CAPGO_KEEP_0__에 대한 구현 세부 정보를 참조하십시오.