public interface AliyunIPipManager
sdk version >= v3.25.0
picture in picture (PIP) manager.
you can create any PIP instance with PIP track by default.
you can also add PIP instance on a given track or move between tracks
example:
The graph below represents a main track + 2 PIP Track + 3 PIP instance.
main track o--------------------------------------------o|
PIP track1 o-------------------------------------------|----o(be truncated)
PIP track2 o--------------o o-------------o |
Attentions:
1. The length of the video is dominated by the main track, and the PIP exceeding the length of the main track will be truncated.
2. he number of PIPs at a time needs to be limited, preferably not more than 3, and you can limit this by the business side at the time of invocation, depending on the performance of your user device.
Modifier and Type | Method and Description |
---|---|
AliyunIPipController |
createNewPip(java.lang.String path)
create a PIP instance, this method will create a new PIP track.
|
AliyunIPipController |
createPipInTrack(java.lang.String path,
AliyunIPipTrack track)
create a PIP instance on a given track.
|
AliyunIPipController |
findTopPipController(long timeInMillis,
PointF pointF)
find top pip controller on given time and point
|
java.util.List<AliyunIPipController> |
getAllPip()
Get all PIP instance controllers
|
java.util.List<AliyunIPipTrack> |
getPipTracks()
Get all PIP tracks
|
boolean |
movePipIntoTrack(AliyunIPipController controller,
AliyunIPipTrack track,
long startTimeInMillis)
Move PIP to some track
|
boolean |
removePip(AliyunIPipController controller)
Remove a PIP instance
|
AliyunIPipController createNewPip(java.lang.String path)
createPipInTrack(java.lang.String, com.aliyun.svideosdk.editor.AliyunIPipTrack)
path
- file pathAliyunIPipController
AliyunIPipController createPipInTrack(java.lang.String path, AliyunIPipTrack track)
path
- file pathtrack
- a exits PIP trackAliyunIPipController
boolean removePip(AliyunIPipController controller)
controller
- a exist PIP controller AliyunIPipController
boolean movePipIntoTrack(AliyunIPipController controller, AliyunIPipTrack track, long startTimeInMillis)
controller
- track
- startTimeInMillis
- start time on trackjava.util.List<AliyunIPipController> getAllPip()
AliyunIPipController findTopPipController(long timeInMillis, PointF pointF)
find top pip controller on given time and point
timeInMillis
- pointF
- java.util.List<AliyunIPipTrack> getPipTracks()