Skip to content

Commit

Permalink
load WebRTC adaptor (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
leigh-johnson authored Feb 25, 2023
1 parent 565e44a commit b135b4d
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
31 changes: 31 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"vue": "^3.2.38",
"vue-codemirror": "^6.1.1",
"vue-router": "^4.1.5",
"webrtc-adapter": "^8.2.1",
"yup": "^0.32.11"
},
"devDependencies": {
Expand Down
10 changes: 10 additions & 0 deletions src/components/video/VideoElement.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script setup lang="ts">
import adapter from "webrtc-adapter";
import { onMounted, ref } from "vue";
import { onBeforeRouteLeave } from "vue-router";
import VideoButton from "@/components/video/VideoButton.vue";
Expand All @@ -25,6 +26,15 @@ async function startStream() {
}
onMounted(async () => {
console.log(
"WebRTC adaptor detected browser: ",
adapter.browserDetails.browser
);
console.log(
"WebRTC adaptor detected version: ",
adapter.browserDetails.version
);
await store.load();
await cameraSettings.loadSettings();
// update default height/width on video element
Expand Down

0 comments on commit b135b4d

Please sign in to comment.