Comments (2)
@icbaker I'm curious why DefaultDrmSession.RequestHandler
was even implemented rather than using the existing com.google.android.exoplayer2.upstream.Loader
. which does largely the same thing with a richer set of API calls to observe and manage the load.
from media.
Alternatives considered
Adding logging to the
HttpMediaDrmCallback
, this is simple but not as useful as a hook that allowed usingAnalyticsListener
to post the data to operational logging.
Not sure if this is what you meant, but to be explicit: you can add a TransferListener
to the DataSource.Factory
you pass to HttpMediaDrmCallback
, and you should get some callbacks including URLs etc.
@icbaker I'm curious why
DefaultDrmSession.RequestHandler
was even implemented rather than using the existingcom.google.android.exoplayer2.upstream.Loader
.
Good question - I'm afraid I don't know the reasoning at the time, but I suspect it might have been felt that the Loader
machinery was a bit heavyweight for "just" making an HTTP request that you expect to complete fairly quickly (vs e.g. keeping a long-running HTTP request open while you load a whole MP4 movie).
We could:
- Add load statistics to the existing
drmKeysLoaded
event- Add two new events (
drmKeyRequestStarted
,drmKeyRequestCompleted
)
I like (1) more than (2), because we could also include additional info like the type of key load (offline, renewal, etc).
Is this something you'd like to send a PR for? I suggest keeping the existing DrmSessionEventListener.onDrmKeysLoaded(int windowIndex, MediaSource.MediaPeriodId)
method and deprecating it, then adding a new onDrmKeysLoaded(int, MediaPeriodId, KeyLoadInfo)
method (type name TBD). You will want to ensure that both are invoked from DrmSessionEventListener.EventDispatcher.drmKeysLoaded
. Similar on AnalyticsListener
(though without the duplication there - each method should just forward directly I think, to avoid too much duplication).
You can probably hard-update the DrmSessionEventListener.EventDispatcher.drmKeysLoaded
method to take the new KeyLoadInfo
type without deprecating the zero-arg overload, since direct usages of that are probably quite rare (custom DrmSessionManager
impls only really) - and maintaining both becomes tricky (since you have to synthesise a 'fake' KeyLoadInfo
which is a bit confusing).
from media.
Related Issues (20)
- Videos filmed vertically are rotated 90 degrees on Android 9
- Problem with skippable pre-roll ads when seeking the player to resume a playback HOT 2
- Is it possible with media3 to replace the MediaMetadataRetriever thumbnail extraction functionality? HOT 1
- last frame is black when show VAST ads HOT 13
- DecoderCounters reset before `onVideoDisabled()` is delivered. HOT 1
- Broken playback resumption HOT 1
- Workaround fix to handle 416 HOT 8
- Fire TV - Google DAI ad playback errors on CMAF streams HOT 2
- Approaches to lazily loading content and building a playlist HOT 2
- How to prevent HDR tracks from being selected when connected to a non-HDR display HOT 1
- CMCD data as query parameter is url-encoded twice HOT 1
- How to pass request headers for HttpDataSource dynamically HOT 3
- How to set a playback error with media 3 HOT 1
- Two tracks are getting downloaded by Exoplayer and IMA SDK HOT 4
- Not able to play files from local cache
- Shaders applied as GLEffects in transformer have different results than applying them directly to a GLSurfaceView HOT 9
- [media3-1.1.0] Codec, Bitrate and version info @ Playing audio/mpeg HOT 2
- Media3 ExoPlayer PlayerView UI - seekbar doesn't work (to change position) and rewind/fast forward buttons are disabled HOT 1
- Opening the app, when notification is clicked HOT 4
- Video playback is not smooth on Mi Box S HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from media.