New feature for Mac users: control LingQ lesson audio with your keyboard!

Hey LingQers,

I’m a Mac user and whenever listening to audio, I always wanted to control the playback using my keyboard’s media playback control keys (rewind, play/pause, fast forward).

So, I wrote a little script that allows me to do just that. In this forum post I will teach you how you can get this set up on your own Mac.

Please note this will only work for Chrome and Safari users.

  1. Download BeardedSpice
    BeardedSpice is a program for macOS that allows you to use your media keys for different websites instead of just for iTunes/Spotify.

Download it here: https://raw.github.com/beardedspice/beardedspice/distr/publish/releases/BeardedSpice-latest.zip

  1. Drag BeardedSpice into your Applications folder.

  2. Allow JavaScript from Apple Events
    This will allow BeardedSpice to control events in your browser. If you don’t trust this, you can read through BeardedSpice’s source code yourself and see that it is safe :slight_smile:

Chrome users:

Safari users:
You must first enable developer mode first: Use the developer tools in the Develop menu in Safari on Mac - Apple Support (CA)

Safari users, after you have enabled developer mode, do this:

  1. Download LingQ media strategy
    A “media strategy” is how BeardedSpice knows that LingQ is playing audio and tells BeardedSpice how to control that audio’s playback.

Download the media strategy I wrote from here: https://gist.githubusercontent.com/edwinfinch/813ea2fcce98284580f574e0dded5629/raw/118460e772c7b35f5a9cb615ef86a327c1055c06/LingQMediaStrategy.js

  1. Install LingQ media strategy
    This is the final step! Follow the images in order:

You’ve successfully installed all necessary components!

You should now see LingQ in your BeardedSpice dashboard when you are playing audio on a lesson.

If you want to do the same for your playlist, you can install a media strategy I wrote for the LingQ playlist from here: https://gist.githubusercontent.com/edwinfinch/73e438c879c75739985fdc5cf515db3a/raw/769401b51fc2286dab079addaaebe128b551d8f3/LingQPlaylistMediaStrategy.js

Controls for the lesson-specific media strategy are as follows:
Play/pause button: toggles play/pause of lesson audio
Rewind button: Rewinds the audio by five seconds
Forward button: Cycles through audio speed (ie. 1x, 0.9x, etc.)

Controls for the playlist media strategy are the same as the lesson-specific media strategy, but the forward button skips to the next playlist entry instead of changing the audio speed.

Enjoy guys and gals!




2 Likes