Jump to content

Start stream with api


papete
 Share

Recommended Posts

I need help to start an specific stream via api. My solution so far has been to create a playlist with a single stream and then invoke the playlist via api, but it is not an optimal solution. I've been able to open "a random stream" via the following uri: content://com.maxmpz.audioplayer.data/stream_files?shs=1 but haven't been able to play a specific one.

Is there a way via api to achieve what I'm looking for? 

Thanks 

Link to comment
Share on other sites

Is stream already imported (or otherwise exists) in Poweramp, or is it new stream uri each time. Poweramp automatically handles incoming m3u(8) uris by importing and playing them.

You can directly feed stream URLs (e.g. http://...) to Poweramp via PowerampAPI.Commands.OPEN_TO_PLAY:
https://github.com/maxmpz/powerampapi/blob/master/poweramp_api_example/app/src/main/java/com/maxmpz/poweramp/apiexample/MainActivity.java#L640

 

Link to comment
Share on other sites

Thanks a lot Max, as always Poweramp is equipped with everything. The streams are already imported, I was wondering if there is an internal uri to call.

I'm posting here the Tasker intent action to play an URL in case this helps anybody (kudos autormali from reddit):

Play Stream Poweramp (978)

A1: Send Intent

Action:com.maxmpz.audioplayer.API_COMMAND

Cat:None

Mime Type:

Data:url here

Extra:cmd:20

Extra:

Extra:

Package:com.maxmpz.audioplayer

Class:com.maxmpz.audioplayer.player.PlayerService

Target:Service
Edited by papete
Give credit where credit is due
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...