Added camera.ffmpeg plugin web panel
This commit is contained in:
parent
9ad6188b5d
commit
b21193dc74
9 changed files with 142 additions and 8 deletions
|
@ -1 +1 @@
|
|||
.camera{min-height:90%;margin-top:4%;overflow:auto;display:flex;flex-direction:column;align-items:center}.camera .camera-container{min-width:640px;min-height:480px;position:relative;background:#000;margin-bottom:1em}.camera .camera-container .frame,.camera .camera-container .no-frame{position:absolute;top:0;width:100%;height:100%}.camera .camera-container .frame{z-index:1}.camera .camera-container .no-frame{display:flex;background:rgba(0,0,0,0.1);color:#fff;align-items:center;justify-content:center;z-index:2}
|
||||
.camera{min-height:90%;margin-top:4%;overflow:auto;display:flex;flex-direction:column;align-items:center}.camera .camera-container{position:relative;background:#000;margin-bottom:1em}.camera .camera-container .frame,.camera .camera-container .no-frame{position:absolute;top:0;width:100%;height:100%}.camera .camera-container .frame{z-index:1}.camera .camera-container .no-frame{display:flex;background:rgba(0,0,0,0.1);color:#fff;align-items:center;justify-content:center;z-index:2}.camera .url{width:640px;display:flex;margin:1em}.camera .url .row{width:100%;display:flex;align-items:center}.camera .url .name{width:140px}.camera .url input{width:500px;font-weight:normal}.camera .params{margin-top:1em;padding:1em;width:640px;display:flex;flex-direction:column;border:1px solid #ccc;border-radius:1em}.camera .params label{font-weight:normal}.camera .params .head{display:flex;justify-content:center}.camera .params .head label{width:100%;display:flex;justify-content:right}.camera .params .head label .name{margin-right:1em}.camera .params .body{display:flex;flex-direction:column;margin:0 0 0 -1em}.camera .params .body .row{width:100%;display:flex;align-items:center;padding:.5em}.camera .params .body .row .name{width:30%}.camera .params .body .row input{width:70%}.camera .params .body .row:nth-child(even){background:#e4e4e4}.camera .params .body .row:hover{background:#def6ea}
|
||||
|
|
|
@ -1 +1 @@
|
|||
camera.cv
|
||||
camera
|
|
@ -0,0 +1 @@
|
|||
camera
|
|
@ -1 +1 @@
|
|||
camera.cv
|
||||
camera
|
|
@ -1 +1 @@
|
|||
camera.cv
|
||||
camera
|
|
@ -0,0 +1,116 @@
|
|||
@import 'common/vars';
|
||||
|
||||
.camera {
|
||||
min-height: 90%;
|
||||
margin-top: 4%;
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
.camera-container {
|
||||
position: relative;
|
||||
background: black;
|
||||
margin-bottom: 1em;
|
||||
|
||||
.frame, .no-frame {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.frame {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.no-frame {
|
||||
display: flex;
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
color: white;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
||||
|
||||
.url {
|
||||
width: 640px;
|
||||
display: flex;
|
||||
margin: 1em;
|
||||
|
||||
.row {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.name {
|
||||
width: 140px;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 500px;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.params {
|
||||
margin-top: 1em;
|
||||
padding: 1em;
|
||||
width: 640px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border: $default-border-3;
|
||||
border-radius: 1em;
|
||||
|
||||
label {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.head {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
label {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: right;
|
||||
|
||||
.name {
|
||||
margin-right: 1em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 0 0 0 -1em;
|
||||
|
||||
.row {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0.5em;
|
||||
|
||||
.name {
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
&:nth-child(even) {
|
||||
background: $default-bg-6;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: $hover-bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
Vue.component('camera-ffmpeg', {
|
||||
template: '#tmpl-camera-ffmpeg',
|
||||
mixins: [cameraMixin],
|
||||
|
||||
methods: {
|
||||
startStreaming: function() {
|
||||
this._startStreaming('ffmpeg');
|
||||
},
|
||||
|
||||
capture: function() {
|
||||
this._capture('ffmpeg');
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
@ -11,9 +11,5 @@ Vue.component('camera-pi', {
|
|||
this._capture('pi');
|
||||
},
|
||||
},
|
||||
|
||||
mounted: function() {
|
||||
this.attrs.resolution = [640, 480];
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
<script type="text/javascript" src="{{ url_for('static', filename='js/plugins/camera/index.js') }}"></script>
|
||||
|
||||
<script type="text/x-template" id="tmpl-camera-ffmpeg">
|
||||
{% include 'plugins/camera/index.html' %}
|
||||
</script>
|
||||
|
Loading…
Reference in a new issue