With the Video.js launch behind us (https://diff.wikimedia.org/2022/07/27/wikimedia-media-playback-now-brought-to-you-with-video-js/), I think we can look at shaking out a bit more from the registry.
We're currently at 11 modules or 0.4KB just to transfer module metadata on every page view
https://grafana.wikimedia.org/d/BvWJlaDWk/startup-manifest-size?orgId=1&from=now-1y&to=now&var-wiki=enwiki&var-component=TimedMediaHandler&var-multiwiki=commonswiki
1. ext.tmh.video-js
Size: LARGE
- 80KB transfer for `modules=ext.tmh.video-js`
Need:
- Articles with videos
- Lazy-load after video click
Current:
Included only by ext.tmh.player.inline,
.. which is lazy-loaded by ext.tmh.player
Recommendation: OK
2. ext.tmh.videojs-ogvjs
Size: LARGE
- 40KB transfer for `modules=ext.tmh.videojs-ogvjs|ext.tmh.OgvJs|ext.tmh.OgvJsSupport`
Need:
- videojs plugin to wrap ogv.js
- Articles with videos
- Lazy-load after video click
- For browsers that lacks Ogv support.
Due LARGE, worth splitting from general video-js payload
Current:
Lazy-loaded by ext.tmh.player.inline
for browsers that need it.
Recommendation: OK.
3. ext.tmh.player.dialog:
Size: LARGE
- 50KB transfer for `modules=oojs-ui-core|oojs-ui-windows`
Need:
- Articles with videos
- Lazy-load after click on video with type=dialog.
Current:
Lazy-loaded by ext.tmh.player
Recommendation:
TBD
4. ext.tmh.player
Size: Small
Need:
Current:
Queued server-side.
Recommendation: OK.
5. ext.tmh.player.inline
Size: Small (self, not including video-js dependency)
- Articles with videos
- Lazy-load after video click on video with type=inline.
Current:
Lazy-loaded by ext.tmh.player
Recommendation:
Merge quietly into ext.tmh.player?
6. ext.tmh.player.styles
Recommendation: OK.
7. ext.tmh.transcodetable
Need:
- File pages for audio/video files
Recommendation: TBD?
8. ext.tmh.timedtextpage.styles
Need:
- TimedText pages
Recommendation: TBD?
9. ext.tmh.OgvJsSupport
Size: Medium (3KB)
Recommendation: TBD?
10.ext.tmh.OgvJs
Size: Large (33KB transfer)
Recommendation: Merge quietly into ext.tmh.videojs-ogvjs?
11.embedPlayerIframeStyle
Size: Tiny
Need:
- When presenting as an embedded iframe
Recommendation: TBD?