Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
63588644
authored
May 05, 2020
by
aquilescanta
Committed by
Oliver Woodman
May 05, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Use DataSpec request headers in HttpMediaDrmCallback
PiperOrigin-RevId: 309944716
parent
ee14fe7a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
library/core/src/main/java/com/google/android/exoplayer2/drm/HttpMediaDrmCallback.java
library/core/src/main/java/com/google/android/exoplayer2/drm/HttpMediaDrmCallback.java
View file @
63588644
...
...
@@ -27,6 +27,7 @@ import com.google.android.exoplayer2.upstream.HttpDataSource.InvalidResponseCode
import
com.google.android.exoplayer2.util.Assertions
;
import
com.google.android.exoplayer2.util.Util
;
import
java.io.IOException
;
import
java.util.Collections
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -138,17 +139,13 @@ public final class HttpMediaDrmCallback implements MediaDrmCallback {
@Nullable
Map
<
String
,
String
>
requestProperties
)
throws
IOException
{
HttpDataSource
dataSource
=
dataSourceFactory
.
createDataSource
();
if
(
requestProperties
!=
null
)
{
for
(
Map
.
Entry
<
String
,
String
>
requestProperty
:
requestProperties
.
entrySet
())
{
dataSource
.
setRequestProperty
(
requestProperty
.
getKey
(),
requestProperty
.
getValue
());
}
}
int
manualRedirectCount
=
0
;
while
(
true
)
{
DataSpec
dataSpec
=
new
DataSpec
.
Builder
()
.
setUri
(
url
)
.
setHttpRequestHeaders
(
requestProperties
!=
null
?
requestProperties
:
Collections
.
emptyMap
())
.
setHttpMethod
(
DataSpec
.
HTTP_METHOD_POST
)
.
setHttpBody
(
httpBody
)
.
setFlags
(
DataSpec
.
FLAG_ALLOW_GZIP
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment