# NotifyBackgroundMusic

建议使用 WMPFMusicApi.registerMusicPlayStatusListener 接口.

# 调用参数

属性 说明
notify 是否监听背景音频变化,true 为监听,false 为取消监听

# 返回参数

属性 说明
state START:1 RESUME:2 PAUSE:3 STOP:4 COMPLETE:5 ERROR:6

# 示例代码

val request = WMPFNotifyBackgroundMusicRequest()
request.baseRequest = WMPFBaseRequestHelper.checked()
request.notify = true
val result = WMPFIPCInvoker.invokeAsync<IPCInvokerTask_NotifyBackgroundMusic,
        WMPFNotifyBackgroundMusicRequest, WMPFNotifyBackgroundMusicResponse>(
    request,
    IPCInvokerTask_NotifyBackgroundMusic::class.java
) { response ->
    /**
     * val START = 1
     * val RESUME = 2
     * val PAUSE = 3
     * val STOP = 4
     * val COMPLETE = 5
     * val ERROR = 6
     **/
    it.onNext(response)
}

if (!result) {
    it.onError(Exception("invoke notifyBackgroundMusic fail"))
}