Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_onError (type, details, data) {
Log.error(`flvjs: ${type}: ${details}`, data)
const formattedError = this.createError({
code: `${type}_${details}`,
description: data.msg || details,
raw: data
})
this.trigger(Events.PLAYBACK_ERROR, formattedError)
this.stop()
}
_error(type, shakaError) {
Log.error('an error was raised support=', DashShakaPlayback.support)
Log.error('an error was raised by shaka player', shakaError.detail)
this.trigger(Events.PLAYBACK_ERROR, shakaError.detail, this.name)
}
}
let { category, code, severity } = error.shakaError.detail || error.shakaError
if (error.videoError || !code && !category) return super._onError()
const isCritical = severity === shaka.util.Error.Severity.CRITICAL
const errorData = {
code: `${category}_${code}`,
description: `Category: ${category}, code: ${code}, severity: ${severity}`,
level: isCritical ? PlayerError.Levels.FATAL : PlayerError.Levels.WARN,
raw: err
}
const formattedError = this.createError(errorData)
Log.error('Shaka error event:', formattedError)
this.trigger(Events.PLAYBACK_ERROR, formattedError)
}