Push to remote repo

This commit is contained in:
Alex Kim
2024-10-10 23:40:01 +11:00
parent ef7fbc985f
commit 8be1e2df0c
26 changed files with 266 additions and 47 deletions

View File

@@ -0,0 +1,26 @@
import { NativeModulesProxy, EventEmitter, Subscription } from 'expo-modules-core';
// Import the native module. On web, it will be resolved to VlcPlayer.web.ts
// and on native platforms to VlcPlayer.ts
import VlcPlayerModule from './src/VlcPlayerModule';
import VlcPlayerView from './src/VlcPlayerView';
import { ChangeEventPayload, VlcPlayerViewProps } from './src/VlcPlayer.types';
// Get the native constant value.
export const PI = VlcPlayerModule.PI;
export function hello(): string {
return VlcPlayerModule.hello();
}
export async function setValueAsync(value: string) {
return await VlcPlayerModule.setValueAsync(value);
}
const emitter = new EventEmitter(VlcPlayerModule ?? NativeModulesProxy.VlcPlayer);
export function addChangeListener(listener: (event: ChangeEventPayload) => void): Subscription {
return emitter.addListener<ChangeEventPayload>('onChange', listener);
}
export { VlcPlayerView, VlcPlayerViewProps, ChangeEventPayload };