mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Don't attempt license request when keys expire.
- Keys should not expire during normal playbacks of correctly configured content. - Attempting to refresh on expiration causes a race condition, that may result in either failure or brief re-buffer, for the 30s license test video. - This change provides deterministic behavior, which is to always fail.
This commit is contained in:
parent
d108c13535
commit
c901025643
@ -103,7 +103,7 @@ import java.util.Locale;
|
||||
+ "as=fmp4_audio_cenc,fmp4_sd_hd_cenc&sparams=ip,ipbits,expire,as&ip=0.0.0.0&ipbits=0"
|
||||
+ "&expire=19000000000&signature=61611F115EEEC7BADE5536827343FFFE2D83D14F."
|
||||
+ "2FDF4BFA502FB5865C5C86401314BDDEA4799BD0&key=ik0", DemoUtil.TYPE_DASH),
|
||||
new Sample("WV: 30s license duration", "f9a34cab7b05881a",
|
||||
new Sample("WV: 30s license duration (fails at ~30s)", "f9a34cab7b05881a",
|
||||
"http://www.youtube.com/api/manifest/dash/id/f9a34cab7b05881a/source/youtube?"
|
||||
+ "as=fmp4_audio_cenc,fmp4_sd_hd_cenc&sparams=ip,ipbits,expire,as&ip=0.0.0.0&ipbits=0"
|
||||
+ "&expire=19000000000&signature=88DC53943385CED8CF9F37ADD9E9843E3BF621E6."
|
||||
|
@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright (C) 2014 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.google.android.exoplayer.drm;
|
||||
|
||||
/**
|
||||
* Thrown when the drm keys loaded into an open session expire.
|
||||
*/
|
||||
public final class KeysExpiredException extends Exception {
|
||||
}
|
@ -322,7 +322,7 @@ public class StreamingDrmSessionManager implements DrmSessionManager {
|
||||
return;
|
||||
case MediaDrm.EVENT_KEY_EXPIRED:
|
||||
state = STATE_OPENED;
|
||||
postKeyRequest();
|
||||
onError(new KeysExpiredException());
|
||||
return;
|
||||
case MediaDrm.EVENT_PROVISION_REQUIRED:
|
||||
state = STATE_OPENED;
|
||||
|
Loading…
x
Reference in New Issue
Block a user