@christianriedl/media 1.0.52 → 1.0.54

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@christianriedl/media",
3
- "version": "1.0.52",
3
+ "version": "1.0.54",
4
4
  "description": "RIC media interfaces",
5
5
 
6
6
  "main": "dist/index.js",
@@ -18,7 +18,7 @@
18
18
  "author": "Christian Riedl",
19
19
  "license": "ISC",
20
20
  "dependencies": {
21
- "@christianriedl/utils": "^1.0.77",
21
+ "@christianriedl/utils": "^1.0.79",
22
22
  "@christianriedl/rest": "^1.0.47",
23
23
  "@christianriedl/epg": "^1.0.26"
24
24
  },
@@ -128,6 +128,15 @@
128
128
  async function onKey(ev: KeyboardEvent) {
129
129
  switch (ev.code) {
130
130
  case "Escape":
131
+ if (appState.fullScreeen.value) {
132
+ await appState.exitFullScreen();
133
+ infoDialog.value = false;
134
+ return;
135
+ }
136
+ if (infoDialog.value) {
137
+ infoDialog.value = false;
138
+ return;
139
+ }
131
140
  router.back();
132
141
  break;
133
142
  case "ArrowLeft":
@@ -141,31 +150,27 @@
141
150
  infoDialog.value = false;
142
151
  break;
143
152
  case "KeyI": // Info
144
- const item = items[index.value];
145
- const exif = await mediaService.getExifInfo(item.DLNAParentID, item.DLNAID);
146
- setMetaData(exif, item);
147
- infoDialog.value = true;
153
+ if (infoDialog.value) {
154
+ infoDialog.value = false;
155
+ }
156
+ else {
157
+ const item = items[index.value];
158
+ const exif = await mediaService.getExifInfo(item.DLNAParentID, item.DLNAID);
159
+ setMetaData(exif, item);
160
+ infoDialog.value = true;
161
+ }
148
162
  break;
149
163
  case "KeyC": // Continue
150
164
  cycle.value = true;
151
165
  break;
152
166
  case "KeyF": // Fullscreen
167
+ infoDialog.value = false;
153
168
  if (appState.fullScreen.value) {
154
- if (window.document.exitFullscreen) {
155
- await window.document.exitFullscreen();
156
- appState.fullScreen.value = window.document.fullscreenElement != null;
157
- }
158
- else
159
- appState.fullScreen.value = false;
169
+ await appState.exitFullScreen();
160
170
  }
161
171
  else {
162
172
  const mainEle = window.document.getElementsByTagName('main')[0];
163
- if (mainEle.requestFullscreen) {
164
- await mainEle.requestFullscreen();
165
- appState.fullScreen.value = window.document.fullscreenElement != null;
166
- }
167
- else
168
- appState.fullScreen.value = true;
173
+ await appState.setFullScreen(mainEle);
169
174
  }
170
175
  break;
171
176
  case "KeyP":