4 ms·
Sure! this is actually one of those things that's super nice to do in Angular and NX. The website app and the extension app both use the same component as a dep
by spaceribs 6y ago
Sure! this is actually one of those things that's super nice to do in Angular and NX. The website app and the extension app both use the same component as a dependency:
https://github.com/spaceribs/plopdown/blob/master/apps/website/src/app/home/home.component.ts#L1 https://github.com/spaceribs/plopdown/blob/master/apps/websi...
https://github.com/spaceribs/plopdown/blob/master/libs/plopdown-overlay/src/lib/video-attachment/video-attachment.component.ts#L3 https://github.com/spaceribs/plopdown/blob/master/libs/plopd...
The "plopdown-overlay" library also contains the components which find and attach to videos, something that the website doesn't need obviously, so the website only grabs and displays this component.
Where angular comes in is at this line: https://github.com/spaceribs/plopdown/blob/master/apps/website/src/app/home/home.module.ts#L28 https://github.com/spaceribs/plopdown/blob/master/apps/websi...
See, loading arbitrary images and audio is something that needs to be done at a pretty low level in plopdown, or at least much further down than just the overlay component. Here, I'm overriding the default behavior which would load things through the extension, and replacing it with one that works on the web.