In Composition.java, there's a comment indicating that instances of MediaItem from different sequences will be mixed in the output when they overlap in time. However, based on my tests involving 5 overlapping media items with transparency, I've noticed that the z-order appears to be undefined. The stacking order of the videos seems to change randomly with each execution. Here's the relevant comment from the code:
/**
* The {@link EditedMediaItemSequence} instances to compose.
*
* <p>{@link MediaItem} instances from different sequences that are overlapping in time will be
* mixed in the output.
*/
Given this behavior, I'm seeking a way to control the z-order of these videos. Specifically, is there a method or technique to set or manipulate the z-order of MediaItem instances within EditedMediaItemSequence ore entire EditedMediaItemSequences to ensure a consistent stacking order in the output?