retold-remote 0.0.23 → 0.0.26

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.
Files changed (79) hide show
  1. package/css/retold-remote.css +343 -20
  2. package/docs/.nojekyll +0 -0
  3. package/docs/README.md +64 -12
  4. package/docs/_cover.md +6 -6
  5. package/docs/_sidebar.md +2 -0
  6. package/docs/_topbar.md +1 -1
  7. package/docs/_version.json +7 -0
  8. package/docs/collections.md +30 -0
  9. package/docs/css/docuserve.css +327 -0
  10. package/docs/ebook-reader.md +75 -1
  11. package/docs/image-explorer.md +62 -2
  12. package/docs/index.html +39 -0
  13. package/docs/retold-catalog.json +254 -0
  14. package/docs/retold-keyword-index.json +31216 -0
  15. package/docs/server-setup.md +122 -91
  16. package/docs/stack-launcher.md +218 -0
  17. package/docs/synology.md +585 -0
  18. package/docs/ultravisor-configuration.md +5 -5
  19. package/docs/ultravisor-integration.md +4 -2
  20. package/package.json +20 -14
  21. package/source/Pict-Application-RetoldRemote.js +22 -0
  22. package/source/RetoldRemote-ExtensionMaps.js +1 -1
  23. package/source/cli/RetoldRemote-Server-Setup.js +460 -7
  24. package/source/cli/RetoldRemote-Stack-Launcher.js +563 -0
  25. package/source/cli/RetoldRemote-Stack-Run.js +41 -0
  26. package/source/cli/commands/RetoldRemote-Command-Serve.js +129 -54
  27. package/source/providers/CollectionManager-AddItems.js +166 -0
  28. package/source/providers/Pict-Provider-GalleryNavigation.js +55 -0
  29. package/source/providers/Pict-Provider-OperationStatus.js +597 -0
  30. package/source/providers/keyboard-handlers/KeyHandler-ImageExplorer.js +20 -1
  31. package/source/providers/keyboard-handlers/KeyHandler-Viewer.js +23 -0
  32. package/source/server/RetoldRemote-AudioWaveformService.js +49 -3
  33. package/source/server/RetoldRemote-CollectionExportService.js +763 -0
  34. package/source/server/RetoldRemote-CollectionService.js +5 -0
  35. package/source/server/RetoldRemote-EbookService.js +218 -3
  36. package/source/server/RetoldRemote-ImageService.js +221 -46
  37. package/source/server/RetoldRemote-MediaService.js +63 -4
  38. package/source/server/RetoldRemote-MetadataCache.js +25 -5
  39. package/source/server/RetoldRemote-OperationBroadcaster.js +363 -0
  40. package/source/server/RetoldRemote-SubimageService.js +680 -0
  41. package/source/server/RetoldRemote-ToolDetector.js +50 -0
  42. package/source/server/RetoldRemote-UltravisorBeacon.js +18 -3
  43. package/source/server/RetoldRemote-UltravisorDispatcher.js +65 -491
  44. package/source/server/RetoldRemote-UltravisorOperations.js +133 -20
  45. package/source/server/RetoldRemote-VideoFrameService.js +302 -9
  46. package/source/views/MediaViewer-EbookViewer.js +419 -1
  47. package/source/views/MediaViewer-PdfViewer.js +1050 -0
  48. package/source/views/PictView-Remote-AudioExplorer.js +77 -1
  49. package/source/views/PictView-Remote-CollectionsPanel.js +213 -0
  50. package/source/views/PictView-Remote-Gallery.js +365 -64
  51. package/source/views/PictView-Remote-ImageExplorer.js +1529 -44
  52. package/source/views/PictView-Remote-ImageViewer.js +2 -2
  53. package/source/views/PictView-Remote-Layout.js +58 -0
  54. package/source/views/PictView-Remote-MediaViewer.js +100 -25
  55. package/source/views/PictView-Remote-RegionsBrowser.js +554 -0
  56. package/source/views/PictView-Remote-SubimagesPanel.js +353 -0
  57. package/source/views/PictView-Remote-TopBar.js +1 -0
  58. package/source/views/PictView-Remote-VideoExplorer.js +77 -1
  59. package/web-application/css/docuserve.css +277 -23
  60. package/web-application/css/retold-remote.css +343 -20
  61. package/web-application/docs/README.md +64 -12
  62. package/web-application/docs/_cover.md +6 -6
  63. package/web-application/docs/_sidebar.md +2 -0
  64. package/web-application/docs/_topbar.md +1 -1
  65. package/web-application/docs/collections.md +30 -0
  66. package/web-application/docs/ebook-reader.md +75 -1
  67. package/web-application/docs/image-explorer.md +62 -2
  68. package/web-application/docs/server-setup.md +122 -91
  69. package/web-application/docs/stack-launcher.md +218 -0
  70. package/web-application/docs/synology.md +585 -0
  71. package/web-application/docs/ultravisor-configuration.md +5 -5
  72. package/web-application/docs/ultravisor-integration.md +4 -2
  73. package/web-application/js/pict-docuserve.min.js +12 -12
  74. package/web-application/js/pict.min.js +2 -2
  75. package/web-application/js/pict.min.js.map +1 -1
  76. package/web-application/retold-remote.js +6596 -1784
  77. package/web-application/retold-remote.js.map +1 -1
  78. package/web-application/retold-remote.min.js +75 -23
  79. package/web-application/retold-remote.min.js.map +1 -1
