Search in sources :

Example 16 with StreamInfo

use of butter.droid.base.providers.media.model.StreamInfo in project butter-android by butterproject.

the class BeamPlayerActivity method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
    super.onCreate(savedInstanceState, 0);
    setShowCasting(true);
    StreamInfo streamInfo = getIntent().getParcelableExtra(EXTRA_STREAM_INFO);
    long resumePosition = getIntent().getLongExtra(EXTRA_RESUME_POSITION, 0);
    if (savedInstanceState == null) {
        fragment = BeamPlayerFragment.newInstance(streamInfo, resumePosition);
        getSupportFragmentManager().beginTransaction().add(android.R.id.content, fragment, TAG_FRAGMENT_BEAM).commit();
    } else {
        fragment = (BeamPlayerFragment) getSupportFragmentManager().findFragmentByTag(TAG_FRAGMENT_BEAM);
    }
    BeamServerService.getServer().start();
    title = streamInfo.getFullTitle() == null ? getString(R.string.the_video) : streamInfo.getFullTitle();
/*
        File subsLocation = new File(SubsProvider.getStorageLocation(context), media.videoId + "-" + subLanguage + ".srt");
        BeamServer.setCurrentSubs(subsLocation);
         */
}
Also used : StreamInfo(butter.droid.base.providers.media.model.StreamInfo)

Aggregations

StreamInfo (butter.droid.base.providers.media.model.StreamInfo)16 MediaWrapper (butter.droid.base.providers.media.model.MediaWrapper)4 Bundle (android.os.Bundle)3 SubtitleWrapper (butter.droid.base.providers.subs.model.SubtitleWrapper)3 Clip (butter.droid.provider.base.model.Clip)3 Media (butter.droid.provider.base.model.Media)3 Uri (android.net.Uri)2 UnsupportedEncodingException (java.io.UnsupportedEncodingException)2 SuppressLint (android.annotation.SuppressLint)1 TargetApi (android.annotation.TargetApi)1 Intent (android.content.Intent)1 UiSubItem (butter.droid.ui.media.detail.model.UiSubItem)1 OnClick (butterknife.OnClick)1