-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathindex.html
2989 lines (2908 loc) · 173 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="icon" type="image/x-icon" href="./assets/favicon.ico">
<!-- import CSS -->
<link rel="stylesheet" href="./assets/elementui/index.css">
<!-- import JS -->
<script src="./js/utils.js"></script>
</head>
<body>
<div id="app">
<el-container>
<el-header>
<el-row>
<el-col :xs="23" :sm="23" :md="23" :lg="23" :xl="23">
<el-menu :default-active="selectIndex" class="el-menu-demo" mode="horizontal"
@select="handleSelect" background-color="#545c64" text-color="#fff"
active-text-color="#ffd04b">
<el-menu-item index="1" disable> <template slot="title">
<el-image style="height: 100%" src="./assets/logo.png" fit="fill"></el-image>
</template>
</el-menu-item>
<el-menu-item index="2">WebRTC测试</el-menu-item>
<el-menu-item index="3">拉流代理</el-menu-item>
<el-menu-item index="4">推流代理</el-menu-item>
<el-menu-item index="5">FFmpeg推拉流</el-menu-item>
<el-menu-item index="6">Rtp服务</el-menu-item>
<el-menu-item index="7">服务器配置</el-menu-item>
</el-menu>
</el-col>
<el-col :xs="1" :sm="1" :md="1" :lg="1" :xl="1" v-show="selectIndex==='7'">
<el-popconfirm confirm-button-text='好的' cancel-button-text='不用了' icon="el-icon-info"
icon-color="red" title="这只有Daemon方式才能重启,否则是直接关闭!确定重启吗?" @confirm="restartServer">
<el-button type="danger" plain slot="reference" icon="el-icon-refresh-right">重启</el-button>
</el-popconfirm>
</el-col>
</el-row>
</el-header>
<el-main>
<div v-show="selectIndex==='1'">
<el-row :gutter="20">
<el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
<div style="height: 300px; background-color: whitesmoke; border-radius: 20px;">
<div style="height: 100%; width: 100%;" ref="chart1">
</div>
</div>
</el-col>
<el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
<div style="height: 300px; background-color: whitesmoke; border-radius: 20px;">
<div style="height: 100%; width: 100%;" ref="chart2">
</div>
</div>
</el-col>
<el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
<div style="height: 300px; background-color: whitesmoke;border-radius: 20px;">
<div style="height: 100%; width: 100%;" ref="chart3">
</div>
</div>
</el-col>
</el-row>
<el-divider><i class="el-icon-s-data"></i></el-divider>
<div style="width: 100%;text-align: right;">
<el-checkbox label="自动刷新" v-model="autorefresh_medialist" ></el-checkbox>
<el-button type="primary" icon="el-icon-refresh" @click="getMediaList">刷新</el-button>
</div>
<el-table :data="medialist" empty-text="暂无数据">
<!-- <el-table-column prop="vhost" label="主机名"> </el-table-column> -->
<el-table-column sortable prop="app" label="应用名"> </el-table-column>
<el-table-column prop="stream" label="流id"> </el-table-column>
<el-table-column sortable prop="schema" label="协议" :filters="schemaFilters" :filter-method="filterSchema"> </el-table-column>
<el-table-column prop="createStamp" label="创建时间">
<template #default="scope">
{{scope.row.createStamp | secFormat}}
</template>
</el-table-column>
<el-table-column prop="aliveSecond" label="时长(s)">
</el-table-column>
<el-table-column prop="bytesSpeed" label="码率">
<template #default="scope">
{{scope.row.bytesSpeed | bitsSpeed}}/s
</template>
</el-table-column>
<el-table-column label="录制">
<template #default="scope">
<el-tag v-if="scope.row.isRecordingHLS">录制HLS</el-tag>
<el-tag v-if="scope.row.isRecordingMP4">录制Mp4</el-tag>
</template>
</el-table-column>
<!--
<el-table-column prop="isRecordingHLS" label="是否录制HLS">
<template #default="scope">
<el-tag v-if="scope.row.isRecordingHLS" type="success" effect="dark">是</el-tag>
<el-tag v-else type="danger" effect="dark">否</el-tag>
</template>
</el-table-column>
<el-table-column prop="isRecordingMP4" label="是否录制MP4">
<template #default="scope">
<el-tag v-if="scope.row.isRecordingMP4" type="success" effect="dark">是</el-tag>
<el-tag v-else type="danger" effect="dark">否</el-tag>
</template>
</el-table-column>
<el-table-column prop="originType" label="源类型">
<template #default="scope">
<el-tag v-if="scope.row.originType==0">unknown</el-tag>
<el-tag v-else-if="scope.row.originType==1">rtmp_push</el-tag>
<el-tag v-else-if="scope.row.originType==2">rtsp_push</el-tag>
<el-tag v-else-if="scope.row.originType==3">rtp_push</el-tag>
<el-tag v-else-if="scope.row.originType==4">pull</el-tag>
<el-tag v-else-if="scope.row.originType==5">ffmpeg_pull</el-tag>
<el-tag v-else-if="scope.row.originType==6">mp4_vod</el-tag>
<el-tag v-else-if="scope.row.originType==7">device_chn</el-tag>
<el-tag v-else-if="scope.row.originType==8">rtc_push</el-tag>
</template>
</el-table-column>
-->
<el-table-column prop="originTypeStr" label="类型"> </el-table-column>
<el-table-column prop="originUrl" label="源地址"> </el-table-column>
<!--
<el-table-column prop="readerCount" label="本协议观看人数"> </el-table-column>
<el-table-column sortable prop="totalReaderCount" label="观看总人数"> </el-table-column>
-->
<el-table-column sortable prop="totalReaderCount" label="观看人数">
<template slot-scope="scope">
<el-button @click="getPlayerList(scope.row)">{{scope.row.readerCount}}/{{scope.row.totalReaderCount}}</el-button>
</template>
</el-table-column>
<el-table-column label="网络信息">
<el-table-column prop="originSock.identifier" label="identifier"> </el-table-column>
<el-table-column label="local_ip">
<template slot-scope="scope">{{scope.row.originSock.local_ip}}:{{scope.row.originSock.local_port}}</template>
</el-table-column>
<el-table-column label="peer_ip">
<template slot-scope="scope">{{scope.row.originSock.peer_ip}}:{{scope.row.originSock.peer_port}}</template>
</el-table-column>
<!--
<el-table-column prop="originSock.local_ip" label="local_ip"> </el-table-column>
<el-table-column prop="originSock.local_port" label="local_port"> </el-table-column>
<el-table-column prop="originSock.peer_ip" label="peer_ip"> </el-table-column>
<el-table-column prop="originSock.peer_port" label="peer_port"> </el-table-column>
-->
</el-table-column>
<el-table-column type="expand" label="媒体轨道">
<template slot-scope="scope">
<el-table v-if="scope.row.tracks.length > 0" :data="scope.row.tracks">
<!--
<el-table-column prop="codec_type" label="编码类型">
</el-table-column>
<el-table-column prop="codec_id" label="编码类型ID">
</el-table-column>
-->
<el-table-column prop="codec_id_name" label="编码">
<template #default="scope">
<el-tag type="success">{{ scope.row.codec_id_name}}</el-tag>
</template>
</el-table-column>
<el-table-column prop="frames" label="接收帧数">
</el-table-column>
<el-table-column prop="duration" label="时长(s)">
<template #default="scope">{{ scope.row.duration/1000}}</template>
</el-table-column>
<el-table-column prop="ready" label="已就绪">
<template #default="scope">
<el-tag v-if="scope.row.ready" type="success" effect="dark">是</el-tag>
<el-tag v-else type="danger" effect="dark">否</el-tag>
</template>
</el-table-column>
<el-table-column label="编码属性">
<template #default="scope">
<el-tag v-if="scope.row.codec_type==1">{{scope.row.channels}}x{{scope.row.sample_rate}}x{{scope.row.sample_bit}}</el-tag>
<el-tag v-else>{{scope.row.width}}x{{scope.row.height}}@{{scope.row.fps}}</el-tag>
</template>
</el-table-column>
<el-table-column prop="key_frames" label="关键帧数">
</el-table-column>
<el-table-column prop="gop_interval_ms" label="gop间隔时间(s)">
</el-table-column>
<el-table-column prop="gop_size" label="gop大小">
</el-table-column>
</el-table>
<el-empty description="无tracks" v-else></el-empty>
</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button size="mini" type="danger"
@click="close_stream(scope.$index, scope.row)">关闭</el-button>
</template>
</el-table-column>
</el-table>
<el-dialog :title="playerTitle"
width="60%" top="2rem"
:close-on-click-modal="true"
:visible.sync="showPlayerDialog">
<div id="shared" style="margin-top: 1rem;">
<el-table :data="playerlist" empty-text="暂无播放器">
<el-table-column prop="identifier" label="id"></el-table-column>
<el-table-column prop="local_ip" label="本机ip"></el-table-column>
<el-table-column prop="local_port" label="本机端口"></el-table-column>
<el-table-column prop="peer_ip" label="对端ip"></el-table-column>
<el-table-column prop="peer_port" label="对端端口"></el-table-column>
<el-table-column prop="typeid" label="类型"></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button size="mini" type="danger"
@click="kick_session(scope.row.identifier)">断开</el-button>
</template>
</el-table-column>
</el-table>
</div>
</el-dialog>
<el-divider><i class="el-icon-connection"></i></el-divider>
<div style="width: 100%;text-align: right;">
<el-checkbox label="自动刷新" v-model="autorefresh_session" ></el-checkbox>
<el-button type="primary" icon="el-icon-refresh" @click="getAllSession">刷新</el-button>
</div>
<el-table :data="sessionlist" empty-text="暂无连接数据">
<el-table-column prop="id" label="id"></el-table-column>
<el-table-column prop="local_ip" label="本机ip"></el-table-column>
<el-table-column prop="local_port" label="本机端口"></el-table-column>
<el-table-column prop="peer_ip" label="对端ip"></el-table-column>
<el-table-column prop="peer_port" label="对端端口"></el-table-column>
<el-table-column prop="typeid" label="类型"></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button size="mini" type="danger"
@click="kick_session(scope.row.id)">断开</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div v-show="selectIndex==='2'">
<el-row :gutter="20">
<el-col :span="24">
<el-row :gutter="10" style="height: 600px;display: flex; margin-bottom: 10px;">
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
<video ref='video' controls autoplay class="videobox">
Your browser is too old which doesn't support HTML5 video.
</video>
</el-col>
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
<video ref='selfVideo' controls autoplay class="videobox">
Your browser is too old which doesn't support HTML5 video.
</video>
</el-col>
</el-row>
</el-col>
<el-col :span="12" :offset="6">
<el-form v-model="webrtc" label-width="160px">
<el-form-item label="url">
<el-input v-model="webrtc.zlmsdpUrl"></el-input>
</el-form-item>
<el-form-item label="">
<el-checkbox label="simulcast" v-model="webrtc.simulcast"></el-checkbox>
<el-checkbox label="useCamera" v-model="webrtc.useCamera"></el-checkbox>
<el-checkbox label="audioEnable" v-model="webrtc.audioEnable"></el-checkbox>
<el-checkbox label="videoEnable" v-model="webrtc.videoEnable"></el-checkbox>
</el-form-item>
<el-form-item label="method">
<el-radio-group v-model="webrtc.type">
<el-radio label="echo"></el-radio>
<el-radio label="push"></el-radio>
<el-radio label="play"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="resolution">
<el-select v-model="webrtc.resolution" placeholder="请选择分辨率" @change="$forceUpdate()"
style="width: 100%;">
<el-option v-for="(opt,index) in resolution_opt" :key="index" :label="opt.text"
:value="index"></el-option>
</el-select>
</el-form-item>
<el-form-item label="datachannel">
<el-switch v-model="webrtc.usedatachannel"></el-switch>
</el-form-item>
<el-form-item label="debug日志">
<el-switch v-model="webrtc.debug"></el-switch>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="startwebrtc">开始(start)</el-button>
<el-button type="danger" @click="stopwebrtc">停止(stop)</el-button>
</el-form-item>
<el-form-item label="msgrecv">
<el-input type="textarea" v-model="webrtc.msgrecv"></el-input>
</el-form-item>
<el-form-item label="msgsend">
<el-input type="text" v-model="webrtc.msgsend">
<template slot="append">
<el-button type="success" @click="sendata">发送数据</el-button>
</template>
</el-input>
</el-form-item>
<el-form-item>
<el-button type="info" @click="closedata">关闭(close datachannel)</el-button>
</el-form-item>
</el-form>
</el-col>
</el-row>
</div>
<div v-if="selectIndex==='3'" style="display: flex;">
<div style="border-radius: 4px; background-color: #545c6421;margin: 10px; flex:1">
<el-form style="margin: 10px;">
<!-- <el-form-item label="api操作密钥" label-width="180px">
<el-input v-model="secret" disabled></el-input>
</el-form-item> -->
<el-form-item label="虚拟主机" label-width="180px">
<el-input v-model="addStreamProxy_params.vhost"></el-input>
</el-form-item>
<el-form-item label="应用名" label-width="180px">
<el-input v-model="addStreamProxy_params.app"></el-input>
</el-form-item>
<el-form-item label="流id" label-width="180px">
<el-input v-model="addStreamProxy_params.stream"></el-input>
</el-form-item>
<el-form-item label="拉流地址" label-width="180px">
<el-input v-model="addStreamProxy_params.url"
placeholder="例如rtmp://live.hkstv.hk.lxdns.com/live/hks2"></el-input>
</el-form-item>
<el-form-item label="" label-width="180px">
<el-row style="text-align: left;">
<el-col :span="8">
<el-checkbox
v-model="addStreamProxy_params.enable_hls">转hls-mpeg</el-checkbox>
</el-col>
<el-col :span="8">
<el-checkbox
v-model="addStreamProxy_params.enable_hls_fmp4">转hls-fmp4</el-checkbox>
</el-col>
<el-col :span="8">
<el-checkbox
v-model="addStreamProxy_params.enable_mp4">mp4录制</el-checkbox>
</el-col>
<el-col :span="8">
<el-checkbox
v-model="addStreamProxy_params.enable_rtsp">转rtsp</el-checkbox>
</el-col>
<el-col :span="8">
<el-checkbox
v-model="addStreamProxy_params.enable_rtmp">转rtmp/flv</el-checkbox>
</el-col>
<el-col :span="8">
<el-checkbox
v-model="addStreamProxy_params.enable_ts">转http-ts/ws-ts</el-checkbox>
</el-col>
<el-col :span="8">
<el-checkbox
v-model="addStreamProxy_params.enable_fmp4">转http-fmp4/ws-fmp4</el-checkbox>
</el-col>
<el-col :span="8">
<el-checkbox
v-model="addStreamProxy_params.hls_demand">按需生成hls</el-checkbox>
</el-col>
<el-col :span="8">
<el-checkbox
v-model="addStreamProxy_params.rtsp_demand">按需生成rtsp</el-checkbox>
</el-col>
<el-col :span="8">
<el-checkbox
v-model="addStreamProxy_params.rtmp_demand">按需生成rtmp</el-checkbox>
</el-col>
<el-col :span="8">
<el-checkbox
v-model="addStreamProxy_params.ts_demand">按需生成ts</el-checkbox>
</el-col>
<el-col :span="8">
<el-checkbox
v-model="addStreamProxy_params.fmp4_demand">按需生成fmp4</el-checkbox>
</el-col>
<el-col :span="8">
<el-checkbox
v-model="addStreamProxy_params.enable_audio">允许音频</el-checkbox>
</el-col>
<el-col :span="8">
<el-checkbox
v-model="addStreamProxy_params.add_mute_audio">添加静音音轨</el-checkbox>
</el-col>
<el-col :span="16">
<el-checkbox
v-model="addStreamProxy_params.mp4_as_player">MP4录制当作观看者参与播放人数计数</el-checkbox>
</el-col>
<el-col :span="16">
<el-checkbox
v-model="addStreamProxy_params.auto_close">无人观看自动关闭流(不触发无人观看hook)</el-checkbox>
</el-col>
</el-row>
</el-form-item>
<el-form-item label="拉流方式" label-width="180px">
<el-select v-model="addStreamProxy_params.rtp_type" style="width: 100%;">
<el-option label="TCP" value="0"> </el-option>
<el-option label="UDP" value="1"> </el-option>
<el-option label="组播" value="2"> </el-option>
</el-select>
</el-form-item>
<el-form-item label="超时时间" label-width="180px">
<el-input v-model="addStreamProxy_params.timeout_sec"></el-input>
</el-form-item>
<el-form-item label="重试次数" label-width="180px">
<el-input v-model="addStreamProxy_params.retry_count" placeholder="默认为-1无限重试"></el-input>
</el-form-item>
<el-form-item label="时间戳覆盖" label-width="180px">
<el-select v-model="addStreamProxy_params.modify_stamp" style="width: 100%;">
<el-option label="不开启" value=""> </el-option>
<el-option label="绝对时间戳" value="0"> </el-option>
<el-option label="系统时间戳" value="1"> </el-option>
<el-option label="相对时间戳" value="2"> </el-option>
</el-select>
</el-form-item>
<el-form-item label="mp4录像保存目录" label-width="180px">
<el-input v-model="addStreamProxy_params.mp4_save_path"
placeholder="mp4录像保存目录,置空使用默认"></el-input>
</el-form-item>
<el-form-item label="mp4切片大小(s)" label-width="180px">
<el-input v-model="addStreamProxy_params.mp4_max_second"
placeholder="mp4录像切片大小(s)"></el-input>
</el-form-item>
<el-form-item label="hls文件保存目录" label-width="180px">
<el-input v-model="addStreamProxy_params.hls_save_path"
placeholder="hls文件保存目录,置空使用默认"></el-input>
</el-form-item>
<el-form-item label="">
<el-input type="textarea" :rows="5" v-model="apiurl" readonly></el-input>
</el-form-item>
</el-form>
</div>
<div style="border-radius: 4px; background-color: #545c6421;margin: 10px; flex:1">
<el-form style="margin: 10px;">
<div style="margin-bottom: 10px;width: 100%;text-align: left;">
<el-button type="primary" @click="addStreamProxy">增加</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="listStreamProxy">刷新</el-button>
</div>
<el-table :data="streamProxyList" empty-text="暂无拉流代理">
<!-- <el-table-column sortable prop="key" label="key"> </el-table-column> -->
<el-table-column sortable prop="url" label="url"> </el-table-column>
<el-table-column sortable prop="src.app" label="app"> </el-table-column>
<el-table-column sortable prop="src.stream" label="stream"> </el-table-column>
<el-table-column sortable prop="status" label="状态"> </el-table-column>
<el-table-column sortable prop="liveSecs" label="时长(s)"> </el-table-column>
<el-table-column sortable prop="rePullCount" label="重试次数"> </el-table-column>
<el-table-column sortable prop="totalReaderCount" label="观看人数"> </el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button size="mini" type="danger"
@click="delStreamProxy(scope.$index, scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
<div v-if="selectIndex==='4'">
<el-form>
<!-- <el-form-item label="api操作密钥" label-width="180px">
<el-input v-model="secret" disabled></el-input>
</el-form-item> -->
<el-form-item label="虚拟主机" label-width="180px">
<el-input v-model="addStreamPusherProxy_params.vhost"></el-input>
</el-form-item>
<el-form-item label="" label-width="180px">
<el-select v-model="addStreamPusherProxy_params.schema" style="width: 100%;">
<el-option label="RTSP" value="rtsp"> </el-option>
<el-option label="RTMP" value="rtmp"> </el-option>
</el-select>
</el-form-item>
<el-form-item label="应用名" label-width="180px">
<el-input v-model="addStreamPusherProxy_params.app"></el-input>
</el-form-item>
<el-form-item label="流id" label-width="180px">
<el-input v-model="addStreamPusherProxy_params.stream"></el-input>
</el-form-item>
<el-form-item label="转推地址" label-width="180px">
<el-input v-model="addStreamPusherProxy_params.dst_url"
placeholder="例如rtmp://live.hkstv.hk.lxdns.com/live/hks2"></el-input>
</el-form-item>
<el-form-item label="推流方式" label-width="180px">
<el-select v-model="addStreamPusherProxy_params.rtp_type" style="width: 100%;">
<el-option label="TCP" value="0"> </el-option>
<el-option label="UDP" value="1"> </el-option>
</el-select>
</el-form-item>
<el-form-item label="超时时间" label-width="180px">
<el-input v-model="addStreamPusherProxy_params.timeout_sec"></el-input>
</el-form-item>
<el-form-item label="重试次数" label-width="180px">
<el-input v-model="addStreamPusherProxy_params.retry_count"></el-input>
</el-form-item>
<el-form-item label="">
<!-- <el-input type="textarea" :rows="5" v-model="addStreamPusherProxy_apiurl" readonly></el-input> -->
<div style="width: 100%;text-align: right;">
<el-button type="primary" @click="addStreamPusherProxy">增加</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="listStreamPusherProxy">刷新</el-button>
</div>
</el-form-item>
</el-form>
<el-table :data="pusherProxyList" empty-text="暂无推流代理">
<!-- <el-table-column sortable prop="key" label="key"> </el-table-column> -->
<el-table-column sortable prop="url" label="url"> </el-table-column>
<el-table-column sortable prop="src.app" label="app"> </el-table-column>
<el-table-column sortable prop="src.stream" label="stream"> </el-table-column>
<el-table-column sortable prop="status" label="状态"> </el-table-column>
<el-table-column sortable prop="liveSecs" label="时长(s)"> </el-table-column>
<el-table-column sortable prop="rePublishCount" label="重试次数"> </el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button size="mini" type="danger"
@click="delStreamPusherProxy(scope.$index, scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div v-show="selectIndex==='5'">
<el-form>
<el-form-item label="源地址" label-width="180px">
<el-input v-model="addFFmpeg_param.src_url"></el-input>
</el-form-item>
<el-form-item label="目的地址" label-width="180px">
<el-input v-model="addFFmpeg_param.dst_url"></el-input>
</el-form-item>
<el-form-item label="命令模板" label-width="180px">
<el-input v-model="addFFmpeg_param.ffmpeg_cmd_key"></el-input>
</el-form-item>
<el-form-item label="" label-width="180px">
<el-checkbox v-model="addFFmpeg_param.enable_mp4">MP4录制</el-checkbox>
<el-checkbox v-model="addFFmpeg_param.enable_hls">HLS录制</el-checkbox>
</el-form-item>
<el-form-item label="超时ms" label-width="180px">
<el-input v-model="addFFmpeg_param.timeout_ms"></el-input>
</el-form-item>
<el-form-item label="">
<el-button type="primary" @click="addFFmpegSource">增加</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="listFFmpegSource">刷新</el-button>
</el-form-item>
</el-form>
<el-table :data="ffmpeglist" empty-text="暂无数据">
<el-table-column sortable prop="src_url" label="源地址"> </el-table-column>
<el-table-column sortable prop="dst_url" label="目的地址"> </el-table-column>
<el-table-column sortable prop="ffmpeg_cmd_key" label="命令模板"></el-table-column>
<el-table-column sortable prop="cmd" label="命令行"> </el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button size="mini" type="danger"
@click="delFFmpegSource(scope.$index, scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div v-show="selectIndex==='6'">
<el-form>
<el-form-item label="虚拟主机" label-width="180px">
<el-input v-model="addRtpServer_param.vhost"></el-input>
</el-form-item>
<el-form-item label="应用名" label-width="180px">
<el-input v-model="addRtpServer_param.app"></el-input>
</el-form-item>
<el-form-item label="流id" label-width="180px">
<el-input v-model="addRtpServer_param.stream_id"></el-input>
</el-form-item>
<el-form-item label="tcp模式" label-width="180px">
<el-select v-model="addRtpServer_param.tcp_mode" style="width: 100%;">
<el-option v-for="(val,key) in typeTcpMode" :label="val" :value="key"></el-option>
</el-select>
</el-form-item>
<el-form-item label="流过滤" label-width="180px">
<el-select v-model="addRtpServer_param.only_track" style="width: 100%;">
<el-option v-for="(val,key) in typeOnlyTrack" :label="val" :value="key"></el-option>
</el-select>
</el-form-item>
<el-form-item label="本地ip" label-width="180px">
<el-input v-model="addRtpServer_param.local_ip"></el-input>
</el-form-item>
<el-form-item label="端口" label-width="180px">
<el-input v-model="addRtpServer_param.port">
<template #append>
<el-checkbox v-model="addRtpServer_param.re_use_port" label="端口复用"/>
</template>
</el-input>
</el-form-item>
<el-form-item label="SSRC" label-width="180px">
<el-input v-model="addRtpServer_param.ssrc"></el-input>
</el-form-item>
<el-form-item label="">
<el-button type="primary" @click="openRtpServer">增加</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="listRtpServer">刷新</el-button>
</el-form-item>
</el-form>
<el-table :data="rtpserverlist" empty-text="暂无数据">
<el-table-column sortable prop="vhost" label="vhost"> </el-table-column>
<el-table-column sortable prop="app" label="app"> </el-table-column>
<el-table-column sortable prop="stream_id" label="stream"> </el-table-column>
<el-table-column sortable prop="port" label="端口"></el-table-column>
<el-table-column sortable prop="tcp_mode" label="tcp模式">
<template slot-scope="scope">
{{typeTcpMode[scope.row.tcp_mode]}}
</template>
</el-table-column>
<el-table-column sortable prop="only_track" label="流过滤">
<template slot-scope="scope">
{{typeOnlyTrack[scope.row.only_track]}}
</template>
</el-table-column>
<el-table-column label="ssrc" width="160">
<template slot-scope="scope">
<el-input v-model="scope.row.ssrc" class="input-with-select">
<template #append>
<el-button icon="el-icon-refresh" @click="updateRtpServerSSRC(scope.row)"></el-button>
</template>
</el-input>
</template>
</el-table-column>
<el-table-column prop="dst_url" label="目的地址" width="280">
<template slot-scope="scope">
<div style="display: flex;">
<el-input placeholder="ip" v-model="scope.row.dst_url" style="flex:4;"></el-input>
<el-input placeholder="port" v-model="scope.row.dst_port" style="flex:2"></el-input>
<el-button size="small" @click="connectRtpServer(scope.$index, scope.row)">连接</el-button>
</div>
</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button size="mini" type="danger"
@click="closeRtpServer(scope.$index, scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div v-if="selectIndex==='7'">
<el-tabs tab-position="left" style="height: 100%;">
<el-tab-pane label="通用设置">
<el-row :gutter="20">
<el-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
<div class="confs">
<div class="conf_item">
<div class="conf_item_label">
check_nvidia_dev
</div>
<div class="conf_item_value">
<el-select v-model="serverConfig.general.check_nvidia_dev" placeholder="请选择" style="width: 100%;">
<el-option v-for="(val,key) in yesNo" :label="val" :value="key"></el-option>
</el-select>
</div>
</div>
<div class="conf_item">
<div class="conf_item_label">
启用虚拟主机
</div>
<div class="conf_item_value">
<el-select v-model="serverConfig.general.enableVhost" placeholder="请选择" style="width: 100%;">
<el-option v-for="(val,key) in yesNo" :label="val" :value="key"></el-option>
</el-select>
</div>
</div>
<div class="conf_item">
<div class="conf_item_label">
服务器唯一id
</div>
<div class="conf_item_value">
<el-input type="text"
v-model="serverConfig.general.mediaServerId"></el-input>
</div>
</div>
<div class="conf_item">
<div class="conf_item_label">
启用FFMPEG日志
</div>
<div class="conf_item_value">
<el-select v-model="serverConfig.general.enable_ffmpeg_log" placeholder="请选择" style="width: 100%;">
<el-option v-for="(val,key) in yesNo" :label="val" :value="key"></el-option>
</el-select>
</div>
</div>
<div class="conf_item">
<div class="conf_item_label">
流超时时间(ms)
</div>
<div class="conf_item_value">
<el-input type="number"
v-model="serverConfig.general.maxStreamWaitMS"></el-input>
</div>
</div>
<div class="conf_item">
<div class="conf_item_label">
合并写缓存(ms)
</div>
<div class="conf_item_value">
<el-input type="number"
v-model="serverConfig.general.mergeWriteMS"></el-input>
</div>
</div>
<div class="conf_item">
<div class="conf_item_label">
断连删除
</div>
<div class="conf_item_value">
<el-select v-model="serverConfig.general.resetWhenRePlay" placeholder="请选择" style="width: 100%;">
<el-option v-for="(val,key) in yesNo" :label="val" :value="key"></el-option>
</el-select>
</div>
</div>
<div class="conf_item">
<div class="conf_item_label">
无人观看流的释放超时(ms)
</div>
<div class="conf_item_value">
<el-input type="number"
v-model="serverConfig.general.streamNoneReaderDelayMS"></el-input>
</div>
</div>
<div class="conf_item">
<div class="conf_item_label">
未就绪缓存帧数
</div>
<div class="conf_item_value">
<el-input type="number"
v-model="serverConfig.general.unready_frame_cache"></el-input>
</div>
</div>
<div class="conf_item">
<div class="conf_item_label">
加流超时(ms)
</div>
<div class="conf_item_value">
<el-input type="number"
v-model="serverConfig.general.wait_add_track_ms"></el-input>
</div>
</div>
<div class="conf_item">
<div class="conf_item_label">
流就绪超时(ms)
</div>
<div class="conf_item_value">
<el-input type="number"
v-model="serverConfig.general.wait_track_ready_ms"></el-input>
</div>
</div>
<div class="conf_item">
<div class="conf_item_label">
on_flow_report事件阈值
</div>
<div class="conf_item_value">
<el-input type="number"
v-model="serverConfig.general.flowThreshold"></el-input>
</div>
</div>
</div>
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="FFMPEG设置">
<el-row :gutter="20">
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
<div class="confs">
<div class="conf_item">
<div class="conf_item_label">
ffmpeg路径
</div>
<div class="conf_item_value">
<el-input type="text" v-model="serverConfig.ffmpeg.bin"></el-input>
</div>
</div>
<div class="conf_item">
<div class="conf_item_label">
拉流再推流命令模板
</div>
<div class="conf_item_value">
<el-input type="text" v-model="serverConfig.ffmpeg.cmd"></el-input>
</div>
</div>
<div class="conf_item">
<div class="conf_item_label">
日志路径
</div>
<div class="conf_item_value">
<el-input type="text" v-model="serverConfig.ffmpeg.log"></el-input>
</div>
</div>
<div class="conf_item">
<div class="conf_item_label">
自动重启时间
</div>
<div class="conf_item_value">
<el-input type="number"
v-model="serverConfig.ffmpeg.restart_sec"></el-input>
</div>
</div>
<div class="conf_item">
<div class="conf_item_label">
截图模板
</div>
<div class="conf_item_value">
<el-input type="text" v-model="serverConfig.ffmpeg.snap"></el-input>
</div>
</div>
</div>
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="API设置">
<el-row :gutter="20">
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
<div class="confs">
<div class="conf_item">
<div class="conf_item_label">
调试
</div>
<div class="conf_item_value">
<el-select v-model="serverConfig.api.apiDebug" placeholder="请选择" style="width: 100%;">
<el-option v-for="(val,key) in yesNo" :label="val" :value="key"></el-option>
</el-select>
</div>
</div>
<div class="conf_item">
<div class="conf_item_label">
密钥
</div>
<div class="conf_item_value">
<el-input type="text" v-model="serverConfig.api.secret"></el-input>
</div>
</div>
<div class="conf_item">
<div class="conf_item_label">
截图路径
</div>
<div class="conf_item_value">
<el-input type="text" v-model="serverConfig.api.snapRoot"></el-input>
</div>
</div>
<div class="conf_item">
<div class="conf_item_label">
缺省截图
</div>
<div class="conf_item_value">
<el-input type="text" v-model="serverConfig.api.defaultSnap"></el-input>
</div>
</div>
</div>
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="Hook设置">
<el-row :gutter="20">
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
<div class="confs">
<div class="conf_item">
<div class="conf_item_label">
启用hook事件
</div>
<div class="conf_item_value">
<el-select v-model="serverConfig.hook.enable" placeholder="请选择" style="width: 100%;">
<el-option v-for="(val,key) in yesNo" :label="val" :value="key"></el-option>
</el-select>
</div>
</div>
<div class="conf_item" v-if="serverConfig.hook.enable=='1'">
<div class="conf_item_label">
alive心跳间隔(s)
</div>
<div class="conf_item_value">
<el-input type="number"
v-model="serverConfig.hook.alive_interval"></el-input>
</div>
</div>
<div class="conf_item" v-if="serverConfig.hook.enable=='1'">
<div class="conf_item_label">
Hook请求超时(s)
</div>
<div class="conf_item_value">
<el-input type="number"
v-model="serverConfig.hook.timeoutSec"></el-input>
</div>
</div>
<div class="conf_item" v-if="serverConfig.hook.enable=='1'">
<div class="conf_item_label">
失败重试次数
</div>
<div class="conf_item_value">
<el-input type="number" v-model="serverConfig.hook.retry"></el-input>
</div>
</div>
<div class="conf_item" v-if="serverConfig.hook.enable=='1'">
<div class="conf_item_label">
失败重试延时(s)
</div>
<div class="conf_item_value">
<el-input type="number"
v-model="serverConfig.hook.retry_delay"></el-input>
</div>
</div>
</div>
</el-col>
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12"
v-if="serverConfig.hook.enable=='1'">
<div class="confs">
<div class="conf_item">
<div class="conf_item_label">
保活上报
</div>
<div class="conf_item_value">
<el-input type="text"
v-model="serverConfig.hook.on_server_keepalive"></el-input>
</div>
</div>
<div class="conf_item">
<div class="conf_item_label">
流量事件
</div>
<div class="conf_item_value">
<el-input type="text"
v-model="serverConfig.hook.on_flow_report"></el-input>
</div>
</div>
<div class="conf_item">
<div class="conf_item_label">
http文件鉴权事件
</div>
<div class="conf_item_value">
<el-input type="text"
v-model="serverConfig.hook.on_http_access"></el-input>
</div>
</div>
<div class="conf_item">
<div class="conf_item_label">
播放鉴权事件
</div>
<div class="conf_item_value">
<el-input type="text" v-model="serverConfig.hook.on_play"></el-input>
</div>
</div>
<div class="conf_item">
<div class="conf_item_label">
推流鉴权事件
</div>
<div class="conf_item_value">
<el-input type="text" v-model="serverConfig.hook.on_publish"></el-input>
</div>
</div>
<div class="conf_item">
<div class="conf_item_label">
mp4切片录好事件
</div>
<div class="conf_item_value">
<el-input type="text"
v-model="serverConfig.hook.on_record_mp4"></el-input>
</div>
</div>
<div class="conf_item">
<div class="conf_item_label">
ts切片录好事件
</div>
<div class="conf_item_value">
<el-input type="text"
v-model="serverConfig.hook.on_record_ts"></el-input>
</div>
</div>
<div class="conf_item">
<div class="conf_item_label">
rtp服务超时事件
</div>
<div class="conf_item_value">
<el-input type="text"
v-model="serverConfig.hook.on_rtp_server_timeout"></el-input>
</div>
</div>
<div class="conf_item">
<div class="conf_item_label">
rtsp播放鉴权事件
</div>
<div class="conf_item_value">
<el-input type="text"
v-model="serverConfig.hook.on_rtsp_auth"></el-input>
</div>
</div>
<div class="conf_item">
<div class="conf_item_label">
rtsp专属鉴权事件
</div>
<div class="conf_item_value">
<el-input type="text"
v-model="serverConfig.hook.on_rtsp_realm"></el-input>
</div>
</div>
<div class="conf_item">
<div class="conf_item_label">
发送rtp被动关闭
</div>
<div class="conf_item_value">
<el-input type="text"
v-model="serverConfig.hook.on_send_rtp_stopped"></el-input>