0.1.0-alpha • Published 5 years ago

@loquiry/vue-record v0.1.0-alpha

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

vue-record

A styleless record button as a vue component

Install

npm i @loquiry/vue-record or yarn add @loquiry/vue-record

Usage

<template>
  <VueReccord class="record" @result="onResult">
    Record
    <template slot="isRecording">
      Stop
    </template>
  </VueReccord>
</template>

<script>
import VueReccord from "@loquiry/vue-record";
export default {
  components: { VueReccord },
  methods: {
    onResult(blob) {
      console.log("record button data:", blob);
    },
  },
};
</script>

<style>
.record.active {
  background: red;
}
</style>

Api

The button emits the result event which returns a blob/

Content

As stated in Usage The component has two slots that will be switched if the button is recording

Classes

  • .active when the button is recording ## Development

Develpment

yarn install

Compiles and hot-reloads for development

yarn run serve
0.1.0-alpha

5 years ago