1.0.8 • Published 7 years ago

vue-twitch-player v1.0.8

Weekly downloads
187
License
MIT
Repository
github
Last release
7 years ago

vue-twitch-player license

A Vue component for embedding a Twitch player. See component for all available properties.

Vue-plugin-load-script is a dependency, since the Twitch Player API needs to be included from Twitch's servers.

Install

# npm
npm install --save-dev vue-twitch-player
# yarn
yarn add --dev vue-twitch-player

Use

  // In main.js
  import LoadScript from 'vue-plugin-load-script';

  Vue.use(LoadScript);
<template>
  <twitch-player
    :channel="channel"
  ></twitch-player>
</template>

<script>
  import VueTwitchPlayer from 'vue-twitch-player';

  export default {
    // ...
    components: {
      VueTwitchPlayer,
    },
    data() {
      return {
        channel: 'tserkov',
      };
    },
    // ...
  };
</script>
<template>
  <twitch-player
    :video="video"
  ></twitch-player>
</template>

<script>
  import VueTwitchPlayer from 'vue-twitch-player';

  export default {
    // ...
    components: {
      VueTwitchPlayer,
    },
    data() {
      return {
        video: '117216248',
      };
    },
    // ...
  };
</script>
<template>
  <twitch-player
    :collection="collection"
  ></twitch-player>
</template>

<script>
  import VueTwitchPlayer from 'vue-twitch-player';

  export default {
    // ...
    components: {
      VueTwitchPlayer,
    },
    data() {
      return {
        collection: 'TbyX29kRqhRnxA',
      };
    },
    // ...
  };
</script>
1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago