https://github.com/numbersprotocol/preview-video
https://github.com/numbersprotocol/preview-video
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/numbersprotocol/preview-video
- Owner: numbersprotocol
- Created: 2022-03-01T05:55:12.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-06-27T06:46:23.000Z (almost 3 years ago)
- Last Synced: 2024-12-27T23:42:29.272Z (over 1 year ago)
- Language: Kotlin
- Size: 366 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# @numbersprotocol/preview-video
Preview Video using native iOS, Android players
## Install
```bash
npm install @numbersprotocol/preview-video
npx cap sync
```
## API
* [`echo(...)`](#echo)
* [`create(...)`](#create)
* [`destroy(...)`](#destroy)
* [`onScroll(...)`](#onscroll)
* [Interfaces](#interfaces)
### echo(...)
```typescript
echo(options: { value: string; }) => Promise<{ value: string; }>
```
| Param | Type |
| ------------- | ------------------------------- |
| **`options`** | { value: string; } |
**Returns:** Promise<{ value: string; }>
--------------------
### create(...)
```typescript
create(_args: CreatePreviewVideoArgs) => Promise
```
| Param | Type |
| ----------- | ------------------------------------------------------------------------- |
| **`_args`** | CreatePreviewVideoArgs |
**Returns:** Promise<any>
--------------------
### destroy(...)
```typescript
destroy(_args: DestroyPreviewVideoArgs) => Promise
```
| Param | Type |
| ----------- | --------------------------------------------------------------------------- |
| **`_args`** | DestroyPreviewVideoArgs |
**Returns:** Promise<any>
--------------------
### onScroll(...)
```typescript
onScroll(args: OnScrollArgs) => Promise
```
| Param | Type |
| ---------- | ----------------------------------------------------- |
| **`args`** | OnScrollArgs |
--------------------
### Interfaces
#### CreatePreviewVideoArgs
| Prop | Type |
| ------------- | ----------------------------------------------------------------- |
| **`id`** | string |
| **`src`** | string |
| **`element`** | HTMLElement |
| **`config`** | PreviewVideoConfig |
#### PreviewVideoConfig
| Prop | Type | Description |
| ------------ | ------------------- | --------------------------------------------------------------- |
| **`width`** | number | Override width for native Video Player |
| **`height`** | number | Override height for native Video Player |
| **`x`** | number | Override absolute x coordinate position for native Video Player |
| **`y`** | number | Override absolute y coordinate position for native Video Player |
#### DestroyPreviewVideoArgs
| Prop | Type |
| -------- | ------------------- |
| **`id`** | string |
#### OnScrollArgs
| Prop | Type |
| ------------------------ | --------------------------------------------------------------------- |
| **`id`** | string |
| **`previewVideoBounds`** | { x: number; y: number; width: number; height: number; } |