use of butter.droid.base.providers.media.model.StreamInfo in project butter-android by butterproject.
the class StreamLoadingFragment method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
StreamInfo streamInfo = getArguments().getParcelable(ARGS_STREAM_INFO);
presenter.onCreate(streamInfo);
}
use of butter.droid.base.providers.media.model.StreamInfo 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.StreamInfo in project butter-android by butterproject.
the class BeamPlayerFragment method onCreate.
@Override
public void onCreate(@Nullable final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
loadingDialog = LoadingBeamingDialogFragment.newInstance();
loadingDialog.setOnCancelListener(dialogInterface -> presenter.closePlayer());
loadingDialog.show(getChildFragmentManager(), "overlay_fragment");
Bundle arguments = getArguments();
StreamInfo streamInfo = arguments.getParcelable(ARG_STREAM_INFO);
long resumePosition = getArguments().getLong(ARG_RESUME_POSITION);
presenter.onCreate(streamInfo, resumePosition);
}
use of butter.droid.base.providers.media.model.StreamInfo in project butter-android by butterproject.
the class TVStreamLoadingFragment method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Bundle arguments = getArguments();
StreamInfo streamInfo = arguments.getParcelable(ARGS_STREAM_INFO);
presenter.onCreate(streamInfo);
}
use of butter.droid.base.providers.media.model.StreamInfo in project butter-android by butterproject.
the class TVPlayerFragment method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
StreamInfo streamInfo = getArguments().getParcelable(ARG_STREAM_INFO);
long resumePosition = getResumePosition(savedInstanceState);
// stateBuilder.addCustomAction(PlayerMediaControllerGlue.ACTION_CLOSE_CAPTION, getString(R.string.subtitles),
// R.drawable.ic_av_subs);g
presenter.onCreate(streamInfo, resumePosition);
}
Aggregations