properly destroy channel preview (#1910)
This commit is contained in:
@@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- Fix startup error with MySql backend caused by database cleaner
|
||||
- Fix emptying trash with ElasticSearch backend
|
||||
- Fix double loading of trash UI elements, and fix reloading of all UI elements after emptying trash
|
||||
- Fix destroying channel preview player when preview dialog is closed
|
||||
- This bug made it difficult to "stop" a channel after previewing it
|
||||
|
||||
## [0.8.8-beta] - 2024-09-19
|
||||
### Added
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
$("h2").addClass("mud-typography mud-typography-h4");
|
||||
$("h3").addClass("mud-typography mud-typography-h5");
|
||||
}
|
||||
|
||||
|
||||
function previewChannel(uri) {
|
||||
var video = document.getElementById('video');
|
||||
if (Hls.isSupported()) {
|
||||
@@ -80,7 +80,7 @@
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function stopPreview() {
|
||||
var hls = $('#video').data('hls');
|
||||
hls && hls.destroy();
|
||||
@@ -114,7 +114,7 @@
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
window.clipboardCopy = {
|
||||
copyText: async function (codeElement) {
|
||||
if (navigator.clipboard && window.isSecureContext) {
|
||||
@@ -124,10 +124,10 @@
|
||||
textArea.value = codeElement.textContent;
|
||||
textArea.style.position = "absolute";
|
||||
textArea.style.left = "-999999px";
|
||||
|
||||
|
||||
document.body.prepend(textArea);
|
||||
textArea.select();
|
||||
|
||||
|
||||
try {
|
||||
document.execCommand('copy');
|
||||
} catch (error) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@inject IJSRuntime JsRuntime
|
||||
@implements IDisposable
|
||||
|
||||
<div>
|
||||
<MudDialog>
|
||||
@@ -43,6 +44,11 @@
|
||||
}
|
||||
|
||||
private void Close()
|
||||
{
|
||||
MudDialog.Close(DialogResult.Ok(true));
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -50,10 +56,9 @@
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// ignored
|
||||
// ignore
|
||||
}
|
||||
|
||||
MudDialog.Close(DialogResult.Ok(true));
|
||||
MudDialog?.Dispose();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user