# videoplayer-vuejs

> This package is a video player for ([vue 3](https://vuejs.org/)).

Latest version **0.0.4** (published 2023-03-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install videoplayer-vuejs
pnpm add videoplayer-vuejs
yarn add videoplayer-vuejs
bun add videoplayer-vuejs
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2023-03-18 |
| First published | 2023-03-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 89 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Mohamed ElSohagy |
| Maintainers | moelsohagy |
| Keywords | Video, Player |

## Links

- npm: https://www.npmjs.com/package/videoplayer-vuejs
- Repository: https://github.com/moelsohagy/videoplayer-vuejs
- Homepage: https://github.com/moelsohagy/videoplayer-vuejs#readme
- Issues: https://github.com/moelsohagy/videoplayer-vuejs/issues
- npm.io page: https://npm.io/package/videoplayer-vuejs

## Dependencies (1)

- [vue](https://npm.io/package/vue.md) ^3.2.45

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.0.4 (latest) — 2023-03-18
- 0.0.3 — 2023-03-12
- 0.0.2 — 2023-03-12

## README

# videoplayer-vuejs

This package is a video player for vue js.

⚠️ Now when you are using ([vue 3.x](https://vuejs.org/)).

---

## install

the `videoplayer-vuejs` component can use in your Vue.js app.

```bash
npm install videoplayer-vuejs
```

---

## Usage

main.js

```javascript
import { createApp } from 'vue'
import App from './App.vue'
import VideoplayerVuejs from 'videoplayer-vuejs'
import 'videoplayer-vuejs/dist/style.css'

const app = createApp(App)
app.use(VideoplayerVuejs)
app.mount('#app')
```

your-component.vue for example `App.vue` (`Options API`)

```javascript
<template>
  <VideoplayerVuejs :sources="videoSource" :poster="poster" />
</template>

<script>
export default {
  data() {
    return {
      videoSource: [
        { resolution: '240', src: 'https://example.com/videos/video-240.mp4', type: 'video/mp4' },
        { resolution: '360', src: 'https://example.com/videos/video-360.mp4', type: 'video/mp4' },
        { resolution: '480p', src: 'https://example.com/videos/video-480p.mp4', type: 'video/mp4' },
        { resolution: '720p', src: 'https://example.com/videos/video-720p.mp4', type: 'video/mp4' },
        { resolution: '1080p', src: 'https://example.com/videos/video-1080p.mp4', type: 'video/mp4' },
      ],
      poster: "https://example.com/images/poster.png",
    }
  },
}
</script>
```

your-component.vue for example `App.vue` (`script setup`)

```javascript
<template>
  <VideoplayerVuejs :sources="videoSource" :poster="poster" />
</template>

<script setup>
const videoSource = [
  { resolution: '240', src: 'https://example.com/videos/video-240.mp4', type: 'video/mp4' },
  { resolution: '360', src: 'https://example.com/videos/video-360.mp4', type: 'video/mp4' },
  { resolution: '480p', src: 'https://example.com/videos/video-480p.mp4', type: 'video/mp4' },
  { resolution: '720p', src: 'https://example.com/videos/video-720p.mp4', type: 'video/mp4' },
  { resolution: '1080p', src: 'https://example.com/videos/video-1080p.mp4', type: 'video/mp4' },
]
const poster = "https://example.com/images/poster.png"
</script>
```

---

## Props

prop | description | type| default
:-------: | -------  |  :-------:  |  :-------:
poster | The poster specifies an image to be shown until the user play the video  | String | ''
sources | Array of objects of video sources, each object is for quality | Array | []

## Obeject of `'sources'` prop

key | description | type| default
:-------: | -------  |  :-------:  |  :-------:
resolution | string that shown for user to select resolution  | String | ''
src | video url  | String | ''
type | Media Type for example `video/mp4` - `video/webm` - `video/ogg` | String | 'video/mp4'

---
---

### Developd by [Mohamed ElSohagy](https://github.com/moelsohagy)

---
_Source: https://npm.io/package/videoplayer-vuejs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
