diff --git a/js/webampLazy.tsx b/js/webampLazy.tsx index 6ce750d3..2bbe5d76 100644 --- a/js/webampLazy.tsx +++ b/js/webampLazy.tsx @@ -125,6 +125,7 @@ interface PrivateOptions { }; }; __butterchurnOptions: ButterchurnOptions; + __customMediaClass: typeof Media; // This should have the same interface as Media } // Return a promise that resolves when the store matches a predicate. @@ -180,6 +181,7 @@ class Winamp { requireMusicMetadata, handleTrackDropEvent, __butterchurnOptions, + __customMediaClass, } = this.options; // TODO: Make this much cleaner @@ -203,7 +205,7 @@ class Winamp { // TODO: Validate required options - this.media = new Media(); + this.media = new (__customMediaClass || Media)(); this.store = getStore( this.media, this._actionEmitter,