You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When playing secure content with ads via the IMA extension the secure session is released. This means when the ad completes the drm session needs to be reacquired causing multiple network requests to the license URL (in case of widevine with http callback), and a spinner filled transition from ad to content for the user.
#4867 was closed recently, which solves the issue for specific scenarios I.E. multi period dash with a mixture of clear ads and DRM content, but the issue still persists with the IMA extension as the ads and the content are contained in separate MediaSources juggled in an AdsMediaSource.
Recipe to reproduce
One dash of secure content, widevine with a http callback is easiest to see
A couple of splashes of IMA ads, at least one midroll is easiest, DRM -> ad (clear) -> DRM
Mix them together with the IMA extension
See the widevine http callback hit on playback start, then again after every ad
Proposed solution
No perfect solution comes to mind, but I'd imagine it would involve AdsMediaSource/CompositeMediaSource retaining the DrmSession somehow. Or maybe preventing the content MediaSource being released while the ad MediaSource is playing if we know it is due to play after the ad.
Alternatives considered
Our current workaround is essentially proxying the DrmSessionManager and the DrmSessions it hands out to block release calls until we know the entire playback session is complete. This prevents multiple license calls and makes the ad to contente playback smooth.
The workaround seems to work ok, but it's a bit of a maintenance problem. Moving from 2.10 to 2.11 was a bit of a mess. I also wouldn't be surprised if we're leaking sessions etc.
The text was updated successfully, but these errors were encountered:
Issue: #7011
Issue: #6725
Issue: #7066
This also mitigates (but doesn't fix) Issue: #4133 because it
prevents a second key load after a short clear section.
PiperOrigin-RevId: 319184325
316f8a8 implements session keepalive inside the DefaultDrmSessionManager. By default sessions are kept for 5 minutes after the last 'release' - this can be customised with DefaultDrmSessionManager.Builder#setSessionKeepaliveMs(long).
This is available on the dev-v2 branch - please try it out and let us know if you spot any problems!
Use case description
When playing secure content with ads via the IMA extension the secure session is released. This means when the ad completes the drm session needs to be reacquired causing multiple network requests to the license URL (in case of widevine with http callback), and a spinner filled transition from ad to content for the user.
#4867 was closed recently, which solves the issue for specific scenarios I.E. multi period dash with a mixture of clear ads and DRM content, but the issue still persists with the IMA extension as the ads and the content are contained in separate
MediaSource
s juggled in anAdsMediaSource
.Recipe to reproduce
Proposed solution
No perfect solution comes to mind, but I'd imagine it would involve
AdsMediaSource
/CompositeMediaSource
retaining theDrmSession
somehow. Or maybe preventing the contentMediaSource
being released while the adMediaSource
is playing if we know it is due to play after the ad.Alternatives considered
Our current workaround is essentially proxying the
DrmSessionManager
and theDrmSession
s it hands out to block release calls until we know the entire playback session is complete. This prevents multiple license calls and makes the ad to contente playback smooth.The workaround seems to work ok, but it's a bit of a maintenance problem. Moving from 2.10 to 2.11 was a bit of a mess. I also wouldn't be surprised if we're leaking sessions etc.
The text was updated successfully, but these errors were encountered: