11/**
22 * Now Playing — minimal playlist pill overlay.
33 *
4- * Displays a pill in the bottom-right corner of the broadcast canvas
4+ * Displays a pill in the top-left corner of the broadcast canvas
55 * showing the current track name when a playlist is active and playing.
6- * Fades in when playback starts and fades out when paused or stopped.
6+ * Fades in when playback starts and fades out when paused, stopped, or
7+ * when the playlist ends.
78 *
89 * Context used: context.playlist, context.width, context.height
910 */
@@ -37,7 +38,7 @@ exports.tick = function (context, state) {
3738 ctx . save ( ) ;
3839 ctx . globalAlpha = state . opacity ;
3940
40- const fontSize = Math . round ( height * 0.022 ) ;
41+ const fontSize = Math . round ( height * 0.016 ) ;
4142 ctx . font = `600 ${ fontSize } px system-ui, sans-serif` ;
4243
4344 const iconGlyph = "\u266A" ; // ♪
@@ -47,8 +48,8 @@ exports.tick = function (context, state) {
4748 const pillWidth = Math . min ( ctx . measureText ( text ) . width + paddingH * 2 , width * 0.38 ) ;
4849 const pillHeight = fontSize + paddingV * 2 ;
4950 const margin = Math . round ( height * 0.025 ) ;
50- const x = width - pillWidth - margin ;
51- const y = height - pillHeight - margin ;
51+ const x = margin ;
52+ const y = margin ;
5253 const radius = pillHeight / 2 ;
5354
5455 // Pill background
0 commit comments