retold-remote 0.0.4 → 0.0.6
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/docs/README.md +181 -0
- package/docs/_cover.md +14 -0
- package/docs/_sidebar.md +10 -0
- package/docs/_topbar.md +3 -0
- package/docs/audio-viewer.md +133 -0
- package/docs/ebook-reader.md +90 -0
- package/docs/image-viewer.md +90 -0
- package/docs/server-setup.md +262 -0
- package/docs/video-viewer.md +134 -0
- package/html/docs.html +59 -0
- package/package.json +21 -7
- package/source/Pict-Application-RetoldRemote.js +143 -2
- package/source/RetoldRemote-ExtensionMaps.js +33 -0
- package/source/cli/RetoldRemote-Server-Setup.js +82 -67
- package/source/cli/commands/RetoldRemote-Command-Serve.js +5 -26
- package/source/providers/Pict-Provider-CollectionManager.js +934 -0
- package/source/providers/Pict-Provider-FormattingUtilities.js +109 -0
- package/source/providers/Pict-Provider-GalleryFilterSort.js +2 -11
- package/source/providers/Pict-Provider-GalleryNavigation.js +270 -353
- package/source/providers/Pict-Provider-RetoldRemoteIcons.js +52 -0
- package/source/providers/Pict-Provider-ToastNotification.js +96 -0
- package/source/providers/keyboard-handlers/KeyHandler-AudioExplorer.js +88 -0
- package/source/providers/keyboard-handlers/KeyHandler-Gallery.js +190 -0
- package/source/providers/keyboard-handlers/KeyHandler-Sidebar.js +65 -0
- package/source/providers/keyboard-handlers/KeyHandler-VideoExplorer.js +57 -0
- package/source/providers/keyboard-handlers/KeyHandler-Viewer.js +197 -0
- package/source/server/RetoldRemote-ArchiveService.js +2 -12
- package/source/server/RetoldRemote-AudioWaveformService.js +7 -16
- package/source/server/RetoldRemote-CollectionService.js +684 -0
- package/source/server/RetoldRemote-EbookService.js +7 -16
- package/source/server/RetoldRemote-MediaService.js +3 -14
- package/source/server/RetoldRemote-ParimeCache.js +349 -0
- package/source/server/RetoldRemote-ThumbnailCache.js +52 -20
- package/source/server/RetoldRemote-VideoFrameService.js +7 -15
- package/source/views/PictView-Remote-AudioExplorer.js +10 -43
- package/source/views/PictView-Remote-CollectionsPanel.js +1087 -0
- package/source/views/PictView-Remote-Gallery.js +237 -44
- package/source/views/PictView-Remote-ImageViewer.js +1 -34
- package/source/views/PictView-Remote-Layout.js +410 -20
- package/source/views/PictView-Remote-MediaViewer.js +338 -51
- package/source/views/PictView-Remote-SettingsPanel.js +155 -138
- package/source/views/PictView-Remote-TopBar.js +615 -14
- package/source/views/PictView-Remote-VLCSetup.js +766 -0
- package/source/views/PictView-Remote-VideoExplorer.js +20 -54
- package/web-application/css/docuserve.css +73 -0
- package/web-application/docs/README.md +181 -0
- package/web-application/docs/_cover.md +14 -0
- package/web-application/docs/_sidebar.md +10 -0
- package/web-application/docs/_topbar.md +3 -0
- package/web-application/docs/audio-viewer.md +133 -0
- package/web-application/docs/ebook-reader.md +90 -0
- package/web-application/docs/image-viewer.md +90 -0
- package/web-application/docs/server-setup.md +262 -0
- package/web-application/docs/video-viewer.md +134 -0
- package/web-application/docs.html +59 -0
- package/web-application/js/pict-docuserve.min.js +58 -0
- package/web-application/js/pict.min.js +2 -2
- package/web-application/js/pict.min.js.map +1 -1
- package/web-application/retold-remote.js +2558 -439
- package/web-application/retold-remote.js.map +1 -1
- package/web-application/retold-remote.min.js +41 -11
- package/web-application/retold-remote.min.js.map +1 -1
- package/server.js +0 -43
|
@@ -342,7 +342,7 @@ class RetoldRemoteAudioExplorerView extends libPictView
|
|
|
342
342
|
// Header
|
|
343
343
|
tmpHTML += '<div class="retold-remote-aex-header">';
|
|
344
344
|
tmpHTML += '<button class="retold-remote-aex-nav-btn" onclick="pict.views[\'RetoldRemote-AudioExplorer\'].goBack()" title="Back to audio (Esc)">← Back</button>';
|
|
345
|
-
tmpHTML += '<div class="retold-remote-aex-title">Audio Explorer — ' + this.
|
|
345
|
+
tmpHTML += '<div class="retold-remote-aex-title">Audio Explorer — ' + this.pict.providers['RetoldRemote-FormattingUtilities'].escapeHTML(tmpFileName) + '</div>';
|
|
346
346
|
tmpHTML += '</div>';
|
|
347
347
|
|
|
348
348
|
// Info bar (populated after waveform loads)
|
|
@@ -449,18 +449,18 @@ class RetoldRemoteAudioExplorerView extends libPictView
|
|
|
449
449
|
if (tmpInfoBar)
|
|
450
450
|
{
|
|
451
451
|
let tmpInfoHTML = '';
|
|
452
|
-
tmpInfoHTML += '<span class="retold-remote-aex-info-item"><span class="retold-remote-aex-info-label">Duration</span> <span class="retold-remote-aex-info-value">' + this.
|
|
452
|
+
tmpInfoHTML += '<span class="retold-remote-aex-info-item"><span class="retold-remote-aex-info-label">Duration</span> <span class="retold-remote-aex-info-value">' + this.pict.providers['RetoldRemote-FormattingUtilities'].escapeHTML(tmpData.DurationFormatted) + '</span></span>';
|
|
453
453
|
if (tmpData.SampleRate)
|
|
454
454
|
{
|
|
455
455
|
tmpInfoHTML += '<span class="retold-remote-aex-info-item"><span class="retold-remote-aex-info-label">Sample Rate</span> <span class="retold-remote-aex-info-value">' + (tmpData.SampleRate / 1000).toFixed(1) + ' kHz</span></span>';
|
|
456
456
|
}
|
|
457
457
|
if (tmpData.Channels)
|
|
458
458
|
{
|
|
459
|
-
tmpInfoHTML += '<span class="retold-remote-aex-info-item"><span class="retold-remote-aex-info-label">Channels</span> <span class="retold-remote-aex-info-value">' + tmpData.Channels + (tmpData.ChannelLayout ? ' (' + this.
|
|
459
|
+
tmpInfoHTML += '<span class="retold-remote-aex-info-item"><span class="retold-remote-aex-info-label">Channels</span> <span class="retold-remote-aex-info-value">' + tmpData.Channels + (tmpData.ChannelLayout ? ' (' + this.pict.providers['RetoldRemote-FormattingUtilities'].escapeHTML(tmpData.ChannelLayout) + ')' : '') + '</span></span>';
|
|
460
460
|
}
|
|
461
461
|
if (tmpData.Codec)
|
|
462
462
|
{
|
|
463
|
-
tmpInfoHTML += '<span class="retold-remote-aex-info-item"><span class="retold-remote-aex-info-label">Codec</span> <span class="retold-remote-aex-info-value">' + this.
|
|
463
|
+
tmpInfoHTML += '<span class="retold-remote-aex-info-item"><span class="retold-remote-aex-info-label">Codec</span> <span class="retold-remote-aex-info-value">' + this.pict.providers['RetoldRemote-FormattingUtilities'].escapeHTML(tmpData.Codec) + '</span></span>';
|
|
464
464
|
}
|
|
465
465
|
if (tmpData.Bitrate)
|
|
466
466
|
{
|
|
@@ -468,9 +468,9 @@ class RetoldRemoteAudioExplorerView extends libPictView
|
|
|
468
468
|
}
|
|
469
469
|
if (tmpData.FileSize)
|
|
470
470
|
{
|
|
471
|
-
tmpInfoHTML += '<span class="retold-remote-aex-info-item"><span class="retold-remote-aex-info-label">Size</span> <span class="retold-remote-aex-info-value">' + this.
|
|
471
|
+
tmpInfoHTML += '<span class="retold-remote-aex-info-item"><span class="retold-remote-aex-info-label">Size</span> <span class="retold-remote-aex-info-value">' + this.pict.providers['RetoldRemote-FormattingUtilities'].formatFileSize(tmpData.FileSize) + '</span></span>';
|
|
472
472
|
}
|
|
473
|
-
tmpInfoHTML += '<span class="retold-remote-aex-info-item"><span class="retold-remote-aex-info-label">Peaks</span> <span class="retold-remote-aex-info-value">' + tmpData.PeakCount + ' (' + this.
|
|
473
|
+
tmpInfoHTML += '<span class="retold-remote-aex-info-item"><span class="retold-remote-aex-info-label">Peaks</span> <span class="retold-remote-aex-info-value">' + tmpData.PeakCount + ' (' + this.pict.providers['RetoldRemote-FormattingUtilities'].escapeHTML(tmpData.Method) + ')</span></span>';
|
|
474
474
|
|
|
475
475
|
tmpInfoBar.innerHTML = tmpInfoHTML;
|
|
476
476
|
tmpInfoBar.style.display = '';
|
|
@@ -964,7 +964,7 @@ class RetoldRemoteAudioExplorerView extends libPictView
|
|
|
964
964
|
{
|
|
965
965
|
let tmpViewStartTime = this._viewStart * tmpDuration;
|
|
966
966
|
let tmpViewEndTime = this._viewEnd * tmpDuration;
|
|
967
|
-
tmpViewRangeEl.textContent = this.
|
|
967
|
+
tmpViewRangeEl.textContent = this.pict.providers['RetoldRemote-FormattingUtilities'].formatTimestamp(tmpViewStartTime, true) + ' - ' + this.pict.providers['RetoldRemote-FormattingUtilities'].formatTimestamp(tmpViewEndTime, true);
|
|
968
968
|
}
|
|
969
969
|
|
|
970
970
|
// Selection
|
|
@@ -976,7 +976,7 @@ class RetoldRemoteAudioExplorerView extends libPictView
|
|
|
976
976
|
let tmpSelMin = Math.min(this._selectionStart, this._selectionEnd) * tmpDuration;
|
|
977
977
|
let tmpSelMax = Math.max(this._selectionStart, this._selectionEnd) * tmpDuration;
|
|
978
978
|
let tmpSelDur = tmpSelMax - tmpSelMin;
|
|
979
|
-
tmpSelRangeEl.textContent = this.
|
|
979
|
+
tmpSelRangeEl.textContent = this.pict.providers['RetoldRemote-FormattingUtilities'].formatTimestamp(tmpSelMin, true) + ' - ' + this.pict.providers['RetoldRemote-FormattingUtilities'].formatTimestamp(tmpSelMax, true) + ' (' + this.pict.providers['RetoldRemote-FormattingUtilities'].formatTimestamp(tmpSelDur, true) + ')';
|
|
980
980
|
}
|
|
981
981
|
else
|
|
982
982
|
{
|
|
@@ -994,7 +994,7 @@ class RetoldRemoteAudioExplorerView extends libPictView
|
|
|
994
994
|
if (tmpWrap)
|
|
995
995
|
{
|
|
996
996
|
let tmpNorm = this._viewStart + (this._cursorX / tmpWrap.clientWidth) * (this._viewEnd - this._viewStart);
|
|
997
|
-
tmpCursorEl.textContent = this.
|
|
997
|
+
tmpCursorEl.textContent = this.pict.providers['RetoldRemote-FormattingUtilities'].formatTimestamp(tmpNorm * tmpDuration, true);
|
|
998
998
|
}
|
|
999
999
|
}
|
|
1000
1000
|
else
|
|
@@ -1167,45 +1167,12 @@ class RetoldRemoteAudioExplorerView extends libPictView
|
|
|
1167
1167
|
if (tmpBody)
|
|
1168
1168
|
{
|
|
1169
1169
|
tmpBody.innerHTML = '<div class="retold-remote-aex-error">'
|
|
1170
|
-
+ '<div class="retold-remote-aex-error-message">' + this.
|
|
1170
|
+
+ '<div class="retold-remote-aex-error-message">' + this.pict.providers['RetoldRemote-FormattingUtilities'].escapeHTML(pMessage || 'An error occurred.') + '</div>'
|
|
1171
1171
|
+ '<button class="retold-remote-aex-nav-btn" onclick="pict.views[\'RetoldRemote-AudioExplorer\'].goBack()">Back to Audio</button>'
|
|
1172
1172
|
+ '</div>';
|
|
1173
1173
|
}
|
|
1174
1174
|
}
|
|
1175
1175
|
|
|
1176
|
-
_formatTimestamp(pSeconds)
|
|
1177
|
-
{
|
|
1178
|
-
if (pSeconds === null || pSeconds === undefined || isNaN(pSeconds))
|
|
1179
|
-
{
|
|
1180
|
-
return '--';
|
|
1181
|
-
}
|
|
1182
|
-
let tmpHours = Math.floor(pSeconds / 3600);
|
|
1183
|
-
let tmpMinutes = Math.floor((pSeconds % 3600) / 60);
|
|
1184
|
-
let tmpSecs = Math.floor(pSeconds % 60);
|
|
1185
|
-
let tmpMs = Math.floor((pSeconds % 1) * 10);
|
|
1186
|
-
|
|
1187
|
-
if (tmpHours > 0)
|
|
1188
|
-
{
|
|
1189
|
-
return `${tmpHours}:${String(tmpMinutes).padStart(2, '0')}:${String(tmpSecs).padStart(2, '0')}.${tmpMs}`;
|
|
1190
|
-
}
|
|
1191
|
-
return `${tmpMinutes}:${String(tmpSecs).padStart(2, '0')}.${tmpMs}`;
|
|
1192
|
-
}
|
|
1193
|
-
|
|
1194
|
-
_escapeHTML(pText)
|
|
1195
|
-
{
|
|
1196
|
-
if (!pText) return '';
|
|
1197
|
-
return pText.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
|
1198
|
-
}
|
|
1199
|
-
|
|
1200
|
-
_formatFileSize(pBytes)
|
|
1201
|
-
{
|
|
1202
|
-
if (!pBytes || pBytes === 0) return '0 B';
|
|
1203
|
-
let tmpUnits = ['B', 'KB', 'MB', 'GB', 'TB'];
|
|
1204
|
-
let tmpIndex = Math.floor(Math.log(pBytes) / Math.log(1024));
|
|
1205
|
-
if (tmpIndex >= tmpUnits.length) tmpIndex = tmpUnits.length - 1;
|
|
1206
|
-
let tmpSize = pBytes / Math.pow(1024, tmpIndex);
|
|
1207
|
-
return tmpSize.toFixed(tmpIndex === 0 ? 0 : 1) + ' ' + tmpUnits[tmpIndex];
|
|
1208
|
-
}
|
|
1209
1176
|
}
|
|
1210
1177
|
|
|
1211
1178
|
RetoldRemoteAudioExplorerView.default_configuration = _ViewConfiguration;
|