v4l2camera-ui 0.1.7 → 0.1.8

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/dist/index.html CHANGED
@@ -5,8 +5,8 @@
5
5
  <link rel="icon" href="/favicon.png" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>v4l2camera</title>
8
- <script type="module" crossorigin src="/assets/index-6afaf224.js"></script>
9
- <link rel="stylesheet" href="/assets/index-f05678c4.css">
8
+ <script type="module" crossorigin src="/assets/index-61de2798.js"></script>
9
+ <link rel="stylesheet" href="/assets/index-9ce2a5f1.css">
10
10
  </head>
11
11
  <body>
12
12
  <div id="app"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "v4l2camera-ui",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "scripts": {
5
5
  "serve": "vite --host=0.0.0.0 preview",
6
6
  "build": "vite build --emptyOutDir",
package/src/App.vue CHANGED
@@ -3,20 +3,12 @@
3
3
  <h1>{{ msg }}</h1>
4
4
  <v-divider></v-divider>
5
5
  <Video/>
6
- <v-container>
7
- <v-row>
8
- <v-expansion-panels v-model="panel">
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 expand>
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
+ <v-divider></v-divider>
7
+ <h3>Formats</h3>
8
+ <Format/>
9
+ <v-divider></v-divider>
10
+ <h3>Controls</h3>
11
+ <Controls/>
20
12
  <v-divider></v-divider>
21
13
  <v-footer>
22
14
  <v-container>
@@ -33,7 +25,7 @@ import Video from './components/Video.vue';
33
25
  import Format from './components/Format.vue';
34
26
  import Controls from './components/Controls.vue';
35
27
  import axios from "axios";
36
- import config from './config.js';
28
+ axios.defaults.baseURL = import.meta.env.VITE_APP_BASE_URL
37
29
 
38
30
  export default {
39
31
  name: 'App',
@@ -43,13 +35,13 @@ export default {
43
35
  Video
44
36
  },
45
37
  mounted() {
46
- axios.get(config.serviceurl + "/api/capabilities").then(
38
+ axios.get("/api/capabilities").then(
47
39
  (response) => {
48
40
  this.msg = response.data.card
49
41
  document.title = this.msg;
50
42
  }
51
43
  );
52
- axios.get(config.serviceurl + "/api/version").then(
44
+ axios.get("/api/version").then(
53
45
  (response) => this.version = response.data);
54
46
  },
55
47
  data() {
@@ -69,6 +61,9 @@ export default {
69
61
  h1 {
70
62
  text-align: center;
71
63
  }
64
+ h3 {
65
+ text-align: center;
66
+ }
72
67
  p {
73
68
  margin-left: 0.5em;
74
69
  }
@@ -57,11 +57,10 @@
57
57
 
58
58
  <script>
59
59
  import axios from "axios";
60
- import config from '../config.js';
61
60
 
62
61
  export default {
63
62
  mounted() {
64
- axios.get(config.serviceurl + "/api/controls").then(
63
+ axios.get("/api/controls").then(
65
64
  (response) => this.controls = response.data
66
65
  );
67
66
  },
@@ -72,7 +71,7 @@ export default {
72
71
  },
73
72
  methods: {
74
73
  updateValue(id, value) {
75
- axios.post(config.serviceurl + "/api/control", {id, value} ).then(
74
+ axios.post("/api/control", {id, value} ).then(
76
75
  (response) => this.controls.filter((d) => d.id == id).forEach((element) => element.value = response.data.value)
77
76
  );
78
77
  },
@@ -15,11 +15,11 @@
15
15
 
16
16
  <v-row>
17
17
  <v-col>Geometry</v-col>
18
- <v-col cols="8" v-if="typeof format.frameSizes[0].width === 'number' && typeof format.frameSizes[0].height === 'number'">
18
+ <v-col cols="8" v-if="format.frameSizes && format.frameSizes[0] && typeof format.frameSizes[0].width === 'number' && typeof format.frameSizes[0].height === 'number'">
19
19
  <v-select v-model="geometry" :items="getGeometries(format.frameSizes)" @update:modelValue="updateGeometry()">
20
20
  </v-select>
21
21
  </v-col>
22
- <v-col cols="7" v-if="typeof format.frameSizes[0].width === 'object' && typeof format.frameSizes[0].height === 'object'">
22
+ <v-col cols="7" v-if="format.frameSizes && format.frameSizes[0] && typeof format.frameSizes[0].width === 'object' && typeof format.frameSizes[0].height === 'object'">
23
23
  <v-slider
24
24
  v-model.number="format.width"
25
25
  :min="format.frameSizes[0].width.min"
@@ -46,7 +46,7 @@
46
46
  <template v-slot:append>{{format.frameSizes[0].height.max}}</template>
47
47
  </v-slider>
48
48
  </v-col>
49
- <v-col cols="1" v-if="typeof format.frameSizes[0].width === 'object' && typeof format.frameSizes[0].height === 'object'">
49
+ <v-col cols="1" v-if="format.frameSizes && format.frameSizes[0] && typeof format.frameSizes[0].width === 'object' && typeof format.frameSizes[0].height === 'object'">
50
50
  <v-text-field
51
51
  v-model.number="format.width"
52
52
  @update:modelValue="updateValue(format)">
@@ -60,11 +60,11 @@
60
60
 
61
61
  <v-row>
62
62
  <v-col>Fps</v-col>
63
- <v-col cols="8" v-if="typeof format.frameSizes[0].intervals[0].fps === 'number'" >
63
+ <v-col cols="8" v-if="format.frameSizes && format.frameSizes[0] && typeof format.frameSizes[0].intervals[0].fps === 'number'" >
64
64
  <v-select v-model.number="format.fps" :items="getFps(format.frameSizes)">
65
65
  </v-select>
66
66
  </v-col>
67
- <v-col cols="7" v-if="typeof format.frameSizes[0].intervals[0].fps === 'object'">
67
+ <v-col cols="7" v-if="format.frameSizes && format.frameSizes[0] && typeof format.frameSizes[0].intervals[0].fps === 'object'">
68
68
  <v-slider
69
69
  v-model.number="format.fps"
70
70
  :min="format.frameSizes[0].intervals[0].fps.min"
@@ -78,7 +78,7 @@
78
78
  <template v-slot:append>{{format.frameSizes[0].intervals[0].fps.max}}</template>
79
79
  </v-slider>
80
80
  </v-col>
81
- <v-col cols="1" v-if="typeof format.frameSizes[0].intervals[0].fps === 'object'">
81
+ <v-col cols="1" v-if="format.frameSizes && format.frameSizes[0] && typeof format.frameSizes[0].intervals[0].fps === 'object'">
82
82
  <v-text-field
83
83
  v-model.number="format.fps"
84
84
  @update:modelValue="updateValue(format)">
@@ -104,15 +104,14 @@
104
104
 
105
105
  <script>
106
106
  import axios from 'axios';
107
- import config from '../config.js';
108
107
 
109
108
  export default {
110
109
  mounted() {
111
- axios.get(config.serviceurl + "/api/formats").then(
110
+ axios.get("/api/formats").then(
112
111
  (response) => {
113
112
  this.formats = response.data.video;
114
113
 
115
- axios.get(config.serviceurl + "/api/format").then(
114
+ axios.get("/api/format").then(
116
115
  (response) => {
117
116
  this.format = response.data;
118
117
  this.updateFormatFields();
@@ -130,7 +129,7 @@ export default {
130
129
  },
131
130
  methods: {
132
131
  updateValue(format) {
133
- axios.post(config.serviceurl + "/api/format", format ).then(
132
+ axios.post("/api/format", format ).then(
134
133
  (response) => {
135
134
  this.format = response.data;
136
135
  this.updateFormatFields();
@@ -24,7 +24,6 @@
24
24
  <script>
25
25
  import axios from "axios";
26
26
  import JMuxer from 'jmuxer';
27
- import config from '../config.js';
28
27
 
29
28
  export default {
30
29
  data() {
@@ -37,10 +36,10 @@ export default {
37
36
  };
38
37
  },
39
38
  mounted() {
40
- axios.get(config.serviceurl + "/api/rtspinfo").then(
39
+ axios.get("/api/rtspinfo").then(
41
40
  (response) => this.rtspinfo = response.data
42
41
  );
43
- axios.get(config.serviceurl + "/api/isCapturing").then(
42
+ axios.get("/api/isCapturing").then(
44
43
  (response) => this.visibility = response.data
45
44
  );
46
45
  },
@@ -82,10 +81,10 @@ export default {
82
81
  },
83
82
  methods: {
84
83
  start() {
85
- axios.get(config.serviceurl + "/api/start").then( () => this.visibility = true);
84
+ axios.get("/api/start").then( () => this.visibility = true);
86
85
  },
87
86
  stop() {
88
- axios.get(config.serviceurl + "/api/stop").then( () => this.visibility = false);
87
+ axios.get("/api/stop").then( () => this.visibility = false);
89
88
  }
90
89
  }
91
90
  };
package/vite.config.js CHANGED
@@ -2,7 +2,6 @@ import { fileURLToPath, URL } from 'url'
2
2
 
3
3
  import { defineConfig } from 'vite'
4
4
  import vue from '@vitejs/plugin-vue'
5
- import path from "path";
6
5
 
7
6
 
8
7
  // https://github.com/vuetifyjs/vuetify-loader/tree/next/packages/vite-plugin