小程序开放平台
文档中心
小游戏
控制台
登录
开发指南
框架
JS API
开发工具
基础
env
小游戏
生命周期
getLaunchOptionsSync
getEnterOptionsSync
应用级事件
onUnhandledRejection
onError
onShow
onHide
offUnhandledRejection
offError
offShow
offHide
系统
getSystemInfo
getSystemInfoSync
转发
showShareMenu
shareAppMessage
onShareAppMessage
offShareAppMessage
onShareTimeline
offShareTimeline
onShareChat
offShareChat
界面
交互
showLoading
showModal
showToast
菜单
getMenuButtonBoundingClientRect
网络
发起请求
request
下载
downloadFile
WebSocket
sendSocketMessage
onSocketOpen
onSocketMessage
onSocketError
onSocketClose
connectSocket
closeSocket
SocketTask
SocketTask事件
SocketTask-close
SocketTask-onClose
SocketTask-onError
SocketTask-onMessage
SocketTask-onOpen
SocketTask-send
上传
uploadFile
uploadTask
uploadTaskAbort
uploadTaskOffHeadersReceived
uploadTaskOffProgressUpdate
uploadTaskOnHeadersReceived
uploadTaskOnProgressUpdate
数据缓存
clearStorage
clearStorageSync
getStorage
getStorageInfo
getStorageInfoSync
removeStorage
getStorageSync
setStorage
setStorageSync
渲染
画布
createCanvas
Canvas方法
图片
createImage
媒体
音频
createInnerAudioContext
InnerAudioContext
InnerAudioContext方法
InnerAudioContext-play
InnerAudioContext-pause
InnerAudioContext-stop
InnerAudioContext-seek
InnerAudioContext-destroy
InnerAudioContext-onCanplay
InnerAudioContext-offCanplay
InnerAudioContext-onPlay
InnerAudioContext-offPlay
InnerAudioContext-onPause
InnerAudioContext-offPause
InnerAudioContext-onStop
InnerAudioContext-offStop
InnerAudioContext-onEnded
InnerAudioContext-offEnded
InnerAudioContext-onTimeUpdate
InnerAudioContext-offTimeUpdate
InnerAudioContext-onError
InnerAudioContext-offError
InnerAudioContext-onWaiting
InnerAudioContext-offWaiting
InnerAudioContext-onSeeking
InnerAudioContext-offSeeking
InnerAudioContext-onSeeked
InnerAudioContext-offSeeked
文件
getFileSystemManager
FileSystemManager
FileSystemManager方法
access
accessSync
copyFile
mkdirSync
readdir
rmdirSync
saveFile
saveFileSync
unlink
unzip
writeFile
writeFileSync
开放接口
用户信息
getUserInfo
登录
checkSession
login
授权
authorize
设置
getSetting
openSetting
帐号信息
getAccountInfoSync
商品
openGoodsDetail
设备
触摸
onTouchStart
onTouchMove
onTouchEnd
onTouchCancel
offTouchStart
offTouchMove
offTouchEnd
offTouchCancel
Touch
振动
vibrateShort
vibrateLong
跳转
restartMiniProgram
exitMiniProgram
位置
getLocation
startLocationUpdate
startLocationUpdateBackground
stopLocationUpdate
onLocationChange
chooseLocation
openLocation
支付
requestOrderPayment
xhs.InnerAudioContext-onError
开发
>
JS API
>
媒体
>
音频
>
InnerAudioContext方法
>
InnerAudioContext-onError
>
更新时间:2024-11-14 11:47:48
监听音频播放错误事件
参数
function listener
音频播放错误事件的监听函数
参数
Object res
属性
类型
说明
errMsg
string
errCode
number
errCode
合法值
说明
10001
系统错误
10002
网络错误
10003
文件错误
10004
格式错误
-1
未知错误
Tips
errCode=100001 时,如若 errMsg 中有 INNERCODE -11828 ,请先检查 response header 是否缺少 Content-Length
errCode=100001 时,如若 errMsg 中有 systemErrCode:200333420,请检查文件编码格式和 fileExtension 是否一致
该文档是否对您有帮助?
参数
function listener
参数
Object res
errCode
Tips