@@ -54,9 +54,17 @@ class RetoldRemoteAudioWaveformService extends libFableServiceProviderBase
54
54
  // Ultravisor dispatcher — set via setDispatcher()
55
55
  this._dispatcher = null;
56
56
 
57
+ // Operation broadcaster — set via setBroadcaster()
58
+ this._broadcaster = null;
59
+
57
60
  // Detect audiowaveform availability
58
61
  this.hasAudiowaveform = this._detectCommand('audiowaveform --version');
59
62
 
63
+ // Detect local ffprobe at startup so _probeAudio can prefer it over
64
+ // dispatching through the Ultravisor pipeline. Same pattern as
65
+ // VideoFrameService — see _probeAudio for the strategy ordering.
66
+ this._ffprobeLocalAvailable = this._detectCommand('ffprobe -version');
67
+
60
68
  // Apply explorer state persistence mixin
61
69
  libExplorerStateMixin.apply(this, AUDIO_EXPLORER_STATE_SOURCE, 'audio-explorer');
62
70
 
@@ -74,6 +82,27 @@ class RetoldRemoteAudioWaveformService extends libFableServiceProviderBase
74
82
  this._dispatcher = pDispatcher;
75
83
  }
76
84
 
85
+ /**
86
+ * Set the operation broadcaster for progress events and cancellation.
87
+ */
88
+ setBroadcaster(pBroadcaster)
89
+ {
90
+ this._broadcaster = pBroadcaster;
91
+ }
92
+
93
+ _emitProgress(pOperationId, pPayload)
94
+ {
95
+ if (this._broadcaster && pOperationId)
96
+ {
97
+ this._broadcaster.broadcastProgress(pOperationId, pPayload);
98
+ }
99
+ }
100
+
101
+ _isCancelled(pOperationId)
102
+ {
103
+ return !!(this._broadcaster && pOperationId && this._broadcaster.isCancelled(pOperationId));
104
+ }
105
+
77
106
  /**
78
107
  * Check if a command-line tool is available.
79
108
  *
@@ -127,7 +156,16 @@ class RetoldRemoteAudioWaveformService extends libFableServiceProviderBase
127
156
 
128
157
  /**
129
158
  * Probe an audio file with ffprobe to get metadata.
130
- * Tries Ultravisor dispatch first, falls back to local execution.
159
+ *
160
+ * Strategy ordering (most efficient first):
161
+ * 1. LOCAL ffprobe — when this process has the binary on PATH (detected
162
+ * at constructor time). Reads the container index in milliseconds,
163
+ * no Ultravisor pipeline involved, no file copies. The right call
164
+ * for stack-mode deployments.
165
+ * 2. DISPATCHED probe — only when the local binary is missing. Goes
166
+ * through the rr-media-probe operation graph (resolve → transfer →
167
+ * probe → result). With shared-fs the file isn't actually copied,
168
+ * but the operation graph still runs.
131
169
  *
132
170
  * @param {string} pAbsPath - Absolute path to the audio file
133
171
  * @param {Function} fCallback - Callback(pError, { duration, sampleRate, channels, codec, bitrate, size })
@@ -136,7 +174,14 @@ class RetoldRemoteAudioWaveformService extends libFableServiceProviderBase
136
174
  {
137
175
  let tmpSelf = this;
138
176
 
139
- // Try Ultravisor operation trigger first
177
+ // Local-first: if ffprobe is on this host, just run it.
178
+ if (this._ffprobeLocalAvailable)
179
+ {
180
+ return this._probeAudioLocal(pAbsPath, fCallback);
181
+ }
182
+
183
+ // No local ffprobe — fall back to dispatching the probe through the
184
+ // Ultravisor mesh.
140
185
  if (this._dispatcher && this._dispatcher.isAvailable())
141
186
  {
142
187
  let tmpRelPath;
@@ -166,7 +211,7 @@ class RetoldRemoteAudioWaveformService extends libFableServiceProviderBase
166
211
  {
167
212
  let tmpData = JSON.parse(tmpProcessOutput.Result);
168
213
  let tmpParsed = tmpSelf._parseAudioProbeData(tmpData);
169
- tmpSelf.fable.log.info(`ffprobe (audio) via operation trigger for ${tmpRelPath}`);
214
+ tmpSelf.fable.log.info(`ffprobe (audio) via operation trigger for ${tmpRelPath} (no local ffprobe)`);
170
215
  return fCallback(null, tmpParsed);
171
216
  }
172
217
  }
@@ -182,6 +227,7 @@ class RetoldRemoteAudioWaveformService extends libFableServiceProviderBase
182
227
  }
183
228
  }
184
229
 
230
+ // Last resort: try local even though detection said it was missing.
185
231
  return this._probeAudioLocal(pAbsPath, fCallback);
186
232
  }
187
233