added routes for call
This commit is contained in:
parent
3dfbc577b6
commit
4b1636ee78
|
@ -0,0 +1,13 @@
|
||||||
|
contactsVideo = document.getElementById("contacts-video");
|
||||||
|
try {
|
||||||
|
const stream = await navigator.mediaDevices.getUserMedia({
|
||||||
|
audio: false,
|
||||||
|
video: true
|
||||||
|
})
|
||||||
|
|
||||||
|
localstream = stream;
|
||||||
|
contactsVideo.srcObject = stream
|
||||||
|
contactsVideo.muted = true
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
}
|
|
@ -61,7 +61,7 @@ a:hover {
|
||||||
|
|
||||||
.video-content {
|
.video-content {
|
||||||
height: 485px;
|
height: 485px;
|
||||||
background-color: black;
|
// background-color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
.half {
|
.half {
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
<%#= stylesheet_pack_tag 'application', media: 'all' %> <!-- Uncomment if you import CSS in app/javascript/packs/application.js -->
|
<%#= stylesheet_pack_tag 'application', media: 'all' %> <!-- Uncomment if you import CSS in app/javascript/packs/application.js -->
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<%= render 'shared/navbar' unless params["action"] == "home"%>
|
|
||||||
|
<%= render 'shared/navbar' unless params["action"] == "home" || params["action"] == "new" %>
|
||||||
<%= render 'shared/flashes' %>
|
<%= render 'shared/flashes' %>
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
<%= javascript_include_tag 'application' %>
|
<%= javascript_include_tag 'application' %>
|
||||||
|
|
|
@ -15,24 +15,24 @@
|
||||||
|
|
||||||
<!-- Modal -->
|
<!-- Modal -->
|
||||||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||||
<div class="vertical-alignment-helper">
|
<div class="vertical-alignment-helper">
|
||||||
<div class="modal-dialog vertical-align-center">
|
<div class="modal-dialog vertical-align-center">
|
||||||
<div class="modal-content modal-color">
|
<div class="modal-content modal-color">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<%= link_to "#", class:"pull-right", 'data-dismiss':"modal", 'data-target':"#myModal" do %>
|
<%= link_to "#", class:"pull-right", 'data-dismiss':"modal", 'data-target':"#myModal" do %>
|
||||||
<i class="fas fa-times-circle"></i>
|
<i class="fas fa-times-circle"></i>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="modal-container">
|
<div class="modal-container">
|
||||||
<img src="https://kitt.lewagon.com/placeholder/users/ssaunier" alt="" class="profile img-circle" width=150>
|
<img src="https://kitt.lewagon.com/placeholder/users/ssaunier" alt="" class="profile img-circle" width=150>
|
||||||
<div class="modal-text">
|
<div class="modal-text">
|
||||||
<h4 class="modal-title" id="myModalLabel">Calling</h4>
|
<h4 class="modal-title" id="myModalLabel">Calling</h4>
|
||||||
<h4><strong>FirstName LastName</strong></h4>
|
<h4><strong>FirstName LastName</strong></h4>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="video-feed half">
|
<div class="video-feed half">
|
||||||
<div class="video-content">
|
<div class="video-content">
|
||||||
|
<video id="contacts-video" autoplay=""></video>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -13,6 +13,8 @@ Rails.application.routes.draw do
|
||||||
root to: "pages#home"
|
root to: "pages#home"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
get '/call', to: 'pages#call'
|
||||||
|
|
||||||
get '/contacts', to: 'pages#index'
|
get '/contacts', to: 'pages#index'
|
||||||
post '/sessions', to: 'video_sessions#create'
|
post '/sessions', to: 'video_sessions#create'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue