Pause and resume music that was started by Tasker itself

277 views
Skip to first unread message

Looki 1975

unread,
Oct 4, 2017, 4:45:05 PM10/4/17
to Tasker
Hello,

I am looking for help achieving the following.

Let's say I have Tasker playing a specific song file.
Is Tasker able to pause playing and later-on resume playing that very same file from the position it was previously paused?

As far as I could test, Tasker can stop playing... but I didn't find how to achieve the above...
The "media button" action cannot be directed to Tasker (Tasker absent from the list of apps)...

Ideas? Suggestions?

Thanks,
Looki

Looki 1975

unread,
Oct 6, 2017, 9:15:07 AM10/6/17
to Tasker
After some research, I found a very very old thread asking for the same and the bottom line was that this is impossible to achieve.
Since that thread was pretty old, I was wondering if any newly-come third party plugin could help achieving this.

Or...

Is there a music player that can be controlled by Tasker:
* Read a specific file that Tasker will pass in parameters (potentially though an intent)
* Can be paused/resumed by Tasker
AND
* Is able to play the said file when screen is locked and off. (Note: that last point Tasker CAN do).

I hope someone can help.

Cheers

Pent

unread,
Oct 21, 2017, 6:31:39 AM10/21/17
to Tasker
It's indeed not possible currently.

I added a mode to the Test Media action, so you can test the current position of the track that Tasker is playing.

So before Music Stop, you can use Test Media, (mode Music Play Position) to get the current position (milliseconds) into
a variable (e.g. %Pos). When you want to resume, you do Music Play with the same file and specify %Pos
as the Start position.

Pent

Pent

unread,
Oct 21, 2017, 6:33:32 AM10/21/17
to Tasker
Change: decided to use seconds for the Music Playing Position test, so it matches the units
used for the Start parameter in Music Play.

Pent

Looki 1975

unread,
Oct 21, 2017, 7:45:23 AM10/21/17
to Tasker
Wow, this is really really fantastic!
And I thank you so much for that!

But... When you write "I added", you mean it will be in the best Tasker release, right?

At the moment I don't see any such option inside the "Test media" action...

Thanks

Looki 1975

unread,
Oct 21, 2017, 7:46:46 AM10/21/17
to Tasker
Sorry, not "best" but "next" release...

Pent

unread,
Oct 21, 2017, 9:54:19 AM10/21/17
to Tasker
Yes, next.

Shouldn't be so long.

Pent

Looki 1975

unread,
Oct 21, 2017, 9:59:37 AM10/21/17
to Tasker
... Although I have no doubt that "next" will be "best" :D

Thanks again!

Reply all
Reply to author
Forward
0 new messages