Class MacNowPlaying
java.lang.Object
lol.trq.orpheus.macos.MacNowPlaying
What macOS shows as "Now Playing". Only the one application the system has elected is visible.
macOS has no public interface for this. The data comes from a helper, mediaremote-adapter (BSD-3-Clause,
bundled in the jar), which this source runs as a child process through the system's /usr/bin/perl. It
rests on a private part of macOS, so any system update can stop it working; the source then reports itself
unavailable and nothing else happens. Commands go to the elected application and are sent by short-lived child
processes.
-
Method Summary
Modifier and TypeMethodDescriptionstatic MacNowPlayingcreate()static MacNowPlayingUses a helper you built yourself instead of the bundled one.booleanforeign()Whether the sessions of this source belong to other applications and must pass the app rules.id()A short stable name, unique among the sources of oneOrpheus.send(ControlRequest request) Sends a command.voidstart(SourceSink sink) Starts reporting tosink.voidstop()Stops and releases every thread, handle and process.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Source
capability, display
-
Method Details
-
create
-
create
Uses a helper you built yourself instead of the bundled one.- Parameters:
adapterDirectory- a directory holdingmediaremote-adapter.plandMediaRemoteAdapter.framework
-
id
-
foreign
-
start
Description copied from interface:SourceStarts reporting tosink. Returns quickly; failures are reported as a status, not thrown. -
stop
-
send
Description copied from interface:TransportSends a command. Never throws and never blocks; the future always completes.
-