Skip to content

Commit

Permalink
better like this
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjl-mux committed Sep 12, 2024
1 parent a0f9d45 commit ac9c080
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions library/src/main/java/com/mux/player/MuxPlayer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,12 @@ class MuxPlayer private constructor(
override fun onMediaItemTransition(mediaItem: MediaItem?, reason: Int) {
// Check if a DRM token is set, set View Drm Type if it is
// TODO: escape hatch TBA
CustomerViewData viewData = CustomerViewData()
// Assumes only widevine DRM playback is supported
// If playready support is added in future, update to select between widevine and playready
viewData.viewDrmType = "widevine" // TODO: make this a constant
if (mediaItem.requestMetadata.extras.getString(Constants.BUNDLE_DRM_TOKEN)) {
CustomerViewData viewData = CustomerViewData()
// Assumes only widevine DRM playback is supported
// If playready support is added in future, update to select between widevine and playready
viewData.viewDrmType = "widevine" // TODO: make this a constant

// TODO: Confirm this doesn't overwrite other keys like view session ID to null
muxStats?.updateCustomerData(
null, null, viewData
Expand Down

0 comments on commit ac9c080

Please sign in to comment.