【调度系统】广东民航医疗快线调度系统源代码
wlzboy
2025-09-06 2decf5219e3476e30095fd9dbf6e49c55e105563
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
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>视频用例</title>
    <link href="../../../bootstrap/css/button.css" type="text/css" rel="stylesheet">
    <link href="../css/video.css" type="text/css" rel="stylesheet">
    <script  type="text/javascript"  src="../../js/jquery.min.js"></script>
    <script  type="text/javascript"  src="jquery.query-2.1.7.js"></script>
    <script type="text/javascript" src="../../../js/lhgdialog.min.js"></script>
    <script type="text/javascript"  src="swfobject.js"></script>
    <script>
          var isInitFinished = false;//视频插件是否加载完成
          var lang = new langZhCn();
          function langZhCn() {
              this.videoExample = "视频用例";
              this.geSessionId = "获取会话号";
              this.userId = "用户名:";
              this.password = "密码:";
              this.login = "登陆";
              this.videoInit = "初始化";
              this.videoLang = "插件语言:";
              this.videoWidth = "插件宽度:";
              this.videoHeight = "插件高度:";
              this.serverIp = "服务器IP:";
              this.serverPort = "端口:";
              this.windowNumber = "窗口数目:";
              this.settings = "设置";
              this.videoLive = "实时视频";
              this.windowIndex = "窗口下标:";
              this.title = "标题:";
              this.jsession = "会话号:";
              this.stream = "码流:";
              this.devIdno = "设备号:";
              this.channel = "通道:";
              this.play = "播放";
              this.stop = "停止";
              this.reset = "重置";
              this.monitor = "监听";
              this.talkback = "对讲";
              this.url = "url链接:";
              this.playback = "远程回放";
              this.nullMic = "您的电脑上没有麦克风,无法启动对讲";
              this.micStop = "没有开启FLASH插件麦克风";
              this.loginError = "登陆失败";
              this.talkback_flashMicStep1 = "第一步,请在视频窗上右键菜单中选择设置"; 
              this.talkback_flashMicStep2 = "第二步在设置窗口中 选择 “允许”,并勾选“记住”"; 
              this.talkback_flashMicStep3 = "关闭设置,并重新启动对讲";
             this.bufferTimeDesc = "说明:主要用于调整视频延时,当缓存的数据达到了最小缓冲时长时(默认为2秒),则会进行播放,当到了最大缓冲时长(默认为6秒),则进行快放。";
              this.minBufferTime = "最小缓冲时长:";
              this.maxBufferTime = "最大缓冲时长:";
              this.vedioStatus = "选中窗口播放状态";
              this.vedioEventStart = '选中事件:选中第';
              this.vedioEventEnd = '个窗口';
              this.vedioPlay = "当前选中窗口正在进行视频播放";
              this.vedioNoPlay = "当前选中窗口未进行视频播放";
                  
                  
          }
          function langEn() {
              this.videoExample = "Video Example";
              this.geSessionId = "Get Jsession";
              this.userId = "Account:";
              this.password = "Password:";
              this.login = "Login";
              this.videoInit = "Init";
              this.videoLang = "language:";
              this.videoWidth = "Width:";
              this.videoHeight = "Height:";
              this.serverIp = "ServerIP:";
              this.serverPort = "Port:";
              this.windowNumber = "WindowNum:";
              this.settings = "Setting";
              this.videoLive = "Live Video";
              this.windowIndex = "Index:";
              this.title = "Title:";
              this.jsession = "Jsession:";
              this.stream = "Stream:";
              this.devIdno = "DevIdno:";
              this.channel = "Channel:";
              this.play = "Play";
              this.stop = "Stop";
              this.reset = "Reset";
              this.monitor = "Monitor";
              this.talkback = "Talkback";
              this.url = "url:";
              this.playback = "Playback";
              this.nullMic = "On your computer does not have a microphone, you can not start speaking";
              this.micStop = "FLASH plug-in microphone is not turned on";
              this.loginError = "Login failed";
              this.talkback_flashMicStep1 = "1. select Settings in the video window on the right-click menu"; 
              this.talkback_flashMicStep2 = "The second step in the Settings window select 'Allow' and check the 'Remember'"; 
              this.talkback_flashMicStep3 = "Close the settings and restart the intercom";
             this.bufferTimeDesc = "Description:It's mainly used for the adjustment of video lazy load. When the video buffers the minimum buffer time(defaults to 2 seconds) of video,"
             +" then it will play the video. When the video buffers the maximum buffer time(defaults to 6 seconds) of video, then it will play the video fast-forward.";
              this.minBufferTime = "Minimun Buffer Time:";
              this.maxBufferTime = "Maximun Buffer Time:";
              this.vedioStatus = "Select window play status";
              this.vedioEventStart = 'Select event: selected  Window ';
              this.vedioEventEnd = ' ';
              this.vedioPlay = "The currently selected window is Playing video now";
              this.vedioNoPlay = "There is no video playback in the current selected window";
          }
          
          function loadLang() {
              document.title = lang.videoExample;
              $('#getJsessionTitle').text(lang.geSessionId);
              $('#accountTitle').text(lang.userId);
              $('#passwordTitle').text(lang.password);
              $('#userLoginBtn').text(lang.login);
              $('#isPlay').text(lang.vedioStatus);
              $('#videoInitTitle').text(lang.videoInit);
              $('#videoInitBtn').text(lang.videoInit);
              $('#videoLangTitle').text(lang.videoLang);
              $('#videoWidthTitle').text(lang.videoWidth);
              $('#videoHeightTitle').text(lang.videoHeight);
              $('#windowNumberTitle').text(lang.windowNumber);
              $('#videoLiveTitle').text(lang.videoLive);
              $('#videoTitleTitle').text(lang.title);
              $('#videoStreamTitle').text(lang.stream);
              $('#videoPlayBtn').text(lang.play);
              $('#videoResetBtn').text(lang.reset);
              $('#monitorTitle').text(lang.monitor);
              $('#monitorBtn').text(lang.monitor);
              $('#talkbackTitle').text(lang.talkback);
              $('#talkbackBtn').text(lang.talkback);
              $('#playbackTitle').text(lang.playback);
              $('#urlTitle').text(lang.url);
              $('#playbackBtn').text(lang.playback);
              $('#bufferTimeDesc').text(lang.bufferTimeDesc);
              
              $('.minBufferTimeTitle').text(lang.minBufferTime);
              $('.maxBufferTimeTitle').text(lang.maxBufferTime);
              $('.serverIp').text(lang.serverIp);
              $('.serverPort').text(lang.serverPort);
              $('.settings').text(lang.settings);
              $('.windowIndex').text(lang.windowIndex);
              $('.jsessionId').text(lang.jsession);
              $('.devIdnoTitle').text(lang.devIdno);
              $('.devChannelTitle').text(lang.channel);
              $('.stop').text(lang.stop);
          }
          
          $(document).ready(function(){
              var host = window.location.host;
            var ip = host.split(":")[0];
            if(!ip || ip == 'localhost') {
                ip = '127.0.0.1';
            }
            $('#serverIp').val(ip);
            $('.monitorServerIp').val(ip);
            $('.talkbackServerIp').val(ip);
            $('#serverPort').val(6605);
            $('.monitorServerPort').val(6605);
            $('.talkbackServerPort').val(6605);
            
            if ($.query.get("lang") == "en") {
                lang = new langEn();
                $('.languagePath').val('en.xml');
            }
            loadLang();
            
            //初始化视频插件
              initPlayerExample();
          });
          
          /**
           * 初始化视频插件
           **/
          function initPlayerExample() {
              for(var i = 0; i < 101; i++){
                  playingStatusArray.push(false);
              } 
            //视频参数
            var params = {
              allowFullscreen: "true",
              allowScriptAccess: "always",
              bgcolor: "#FFFFFF",
              wmode: "transparent"
            };
            //赋值初始化为未完成
            isInitFinished = false;
            //视频插件宽度
            var width = $.trim($('.playerWidth').val());
            if(width == '') {
                $('.playerWidth').focus();
                return;
            }
              //视频插件高度
            var hieght = $.trim($('.playerHeight').val());
            if(hieght == '') {
                $('.playerHeight').focus();
                return;
            }
            //初始化flash
            swfobject.embedSWF("player.swf", "cmsv6flash", width, hieght, "11.0.0", null, null, params, null);
            initFlash();
          }
          /**
           * 插件初始化完成后执行
           **/
          function initFlash() {
            if (swfobject.getObjectById("cmsv6flash") == null ||
                 typeof swfobject.getObjectById("cmsv6flash").setWindowNum == "undefined" ) {
                  setTimeout(initFlash, 50);
            } else {
                 //初始化插件语言
                 var language = $.trim($('.languagePath').val());
                 if(!language) {
                     $('.languagePath').focus();
                     return;
                 }
                  swfobject.getObjectById("cmsv6flash").setLanguage(language);
                  //先将全部窗口创建好
                  swfobject.getObjectById("cmsv6flash").setWindowNum(36);
                  //再配置当前的窗口数目
                  var windowNum = $.trim($('.windowNumber').val());
                  if(windowNum == '') {
                      $('.windowNumber').focus();
                      return;
                  }
                  swfobject.getObjectById("cmsv6flash").setWindowNum(windowNum);
                  //设置服务器信息
                  var serverIp = $.trim($('#serverIp').val());
                  if(!serverIp) {
                      $('#serverIp').focus();
                      return;
                  }
                  var serverPort = $.trim($('#serverPort').val());
                  if(!serverPort) {
                      $('#serverPort').focus();
                      return;
                  }
                  swfobject.getObjectById("cmsv6flash").setServerInfo(serverIp, serverPort);
                  isInitFinished = true;
               }
          }
          
          /**
           * 设置视频插件窗口数量
           **/
          function setVideoWindowNumber() {
              if (!isInitFinished){
                  return;
              } else {
                  //窗口数目
                  var windowNum = $.trim($('.windowNumber').val());
                  if(windowNum == '') {
                      $('.windowNumber').focus();
                      return;
                  }
                  swfobject.getObjectById("cmsv6flash").setWindowNum(windowNum);
              }
          }
          
          /**
           * 设置视频插件服务器信息
           **/
          function setVideoServer() {
              if (!isInitFinished){
                  return;
              } else {
                  //服务器信息
                  var serverIp = $.trim($('#serverIp').val());
                  if(!serverIp) {
                      $('#serverIp').focus();
                      return;
                  }
                  var serverPort = $.trim($('#serverPort').val());
                  if(!serverPort) {
                      $('#serverPort').focus();
                      return;
                  }
                  swfobject.getObjectById("cmsv6flash").setServerInfo(serverIp, serverPort);
              }
          }
          
          /**
           * 设置视频插件语言
           **/
          function setVideoLanguage() {
              if (!isInitFinished){
                  return;
              } else {
                  //语言文件
                  var language = $.trim($('.languagePath').val());
                 if(!language) {
                     $('.languagePath').focus();
                     return;
                 }
                  swfobject.getObjectById("cmsv6flash").setLanguage(language);
              }
          }
          
          /**
           * 设置窗口标题
           **/
          function setWindowTitle() {
              if (!isInitFinished){
                  return;
              } else {
                  //窗口下标
                  var index = $.trim($('.liveVideoIndex').val());
                 if(index == '') {
                     $('.liveVideoIndex').focus();
                     return;
                 }
                 //标题
                 var title = $.trim($('.liveWindowTitle').val());
                  swfobject.getObjectById("cmsv6flash").setVideoInfo(index, title);
              }
          }
          
          //播放实时视频
          function playLiveVideo() {
              if(!isInitFinished) {
                  return;
              }
              //窗口下标
              var index = $.trim($('.liveVideoIndex').val());
              if(index == '') {
                  $('.liveVideoIndex').focus();
                  return;
              }
              //jsession会话号
              var jsession = $.trim($('.liveJsession').val());
              if(jsession == '') {
                  $('.liveJsession').focus();
                  return;
              }
              //设备号
              var devIdno = $.trim($('.liveDevIdno').val());
              if(devIdno == '') {
                  $('.liveDevIdno').focus();
                  return;
              }
              //通道号
              var channel = $.trim($('.liveChannel').val());
              if(channel == '') {
                  $('.liveChannel').focus();
                  return;
              }
              //码流
              var stream = $.trim($('.liveStream').val());
              if(stream == '') {
                  $('.liveStream').focus();
                  return;
              }
             //最小缓冲时长
             var minBufferTime = $.trim($('.minBufferTime').val());
             if(minBufferTime != ''){
                 swfobject.getObjectById("cmsv6flash").setBufferTime(index, minBufferTime);
             }
             //最大缓冲时长
             var maxBufferTime = $.trim($('.maxBufferTime').val());
             if(maxBufferTime != ''){
                 swfobject.getObjectById("cmsv6flash").setBufferTimeMax(index, maxBufferTime);
             }
 
              //先停止视频窗口
              swfobject.getObjectById("cmsv6flash").stopVideo(index);
              //设置窗口标题
              var title  = $.trim($('.liveWindowTitle').val());
              swfobject.getObjectById("cmsv6flash").setVideoInfo(index, title);
              //播放视频
              swfobject.getObjectById("cmsv6flash").startVideo(index, jsession, devIdno, channel, stream, true);
          }
          
          /**
           * 停止视频窗口播放视频窗口
           **/
          function stopLiveVideo() {
              if (!isInitFinished){
                  return;
              } else {
                  //窗口下标
                  var index = $.trim($('.liveVideoIndex').val());
                 if(index == '') {
                     $('.liveVideoIndex').focus();
                     return;
                 }
                  swfobject.getObjectById("cmsv6flash").stopVideo(index);
              }
          }
          
          /**
           * 重置实时视频窗口
           **/
          function reSetLiveVideo() {
              if (!isInitFinished){
                  return;
              } else {
                  //窗口下标
                  var index = $.trim($('.liveVideoIndex').val());
                  if(index == '') {
                     $('.liveVideoIndex').focus();
                     return;
                 }
                  swfobject.getObjectById("cmsv6flash").reSetVideo(index);
              }
          }
          
          /**
           * 开始监听
           **/
          function startMonitor() {
              if (!isInitFinished){
                  return;
              } else {
                  //会话号
                  var jsession = $.trim($('.monitorJsession').val());
                  if(jsession == '') {
                      $('.monitorJsession').focus();
                      return;
                  }
                  //设备号
                  var devIdno = $.trim($('.monitorDevIdno').val());
                  if(devIdno == '') {
                      $('.monitorDevIdno').focus();
                      return;
                  }
                  //通道号
                  var channel = $.trim($('.monitorChannel').val());
                  if(channel == '') {
                      $('.monitorChannel').focus();
                      return;
                  }
                  //服务器ip
                  var ip = $.trim($('.monitorServerIp').val());
                  if(ip == '') {
                      $('.liveStream').focus();
                      return;
                  }
                  //服务器端口
                  var port = $.trim($('.monitorServerPort').val());
                  if(port == '') {
                      $('.monitorServerPort').focus();
                      return;
                  }
                  
                  swfobject.getObjectById("cmsv6flash").setListenParam(1);
                  swfobject.getObjectById("cmsv6flash").startListen(jsession, devIdno, channel, ip, port);
              }
          }
          
          /**
           * 停止监听
           **/
          function stopMonitor() {
              if (!isInitFinished){
                  return;
              } else {
                  swfobject.getObjectById("cmsv6flash").stopListen();
              }
          }
          
          /**
           * 开始对讲
           **/
          function startTalkback() {
              if (!isInitFinished){
                  return;
              } else {
                  //会话号
                  var jsession = $.trim($('.talkbackJsession').val());
                  if(jsession == '') {
                      $('.talkbackJsession').focus();
                      return;
                  }
                  //设备号
                  var devIdno = $.trim($('.talkbackDevIdno').val());
                  if(devIdno == '') {
                      $('.talkbackDevIdno').focus();
                      return;
                  }
                  //服务器ip
                  var ip = $.trim($('.talkbackServerIp').val());
                  if(ip == '') {
                      $('.talkbackStream').focus();
                      return;
                  }
                  //服务器端口
                  var port = $.trim($('.talkbackServerPort').val());
                  if(port == '') {
                      $('.talkbackServerPort').focus();
                      return;
                  }
                  
                  swfobject.getObjectById("cmsv6flash").setTalkParam(1);
                  var ret = swfobject.getObjectById("cmsv6flash").startTalkback(jsession, devIdno, 0, ip, port);
                  //返回 0成功,1表示正在对讲,2表示没有mic,3表示禁用了mic
                  if (ret == 0) {
                } else if (ret == 1) {
                } else if (ret == 2) {
                    alert(lang.nullMic);
                } else if (ret == 3) {            
                    //alert(lang.micStop);
                    $.dialog({id:'talkbacktip', title: lang.talkback_openMic, content: 'url:talkbacktipSP.html', min:false, max:false, lock:true
                        , autoSize:true});
                } else {
                }
              }
          }
          
          /**
           * 停止对讲
           **/
          function stopTalkback() {
              if (!isInitFinished){
                  return;
              } else {
                  swfobject.getObjectById("cmsv6flash").stopTalkback();
              }
          }
          
          /**
           * 开始远程回放
           **/
          function startPlayback() {
              if (!isInitFinished){
                  return;
              } else {
                  //窗口下标
                  var index = $.trim($('.playbackVideoIndex').val());
                  if(index == '') {
                     $('.playbackVideoIndex').focus();
                     return;
                 }
                  //回放url
                  var url = $.trim($('.playbackUrl').val());
                  if(url == '') {
                     $('.playbackUrl').focus();
                     return;
                 }
                  //回放之前先停止
                  swfobject.getObjectById('cmsv6flash').stopVideo(index);
                  //开始回放
                  swfobject.getObjectById("cmsv6flash").startVod(index, url);
              }
          }
          
          /**
           * 停止远程回放
           **/
          function stopPlayback() {
              if (!isInitFinished){
                  return;
              } else {
                  //窗口下标
                  var index = $.trim($('.playbackVideoIndex').val());
                 if(index == '') {
                     $('.playbackVideoIndex').focus();
                     return;
                 }
                  swfobject.getObjectById("cmsv6flash").stopVideo(index);
              }
          }
          
          /**
           * 用户登录
           **/
          function userLogin() {
              //用户名
              var account = $.trim($('.account').val());
             if(account == '') {
                 $('.account').focus();
                 return;
             }
             //密码
              var password = $.trim($('.password').val());
             if(password == '') {
                 $('.password').focus();
                 return;
             }
             var param = [];
             param.push({name: 'account', value: account});
             param.push({name: 'password', value: password});
             
             $.ajax({
                type: 'POST',
                url: 'http://'+ window.location.host+'/StandardApiAction_login.action',
                data: param,
                cache:false,/*禁用浏览器缓存*/
                dataType: 'json',
                success: function (data) {
                    if(data.result == 0){
                        $('.liveJsession').val(data.jsession);
                        $('.monitorJsession').val(data.jsession);
                        $('.talkbackJsession').val(data.jsession);
                    } else {
                        alert(lang.loginError);
                    }
                },
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                    try {
                        if (p.onError) p.onError(XMLHttpRequest, textStatus, errorThrown);
                    } catch (e) {}
                    alert(lang.loginError);
                }
            });
          }
          
          /**
           * 设置缓冲时长
           **/
          function setBufferInfo() {
              if (!isInitFinished){
                  return;
              } else {
                  //窗口下标
                  var index = $.trim($('.liveVideoIndex').val());
                 if(index == '') {
                     $('.liveVideoIndex').focus();
                     return;
                 }
                 //最小缓冲时长
                 var minBufferTime = $.trim($('.minBufferTime').val());
                 //最大缓冲时长
                 var maxBufferTime = $.trim($('.maxBufferTime').val());
                 if(minBufferTime== '' && maxBufferTime== ''){
                     return;
                 }
                 if(maxBufferTime != ''){
                     swfobject.getObjectById("cmsv6flash").setBufferTimeMax(index, maxBufferTime);
                 }
                 if(minBufferTime != ''){
                     swfobject.getObjectById("cmsv6flash").setBufferTime(index, minBufferTime);
                 }
              }
          }
          
          
          
          
          
          function onTtxVideoMsg(index,type) {
              if (index != null && index != "") {
                  index = parseInt(index, 10);
              }
              //窗口事件
              //window message
              if (type == "select") {
                  //选中窗口             select window
                  selectIndex = index;
                  $('#eventTip').text(lang.vedioEventStart+(index+1)+lang.vedioEventEnd);
              } else if (type == "full") {
                  //全屏            Full screen
              } else if (type == "norm") {
                  //退出全屏            Exit full screen
              } 
              //视频播放事件
              //video play messsage
              else if (type == "stop") {
                  //停止播放            stop playing
                  playingStatusArray[index] = false;
              } else if (type == "start") {
                  //开始播放            Start play
                  playingStatusArray[index] = true;
              } else if (type == "sound") {
                  //开启声音            Turn on the sound
              } else if (type == "silent") {
                  //静音            Mute
              } else if (type == "play") {
                  //暂停或停止后重新播放            Play again after pause or stop
              } else if (type == "PicSave") {
                  //截图            screenshot
              }
              //对讲事件
              //Intercom messsage
              else if (type == "startRecive" || type == "uploadRecive" || type == "loadRecive") {
                //开启对讲            Open intercom
            } else if (type == "stopTalk") {
                //关闭对讲            Turn off intercom
            } else if (type == "playRecive") {
                //对讲中            Talkback
            } else if (type == "reciveStreamStop" || type == "reciveNetError" || type == "reciveStreamNotFound") {
                //对讲异常(网络异常等)            Talkback anomalies (network exceptions, etc.)
                
            } else if (type == "uploadNetClosed" || type == "uploadNetError") {
                //连接异常             Connection exception 
            } else if (type == "upload") {
                //对讲讲话            Talkback speech
            } else if (type == "uploadfull") {
                //对讲讲话结束        Talkback speech ends
            }
              //监听事件
              //Listen messsage
              else if (type == "startListen") {
                //开始监听              Start listening    
            } else if (type == "stopListen") {
                //主动停止监听         Active stop monitoring
                
            } else if (type == "listenNetError") {
                //网络异常              Network anomaly
                
            } else if (type == "playListen") {
                //监听中              In listening
            } else if (type == "loadListen" || type == "listenStreamNotFound" || type == "listenStreamStop") {
                //等待请求监听           Waiting request monitoring 
            } 
          }
          
          
        var selectIndex = 0;
          var playingStatusArray = [];
          //判断当前选择窗口是否播放状态
          function checkIsPlaying(){
              if(playingStatusArray[selectIndex]){
                  alert(lang.vedioPlay);
              }else{
                  alert(lang.vedioNoPlay);
              }
          }
          
    </script>
  </head>
  <body>
      <div id="flashExample">
          <div id="cmsv6flash"></div>
          <div></div>
          <div id="eventTip"></div>
              <div class="player-params">
                <div class="player-param">
                        <a id="isPlay" class="button button-primary button-rounded button-small" onclick="checkIsPlaying();">播放状态</a>
                </div>
            </div>
      </div>
    <div id="operateExample">
        <!--  用户登录开始 -->
        <div class="userLogin">
            <p id="getJsessionTitle">登录获取会话号</p>
            <div class="player-params">
                <div class="player-param">
                    <a class="title" id="accountTitle">用户名:</a>
                    <input style="width: 150px;" value="" class="account">
                    <a style="padding-left: 20px;" class="title" id="passwordTitle">密码:</a>
                    <input type="password" style="width: 150px;" value="" class="password">
                </div>
                <div class="player-param">
                    <a id="userLoginBtn" class="button button-primary button-rounded button-small" onclick="userLogin();">登录</a>
                </div>
            </div>
        </div>
        <!--  用户登录结束 -->
        <!--  视频插件初始化开始  -->
        <div class="videoInit">
            <p id="videoInitTitle">初始化</p>
            <div class="player-params">
                <div class="player-param">
                    <a class="title" id="videoLangTitle">插件语言:</a>
                    <select style="width: 140px;" class="languagePath">
                        <option>cn.xml</option>
                        <option>en.xml</option>
                    </select>
<!--                     <input style="width: 140px;" value="cn.xml" class="languagePath"> -->
                    <a style="margin-left: 20px;" class="button button-primary button-rounded button-small settings" onclick="setVideoLanguage()">设置</a>
                </div>
                <div class="player-param">
                    <a class="title" id="videoWidthTitle">插件宽度:</a>
                    <input style="width: 140px;" value="400" class="playerWidth">
                    <a style="padding-left: 20px;" class="title" id="videoHeightTitle">插件高度:</a>
                    <input style="width: 140px;" value="400" class="playerHeight">
                </div>
                <div class="player-param">
                    <a class="title serverIp">服务器IP:</a>
                    <input style="width: 140px;" value="" id="serverIp">
                    <a style="padding-left: 20px;" class="title serverPort">服务器端口:</a>
                    <input style="width: 100px;" value="" id="serverPort">
                    <a style="margin-left: 20px;" class="button button-primary button-rounded button-small settings" onclick="setVideoServer()">设置</a>
                </div>
                <div class="player-param">
                    <a class="title" id="windowNumberTitle">窗口数目:</a>
                    <input style="width: 100px;" value="4" class="windowNumber">
                    <a style="margin-left: 20px;" class="button button-primary button-rounded button-small settings" onclick="setVideoWindowNumber();">设置</a>
                </div>
                <div class="player-param">
                    <a id="videoInitBtn" class="button button-primary button-rounded button-small" onclick="initPlayerExample();">初始化</a>
                </div>
            </div>
        </div>
        <!--  视频插件初始化结束  -->
        <!--  实时视频开始  -->
        <div class="videoLive">
            <p id="videoLiveTitle">实时视频</p>
            <div class="player-params">
                <div class="player-param">
                    <a class="title windowIndex">窗口下标:</a>
                    <input style="width: 80px;" value="0" class="liveVideoIndex">
                    <a style="padding-left: 20px;" class="title" id="videoTitleTitle">标题:</a>
                    <input style="width: 300px;" value="vehicle123124235" class="liveWindowTitle">
                    <a style="margin-left: 20px;" class="button button-primary button-rounded button-small settings" onclick="setWindowTitle();">设置</a>
                </div>
                <div class="player-param">
                    <a class="title jsessionId">会话号:</a>
                    <input style="width: 300px;" value="" class="liveJsession">
                    <a style="padding-left: 20px;" class="title" id="videoStreamTitle">码流:</a>
                    <select style="width: 100px;" class="liveStream">
                        <option>0</option>
                        <option selected="selected">1</option>
                    </select>
