Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
import com.npaw.youbora.lib6.exoplayer2.Exoplayer2Adapter;
import com.npaw.youbora.lib6.plugin.Options;
import com.npaw.youbora.lib6.plugin.Plugin;

import android.media.MediaDrm;
import java.io.IOException;

import com.google.common.collect.ImmutableList;
Expand Down Expand Up @@ -250,6 +250,7 @@ class ReactExoplayerView extends FrameLayout implements
private long lastPos = -1;
private long lastBufferDuration = -1;
private long lastDuration = -1;
private int hdcp = 0;

private final Handler progressHandler = new Handler(Looper.getMainLooper()) {
@Override
Expand Down Expand Up @@ -393,7 +394,7 @@ public void onBandwidthSample(int elapsedMs, long bytes, long bitrate) {
int width = videoFormat != null ? videoFormat.width : 0;
int height = videoFormat != null ? videoFormat.height : 0;
String trackId = videoFormat != null ? videoFormat.id : "-1";
eventEmitter.bandwidthReport(bitrate, height, width, trackId);
eventEmitter.bandwidthReport(bitrate, height, width, String.valueOf(hdcp));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we're just in the process of trying to unpick all the PRs to this repo, I don't think we should add more.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure I will close this pr only test on my feature branch for now

}
}
}
Expand Down Expand Up @@ -843,6 +844,9 @@ private DrmSessionManager buildDrmSessionManager(UUID uuid, String licenseUrl, S
HttpMediaDrmCallback drmCallback = new HttpMediaDrmCallback(licenseUrl,
buildHttpDataSourceFactory(false));
FrameworkMediaDrm mediaDrm = FrameworkMediaDrm.newInstance(uuid);
try (MediaDrm mediaDrmTemp = new MediaDrm(uuid)) {
hdcp = mediaDrmTemp.getConnectedHdcpLevel();
}
if (keyRequestPropertiesArray != null) {
for (int i = 0; i < keyRequestPropertiesArray.length - 1; i += 2) {
drmCallback.setKeyRequestProperty(keyRequestPropertiesArray[i], keyRequestPropertiesArray[i + 1]);
Expand Down