use of butter.droid.base.providers.media.model.MediaWrapper 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);
}
use of butter.droid.base.providers.media.model.MediaWrapper in project butter-android by butterproject.
the class ShowDetailAboutFragment method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
MediaWrapper show = getArguments().getParcelable(ARG_SHOW);
presenter.onCreate(show);
}
use of butter.droid.base.providers.media.model.MediaWrapper in project butter-android by butterproject.
the class ShowDetailFragment method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
MediaWrapper show = getArguments().getParcelable(ARG_SHOW);
presenter.onCreate(show);
}
use of butter.droid.base.providers.media.model.MediaWrapper in project butter-android by butterproject.
the class VideoPlayerPresenterImpl method onCreate.
@Override
public void onCreate(final StreamInfo streamInfo, final long resumePosition, final String action, final Intent intent) {
if (Intent.ACTION_VIEW.equals(action)) {
String videoLocation = StreamInfoUtils.getActionViewVideoLocation(contentResolver, intent);
if (videoLocation != null) {
final Media media = new Clip("0", videoLocation, -1, new Genre[0], -1, "", "", "", videoLocation);
this.streamInfo = new StreamInfo(videoLocation, new MediaWrapper(media, -1), null);
this.resumePosition = intent.getLongExtra("position", 0);
view.showVideoFragment(this.streamInfo, this.resumePosition);
} else {
// TODO: 4/2/17 Show error
}
} else {
this.streamInfo = streamInfo;
this.resumePosition = resumePosition;
if (streamInfo == null) {
throw new IllegalStateException("StreamInfo has to be provided");
}
view.showVideoFragment(streamInfo, resumePosition);
}
}
use of butter.droid.base.providers.media.model.MediaWrapper in project butter-android by butterproject.
the class TrailerPlayerActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState, 0);
final Intent intent = getIntent();
final MediaWrapper media = intent.getParcelableExtra(EXTRA_MEDIA);
final String youtubeUrl = intent.getStringExtra(EXTRA_URI);
if (savedInstanceState == null) {
TrailerPlayerFragment fragment = TrailerPlayerFragment.newInstance(media, youtubeUrl);
getSupportFragmentManager().beginTransaction().add(android.R.id.content, fragment).commit();
}
}
Aggregations