<!--                     <input style="width: 100px;" value="1" class="liveStream"> -->
                </div>
                <div class="player-param">
                    <a class="title devIdnoTitle">设备号:</a>
                    <input style="width: 300px;" value="500000" class="liveDevIdno">
                    <a style="padding-left: 20px;" class="title devChannelTitle">通道:</a>
                    <input style="width: 100px;" value="0" class="liveChannel">
                </div>
                <div class="player-param">
                    <div>
                        <a class="title minBufferTimeTitle">最小缓冲时长:</a>
                        <input style="width: 80px;" value="2" class="minBufferTime">
                        <a style="padding-left: 20px;" class="title maxBufferTimeTitle">最大缓冲时长:</a>
                        <input style="width: 80px;" value="6" class="maxBufferTime">
                        <a style="margin-left: 20px;" class="button button-primary button-rounded button-small settings" onclick="setBufferInfo();">设置</a>
                    </div>
                    <div>
                        <span id="bufferTimeDesc" style="font-size:10px;">说明:主要用于调整视频延时,当缓存的数据达到了最小缓冲时长时(默认为2秒),则会进行播放,当到了最大缓冲时长(默认为6秒),则进行快放。</span>
                    </div>
                </div>
                <div class="player-param">
                    <a id="videoPlayBtn" class="button button-primary button-rounded button-small" onclick="playLiveVideo();">播放</a>
                    <a style="margin-left: 20px;" class="button button-primary button-rounded button-small stop" onclick="stopLiveVideo()">停止</a>
                    <a id="videoResetBtn" style="margin-left: 20px;" class="button button-primary button-rounded button-small" onclick="reSetLiveVideo()">重置</a>
                </div>
            </div>
        </div>
        <!--  实时视频结束  -->
        <!--  监听开始  -->
        <div class="monitor">
            <p id="monitorTitle">监听</p>
            <div class="player-params">
                <div class="player-param">
                    <a class="title jsessionId">会话号:</a>
                    <input style="width: 400px;" value="" class="monitorJsession">
                </div>
                <div class="player-param">
                    <a class="title devIdnoTitle">设备号:</a>
                    <input style="width: 200px;" value="500000" class="monitorDevIdno">
                    <a style="padding-left: 20px;" class="title devChannelTitle">通道:</a>
                    <input style="width: 120px;" value="0" class="monitorChannel">
                </div>
                <div class="player-param">
                    <a class="title serverIp">服务器IP:</a>
                    <input style="width: 200px;" value="" class="monitorServerIp">
                    <a style="padding-left: 20px;" class="title serverPort">端口:</a>
                    <input style="width: 100px;" value="" class="monitorServerPort">
                </div>
                <div class="player-param">
                    <a id="monitorBtn" class="button button-primary button-rounded button-small" onclick="startMonitor();">监听</a>
                    <a style="margin-left: 20px;" class="button button-primary button-rounded button-small stop" onclick="stopMonitor()">停止</a>
                </div>
            </div>
        </div>
        <!--  监听结束  -->
        <!--  对讲开始  -->
        <div class="talkback">
            <p id="talkbackTitle">对讲</p>
            <div class="player-params">
                <div class="player-param">
                    <a class="title jsessionId">会话号:</a>
                    <input style="width: 400px;" value="" class="talkbackJsession">
                </div>
                <div class="player-param">
                    <a class="title devIdnoTitle">设备号:</a>
                    <input style="width: 400px;" value="500000" class="talkbackDevIdno">
                </div>
                <div class="player-param">
                    <a class="title serverIp">服务器IP:</a>
                    <input style="width: 200px;" value="" class="talkbackServerIp">
                    <a style="padding-left: 20px;" class="title serverPort">端口:</a>
                    <input style="width: 100px;" value="" class="talkbackServerPort">
                </div>
                <div class="player-param">
                    <a id="talkbackBtn" class="button button-primary button-rounded button-small" onclick="startTalkback();">对讲</a>
                    <a style="margin-left: 20px;" class="button button-primary button-rounded button-small stop" onclick="stopTalkback()">停止</a>
                </div>
            </div>
        </div>
        <!--  对讲结束  -->
        <!--  远程回放开始  -->
        <div class="playback">
            <p id="playbackTitle">远程回放</p>
            <div class="player-params">
                <div class="player-param">
                    <a class="title windowIndex">窗口下标:</a>
                    <input style="width: 80px;" value="0" class="playbackVideoIndex">
                </div>
                <div class="player-param">
                    <a id="urlTitle" class="title">url链接:</a>
                    <textarea style="width: 400px;height:100px;" class="playbackUrl">http://127.0.0.1:6604/3/5?DownType=5&DevIDNO=10009&FILELOC=1&FILESVR=0&FILECHN=0&FILEBEG=1&FILEEND=100&PLAYIFRM=0&PLAYFILE=/mnt/hgfs/linux/libdvrnet/jni/demo/bin/record/H20121123-112931P3A1P0.avi&PLAYBEG=0&PLAYEND=0&PLAYCHN=0</textarea>
                </div>
                <div class="player-param">
                    <a id="playbackBtn" class="button button-primary button-rounded button-small" onclick="startPlayback();">开始回放</a>
                    <a style="margin-left: 20px;" class="button button-primary button-rounded button-small stop" onclick="stopPlayback()">停止回放</a>
                </div>
            </div>
        </div>
        <!--  远程回放开始  -->
    </div>
  </body>
</html>