6.FAQ
1. How to Modify Speed Options
To modify the speed options, you need to edit the following two files, which handle the speed selection UI in portrait and landscape modes respectively:
PLVMediaPlayerMoreLayoutPort.ets(speed options in the "More" panel in portrait mode)PLVMediaPlayerSpeedSelectLayoutLand.ets(independent speed selection panel in landscape mode)
Both files independently define the supportSpeeds array, so they must be modified separately to ensure the speed options are visible and selectable in both layouts. The following example demonstrates how to add a 2.5x speed option:
Steps:
- Modify the
PLVMediaPlayerMoreLayoutPort.etsfile.
Before modification:
private supportSpeeds: string[] = ["0.5", "0.75", "1", "1.25", "1.5", "2", "3"]
After modification:
Insert "2.5" between "2" and "3". To maintain logical order of options, it is recommended to place it after "2".
private supportSpeeds: string[] = ["0.5", "0.75", "1", "1.25", "1.5", "2", "2.5", "3"] // 添加了 "2.5"
- Modify the
PLVMediaPlayerSpeedSelectLayoutLand.etsfile.
Before modification:
private supportSpeeds: string[] = ["0.5", "0.75", "1", "1.25", "1.5", "2", "3"]
After modification:
Similarly, insert "2.5" between "2" and "3".
private supportSpeeds: string[] = ["0.5", "0.75", "1", "1.25", "1.5", "2", "2.5", "3"] // 添加了 "2.5"
After completing the modifications to both files, recompile and run your application. You will see the 2.5x speed option in the player's speed selection interface.
