v4l2camera-ui 0.0.0 → 0.1.4-10-g6402a9c

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "v4l2camera-ui",
3
- "version": "0.0.0",
3
+ "version": "0.1.4-10-g6402a9c",
4
4
  "scripts": {
5
5
  "serve": "vite --host=0.0.0.0 preview",
6
6
  "build": "vite build --emptyOutDir",
@@ -13,6 +13,7 @@
13
13
  "vuetify": "^3.0.0-beta.11"
14
14
  },
15
15
  "devDependencies": {
16
+ "@mdi/font": "^7.0.96",
16
17
  "@vitejs/plugin-vue": "^3.0.3",
17
18
  "vite": "^3.1.0",
18
19
  "vite-plugin-vuetify": "^1.0.0-alpha.12",
package/src/App.vue CHANGED
@@ -3,10 +3,28 @@
3
3
  <h1>{{ msg }}</h1>
4
4
  <v-divider></v-divider>
5
5
  <Video/>
6
+ <v-container>
7
+ <v-row>
8
+ <v-expansion-panels>
9
+ <v-expansion-panel>
10
+ <v-expansion-panel-title>Format</v-expansion-panel-title>
11
+ <v-expansion-panel-text><Format/></v-expansion-panel-text>
12
+ </v-expansion-panel>
13
+ <v-expansion-panel>
14
+ <v-expansion-panel-title>Controls</v-expansion-panel-title>
15
+ <v-expansion-panel-text><Controls/></v-expansion-panel-text>
16
+ </v-expansion-panel>
17
+ </v-expansion-panels>
18
+ </v-row>
19
+ </v-container>
6
20
  <v-divider></v-divider>
7
- <Format/>
8
- <v-divider></v-divider>
9
- <Controls/>
21
+ <v-footer>
22
+ <v-container>
23
+ <v-row align="center" justify="center">
24
+ <v-icon>mdi-github</v-icon><a href="https://github.com/mpromonet/v4l2camera">v4l2camera</a>
25
+ </v-row>
26
+ </v-container>
27
+ </v-footer>
10
28
  </v-app>
11
29
  </template>
12
30
 
@@ -25,8 +43,11 @@ export default {
25
43
  Video
26
44
  },
27
45
  mounted() {
28
- axios({ method: "GET", url: config.serviceurl + "/api/capabilities" }).then(
29
- (response) => this.msg = response.data.card
46
+ axios.get(config.serviceurl + "/api/capabilities").then(
47
+ (response) => {
48
+ this.msg = response.data.card
49
+ document.title = this.msg;
50
+ }
30
51
  );
31
52
  },
32
53
  data() {
@@ -26,6 +26,7 @@
26
26
  :max="c.maximum"
27
27
  :step="c.step"
28
28
  ticks="always"
29
+ thumb-label="always"
29
30
  :disabled="disabled(c.flags)"
30
31
  @update:modelValue="updateValue(c.id,c.value)"
31
32
  >
@@ -26,6 +26,7 @@
26
26
  :max="format.frameSizes[0].width.max"
27
27
  :step="format.frameSizes[0].width.step"
28
28
  color="blue"
29
+ thumb-label="always"
29
30
  @update:modelValue="updateValue(format)"
30
31
  >
31
32
  <template v-slot:prepend>{{format.frameSizes[0].width.min}}</template>
@@ -37,6 +38,7 @@
37
38
  :min="format.frameSizes[0].height.min"
38
39
  :max="format.frameSizes[0].height.max"
39
40
  color="blue"
41
+ thumb-label="always"
40
42
  :step="format.frameSizes[0].height.step" @change="alert($event)"
41
43
  @update:modelValue="updateValue(format)"
42
44
  >
@@ -68,7 +70,7 @@
68
70
  :min="format.frameSizes[0].intervals[0].fps.min"
69
71
  :max="format.frameSizes[0].intervals[0].fps.max"
70
72
  color="blue"
71
- thumb-label="true"
73
+ thumb-label="always"
72
74
  :step="format.frameSizes[0].intervals[0].fps.step"
73
75
  @update:modelValue="updateValue(format)"
74
76
  >
@@ -93,11 +95,11 @@ import config from '../config.js';
93
95
 
94
96
  export default {
95
97
  mounted() {
96
- axios({ method: "GET", url: config.serviceurl + "/api/formats" }).then(
98
+ axios.get(config.serviceurl + "/api/formats").then(
97
99
  (response) => {
98
100
  this.formats = response.data;
99
101
 
100
- axios({ method: "GET", url: config.serviceurl + "/api/format" }).then(
102
+ axios.get(config.serviceurl + "/api/format").then(
101
103
  (response) => {
102
104
  this.format = response.data;
103
105
  this.updateFormatFields();
@@ -123,11 +125,11 @@ export default {
123
125
  );
124
126
  },
125
127
  updateGeometry() {
126
- console.log(this.geometry)
127
- const sizes = this.geometry.split('x');
128
- this.format.width = parseInt(sizes[0]);
129
- this.format.height = parseInt(sizes[1]);
130
- this.updateValue(this.format);
128
+ console.log(this.geometry)
129
+ const sizes = this.geometry.split('x');
130
+ this.format.width = parseInt(sizes[0]);
131
+ this.format.height = parseInt(sizes[1]);
132
+ this.updateValue(this.format);
131
133
  },
132
134
  updateFormatFields() {
133
135
  this.geometry = `${this.format.width}x${this.format.height}`;
@@ -141,7 +143,7 @@ export default {
141
143
  return formats.sort((a,b) => a.width*a.height - b.width*b.height).map(item => `${item.width}x${item.height}`);
142
144
  },
143
145
  getFps(formats) {
144
- return formats.filter((fmt) => fmt.width + 'x' + fmt.height == this.geometry)[0].intervals.map(f => f.fps);
146
+ return formats.filter((fmt) => fmt.width + 'x' + fmt.height == this.geometry)[0].intervals.map(f => f.fps);
145
147
  }
146
148
  }
147
149
  };
@@ -37,10 +37,10 @@ export default {
37
37
  };
38
38
  },
39
39
  mounted() {
40
- axios({ method: "GET", url: config.serviceurl + "/api/rtspinfo" }).then(
40
+ axios.get(config.serviceurl + "/api/rtspinfo").then(
41
41
  (response) => this.rtspinfo = response.data
42
42
  );
43
- axios({ method: "GET", url: config.serviceurl + "/api/isCapturing" }).then(
43
+ axios.get(config.serviceurl + "/api/isCapturing").then(
44
44
  (response) => this.visibility = response.data
45
45
  );
46
46
  },
package/src/main.js CHANGED
@@ -2,6 +2,7 @@ import 'vuetify/styles'
2
2
  import { createApp } from 'vue'
3
3
  import { createVuetify } from 'vuetify'
4
4
  import App from './App.vue'
5
+ import '@mdi/font/css/materialdesignicons.css'
5
6
 
6
7
  const vuetify = createVuetify();
7
8