From 4b1636ee78dfdef74d9659c4efd08eec6000b8cc Mon Sep 17 00:00:00 2001 From: Beatrice Olivera Date: Tue, 28 Aug 2018 18:26:33 +0100 Subject: [PATCH] added routes for call --- app/assets/javascripts/test.js | 13 ++++++++ app/assets/stylesheets/pages/_contacts.scss | 2 +- app/views/layouts/application.html.erb | 3 +- app/views/pages/_contact.html.erb | 34 ++++++++++----------- app/views/pages/index.html.erb | 1 + config/routes.rb | 2 ++ 6 files changed, 36 insertions(+), 19 deletions(-) create mode 100644 app/assets/javascripts/test.js diff --git a/app/assets/javascripts/test.js b/app/assets/javascripts/test.js new file mode 100644 index 0000000..61fd389 --- /dev/null +++ b/app/assets/javascripts/test.js @@ -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); +} diff --git a/app/assets/stylesheets/pages/_contacts.scss b/app/assets/stylesheets/pages/_contacts.scss index f257221..d5075eb 100644 --- a/app/assets/stylesheets/pages/_contacts.scss +++ b/app/assets/stylesheets/pages/_contacts.scss @@ -61,7 +61,7 @@ a:hover { .video-content { height: 485px; - background-color: black; + // background-color: black; } .half { diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 6202e07..93d7b8c 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -10,7 +10,8 @@ <%#= stylesheet_pack_tag 'application', media: 'all' %> - <%= 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' %> diff --git a/app/views/pages/_contact.html.erb b/app/views/pages/_contact.html.erb index 2450153..4c33e80 100644 --- a/app/views/pages/_contact.html.erb +++ b/app/views/pages/_contact.html.erb @@ -15,24 +15,24 @@