use of butter.droid.base.providers.media.model.StreamInfo in project butter-android by butterproject.
the class TVLaunchActivity method navigateForward.
@Override
public void navigateForward() {
String action = getIntent().getAction();
Uri data = getIntent().getData();
if (action != null && action.equals(Intent.ACTION_VIEW) && data != null) {
String streamUrl = data.toString();
try {
streamUrl = URLDecoder.decode(streamUrl, "utf-8");
final Media media = new Clip("0", streamUrl, -1, new Genre[0], -1, null, "", "", streamUrl);
TVStreamLoadingActivity.startActivity(this, new StreamInfo(streamUrl, new MediaWrapper(media, -1), null));
finish();
return;
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
}
TVMainActivity.startActivity(this);
finish();
}
use of butter.droid.base.providers.media.model.StreamInfo in project butter-android by butterproject.
the class TVStreamableDetailsFragment method startMovie.
@Override
public void startMovie(final MediaWrapper item, final Torrent torrent, final String quality) {
// Default subtitles will be loaded
StreamInfo info = new StreamInfo(torrent, item, null, new SubtitleWrapper());
TVStreamLoadingActivity.startActivity(getActivity(), info);
}
use of butter.droid.base.providers.media.model.StreamInfo in project butter-android by butterproject.
the class TVStreamLoadingActivity method onCreate.
@SuppressLint("MissingSuperCall")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState, 0);
StreamInfo streamInfo = getIntent().getParcelableExtra(EXTRA_STREAM_INFO);
presenter.onCreate(streamInfo, savedInstanceState != null);
}
use of butter.droid.base.providers.media.model.StreamInfo in project butter-android by butterproject.
the class PlayerFragment method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
StreamInfo streamInfo = getArguments().getParcelable(ARG_STREAM_INFO);
long resumePosition = getResumePosition(savedInstanceState);
stateBuilder.addCustomAction(ACTION_CLOSE_CAPTION, getString(R.string.subtitles), R.drawable.ic_av_subs);
presenter.onCreate(streamInfo, resumePosition);
}
use of butter.droid.base.providers.media.model.StreamInfo in project butter-android by butterproject.
the class MainActivity method checkActions.
private void checkActions() {
String action = getIntent().getAction();
Uri data = getIntent().getData();
if (action != null && action.equals(Intent.ACTION_VIEW) && data != null) {
String streamUrl = data.toString();
try {
streamUrl = URLDecoder.decode(streamUrl, "UTF-8");
// TODO: 7/29/17 Check if actual torrent
final Media clip = new Clip("0", streamUrl, 0, new Genre[0], -1, "", "", "", streamUrl);
StreamLoadingActivity.startActivity(this, new StreamInfo(streamUrl, new MediaWrapper(clip, -1), null));
finish();
} catch (UnsupportedEncodingException e) {
// this should never happen
Timber.d("Unknown encoding");
}
}
}
Aggregations