From 8769e33119202a23a23b2f5fdacc1f9a9f006352 Mon Sep 17 00:00:00 2001 From: SimonAllen <61531170+SimonAllen0901@users.noreply.github.com> Date: Tue, 18 Mar 2025 21:11:22 +0800 Subject: [PATCH] fix: correct "this" context in getData method --- packages/xgplayer-dash/src/dash.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/xgplayer-dash/src/dash.js b/packages/xgplayer-dash/src/dash.js index 2ef46fe4..3df45c7e 100755 --- a/packages/xgplayer-dash/src/dash.js +++ b/packages/xgplayer-dash/src/dash.js @@ -22,7 +22,7 @@ class DASH extends EventEmitter { return new Promise((resolve, reject) => { const task = new Task(url, resolve, range) task.once('error', err => { - self.emit('error', err) + this.emit('error', err) }) }) }