mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-04-21 08:14:42 +01:00
Push to remote repo
This commit is contained in:
7
modules/vlc-player/src/VlcPlayer.types.ts
Normal file
7
modules/vlc-player/src/VlcPlayer.types.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export type ChangeEventPayload = {
|
||||
value: string;
|
||||
};
|
||||
|
||||
export type VlcPlayerViewProps = {
|
||||
name: string;
|
||||
};
|
||||
5
modules/vlc-player/src/VlcPlayerModule.ts
Normal file
5
modules/vlc-player/src/VlcPlayerModule.ts
Normal 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');
|
||||
13
modules/vlc-player/src/VlcPlayerModule.web.ts
Normal file
13
modules/vlc-player/src/VlcPlayerModule.web.ts
Normal 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! 👋';
|
||||
},
|
||||
};
|
||||
11
modules/vlc-player/src/VlcPlayerView.tsx
Normal file
11
modules/vlc-player/src/VlcPlayerView.tsx
Normal 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} />;
|
||||
}
|
||||
11
modules/vlc-player/src/VlcPlayerView.web.tsx
Normal file
11
modules/vlc-player/src/VlcPlayerView.web.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user