import { type Player, type PlayerPlugin, type Source } from '@oplayer/core'; import type Webtorrent from 'webtorrent'; export type PluginOptions = { config?: Record; matcher?: (src: Source) => boolean; /** * https://cdn.jsdelivr.net/npm/webtorrent@0.98.18/webtorrent.min.js */ library?: string; }; declare class TorrentPlugin implements PlayerPlugin { options: PluginOptions; key: string; name: string; version: any; static defaultMatcher: PluginOptions['matcher']; static library: Webtorrent.WebTorrent; player: Player; instance: Webtorrent.Instance; constructor(options: PluginOptions); apply(player: Player): this; load({ $video }: Player, source: Source): Promise; unload(): Promise; destroy(): Promise; } export default function create(options?: PluginOptions): TorrentPlugin; export {}; //# sourceMappingURL=index.d.ts.map