use of butter.droid.base.providers.media.model.StreamInfo in project butter-android by butterproject.
the class TVShowDetailPresenterImpl method startTorrent.
private void startTorrent(final MediaWrapper episode, final Torrent torrent) {
// Load default subtitles
StreamInfo info = new StreamInfo(torrent, episode, item, new SubtitleWrapper());
view.torrentSelected(info);
}
use of butter.droid.base.providers.media.model.StreamInfo in project butter-android by butterproject.
the class StreamLoadingActivity method onCreate.
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
@Override
public void onCreate(Bundle savedInstanceState) {
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
getWindow().setBackgroundDrawableResource(R.color.bg);
super.onCreate(savedInstanceState, 0);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
if (!getIntent().hasExtra(EXTRA_INFO)) {
finish();
}
StreamInfo info = getIntent().getParcelableExtra(EXTRA_INFO);
presenter.onCreate(info, savedInstanceState != null);
}
use of butter.droid.base.providers.media.model.StreamInfo in project butter-android by butterproject.
the class VideoPlayerActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState, 0);
setShowCasting(true);
Intent intent = getIntent();
Bundle extras = intent.getExtras();
StreamInfo streamInfo = extras.getParcelable(EXTRA_STREAM_INFO);
long resumePosition = extras.getLong(EXTRA_RESUME_POSITION, 0);
if (savedInstanceState == null) {
presenter.onCreate(streamInfo, resumePosition, intent.getAction(), intent);
} else {
fragment = (PlayerFragment) getSupportFragmentManager().findFragmentByTag(TAG_VIDEO_FRAGMENT);
}
}
use of butter.droid.base.providers.media.model.StreamInfo in project butter-android by butterproject.
the class MediaDetailPresenterImpl method playMediaClicked.
@Override
public void playMediaClicked() {
if (preferencesHandler.wifiOnly() && !networkManager.isWifiConnected() && !networkManager.isEthernetConnected() && networkManager.isNetworkConnected()) {
view.displayDialog(R.string.wifi_only, R.string.wifi_only_message);
} else {
StreamInfo streamInfo = new StreamInfo(selectedTorrent, media, null, subtitle);
view.playStream(streamInfo);
}
}
use of butter.droid.base.providers.media.model.StreamInfo in project butter-android by butterproject.
the class EpisodeDialogFragment method playClick.
@OnClick(R.id.play_button)
public void playClick() {
smoothDismiss();
// TODO parent
UiSubItem selectedSub = this.selectedSub;
final SubtitleWrapper subtitleWrapper;
if (selectedSub != null) {
subtitleWrapper = new SubtitleWrapper(selectedSub.getSubtitle());
} else {
subtitleWrapper = null;
}
// TODO use pare presenter
StreamInfo streamInfo = new StreamInfo(selectedTorrent, new MediaWrapper(episode, mediaMeta), null, subtitleWrapper);
((FragmentListener) getActivity()).playStream(streamInfo);
}
Aggregations