commit
aaf935eec6
|
@ -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 {
|
||||
height: 485px;
|
||||
background-color: black;
|
||||
// background-color: black;
|
||||
}
|
||||
|
||||
.half {
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
<%#= stylesheet_pack_tag 'application', media: 'all' %> <!-- Uncomment if you import CSS in app/javascript/packs/application.js -->
|
||||
</head>
|
||||
<body>
|
||||
<%= render 'shared/navbar' unless params["action"] == "home"%>
|
||||
|
||||
<%= render 'shared/navbar' unless params["action"] == "home" || params["action"] == "new" %>
|
||||
<%= render 'shared/flashes' %>
|
||||
<%= yield %>
|
||||
<%= javascript_include_tag 'application' %>
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
</div>
|
||||
<div class="video-feed half">
|
||||
<div class="video-content">
|
||||
<video id="contacts-video" autoplay=""></video>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -13,6 +13,8 @@ Rails.application.routes.draw do
|
|||
root to: "pages#home"
|
||||
end
|
||||
|
||||
get '/call', to: 'pages#call'
|
||||
|
||||
get '/contacts', to: 'pages#index'
|
||||
post '/sessions', to: 'video_sessions#create'
|
||||
|
||||
|
|
Loading…
Reference in New Issue