Class SystemSessions

java.lang.Object
lol.trq.orpheus.system.SystemSessions
All Implemented Interfaces:
Source

public final class SystemSessions extends Object implements Source
The media sessions of whatever operating system the program runs on: Windows media sessions, MPRIS on Linux, Now Playing on macOS (experimental). Its id is always system, so code that pins or shares by source id is the same everywhere. On any other system it reports itself unavailable.
  • Method Details

    • create

      public static SystemSessions create()
    • id

      public String id()
      Description copied from interface: Source
      A short stable name, unique among the sources of one Orpheus.
      Specified by:
      id in interface Source
    • foreign

      public boolean foreign()
      Description copied from interface: Source
      Whether the sessions of this source belong to other applications and must pass the app rules. True for operating system sources, false for a program's own player.
      Specified by:
      foreign in interface Source
    • display

      public DisplayRules display()
      Description copied from interface: Source
      Rules that come with the data of this source.
      Specified by:
      display in interface Source
    • start

      public void start(SourceSink sink)
      Description copied from interface: Source
      Starts reporting to sink. Returns quickly; failures are reported as a status, not thrown.
      Specified by:
      start in interface Source
    • stop

      public void stop()
      Description copied from interface: Source
      Stops and releases every thread, handle and process. Safe to call twice and before start.
      Specified by:
      stop in interface Source
    • capability

      public <T> T capability(Class<T> type)
      Description copied from interface: Source
      The ability of the given type, or null when this source does not have it.
      Specified by:
      capability in interface Source