![]() |
#196 |
but forgot what it's like
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
|
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"}}' 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 Code:
lipc-get-prop -i com.lab126.winmgr chromeState 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 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. Last edited by eureka; 06-01-2012 at 04:35 PM. |
![]() |
![]() |
![]() |
#197 |
but forgot what it's like
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
|
Sorry for continued offtopic...
Thanks to this post from Russian forum, I've found an alternative way to show mp3 playing UI through LIPC: Code:
lipc-set-prop com.lab126.appmgrd start app://com.lab126.booklet.audiblePlayer/mnt/us/music/any.mp3?action=startplay The player interface is a bit different from MP3 player bar (because it's not [experimental] MP3 player, it's a stock Audible player) and it can't been sent to background. You can also resume playing after exiting from player. Just replace action=startplay with action=resume. If you'll remove part after ? (including ?) player will be only loaded (without immediate playing of mp3 file). |
![]() |
![]() |
![]() |
#198 | |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#199 |
Enthusiast
![]() Posts: 39
Karma: 10
Join Date: May 2012
Device: Kindle Touch
|
Gentlemen, all I can say is that you ROCK!
Thanks eureka, diba and geekmaster. I will use some spare cycles this weekend to test your advice and generate some Launcher app that does what I need, maybe someone would like to use that as well. Will investigate how to create the .bin, I think I saw instructions somewhere around here... Thanks again and hope I can give something back to the community... |
![]() |
![]() |
![]() |
#200 |
(offline)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,907
Karma: 6736094
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
For launcher, it's probably best to not create .bin files (launcher extensions only need to be copied into the extensions/ folder of the USB storage, which is accessible anyway). "Real" installers are only required for hacks which need to modify the filesystem outside of the USB storage, where it's not "normally" reachable by the end user.
To clarify this again (just in case): the only accessible directory, for "normal" users, is /mnt/us/. Anything that needs to go somewhere else than that directory needs special care (like installers etc.) Conversely, anything that only needs access to this directory can be installed just fine by the average Windows user, by just dragging that one symbol to that other symbol, assuming that the instructions are really foolproof enough. That said: You are of course very welcome to plunge into the "mechanical gears" of the system (that's where the real fun is... quite simply *because* it is challenging and tricky), and to try out kindletool etc. for yourself... Welcome to the "geeky" side of mobileread! ![]() Last edited by ixtab; 06-01-2012 at 11:37 PM. |
![]() |
![]() |
![]() |
#201 | |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#202 | |
Enthusiast
![]() Posts: 39
Karma: 10
Join Date: May 2012
Device: Kindle Touch
|
Quote:
The compilation had no errors (after I copied the libraries I compiled to the corresponding /usr/lib folder) and the program runs, but no sound comes out of it ![]() Nevertheless, I installed mplayer and will try to create an interface to play mp3s with playlists and stuff using whatever code font hack has to offer. I have to see how to debug and test-run apps from the KT, so I will read whatever documentation is available... if I have some extra spare time. Thanks a lot guys, hope I can do something useful out of this ![]() |
|
![]() |
![]() |
![]() |
#203 | |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
An OTA update can brick a kindle if it runs out of space on the main root partition, which can happen when you add your own files to it. Last edited by geekmaster; 06-02-2012 at 04:09 PM. |
|
![]() |
![]() |
![]() |
#204 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047190
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@elRicharD: AFAIK, the ALSA setup on the Kindles is a bit messy, so you may have to play a bit with the settings in order to find the right i/o/mixers. (Or check what the mplayer builds available here are doing). Having real world experience with ALSA might help, because it can be a huge PITA to setup...
Except that a pure ALSA experience seems to be a thing of the past, since every distro out there seems to think that PulseAudio is the second coming... USE=-pulseaudio ftw. (Oops, I'm ranting. Sorry ^^). Last edited by NiLuJe; 06-02-2012 at 03:57 PM. |
![]() |
![]() |
![]() |
#205 | |
Enthusiast
![]() Posts: 39
Karma: 10
Join Date: May 2012
Device: Kindle Touch
|
Quote:
It runs but it does not produce any sound. I screwed around with the alsamixer sliders and when mpg123 starts I can hear something, like the audio starting, but no music. My idea is to compile it as static as I can so I don't have to have users messing with the OS, at the expense of some size overhead... anyway it did not work, I will check the mplayer package to see how can I get that working. Anyway the symlinks hint is cool. Thanks guys! |
|
![]() |
![]() |
![]() |
#206 | |
Enthusiast
![]() Posts: 39
Karma: 10
Join Date: May 2012
Device: Kindle Touch
|
Quote:
|
|
![]() |
![]() |
![]() |
#207 |
THE NOOB
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 701
Karma: 1545649
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
|
Small (and hopefully easy) patch suggestion: add contrast adjustment in browser just like in PDFs. Thinking about this, anyway, suggests me a problem: browser is a WAF and its menu is in JS...
Second shot: adding a nice step controller to pinch to zoom in PDF. I.E. add a menu entry which shows two buttons to increase/decrease zoom. ...maybe also this one isn't feasible... |
![]() |
![]() |
![]() |
#208 |
(offline)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,907
Karma: 6736094
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
Status report
I am currently re-working the entire framework. Probable features of the upcoming version 2.0:
This means that from my side, all actual patch development is currently on hold, until the new version of jbpatch is ready. (It also means that the new version will be incompatible with all currently existing patches. However, that is not likely to be an issue, because all "official" patches so far have been released by me, and I will adapt all of them to the new version before publishing it). As always: don't hold your breath, it may take a bit of time to finish this - I'm doing it in my spare time. But of course, all comments or suggestions are welcome! |
![]() |
![]() |
![]() |
#209 |
but forgot what it's like
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
|
@ixtab, could you please sync your progress to bitbucket as work goes (maybe in separate branch)? I'm looking into adding to jbpatcher support for patches written in scripting languages (with using of JSR 223 implementation), so I'd like to see what parts of jbatcher are being reworked as close to real-time as possible (i.e. before official release).
(Yes, I'm understanding that you've rejected this idea. That's why I'm looking into it by myself ![]() |
![]() |
![]() |
![]() |
#210 | |
(offline)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,907
Karma: 6736094
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
Quote:
![]() |
|
![]() |
![]() |