Closed kozec closed 6 years ago
this.sub = libjass.ASS.fromUrl(myURL); this.sub.then((ass: any): void => { this.render = libjass.renderers.DefaultRenderer(this.video.nativeElement, ass, {}); });
Trying to implement this in an angular component and can't get it to work for the life of me :(
this.render = libjass.renderers.DefaultRenderer(...)
is missing a new
It appears that .settings property of WebRenderer is not being set anywhere, at least not before its first use at https://github.com/Arnavion/libjass/blob/master/src/renderers/web/renderer.ts#L150
My backtrace: libjass.js:5904 Uncaught (in promise) TypeError: Cannot read property 'fontMap' of undefined at Object.WebRenderer (libjass.js:5904) at Object.DefaultRenderer (libjass.js:5176) at VideoPlayer.subtitles_parsed (index.py.js:2928) at index.py.js:38 at