这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@Auxilus
Copy link
Contributor

@Auxilus Auxilus commented Apr 9, 2018

No description provided.

@tomty89
Copy link
Contributor

tomty89 commented Apr 9, 2018

It won't work because the file object is only available in playHandler:

ERROR in /data/data/com.termux/files/home/com/termux/api/MediaPlayerAPI.java (at line 201)
        result.message = String.format("Song: %s\nStatus: %s\n%s",mediaFile.getName(), status, getPlaybackPositionString(player));
                                                                  ^^^^^^^^^
mediaFile cannot be resolved

To make it work we will need something like hasTrack.

@Auxilus
Copy link
Contributor Author

Auxilus commented Apr 9, 2018

Can you add it? I can close this PR then...

@Auxilus Auxilus closed this Apr 9, 2018
@Auxilus Auxilus deleted the patch-7 branch April 9, 2018 14:37
fornwall pushed a commit that referenced this pull request Apr 11, 2018
* MediaPlayerAPI: revert commit 299d557

The error message won't be displayed anyway:

$ touch empty
$ dd if=/dev/urandom of=random count=2048
2048+0 records in
2048+0 records out
1048576 bytes (1.0MB) copied, 0.190185 seconds, 5.3MB/s
$ termux-media-player play empty

setDataSourceFD failed.: status=0x80000000
$ termux-media-player play random

Prepare failed.: status=0x1
$

* MediaPlayerAPI: catch NullPointerException for -a play

* MediaPlayerAPI: use getCanonicalPath() instead

* MediaPlayerAPI: use proper values for setVolume()

* MediaPlayerAPI: fix play and stop from pause

* MediaPlayerAPI: add trackName for info and resume

Suggested by Auxilus (#162)
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

Successfully merging this pull request may close these issues.

2 participants