public class ARVideoElement extends AREffectElement
AREffectElement.OnTapListener, AREffectElement.OnTouchListener, AREffectElement.PositionType
构造器和说明 |
---|
ARVideoElement(android.content.Context context)
构造函数
|
限定符和类型 | 方法和说明 |
---|---|
int |
getBackGroundView()
获取背景视图view
|
android.media.MediaPlayer |
getMediaPlayer()
获取播放器
|
boolean |
isLoopFlag()
获取循环状态
|
void |
loadModel(int resourceId)
通过视频资源id加载
|
void |
loadModel(android.media.MediaPlayer mediaPlayer)
加载AR视频元素
|
void |
loadModel(java.lang.String resourceUri)
通过视频uri 加载AR视频元素
|
void |
pause()
暂停
|
void |
setBackGroundView(int resourceId)
加载背景视图(与setMediaPlayer()使用) 例: MediaPlayer mediaPlayer = MediaPlayer.create(this,R.raw.huawei3); videoElement = new ARVideoElement(this); videoElement.setBackGroundView(R.layout.ar_video_key_1920x1080); videoElement.loadModel(mediaPlayer); videoElement.setParentNode(parentElement);
|
void |
setLoopFlag(boolean loopFlag)
设置是否循环播放
|
void |
start()
播放video
|
void |
stop()
停止
|
addChild, addChilds, addOnTapListener, addOnTouchListener, clearAllChilds, getAllChilds, getChild, getChild, getChild, getChildCount, getId, getPosition, getPositionType, getRelativePosition, getRotationAngle, getRotationAxis, getScaleFactor, getWGSCoordinates, isTransformable, isVisible, removeChild, removeChild, removeChild, removeOnTapListener, removeOnTouchListener, setElementName, setParentNode, setParentNode, setPosition, setRelativePosition, setRotationAngle, setScaleFactor, setTransformable, setVisiblity, setWGSCoordinates
public boolean isLoopFlag()
public void setLoopFlag(boolean loopFlag)
loopFlag
-public void loadModel(int resourceId)
resourceId
-public void loadModel(java.lang.String resourceUri)
resourceUri
-public void loadModel(android.media.MediaPlayer mediaPlayer)
mediaPlayer
-public void setBackGroundView(int resourceId)
resourceId
-public int getBackGroundView()
public android.media.MediaPlayer getMediaPlayer()
public void start()
public void pause()
public void stop()