Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Zeye Client

License

NotificationsYou must be signed in to change notification settings

zeye-video/vue-zeye-client

Repository files navigation

Pronouced like [zaɪ]Client

Designed to work in pair with myfork ofmediasoup-demo-server

VueZeyeClient relies heavily on vuex.Everything under the hood work is in there, so installing vuex is mandatory.

HTML

<scriptsrc="https://unpkg.com/vue/dist/vue.js"></script><scriptsrc="https://unpkg.com/vue/dist/vuex.js"></script><scriptsrc="https://unpkg.com/vue-zeye-client/dist/vue-zeye-client.js"></script><divid="#app"><!-- NOTE: here the outputs --></div>

NPM

npm install stasoft91/vue-zeye-client

Yarn

yarn add stasoft91/vue-zeye-client

JavaScript

// If using a module system (e.g. via Vue CLI), import Vue and vue-zeye-client and then call Vue.use(vue-zeye-client).// import Vue from 'vue'// import Vuex from 'vuex'// import vueZeyeClient from 'vue-zeye-client'Vue.use(Vuex)conststore=newVuex.Store({modules:{/*        this line us mandatory, because all zeyeClient vuex modules are designed        to be nested under 'zeyeClient' to prevent any conflicts with existing store    */zeyeClient:{namespaced:true}}})Vue.use(zeyeClient,store)// Now the app has started!newVue({}).$mount('#app')

Then somewhere in yourconference.vue:

<divstyle="width:250px"><zeye-peer-media:show-volume-bar="true":peer-id="'me'"></zeye-peer-media></div><divstyle="width:250px"v-for="peer in $zeyeClient.getPeers()":key="peer.id"><zeye-peer-media:show-volume-bar="true":peer-id="peer.id"></zeye-peer-media></div>

And in script section:

exportdefault{mounted(){this.$zeyeClient.setRoomUrl()constroomId='example01'constpeerId='example'+Math.random()this.$zeyeClient.setMe(peerId)this.$zeyeClient.join({            roomId,            peerId,displayName:this.$zeyeClient.getMe().displayName})}}

For Nuxt

  1. Create empty zeyeClient.js in store
  2. Create plugins/vue-zye-client.js with code below then mention it in plugins section in nuxt.config.js
// plugins/vue-zeye-client.jsimport zeyeClient from 'vue-zeye-client'import Vue from 'vue'export default ({ store }) => {  Vue.use(zeyeClient, store)}

Also we have some documentation

SeeDocs

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp