aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android/src/github
diff options
context:
space:
mode:
authorowner <owner@DeeDee-Laptop>2012-11-23 09:18:39 -0800
committerowner <owner@DeeDee-Laptop>2012-11-23 09:18:39 -0800
commit385b399420ee3321bf7624a76276229efc986688 (patch)
tree20623883e333ed0f57cdf06a3b2b5d0850e50fbd /subsonic-android/src/github
parent2d29f14924111781262b16caaad9dc121f115357 (diff)
downloaddsub-385b399420ee3321bf7624a76276229efc986688.tar.gz
dsub-385b399420ee3321bf7624a76276229efc986688.tar.bz2
dsub-385b399420ee3321bf7624a76276229efc986688.zip
Added option to play videos with external player
Diffstat (limited to 'subsonic-android/src/github')
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java
index 2d87c263..cd71db36 100644
--- a/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java
+++ b/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java
@@ -78,7 +78,7 @@ public class SelectAlbumActivity extends SubsonicTabActivity {
intent.putExtra(Constants.INTENT_EXTRA_NAME_NAME, entry.getTitle());
Util.startActivityWithoutTransition(SelectAlbumActivity.this, intent);
} else if (entry.isVideo()) {
- playVideo(entry);
+ playExternalPlayer(entry);
}
}
}
@@ -291,7 +291,10 @@ public class SelectAlbumActivity extends SubsonicTabActivity {
toggleStarred(entry);
break;
case R.id.song_menu_webview:
- playVideo(entry);
+ playWebView(entry);
+ break;
+ case R.id.song_menu_play_external:
+ playExternalPlayer(entry);
break;
default:
return super.onContextItemSelected(menuItem);
@@ -492,12 +495,17 @@ public class SelectAlbumActivity extends SubsonicTabActivity {
}
}
- private void playVideo(MusicDirectory.Entry entry) {
+ private void playWebView(MusicDirectory.Entry entry) {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(MusicServiceFactory.getMusicService(this).getVideoUrl(this, entry.getId())));
startActivity(intent);
}
+ private void playExternalPlayer(MusicDirectory.Entry entry) {
+ Intent intent = new Intent(Intent.ACTION_VIEW);
+ intent.setDataAndType(Uri.parse(entry.getPath()), "video/*");
+ startActivity(intent);
+ }
private void checkLicenseAndTrialPeriod(Runnable onValid) {
if (licenseValid) {