Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API suggestions #9

Open
thisispete opened this issue Jan 29, 2017 · 7 comments
Open

API suggestions #9

thisispete opened this issue Jan 29, 2017 · 7 comments

Comments

@thisispete
Copy link

thisispete commented Jan 29, 2017

would be really great to be able to jump to a specific time, and a specific percent instead of just ff / rw. controls.

In addition (since they will be needed for those calculations) would be nice to expose the total length and current playback position in the get status, or some other method for creating a playback timeline progress bar UI

found some related dbus control commands in another project:
https://github.com/popcornmix/omxplayer/blob/master/dbuscontrol.sh

 duration=`dbus-send --print-reply=literal --session --reply-timeout=500 --dest=org.mpris.MediaPlayer2.omxplayer /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:"org.mpris.MediaPlayer2.Player" string:"Duration"`
[ $? -ne 0 ] && exit 1
duration="$(awk '{print $2}' <<< "$duration")"

position=`dbus-send --print-reply=literal --session --reply-timeout=500 --dest=org.mpris.MediaPlayer2.omxplayer /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:"org.mpris.MediaPlayer2.Player" string:"Position"`
[ $? -ne 0 ] && exit 1
position="$(awk '{print $2}' <<< "$position")"

 seek)
dbus-send --print-reply=literal --session --dest=org.mpris.MediaPlayer2.omxplayer /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Seek int64:$2 >/dev/null;;

 setposition)
dbus-send --print-reply=literal --session --dest=org.mpris.MediaPlayer2.omxplayer /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.SetPosition objpath:/not/used int64:$2 >/dev/null;;
@vabatta
Copy link
Owner

vabatta commented Feb 2, 2017

Actually I was starting developing a dbus controlled wrapper but I stopped develop it. You can see that the structure is already up for that in the development branch. Watching the source after that time, I think that moving back to vanilla JS would be better than all of those crappy compilers-pre-post work. Could think about the develop of it.

@vabatta
Copy link
Owner

vabatta commented Feb 12, 2017

@thisispete I will publish 0.2.0 which brings some performance improvements, better consistency and a backed DBUS controller for actions. Actually I'm doing some tests and implementing the last features. At the moment I don't know if force the user to have / use DBUS to control the instance or let him choose between keyboard / keyboard + DBUS. The problem is method consistency.

@thisispete
Copy link
Author

thisispete commented Mar 22, 2017

cool! excited to check it out. Maybe give the choice in a config file, or is there a way to write it as a plugin type architecture? ie I'm writing an app that won't have keyboard control, I only need the methods exposed, and want all the options dbus has available.. maybe there's a way to separate them out? I haven't dug too far into your code to see how that might work, just throwing out ideas :)

@stulees
Copy link

stulees commented Sep 8, 2017

@vabatta Curious on when you might be publishing 0.2.0 with the backed DBUS controller?

@vabatta
Copy link
Owner

vabatta commented Sep 19, 2017

@stulees After a lot of debugging, at the time, I found a problem which still stay unsolved and prevented me to publish the new version with the DBUS controller.

@MortenHe
Copy link

@vabatta Curious on when you might be publishing 0.2.0 with the backed DBUS controller?

@vabatta
Copy link
Owner

vabatta commented Sep 26, 2018

@vabatta Curious on when you might be publishing 0.2.0 with the backed DBUS controller?

This project is dead. I am not maintaining this repo anymore as I don't have the time. I still have the unpushed and incomplete code of the DBUS controller draft, which had (and still has) an unsolved problem about the underlaying piping of commands from NodeJS to the OmxPlayer through the DBUS line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants