visualfries 0.1.801 → 0.1.901

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.
@@ -247,6 +247,16 @@ export class MediaHook {
247
247
  async #handleDestroy() {
248
248
  this.#destroyed = true;
249
249
  this.#lastTargetTime = null;
250
+ // Release the media element back to the MediaManager
251
+ if (this.#mediaElement) {
252
+ const mediaType = this.#context.type === 'VIDEO' ? 'video' : 'audio';
253
+ const source = this.#context.contextData.source;
254
+ if (source && source.url) {
255
+ this.mediaManager.releaseMediaElement(source.url, mediaType);
256
+ }
257
+ this.#context.removeResource(mediaType === 'video' ? 'videoElement' : 'audioElement');
258
+ }
259
+ this.#mediaElement = undefined;
250
260
  }
251
261
  async handle(type, context) {
252
262
  this.#context = context;
@@ -69,7 +69,7 @@ export const SceneSettingsShape = z.object({
69
69
  z.object({
70
70
  type: z.enum(['linear', 'radial']),
71
71
  colors: z.array(z.string().refine(isValidColor)).min(2),
72
- stops: z.array(z.number().min(0).max(1)).optional(),
72
+ stops: z.array(z.number().min(0).max(100)).optional(),
73
73
  angle: z.number().min(0).max(360).prefault(180).optional(),
74
74
  position: z.string().optional(),
75
75
  shape: z.enum(['ellipse', 'circle']).optional()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "visualfries",
3
- "version": "0.1.801",
3
+ "version": "0.1.901",
4
4
  "license": "MIT",
5
5
  "author": "ContentFries",
6
6
  "repository": {