Coder Social home page Coder Social logo

vue-jitsi-meet's Introduction

vue-jitsi-meet Deploy

Vue component for Jitsi Meet Web Integration via IFrame.

NOTE: Always refer to the official Jitsi Meet IFrame API Docs.

Installation

YARN

$ yarn add @mycure/vue-jitsi-meet

NPM

$ npm install @mycure/vue-jitsi-meet

Props

Prop Type Description
domain String The jitsi server domain
options Object Jitsi [Options] (https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-iframe#api--new-jitsimeetexternalapidomain-options)

Usage

<template>
  <vue-jitsi-meet
    ref="jitsiRef"
    domain="meet.jit.si"
    :options="jitsiOptions"
  ></vue-jitsi-meet>
</template>

<script>
import { JitsiMeet } from '@mycure/vue-jitsi-meet';
export default {
  components: {
    VueJitsiMeet: JitsiMeet
  },
  computed: {
    jitsiOptions () {
      return {
        roomName: 'some-room-name',
        noSSL: false,
        userInfo: {
          email: '[email protected]',
          displayName: '',
        },
        configOverwrite: {
          enableNoisyMicDetection: false
        },
        interfaceConfigOverwrite: {
          SHOW_JITSI_WATERMARK: false,
          SHOW_WATERMARK_FOR_GUESTS: false,
          SHOW_CHROME_EXTENSION_BANNER: false
        },
        onload: this.onIFrameLoad
      };
    },
  },
  methods: {
    onIFrameLoad () {
      // do stuff
    },
  },
};
</script>

Domain, and Options

This plugin supports all options available in the Jitsi IFrame API Documentation.

Usage

Just bind the jitsi option object to the options property.

<vue-jitsi-meet domain="meet.jit.si" :options="options"/>

Events

Methods

addEventListener(eventName, handler)

To create an event, you must specify a ref in the JitsiMeet component. This ref is required to access the methods in the JitMeet component.

<vue-jitsi-meet ref="jitsiRef" :options="jitsiOptions"/>
...
computed: {
  jitsiOptions () {
    return {
      ...
      onload: this.onIFrameLoad
    };
  },
},
methods: {
  // Setup events after the IFrame onload event
  onIFrameLoad () {
    this.$refs.jitsiRef.addEventListener('participantJoined', this.onParticipantJoined);
  },
  onParticipantJoined (e) {
    // do stuff
  },
}
...

Execute Command

Commands Documentation;

Methods

executeCommand(commandName, arg1, arg2, ...args)

Control the embedded JitsiMeet conference using the executeCommand method. Similar to the events, this can also be achieved using ref.

<vue-jitsi-meet ref="jitsiRef" :options="jitsiOptions"/>
...
computed: {
  jitsiOptions () {
    return {
      ...
      onload: this.onIFrameLoad
    };
  },
},
methods: {
  // Execute commands after the IFrame onload event
  // or at any given action by the user.
  onIFrameLoad () {
    // This will load the 'The display name' value using the `displayName` command.
    this.$refs.jitsiRef.executeCommand('displayName', 'The display name');
  },
}
...

vue-jitsi-meet's People

Contributors

jofftiquez avatar dependabot[bot] avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.