visualfries 0.1.7 → 0.1.801
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.
|
@@ -182,6 +182,9 @@ export class MediaHook {
|
|
|
182
182
|
}
|
|
183
183
|
return;
|
|
184
184
|
}
|
|
185
|
+
if (!this.#mediaElement) {
|
|
186
|
+
await this.#handleRefresh();
|
|
187
|
+
}
|
|
185
188
|
// Make sure we're still marked as the controller (debounced)
|
|
186
189
|
if (!isController && shouldCheckController) {
|
|
187
190
|
// Only set controller if no other component is currently controlling this media
|
|
@@ -244,16 +247,6 @@ export class MediaHook {
|
|
|
244
247
|
async #handleDestroy() {
|
|
245
248
|
this.#destroyed = true;
|
|
246
249
|
this.#lastTargetTime = null;
|
|
247
|
-
// Release the media element back to the MediaManager
|
|
248
|
-
if (this.#mediaElement) {
|
|
249
|
-
const mediaType = this.#context.type === 'VIDEO' ? 'video' : 'audio';
|
|
250
|
-
const source = this.#context.contextData.source;
|
|
251
|
-
if (source && source.url) {
|
|
252
|
-
this.mediaManager.releaseMediaElement(source.url, mediaType);
|
|
253
|
-
}
|
|
254
|
-
this.#context.removeResource(mediaType === 'video' ? 'videoElement' : 'audioElement');
|
|
255
|
-
}
|
|
256
|
-
this.#mediaElement = undefined;
|
|
257
250
|
}
|
|
258
251
|
async handle(type, context) {
|
|
259
252
|
this.#context = context;
|