Bug Description
1. Summary
dash.js does not perform retry processing correctly due to an error in the additional lines modified by Amazon. Specifically, the object being passed as the event handler is incorrect.
App Name:
App Link on Amazon Appstore ABEMA - App on Amazon Appstore
Bug Severity
Select one that applies
-
Impacts operation of app
-
Blocks current development
-
Improvement suggestion
-
Issue with documentation (If selected, please share the doc link and describe the issue)
-
Other
2. Steps to Reproduce
-
Please block playback with proxy(Charles, proxyman etc…
-
The internal retry process in dash.js starts, but an error occurs and the retry does not complete successfully.
3. Observed Behavior
dash.js doesn't retry.
4. Expected Behavior
Retry normally.
4.a Possible Root Cause & Temporary Workaround
src/streaming/protection/models/ProtectionModel_21Jan2015.js
function setMediaElement(mediaElement) {
if (videoElement === mediaElement)
return;
// Replacing the previous element
if (videoElement) {
videoElement.removeEventListener('encrypted', eventHandler); <-- This is event handler which is expected to remove.
if (videoElement.setMediaKeys) {
videoElement.setMediaKeys(null);
}
}
videoElement = mediaElement;
// Only if we are not detaching from the existing element
if (videoElement) {
// AMAZON_MOD_BEGIN
videoElement.addEventListener('encrypted', eventHandler.handleEvent); <-- But in this line, remove event listener is different.
if (videoElement.setMediaKeys) {
videoElement.setMediaKeys(mediaKeys);
}
// AMAZON_MOD_END
}
}
We can address this by modifying the relevant section in dash.js; however, we would like Amazon to confirm whether this code is correct as a whole. Since the issue is caused by the code added by Amazon, we would appreciate their validation.
5. Logs or crash report
Feb 19 09:34:01.015572 firestick-eb75ecaaa7c72e23 local0.info tv.abema.golem[29612]: 3449343573 INFO com.amazon.keplerscript: [KeplerScript-JavaScript] MediaPlayer:addEventListener: needkey
Feb 19 09:34:01.015882 firestick-eb75ecaaa7c72e23 local0.info tv.abema.golem[29612]: 3449343573 INFO com.amazon.keplerscript: [KeplerScript-JavaScript] MediaEventEmitterImpl:addEventListener: needkey
Feb 19 09:34:01.016054 firestick-eb75ecaaa7c72e23 local0.info tv.abema.golem[29612]: 3449343573 INFO com.amazon.keplerscript: [KeplerScript-JavaScript] MediaEventEmitterImpl:addEventListener: typeof listener=object, listener=[object Object], constructorName=Object
Feb 19 09:34:01.020687 firestick-eb75ecaaa7c72e23 local0.info tv.abema.golem[29612]: 3449343573 INFO com.amazon.keplerscript: [truncated][KeplerScript-JavaScript] [Fluffy:ContentSession] _resetPlayer: initPlayer失敗, error=The listener must be a function, stack=TypeError: The listener must be a function
at addListener (http://localhost:8081/index.bundle//&platform=kepler&dev=true&minify=false:141185:26)
at on (http://localhost:8081/index.bundle//&platform=kepler&dev=true&minify=false:141343:23)
at apply (native)
at anonymous (http://localhost:8081/index.bundle//&platform=kepler&dev=true&minify=false:141079:284)
at addEventListener (http://localhost:8081/index.bundle//&platform=kepler&dev=true&minify=false:141113:69)
at addEventListener (http://localhost:8081/index.bundle//&platform=kepler&dev=true&minify=false:139949:104)
at setMediaElement (http://localhost:8081/index.bundle//&platform=kepler&dev=true&minify=false:233114:103)
at Y (http://localhost:8081/index.bundle//&platform=kepler&dev=true&minify=false:231869:44)
at initialize (http://localhost:8081/index.bundle//&platform=kepler&dev=true&minify=false:166115:40)
at xt (http://localhost:8081/index.bundle//&platform=kepler&dev=true&minify=false:187429:98)
at St (http://localhost:8081/index.bundle//&platform=kepler&dev=true&minify=false:187257:158)
at initialize (http://localhost:8081/index.bundle//&platform=kepler&dev=true&minify=false:187685:78)
at dashOnlyInitialize (http://localhost:8081/index.bundle//&platform=kepler&dev=true&minify=false:192932:26)
at ?anon_0_ (http://localhost:8081/index.bundle//&platform=kepler&dev=true&minify=false:192213:32)
at next (native)
at asyncGeneratorStep (http://localhost:8081/index.bundle//&platform=kepler&dev=true&minify=false:28753:19)
at _next (http://localhost:8081/index.bundle//&platform=kepler&dev=true&minify=false:28767:29)
at M (http://localhost:8081/index.bundle//&platform=kepler&dev=true&minify=false:236147:26)
at anonymous (http://localhost:8081/index.bundle//&platform=kepler&dev=true&minify=false:236050:29)
at m (http://localho...[Exceeds field length limit of 2048 bytes]
6. Environment
-
SDK Version: 0.22.5600
-
App State:
[Foreground] -
OS Information
NAME="OS" OE_VERSION="4.0.0" OS_MAJOR_VERSION="1" OS_MINOR_VERSION="1" RELEASE_ID="14" OS_VERSION="1.1" BRANCH_CODE="TV Ship day60" BUILD_DESC="OS 1.1 (TV Ship day60/90)" BUILD_FINGERPRINT="4.0.211542.0(3072cab629675a74)/90N:user-external/release-keys" BUILD_VARIANT="user-external" BUILD_TAGS="release-keys" BUILD_DATE="Mon Jan 19 21:04:32 UTC 2026" BUILD_TIMESTAMP="1768856672" VERSION_NUMBER="1401010009050"
7. Example Code Snippet / Screenshots / Screengrabs
I wrote in Possible Root Cause & Temporary Workaround Section.
Playback Issues
Please share the following details in addition:_
-
Player SDK:
[dash.js] -
Player SDK Version:
[Play adaptive content using Dash.js Player | Design and Develop Vega Apps]`-
Audio Codecs:
[MPEG-4 AC-LC] -
Video Codecs:
[AVC] -
Manifest Types:
[dash]
-
Q: If applicable, please provide your media/content url
If this is created dynamically, tokenized, etc please provide a way for us to access it
You don't have to playback url addressing this problem.
Q: Are there any special headers required to reproduce the issue you are facing?
N/A