Tag: Lyricova Jukebox

  • Use WebVTT without actually using WebVTT: Another way to monitor playback progress of HTML Media Elements

    Use WebVTT without actually using WebVTT: Another way to monitor playback progress of HTML Media Elements

    Previously, I have introduced how LyricsX handled playback progress of different players, and briefly talked about how I applied its principal to web audio with a requestAnimationFrame() loop. In this article, I’ll talk about how to use WebVTT, a browser-native captioning feature to receive callbacks on specific time ranges.

  • Use GraphQL subscription to show progress of time-consuming operations

    Use GraphQL subscription to show progress of time-consuming operations

    GraphQL is feature-rich query language designed to fit majority of needs of generic online applications. The 3 main types of operations in GraphQL are query, mutation and subscription. While queries and mutations are send in HTTP requests, subscriptions are running on WebSocket, which enables it to receive updates in real time. In this article, I…

  • Measure per-letter dimension of text in JavaScript

    Measure per-letter dimension of text in JavaScript

    TL;DR: Create a Range, set proper start and end points up to the text node with proper offset, then use Range.getBoundingClientRect() to get the dimensions. As a part of the Lyricova Jukebox, we wanted to support inline karaoke swipe animation. With the time tags in the data, it is easy to figure out the time…

  • How LyricsX keeps track of progress of media players

    How LyricsX keeps track of progress of media players

    LyricsX is an open source software for macOS to download and display lyrics of current playing track on Music (previously iTunes), Spotify, Audirvana, Vox, Swinsian, or the Now Playing indicator in the OS. It gets time-tagged lyrics files from local storage or internet, and then display the lyrics in sync with the player. As a…