Skip to content

Add an escape sequence to play audio files

Matan Ziv-Av requested to merge matan/konsole:iterm-media3 into master

Actually: add inlineMedia parameter to OSC 1337 File= command. With this parameter the file is passed to QMediaPlayer which plays the file if it is an audio file. If the file is a video file, only the audio is played.

Playing a new file while another is still playing (in the same session) will stop the old one.

Each session has its own media player, so two session can play audio at the same time.

I see two main uses for such an escape sequence:

  1. When managing files over ssh, it is easy to check the content of an audio file.
  2. Terminal games (and other applications) may have audio which works remotely and on any platform (that has konsole, or another terminal that adopts this),

Possible future enhancement:

  • Allow queuing of media file
  • An escape sequence to report the current status
  • Volume control

The first commit in this MR fixes for the parsing of OSC 1337 File= parameters.

Merge request reports