# 音频被收藏操作打断

#### 问题现象

用户播放音频时，点击画面的收藏操作，音频会暂停播放。

#### 背景知识

AVPlayer.on('stateChange')：监听播放状态机AVPlayerState切换的事件。

#### 问题定位

1.  查看Hilog日志关键字Click accepted，日志打印Click accepted,tag: Image，判断收藏图片做了Click事件消费。
2.  查看Hilog日志AVPlayer state，日志在收藏动作后紧接着打印AVPlayer state stopped called，判断音频在做收藏操作时候主动做了停止播放的逻辑。
    
    ```
    [(100000:100000:scope)] Click try accept
    [(100000:100000:scope)] Click accepted, tag: Image
    [(100000:100000:scope)] id: 0, log: {types: Click, node: Image, prcd: Down, state: READY, extraInfo: ETF: 0 CFP: 0, prcd: Up, state: SUCCEED, extraInfo: ETF: 0 CFP: 0}{types: Sequenced, node: Image, prcd: Down, state: READY, prcd: Up, state: FAIL}{types: LongPress, node: Image, prcd: Down, state: DETECTING, prcd: Up, state: FAIL}{types: Pan, node: Image}{types: LongPress, node: Image, prcd: Down, state: DETECTING, prcd: Up, state: FAIL}
    IC AVPlayer state playing called.
    #113 0xCD4D60 StopClick
    #167 0x893438 ClickThread End
    IC AVPlayer state stopped called.
    ```
    

#### 分析结论

应用音频停止/暂停播放逻辑实现问题，在非停止/暂停播放场景调用了停止/暂停播放逻辑。

#### 修改建议

修改业务逻辑，在执行收藏等非音频操作行为时，不要调用音频停止/暂停接口。