All Projects → vinayakkulkarni → v-clappr

vinayakkulkarni / v-clappr

Licence: MIT license
👏🏻Vue.js wrapper for Clappr media player

Programming Languages

Vue
7211 projects
typescript
32286 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to v-clappr

Vue Video Player
🎞 @videojs component for @vuejs
Stars: ✭ 4,026 (+22266.67%)
Mutual labels:  video-player, vue2, vue-component
Vue Marquee Text Component
[CSS GPU Animation] Marquee Text for vuejs
Stars: ✭ 226 (+1155.56%)
Mutual labels:  vue2, vue-component
Vue Codemirror
⌨️ @codemirror component for @vuejs
Stars: ✭ 2,115 (+11650%)
Mutual labels:  vue2, vue-component
Vue Form Json Schema
Create forms using JSON schema. Bring your components!
Stars: ✭ 253 (+1305.56%)
Mutual labels:  vue2, vue-component
Vue Truncate Collapsed
A simple component that truncates your text and adds a 'Read More/Show Less' clickable.
Stars: ✭ 98 (+444.44%)
Mutual labels:  vue2, vue-component
Vue Online
A reactive offline indicator component for vue.js
Stars: ✭ 130 (+622.22%)
Mutual labels:  vue2, vue-component
Vue Trix
Trix text editor component for Vue.js
Stars: ✭ 159 (+783.33%)
Mutual labels:  vue2, vue-component
vue-pattern-input
Use RegExp to limit input
Stars: ✭ 25 (+38.89%)
Mutual labels:  vue2, vue-component
vue-drag-zone
Drag Zone component for @vuejs
Stars: ✭ 127 (+605.56%)
Mutual labels:  vue2, vue-component
vue-collapse
A simple collapse component for Vue.js
Stars: ✭ 34 (+88.89%)
Mutual labels:  vue2, vue-component
Vue Toastr
Vuejs Toast : Plugin and Component Capability.
Stars: ✭ 93 (+416.67%)
Mutual labels:  vue2, vue-component
clappr-stats
A clappr plugin to report playback statuses (timers: session, buffering, watch and counters: play, pause, error, fps)
Stars: ✭ 40 (+122.22%)
Mutual labels:  video-player, clappr-player
Xcui
🍴 A Vue.js 2.x desktop components colletion
Stars: ✭ 88 (+388.89%)
Mutual labels:  vue2, vue-component
Vue Awesome Swiper
🏆 Swiper component for @vuejs
Stars: ✭ 12,072 (+66966.67%)
Mutual labels:  vue2, vue-component
Diagram Vue
A editable SVG-based diagram component for Vue
Stars: ✭ 86 (+377.78%)
Mutual labels:  vue2, vue-component
Vue Particles
Vue.js component for particles backgrounds ✨
Stars: ✭ 1,220 (+6677.78%)
Mutual labels:  vue2, vue-component
Vue Typer
Vue component that simulates a user typing, selecting, and erasing text.
Stars: ✭ 691 (+3738.89%)
Mutual labels:  vue2, vue-component
Vue Quill Editor
🍡@quilljs editor component for @vuejs
Stars: ✭ 6,874 (+38088.89%)
Mutual labels:  vue2, vue-component
Clappr
🎬 An extensible media player for the web.
Stars: ✭ 5,436 (+30100%)
Mutual labels:  video-player, clappr
clappr-core
Core components of the Clappr player architecture
Stars: ✭ 41 (+127.78%)
Mutual labels:  video-player, clappr

V-Clappr 🎥

GitHub Workflow Status GitHub Workflow Status GitHub release (latest SemVer) npm npm npm bundle size (version) npm type definitions DeepScan grade Snyk Vulnerabilities for GitHub Repo LGTM Alerts LGTM Grade GitHub contributors FOSSA

eslint prettier rollup vue typescript


Features

  • Built with latest @clappr/core
  • Built from scratch using TypeScript
  • For Vue 2.x version – npm i v-clappr@2
  • For Vue 3.x version – npm i v-clappr@3

Demo

Edit VClappr Demo


Table of Contents

Requirements

Build Setup

# install dependencies
$ npm ci

# package the library
$ npm run build

Installation

$ npm install v-clappr --save
$ npm install @clappr/core @clappr/plugins @clappr/hlsjs-playback dash-shaka-playback --save
$ npm install @vue/composition-api --save-dev

CDN: UNPKG | jsDelivr (available as window.VClappr)

Usage

Globally

As a component

import { VClappr } from 'v-clappr';
Vue.component('VClappr', VClappr);

As a plugin

import VClappr from 'v-clappr';
Vue.use(VClappr);

Locally

As a component

import { VClappr } from 'v-clappr';

Example(s)

Example 1 (w/ all options – refer App.vue)

HTML

  <v-clappr
    el="player"
    :source="source"
    :options="options"
    @init="oninit"
    @ready="onready"
    @play="onplay"
    @pause="onpause"
    @stop="onstop"
    @ended="onended"
    @fullscreen="onfullscreen"
    @resize="onresize"
    @seek="onseek"
    @timeupdate="ontimeupdate"
    @volumeupdate="onvolumeupdate"
    @error="onerror"
  />

JS

import { VClappr } from 'v-clappr';

Vue.component('example-component', {
  components: {
    VClappr,
  },
  data: () => ({
    source:'https://your.site/yourfile.mp4',
    options: {
      width: '100%',
      height: '100%',
      autoPlay: false,
      mute: false,
      loop: false,
      language: 'en-US',
      playbackNotSupportedMessage: 'Playback not supported',
      autoSeekFromUrl: true,
      includeResetStyle: true,
      playback: {
        preload: 'metadata',
        disableContextMenu: true,
        controls: false,
        crossOrigin: null,
        playInline: false,
        minimumDvrSize: null,
        externalTracks: [],
        hlsjsConfig: {},
        shakaConfiguration: {},
      },
      poster: 'https://picsum.photos/3840/2160',
    },
    clappr: null,
  }),
  methods: {
    oninit(clappr) {
      this.clappr = clappr;
    },
    onready(event) {
      console.log('inside hook: onready', event);
    },
    onplay(event) {
      console.log('inside hook: onplay', event);
    },
    onpause(event) {
      console.log('inside hook: onpause', event);
    },
    onstop(event) {
      console.log('inside hook: onstop', event);
    },
    onended(event) {
      console.log('inside hook: onended', event);
    },
    onfullscreen(isBool) {
      console.log('player fullscreen?', isBool);
    },
    onresize(resize) {
      console.log('Resized object', resize);
    },
    onseek(time) {
      console.log('on seek, time in seconds:', time);
    },
    ontimeupdate(progress) {
      console.log('Progress of played video:', progress);
    },
    onvolumeupdate(volume) {
      console.log('Volume updated, current volume:', volume);
    },
    onerror(e) {
      console.log('le error:', e);
    },
  },
});
Example 2 (minimal)

HTML

  <v-clappr
    el="mycustomid"
    :source="source"
  />

JS

import { VClappr } from 'v-clappr';

Vue.component('example-component', {
  components: {
    VClappr,
  },
  data: () => ({
    source:'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4',
  }),
});

API

Props

Name Type Required? Description
el String Yes The id required for initializing Clappr
source String Yes The URL of the video to be fed to Clappr
options Object No Set of options provided by Clappr defaults: L47-L69

Events

Name Description
ready Emits an Object the Player instance
resize Emits an Object with width & height numbers
play Emits an Boolean value
pause Emits an Boolean value
stop Emits an Boolean value
ended Emits an Boolean value
seek Emits an Number value
error Emits an Error type
time-updated Emits an Object current & total time in microseconds
volume-updated Emits an Number with current volume
subtitle-available Emits an Boolean value

Contributing

  1. Fork it ( https://github.com/vinayakkulkarni/v-clappr/fork )
  2. Create your feature branch (git checkout -b feat/new-feature)
  3. Commit your changes (git commit -Sam 'feat: add feature')
  4. Push to the branch (git push origin feat/new-feature)
  5. Create a new Pull Request

Note:

  1. Please contribute using GitHub Flow
  2. Commits & PRs will be allowed only if the commit messages & PR titles follow the conventional commit standard, read more about it here
  3. PS. Ensure your commits are signed. Read why

Author

v-clappr © Vinayak, Released under the MIT License.
Authored and maintained by Vinayak Kulkarni with help from contributors (list).

vinayakkulkarni.dev · GitHub @vinayakkulkarni · Twitter @_vinayak_k

License

FOSSA Status

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].