mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 17:46:37 +03:00
Do not try to play files in streaming by now
This commit is contained in:
parent
9420651936
commit
ba6eafccb8
2 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue