To show media player UI through LIPC, one should issue following commands. First, to set information, which will be displayed in UI:
Code:
lipc-set-prop -s com.lab126.pillow configureChrome '{"appId": "com.lab126.mediaplayer", "mediaBar": {"clientParams": {"trackCount": 1, "volume": 11, "trackInfo": {"trackIndex": 1, "title":"Media title", "artist": "Media artist"}, "playerState": 3}, "name":"media_player_bar"}}'
Here parameters
trackCount,
volume,
trackIndex,
title,
artist and
playerState could be changed. I think, it's easily understandable, what each of them relates to, except
playerState which, I guess, relates to value of property
control of
com.lab126.mediaplayer.
This command will create media player UI window, if it wasn't created yet or was closed.
Then, to show media player UI window, issue:
Code:
lipc-set-prop -i com.lab126.winmgr chromeState 1
Window can still be hidden after setting this property. I don't know why, but it's easy to check programmaticaly, whether it's shown. Just issue:
Code:
lipc-get-prop -i com.lab126.winmgr chromeState
If returned value is 0, then window isn't shown yet and you should repeat command for it's showing (set
chromeState property again).
Even stock KT program check this property after it's setting (and repeat setting if it's equals to zero), so this isn't bug, I assume.
To hide media player UI window, issue:
Code:
lipc-set-prop -i com.lab126.winmgr chromeState 0
Media player UI window sometimes is not only hidden, but totally closed after this command.
Unfortunately, all this information will not help so much. As
ixtab said, all media player logic is implemented in Java through OSGi bundle (located at
/opt/amazon/ebook/lib/{MediaPlayer,MediaPlayer-impl}.jar and registered on LIPC bus as
com.lab126.mediaplayer). UI is only dumb view, which is displaying information from Java app and forwarding events (key presses etc.) to Java app.
Also, for me UI didn't made anything useful when it had been started from LIPC manually.
Also, media player OSGi bundle isn't loaded automatically on Framework starting. It's only starting when user first goes to
Experimental screen from menu and selects
MP3 Player.