51黑料 v2.0版本的 MD5 值为:cc00ad70c70d95f274d15d4654c16262
以下内容为反编译后的 SmoothStreamingTestMediaDrmCallback.java 源代码,内容仅作参考
package tv.danmaku.ijk.media.exo.demo;
import android.annotation.TargetApi;
import android.text.TextUtils;
import com.google.android.exoplayer.drm.ExoMediaDrm;
import com.google.android.exoplayer.drm.MediaDrmCallback;
import com.google.android.exoplayer.util.Util;
import g.b.a.a.a;
import java.util.Collections;
import java.util.Map;
import java.util.UUID;
@TargetApi(18)
public class SmoothStreamingTestMediaDrmCallback implements MediaDrmCallback {
private static final String PLAYREADY_TEST_DEFAULT_URI = "http://playready.directtaps.net/pr/svc/rightsmanager.asmx";
private static final Map<String, String> PROVISIONING_REQUEST_PROPERTIES = Collections.singletonMap("Content-Type", "application/octet-stream");
private static final Map<String, String> KEY_REQUEST_PROPERTIES = a.Y("Content-Type", "text/xml", "SOAPAction", "http://schemas.microsoft.com/DRM/2007/03/protocols/AcquireLicense");
public byte[] executeKeyRequest(UUID uuid, ExoMediaDrm.KeyRequest keyRequest) {
String defaultUrl = keyRequest.getDefaultUrl();
if (TextUtils.isEmpty(defaultUrl)) {
defaultUrl = PLAYREADY_TEST_DEFAULT_URI;
}
return Util.executePost(defaultUrl, keyRequest.getData(), KEY_REQUEST_PROPERTIES);
}
public byte[] executeProvisionRequest(UUID uuid, ExoMediaDrm.ProvisionRequest provisionRequest) {
return Util.executePost(provisionRequest.getDefaultUrl() + "&signedRequest=" + new String(provisionRequest.getData()), (byte[]) null, PROVISIONING_REQUEST_PROPERTIES);
}
}