Skip to content

Commit

Permalink
Add signaling servers to requirements matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
carlobeltrame committed Sep 28, 2022
1 parent 8c10b80 commit af617d0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions resources/js/components/feedback/FeedbackEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export default {
showImpression: { type: Boolean, default: false },
username: { type: String, default: null },
collaborationKey: { type: String, default: null },
signalingServers: { type: Array, default: null },
},
data() {
const extensions = [
Expand Down Expand Up @@ -121,9 +120,10 @@ export default {
withCollaboration (extensions) {
const ydoc = new Y.Doc()
const feedbackKey = 'qualix-feedback-' + this.courseId + '-' + this.collaborationKey.substr(0, 8)
const signalingServers = window.Laravel.signalingServers
const provider = new WebrtcProvider(feedbackKey, ydoc, {
password: this.collaborationKey.substr(8),
...(this.signalingServers ? { signaling: this.signalingServers } : {})
...(signalingServers ? { signaling: signalingServers } : {}),
})
return extensions.concat([
Collaboration.configure({ document: ydoc }),
Expand Down
4 changes: 0 additions & 4 deletions resources/js/components/feedback/InputFeedbackEditorLarge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
:name="name"
:class="{ 'form-control': !readonly, 'is-invalid': errorMessage || markInvalid }"
:username="username"
:signaling-servers="signalingServers"
v-model="currentValue"
v-bind="$attrs"
@localinput="$emit('localinput')"></feedback-editor>
Expand Down Expand Up @@ -35,9 +34,6 @@ export default {
username () {
return window.Laravel.username
},
signalingServers () {
return window.Laravel.signalingServers
},
}
}
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,10 @@ export default {
}
const ydoc = new Y.Doc()
const feedbackKey = 'qualix-feedback-' + this.feedback.feedback_data.course_id + '-' + this.feedback.collaborationKey.substr(0, 8)
const signalingServers = window.Laravel.signalingServers
new WebrtcProvider(feedbackKey, ydoc, {
password: this.feedback.collaborationKey.substr(8),
...(this.signalingServers ? { signaling: this.signalingServers } : {})
...(signalingServers ? { signaling: signalingServers } : {}),
})
return [Collaboration.configure({ document: ydoc })]
},
Expand Down

0 comments on commit af617d0

Please sign in to comment.