Skip to content

Commit

Permalink
Fixed necessity to reload vue page the first time and screenShare beh…
Browse files Browse the repository at this point in the history
…aviour
  • Loading branch information
vanesa-rh committed May 28, 2023
1 parent 6d6baa7 commit 8870794
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 12 deletions.
14 changes: 7 additions & 7 deletions openvidu-call-vuetify-frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion openvidu-call-vuetify-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"unique-names-generator": "^4.7.1",
"vue": "^3.2.13",
"vue-router": "^4.0.0",
"vuetify": "^3.0.0",
"vuetify": "^3.2.2",
"webfontloader": "^1.0.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion openvidu-call-vuetify-frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
</template>

<script setup>
//
import 'vuetify/dist/vuetify.min.css'
</script>
2 changes: 1 addition & 1 deletion openvidu-call-vuetify-frontend/src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import AuthService from '@/api/AuthService';

const routes = [
{
path: '/',
path: '',
name: 'Home',
component: Home,
},
Expand Down
16 changes: 14 additions & 2 deletions openvidu-call-vuetify-frontend/src/views/Call.vue
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@

<script>
import router from '@/router';
import { OpenVidu, StreamPropertyChangedEvent } from "openvidu-browser";
import { OpenVidu } from "openvidu-browser";
import UserVideo from "../components/UserVideo.vue";
import SessionService from "@/api/SessionService";
Expand Down Expand Up @@ -204,7 +204,7 @@
this.sessionPublisher = this.OVPublisher.initSession();
this.sessionScreenShare = this.OVScreenShare.initSession();
// Specify session´s behavior
// Specify session´s publisher behavior
this.sessionPublisher.on("streamCreated", ({ stream }) => {
const subscriber = this.sessionPublisher.subscribe(stream);
this.subscribers.push(subscriber);
Expand Down Expand Up @@ -241,6 +241,18 @@
}
})
// Specify session´s screen share behavior
this.sessionScreenShare.on("streamDestroyed", ({ stream }) => {
const index = this.subscribers.indexOf(stream.streamManager, 0);
if (index >= 0) {
this.subscribers.splice(index, 1);
}
});
this.sessionScreenShare.on("exception", ({ exception }) => {
console.warn(exception);
});
// Get input sources
this.OVPublisher.getDevices().then(devices => {
var videoDevices = devices.filter(device => device.kind === 'videoinput');
Expand Down

0 comments on commit 8870794

Please sign in to comment.