This document describes the typical problems that occur when you use AVCastPicker in audio and video apps and how to locate and solve the problems. You can further locate the faults based on the media session management error codes and HiLog.
Symptom
After AVCastPicker is clicked, the device selection page is empty.
Possible causes
Solution
Symptom
customPicker is used to customize a component style, but the style is not updated after the device is switched.
Possible causes
The custom style does not automatically refresh with the device change. The app needs to refresh the style based on the device change.
Solution
Listen to the audio device switchover event using on('preferOutputDeviceChangeForRendererInfo'), and call getPreferredOutputDeviceForRendererInfoSync in the callback to obtain the current device, and refresh the custom style. For details, see Implementing a Custom Style.