|
279 | 279 | </ElCol>
|
280 | 280 | </ElRow>
|
281 | 281 | </ElTooltip>
|
| 282 | + <ElTooltip v-if="config.RTSPSERVER === 'on'" :tabindex="-1" placement="top" content="RTSPをHTTP経由で配信します" effect="light" :open-delay="500"> |
| 283 | + <ElRow> |
| 284 | + <ElCol :offset="2" :span="7"> |
| 285 | + <h4>RTSP over HTTP</h4> |
| 286 | + </ElCol> |
| 287 | + <ElCol :span="10"> |
| 288 | + <ElSwitch v-model="config.RTSP_OVER_HTTP" active-value="on" inactive-value="off" /> |
| 289 | + </ElCol> |
| 290 | + </ElRow> |
| 291 | + </ElTooltip> |
282 | 292 | <ElRow v-if="config.RTSPSERVER === 'on'">
|
283 | 293 | <ElCol :offset="2" :span="7">
|
284 |
| - <h4>RTSP(UDP)</h4> |
285 |
| - </ElCol> |
286 |
| - <ElCol :span="10"> |
287 |
| - <ElInput type="text" readonly v-model="RTSP_UDP" /> |
288 |
| - </ElCol> |
289 |
| - </ElRow> |
290 |
| - <ElRow v-if="config.RTSPSERVER === 'on'"> |
291 |
| - <ElCol :offset="2" :span="7"> |
292 |
| - <h4>RTSP(over HTTP)</h4> |
| 294 | + <h4>RTSP URL</h4> |
293 | 295 | </ElCol>
|
294 | 296 | <ElCol :span="10">
|
295 |
| - <ElInput type="text" readonly v-model="RTSP_OVER_HTTP" /> |
| 297 | + <ElInput type="text" readonly :value="RtspUrl" /> |
296 | 298 | </ElCol>
|
297 | 299 | </ElRow>
|
298 | 300 |
|
|
588 | 590 | },
|
589 | 591 | data() {
|
590 | 592 | return {
|
591 |
| - RTSP_UDP: '', |
592 |
| - RTSP_OVER_HTTP: '', |
593 | 593 | config: {
|
594 | 594 | appver: '', // ATOMCam app_ver (/atom/config/app.ver)
|
595 | 595 | ATOMHACKVER: '', // AtomHack Ver (/etc/atomhack.ver)
|
|
602 | 602 | RECORDING_LOCAL_SCHEDULE: 'off',
|
603 | 603 | RECORDING_LOCAL_SCHEDULE_LIST: '', // -> /media/mmc/local_schedule
|
604 | 604 | RTSPSERVER: 'off',
|
| 605 | + RTSP_OVER_HTTP: 'off', |
605 | 606 | RTSP_AUDIO: 'off',
|
606 | 607 | STORAGE_SDCARD: 'on',
|
607 | 608 | STORAGE_SDCARD_PUBLISH: 'off',
|
|
678 | 679 | isSwing() {
|
679 | 680 | return !this.rebooting && this.posValid && (this.config.PRODUCT_MODEL === 'ATOM_CAKP1JZJP');
|
680 | 681 | },
|
| 682 | + RtspUrl() { |
| 683 | + const port = (this.config.RTSP_OVER_HTTP === 'on') ? 8080 : 8554; |
| 684 | + return `rtsp://${window.location.host}:${port}/unicast`; |
| 685 | + }, |
681 | 686 | },
|
682 | 687 | async mounted() {
|
683 | 688 | const res = await axios.get('./cgi-bin/hack_ini.cgi').catch(err => {
|
|
748 | 753 | this.reboot.dayOfWeekSelect = days.map(d => this.weekDays[(d + 6) % 7]);
|
749 | 754 | }
|
750 | 755 |
|
751 |
| - this.RTSP_UDP = `rtsp://${window.location.host}:8554/unicast`; |
752 |
| - this.RTSP_OVER_HTTP = `rtsp://${window.location.host}:8080/unicast`; |
753 |
| -
|
754 | 756 | setInterval(async () => {
|
755 | 757 | const res = await axios.get('./cgi-bin/cmd.cgi?name=time').catch(err => {
|
756 | 758 | // eslint-disable-next-line no-console
|
|
911 | 913 | execCmds.push(`samba ${this.config.STORAGE_SDCARD_PUBLISH}`);
|
912 | 914 | }
|
913 | 915 | if(((this.config.RTSPSERVER !== this.oldConfig.RTSPSERVER) ||
|
914 |
| - (this.config.RTSP_AUDIO !== this.oldConfig.RTSP_AUDIO)) && |
| 916 | + (this.config.RTSP_AUDIO !== this.oldConfig.RTSP_AUDIO) || |
| 917 | + (this.config.RTSP_OVER_HTTP !== this.oldConfig.RTSP_OVER_HTTP)) && |
915 | 918 | (this.config.RTSPSERVER === "on")) {
|
916 |
| - execCmds.push(`rtspserver ${this.config.RTSPSERVER}`); |
| 919 | + if(this.config.RTSP_OVER_HTTP !== this.oldConfig.RTSP_OVER_HTTP) { |
| 920 | + execCmds.push('rtspserver restart'); |
| 921 | + } else { |
| 922 | + execCmds.push('rtspserver on'); |
| 923 | + } |
917 | 924 | }
|
918 | 925 | if(Object.keys(this.config).some(prop => (prop.search(/WEBHOOK/) === 0) && (this.config[prop] !== this.oldConfig[prop]))) {
|
919 | 926 | execCmds.push('setwebhook');
|
|
0 commit comments