Commit 6bb1cc57 authored by Ulan's avatar Ulan

Update PlayerActivity.java

parent 0e10cf35
...@@ -37,7 +37,6 @@ import android.view.View; ...@@ -37,7 +37,6 @@ import android.view.View;
import android.view.WindowManager; import android.view.WindowManager;
import android.view.animation.AccelerateInterpolator; import android.view.animation.AccelerateInterpolator;
import android.view.animation.DecelerateInterpolator; import android.view.animation.DecelerateInterpolator;
import android.widget.CheckBox;
import android.widget.Toast; import android.widget.Toast;
import com.google.android.exoplayer2.C; import com.google.android.exoplayer2.C;
...@@ -234,7 +233,6 @@ public class PlayerActivity extends BaseActivity implements CustomPlayBackContro ...@@ -234,7 +233,6 @@ public class PlayerActivity extends BaseActivity implements CustomPlayBackContro
String[] keyRequestPropertiesArray = intent.getStringArrayExtra(DRM_KEY_REQUEST_PROPERTIES); String[] keyRequestPropertiesArray = intent.getStringArrayExtra(DRM_KEY_REQUEST_PROPERTIES);
boolean multiSession = intent.getBooleanExtra(DRM_MULTI_SESSION, false); boolean multiSession = intent.getBooleanExtra(DRM_MULTI_SESSION, false);
int errorStringId = R.string.error_drm_unknown; int errorStringId = R.string.error_drm_unknown;
try { try {
drmSessionManager = buildDrmSessionManagerV18(drmSchemeUuid, drmLicenseUrl, drmSessionManager = buildDrmSessionManagerV18(drmSchemeUuid, drmLicenseUrl,
keyRequestPropertiesArray, multiSession); keyRequestPropertiesArray, multiSession);
...@@ -247,10 +245,8 @@ public class PlayerActivity extends BaseActivity implements CustomPlayBackContro ...@@ -247,10 +245,8 @@ public class PlayerActivity extends BaseActivity implements CustomPlayBackContro
return; return;
} }
} }
DefaultRenderersFactory renderersFactory = new DefaultRenderersFactory(this, DefaultRenderersFactory renderersFactory = new DefaultRenderersFactory(this,
drmSessionManager, DefaultRenderersFactory.EXTENSION_RENDERER_MODE_PREFER); drmSessionManager, DefaultRenderersFactory.EXTENSION_RENDERER_MODE_PREFER);
player = ExoPlayerFactory.newSimpleInstance(renderersFactory, trackSelector); player = ExoPlayerFactory.newSimpleInstance(renderersFactory, trackSelector);
player.addListener(new PlayerEventListener()); player.addListener(new PlayerEventListener());
simpleExoPlayerView.setPlayer(player); simpleExoPlayerView.setPlayer(player);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment