Dash-Industry-Forum/dash.js — pull request #277 by TheHedge (2014-10-31 16:45:52+00:00)
Title: Unlisten to needKey signal on media source teardown

Javascript undefined error was occurring in onMediaSourceNeedsKey() with an uninitialized mediaInfos object. Reason was during a media tear down, the needsKey listener was not being removed and thus multiple needsKey signals were being generated.

This fix removes the stale listener when the media source is undergoing tear down processing.