Created
November 24, 2020 14:57
-
-
Save Oleur/bb07ce9dae4de05ded28120bb30f127e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun buildMediaSource(uri: Uri, drmSessionManager: DrmSessionManager<FrameworkMediaCrypto>): MediaSource? { | |
when (val type = PlayerUtils.inferContentType(videoUrl)) { | |
... | |
C.TYPE_OTHER -> { | |
return if (videoUrl.isSmb()) { | |
ProgressiveMediaSource.Factory(SmbDataSourceFactory(videoUrl)) | |
.setDrmSessionManager(drmSessionManager) | |
.createMediaSource(uri) | |
} else { | |
ProgressiveMediaSource.Factory(mediaDataSourceFactory) | |
.setDrmSessionManager(drmSessionManager) | |
.createMediaSource(uri) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment