diff --git a/smart-hut/public/paranormal-activity.mp4 b/smart-hut/public/paranormal-activity.mp4 deleted file mode 100644 index f3bc61a..0000000 Binary files a/smart-hut/public/paranormal-activity.mp4 and /dev/null differ diff --git a/smart-hut/src/components/dashboard/devices/Videocam.js b/smart-hut/src/components/dashboard/devices/Videocam.js index 852d51c..f541b8b 100644 --- a/smart-hut/src/components/dashboard/devices/Videocam.js +++ b/smart-hut/src/components/dashboard/devices/Videocam.js @@ -4,6 +4,7 @@ import React, { Component } from "react"; import { StyledDivCamera } from "./styleComponents"; import { Grid } from "semantic-ui-react"; import { RemoteService } from "../../../remote"; +import { endpointURL } from "../../../endpoint"; import { connect } from "react-redux"; import VideocamModal from "./VideocamModal"; @@ -25,13 +26,17 @@ class Videocam extends Component { }); }; + get url() { + return endpointURL() + this.props.device.path; + } + render() { const VideocamView = (
@@ -41,6 +46,7 @@ class Videocam extends Component { diff --git a/smart-hut/src/components/dashboard/devices/VideocamModal.js b/smart-hut/src/components/dashboard/devices/VideocamModal.js index ba54587..7a1e553 100644 --- a/smart-hut/src/components/dashboard/devices/VideocamModal.js +++ b/smart-hut/src/components/dashboard/devices/VideocamModal.js @@ -1,41 +1,35 @@ -import React from 'react'; -import Modal from 'react-modal'; +import React from "react"; +import Modal from "react-modal"; import { Button } from "semantic-ui-react"; const ModalStyle = { - content: { - top: '20%', - left: '45%', - right: 'auto', - bottom: 'auto', - marginRight: '-40%', - width: '80%', - transform: 'translate(-40%, -10%)', - }, - }; - + content: { + top: "20%", + left: "45%", + right: "auto", + bottom: "auto", + marginRight: "-40%", + width: "80%", + transform: "translate(-40%, -10%)", + }, +}; const VideocamModal = (props) => ( - - {props.selectedVideo && - - } - - - ); + + {props.selectedVideo && ( + + )} + + +); - -export default VideocamModal; \ No newline at end of file +export default VideocamModal;