Do not try to play files in streaming by now

This commit is contained in:
David A. Velasco 2013-02-12 12:19:38 +01:00
parent 9420651936
commit ba6eafccb8
2 changed files with 4 additions and 1 deletions

View file

@ -426,10 +426,13 @@ public class MediaService extends Service implements OnCompletionListener, OnPre
createMediaPlayerIfNeeded();
mPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
String url = mFile.getStoragePath();
/* Streaming is not possible right now
if (url == null || url.length() <= 0) {
url = AccountUtils.constructFullURLForAccount(this, mAccount) + mFile.getRemotePath();
}
mIsStreaming = url.startsWith("http:") || url.startsWith("https:");
*/
mIsStreaming = false;
mPlayer.setDataSource(url);

View file

@ -424,7 +424,7 @@ public class FileDetailFragment extends SherlockFragment implements
@Override
public boolean onTouch(View v, MotionEvent event) {
if (v == mPreview && event.getAction() == MotionEvent.ACTION_DOWN && mFile != null) {
if (v == mPreview && event.getAction() == MotionEvent.ACTION_DOWN && mFile != null && mFile.isDown()) {
if (mFile.isAudio()) {
if (!mMediaServiceBinder.isPlaying(mFile)) {
Log.d(TAG, "starting playback of " + mFile.getStoragePath());