Layer count limits
When an app uses a XComponent, the surface mode and texture mode are available. In surface mode, an XComponent creates an independent layer surface. The number of XComponent to use varies according to the playback scenarios. For full-screen video playback without bullet comments, it is required that no more than two XComponents be used in surface mode. For full-screen video playback with bullet comments, the surface mode allows the use of no more than three XComponents on one screen because bullet comments require an additional surface layer for rendering.
XComponent({ id: 'XComponentId', type: 'surface', libraryname: 'entry' })
.width(360)
.height(360)
The command for capturing layer information is hdc shell hidumper -s 10 -a allInfo. Check surface in LayerInfo to obtain the number of layers.

The preceding figure shows a video scenario without on-screen comments. There are four layers, including two system layers (RCDTopSurfaceNode and RCDBottomSurfaceNode) and two third-party app layers, which meet the requirements of third-party apps.