Skip to content

BUGFIX: Clean-up CDM key sessions when videoelement unref'ed.

Created by: vuduDASH

Seems like a bug was introduced to DASH-JS in the refactor of ProtectionController/ProtectionModel. The old "teardown()" code was removed (see dashjs1.6) and now StreamController::reset() calls ProtectionController::reset().

ProtectionController::reset() nulls out the videoElement reference in the ProtectionModel, so ProtectionModel::reset() is not able to call cancelKeyRequest().

Add code in ProtectionModel::setMediaElement() to close the keysessions on the de-referenced videoElement.

Merge request reports