All Projects → vinayakkulkarni → v-pip

vinayakkulkarni / v-pip

Licence: MIT License
🖼 Tiny vue wrapper for supporting native picture-in-picture mode.

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-pip

v-intl
Add i18n to your awesome Vue 3 app 🔉
Stars: ✭ 13 (-56.67%)
Mutual labels:  vue-components, vue2, vue3, composition-api
hoc-element-table
📦 A Vue 3.x Table Component built on Webpack 5
Stars: ✭ 26 (-13.33%)
Mutual labels:  vue-components, vue2, vue3
vue3-demo
💡 vue3新特性示例: 响应式API、组合式API、TodoMVC
Stars: ✭ 114 (+280%)
Mutual labels:  vue3, vue3-demo, composition-api
vue-unstated
A tiny state management library for Vue Composition API.
Stars: ✭ 30 (+0%)
Mutual labels:  vue2, vue3, composition-api
Vue3 News
🔥 Find the latest breaking Vue3、Vue CLI 3+ & Vite News. (2021)
Stars: ✭ 2,416 (+7953.33%)
Mutual labels:  vue-components, vue3, composition-api
2019-ncov-vue3-version
新型冠状病毒实时疫情 Vue-Compostion-Api版本 (Vue3 + TypeScript)
Stars: ✭ 55 (+83.33%)
Mutual labels:  vue3, vue3-demo, composition-api
vue3-docs
vue中文社区,vue3 中文文档
Stars: ✭ 180 (+500%)
Mutual labels:  vue-components, vue3, vue3-demo
vue-snippets
Visual Studio Code Syntax Highlighting For Vue3 And Vue2
Stars: ✭ 25 (-16.67%)
Mutual labels:  vue2, vue3, composition-api
fluent-vue
Internationalization plugin for Vue.js
Stars: ✭ 137 (+356.67%)
Mutual labels:  vue2, vue3
janak
Your next vue.js package!
Stars: ✭ 26 (-13.33%)
Mutual labels:  vue2, vue3
vue-flag-icon
a vue compoment for flag-icon-css
Stars: ✭ 64 (+113.33%)
Mutual labels:  vue-components, vue2
vue-split-carousel
a carousel component for vue, meanwhile display several carousel item
Stars: ✭ 37 (+23.33%)
Mutual labels:  vue2, vue3
g2plot-vue
g2plot for vue, both 2 and 3
Stars: ✭ 106 (+253.33%)
Mutual labels:  vue2, vue3
v-page
A simple pagination bar, including length Menu, i18n support, based on Vue2.x
Stars: ✭ 85 (+183.33%)
Mutual labels:  vue-components, vue2
slider
Vue 3 slider component with multihandles, tooltips merging and formatting (+Tailwind CSS support).
Stars: ✭ 162 (+440%)
Mutual labels:  vue2, vue3
vue-next-rx
RxJS integration for Vue next
Stars: ✭ 31 (+3.33%)
Mutual labels:  vue3, composition-api
seal-vue
本项目为 https://github.com/hequan2017/seal 项目 前端vue版本 基于 iview-admin 2.5.0 支持 动态菜单 本项目已停止开发!因长时间未对代码进行维护,可能会造成项目在不同环境上无法部署、运行BUG等问题,请知晓!项目仅供参考!
Stars: ✭ 16 (-46.67%)
Mutual labels:  vue3, vue3-demo
vuestic-ui
Free and Open Source UI Library for Vue 3 🤘
Stars: ✭ 1,501 (+4903.33%)
Mutual labels:  vue-components, vue3
security-code
A powerful security code input supports dynamic configuration of the number of input boxes.
Stars: ✭ 63 (+110%)
Mutual labels:  vue2, vue3
vue2-timeago
🙌 A vue component used to format date with time ago statement. 💬
Stars: ✭ 76 (+153.33%)
Mutual labels:  vue-components, vue3

V-Pip 🖼

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

built using janak eslint prettier rollup vue typescript


Features

  • Vue 💚 Picture-in-picture!
  • Built using TypeScript

Versions

  • For Vue 3.x version – npm i v-pip@2
  • For Vue 2.x version – npm i v-pip@1

Table of Contents

Demo

Edit v-pip demo

Requirements

Installation

npm install v-pip # yarn add v-pip

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

Build Setup

# install dependencies
$ npm ci

# package the library
$ npm run build

Usage

Globally

As a component

import { VPip } from 'v-pip';
Vue.component('VPip', VPip);

As a plugin

import Vue from 'vue';
import VPip from 'v-pip';

Vue.use(VPip);

Locally

import { VPip } from 'v-pip';
Example 1 (refer App.vue)

HTML

  <v-pip
    :video-options="videoOptions"
    :button-options="buttonOptions"
    @video-in-pip="handlePIP"
    @requesting-pip-failure="handlePipOpenFailure"
    @exiting-pip-failure="handlePipExitFailure"
  />

JS

import { VPip } from 'v-pip';

Vue.component('example-component', {
  components: {
    VPip,
  },
  data: () => ({
    isPip: false,
    videoOptions: {
      wrapper: '',
      src: 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4',
      poster: 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/images/BigBuckBunny.jpg',
    },
    buttonOptions: {
      wrapper: '',
      type: 'button',
      class: '',
      label: 'Toggle picture-in-picture',
    },
  }),
  methods: {
    handlePIP(e) {
      this.isPip = e;
    },
    handlePipOpenFailure(err) {
      console.log('Video failed to enter Picture-in-Picture mode.', err);
    },
    handlePipExitFailure(err) {
      console.log('Video failed to leave Picture-in-Picture mode.', err);
    },
  },
});
Example 2 (minimal)

HTML

  <v-pip :video-options="videoOptions" />

JS

import { VPip } from 'v-pip';

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

Props

Name Type Required? Description
video-options Object Yes The set of options required to setup the V-Pip component.
button-options Object No The set of options for the toggle button

Events

Name Description
video-in-pip Emits an Boolean whether the Video is in PIP or not
requesting-pip-failure Emits an Object when the video fails to enter Picture-in-Picture mode.
exiting-pip-failure Emits an Object when the video fails to leave Picture-in-Picture mode.

Contributing

  1. Fork it ( https://github.com/vinayakkulkarni/v-pip/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-pip © 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].