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,7 @@
export type ChangeEventPayload = {
value: string;
};
export type VlcPlayerViewProps = {
name: string;
};

View File

@@ -0,0 +1,5 @@
import { requireNativeModule } from 'expo-modules-core';
// It loads the native module object from the JSI or falls back to
// the bridge module (from NativeModulesProxy) if the remote debugger is on.
export default requireNativeModule('VlcPlayer');

View File

@@ -0,0 +1,13 @@
import { EventEmitter } from 'expo-modules-core';
const emitter = new EventEmitter({} as any);
export default {
PI: Math.PI,
async setValueAsync(value: string): Promise<void> {
emitter.emit('onChange', { value });
},
hello() {
return 'Hello world! 👋';
},
};

View File

@@ -0,0 +1,11 @@
import { requireNativeViewManager } from 'expo-modules-core';
import * as React from 'react';
import { VlcPlayerViewProps } from './VlcPlayer.types';
const NativeView: React.ComponentType<VlcPlayerViewProps> =
requireNativeViewManager('VlcPlayer');
export default function VlcPlayerView(props: VlcPlayerViewProps) {
return <NativeView {...props} />;
}

View File

@@ -0,0 +1,11 @@
import * as React from 'react';
import { VlcPlayerViewProps } from './VlcPlayer.types';
export default function VlcPlayerView(props: VlcPlayerViewProps) {
return (
<div>
<span>{props.name}</span>
</div>
);
}