Skip to content

Commit

Permalink
changed vue components to kebab instead of camel
Browse files Browse the repository at this point in the history
  • Loading branch information
eyesore- committed Jan 15, 2017
1 parent 7407f1c commit f38b8ca
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
5 changes: 3 additions & 2 deletions client/vue-components/main_content.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="content">

<div class="content-left">
<videocomponent id="video" :wsRTC="wsRTC" :URI="URI"></videocomponent>
<videocomponent id="video" :wsrtc="wsRTC" :uri="URI"></videocomponent>

<div class="doc-info" v-if="count > 0">
<div>{{ count }} words</div>
Expand Down Expand Up @@ -40,14 +40,15 @@
//create RTC websocket
this.wsRTC = new WebSocket(`wss:https://${window.location.host}/ws/${this.URI}rtc`);
// update URL display. I still think we can do this with router somehow :S
window.history.pushState(window.location.origin, '/', this.URI);
},
mounted() {
sharedb.types.register(richText.type)
let socket = new WebSocket(`ws:https://${window.location.hostname}:3000/${this.URI}`)
const connection = new sharedb.Connection(socket)
console.log(socket, this.wsRTC)
// For testing reconnection
window.disconnect = function() {
connection.close();
Expand Down
25 changes: 14 additions & 11 deletions client/vue-components/video_component.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,22 @@

</template>

<style>
video {
display: inline-block;
max-width: 100%;
}
button {
width: 100%
}
</style>
<script>
import Utils from '../js/utils.js'
import Methods from '../js/webrtc.js'
export default {
mounted() {
console.log('videocomponent mounted, this.wsrtc:', this.wsrtc)
console.log('videocomponent mounted, this.URI:', this.uri)
this.start();
this.wsRTC.onmessage = e => {
this.wsrtc.onmessage = e => {
this.signalHandler(e)
};
console.log('this.remoteMuted at start', this.remoteMuted)
},
props: ['wsRTC','URI'],
props: ['wsrtc','uri'],
data() {
return {
Expand Down Expand Up @@ -270,3 +263,13 @@
}
}
</script>

<style>
video {
display: inline-block;
max-width: 100%;
}
button {
width: 100%
}
</style>

0 comments on commit f38b8ca

Please sign in to comment.