Do not try to play files in streaming by now
authorDavid A. Velasco <dvelasco@solidgear.es>
Tue, 12 Feb 2013 11:19:38 +0000 (12:19 +0100)
committerDavid A. Velasco <dvelasco@solidgear.es>
Tue, 12 Feb 2013 11:19:38 +0000 (12:19 +0100)
src/com/owncloud/android/media/MediaService.java
src/com/owncloud/android/ui/fragment/FileDetailFragment.java

index a511852..30558cd 100644 (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);
 
index bfa4bbb..f37c609 100644 (file)
@@ -424,7 +424,7 @@ public class FileDetailFragment extends SherlockFragment implements
     \r
     @Override\r
     public boolean onTouch(View v, MotionEvent event) {\r
-        if (v == mPreview && event.getAction() == MotionEvent.ACTION_DOWN && mFile != null) {\r
+        if (v == mPreview && event.getAction() == MotionEvent.ACTION_DOWN && mFile != null && mFile.isDown()) {\r
             if (mFile.isAudio()) {\r
                 if (!mMediaServiceBinder.isPlaying(mFile)) {\r
                     Log.d(TAG, "starting playback of " + mFile.getStoragePath());\r