Skip to content

Commit ab7db75

Browse files
authored
fix: errors display when using HLS (#880)
1 parent 0f65f86 commit ab7db75

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/plugins/adaptive-streaming/quality-levels.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,10 @@ const qualityLevels = (player, options) => {
442442
hls.on(Hls.Events.ERROR, (eventName, data) => {
443443
debugLog(`HLS event: ${eventName}`, data);
444444
if (data.fatal) {
445-
player.trigger({ type: 'error', eventData: data });
445+
player.error({
446+
code: 4, // MEDIA_ERR_SRC_NOT_SUPPORTED will trigger Utils.handleCldError
447+
...data
448+
});
446449
}
447450
});
448451
} else {

0 commit comments

Comments
 (0)