summaryrefslogtreecommitdiff
path: root/www/templates/monitors-modal.html
blob: 064b2ff886f734632c401d3e6cd68198cf5650da (plain)
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
<div ng-controller="MonitorModalCtrl" ng-cloak>

    <ion-modal-view cache-view="false" style="background-color:#444444"  >
        <ion-content on-double-tap="closeModal();"  >
            
            <ion-scroll delegate-handle="imgscroll" has-bouncing=false min-zoom=1 zooming="true" direction="xy" style="width: 100%;" overflow-scroll="false"  >
                <!-- android needs this 100vh - otherwise max- does not work -->
                <!--  -->
                <div id="monitorimage" style="height: 100vh;" class="main">



                    <div ng-if="$root.authSession!='undefined'">


                        <div ng-if="!animationInProgress && !isBackground() && connKey">
                            <!--<span style="color:white">{{currentStreamMode}}</span>-->
                            
                            <img id="singlemonitor" style="width:100vw; height:100vh;"  image-spinner-loader="lines" image-spinner-src="{{monitor.Monitor.streamingURL}}/nph-zms?mode={{currentStreamMode}}&monitor={{monitorId}}{{$root.authSession}}&rand={{$root.modalRand}}&connkey={{connKey}}" ng-class="{'object-fit_cover':imageFit==false, 'object-fit_contain':imageFit==true}" on-swipe-left="onSwipe(monitorId,1)" on-swipe-right="onSwipe(monitorId,-1)" on-double-tap="closeModal();" />
                            
                           

                        </div>
                        <div ng-if="animationInProgress || isBackground()">
                            <img style="width:100vw; height:100vh" ng-src="img/pausevideo.png" class="object-fit_contain" />
                        </div>

                    </div>
                    <div ng-if="$root.authSession=='undefined'">
                        <img id="singlemonitor" ng-src="img/pausevideo.png" style="width:100vw; height:100vh; display:block;" class="object-fit_contain" width="{{((devWidth)/(7-monitorSize[$index]))}}px;" />
                    </div>
                </div>
            </ion-scroll>
            
        </ion-content>


        <div ng-show="isControllable=='1' && showPTZ">
            <div class="ptzcentered">
                <circular options="ptzRadialMenuOptions">
                </circular>
            </div>

            <div ng-if="presetOn" class="ptzpresetbuttons animated fadeInDown" id="presetlist">
                <div ng-repeat="preset in ptzPresets track by $index">
                    <button class="button {{preset.icon}} button-small button-royal" style="float:left;margin-right:10px;margin-bottom:10px;" ng-click="controlPTZ(monitorId, preset.cmd);">{{preset.name}}</button>


                </div>
            </div>


            <div class="ptzcenteredbutton">
                <div ng-if="canZoom">
                    <a class="button button-small icon ion-search button-positive" href="" ng-click="controlPTZ(monitorId, zoomInCommand);">+</a>
                    <a class="button button-small icon ion-search button-positive" href="" ng-click="controlPTZ(monitorId, zoomOutCommand);">-</a>
                    <a class="button button-small icon ion-search button-positive" href="" ng-click="controlPTZ(monitorId, zoomStopCommand);">x</a>
                    
                </div>
                <br/>
                <a class="button button-small icon ion-stop  button-assertive" href="" ng-click="controlPTZ(monitorId, ptzStopCommand);"></a>
                <a class="button button-small button-royal" href="" ng-click="togglePresets();">{{'kPresets' | translate}}</a>
            </div>

        </div>


        

    </ion-modal-view>
    <nav mfb-menu position="br" effect="zoomin" label="{{'kCollapse' | translate}}" active-icon="ion-chevron-down" resting-icon="ion-chevron-up" toggling-method="click">
        <button mfb-button icon="ion-arrow-resize" label="{{imageFit? ('kFitScreen' | translate):('kFillScreen' | translate)}}" ng-click="scaleImage();">
        </button>
        <button mfb-button icon="ion-refresh" label="{{'kRefresh' | translate}}" ng-click="reloadView();">
        </button>
        <button mfb-button icon="ion-arrow-expand" label="{{'kPTZ'| translate}}" ng-click="togglePTZ();">
        </button>
        
    </nav>

    <nav mfb-menu position="tr" effect="zoomin" label="{{'kCollapse' | translate}}" active-icon="ion-chevron-up" resting-icon="ion-chevron-down" toggling-method="click">
        <button mfb-button icon="ion-android-arrow-back" label="{{'kPrevMonitor' | translate}} " ng-click="onTap(monitorId,-1);">
        </button>
        <button mfb-button icon="ion-android-arrow-forward" label="{{'kNextMonitor' | translate}}" ng-click="onTap(monitorId,1);">
        </button>
        <button mfb-button icon="ion-close" label="{{'kExitLiveView' | translate}}" ng-click="closeModal();">
        </button>

    </nav>
    
    

    
  <div id="flyoutmenu" style="position:absolute;bottom:80px;left:10px">
    <ul>

        <li>
            <a href="" ng-click="saveImageToPhone(monitorId)"> <i class="icon  ion-ios-camera"></i></a>
        </li>

        <li ng-if="$root.platformOS == 'desktop'">
            <a href="" ng-click="zoomImage(1)"><i class="ion-plus-round"></i></a>
        </li>
        <li ng-if="$root.platformOS == 'desktop'">
            <a href="" ng-click="zoomImage(-1)"><i class="ion-minus-round"></i></a>
        </li>

        <li>
            <a href="" ng-click="enableAlarm(monitorId,true)"> <i class="icon  ion-flash"></i></a>
        </li>
        <li>
            <a href="" ng-click="enableAlarm(monitorId,false)"> <i class="icon  ion-flash-off"></i></a>
        </li>




        <li ng-if="$root.isAlarm">
            <a data-badge="{{$root.alarmCount}}" class="notification-badge animated infinite tada" href="" ng-click="handleAlarms()"><i class="ion-ios-bell"></i></a>
        </li>


    </ul>
</div>

    <div class="monitor-modal-text">{{monitorName}}&nbsp;<span style="{{stateColor()}}">{{monStatus}}&nbsp;</span></div>

</div>