com.supermap.ar.areffect
类 ARVideoElement
- java.lang.Object
-
- com.supermap.ar.areffect.AREffectElement
-
- com.supermap.ar.areffect.ARVideoElement
-
public class ARVideoElement extends AREffectElement
AR视频元素
-
-
嵌套类概要
-
从类继承的嵌套类/接口 com.supermap.ar.areffect.AREffectElement
AREffectElement.OnRenderableLoadCompleteListener, AREffectElement.OnTapListener, AREffectElement.OnTouchListener, AREffectElement.PositionType, AREffectElement.VisualizerType
-
-
构造器概要
构造器 构造器和说明 ARVideoElement(android.content.Context context)
构造函数
-
方法概要
所有方法 实例方法 具体方法 限定符和类型 方法和说明 int
getBackGroundView()
获取背景视图viewandroid.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()
播放videovoid
stop()
停止-
从类继承的方法 com.supermap.ar.areffect.AREffectElement
addChild, addChilds, addOnTapListener, addOnTouchListener, changeBindNode, clearChildren, createChildElement, destroy, getAllChilds, getAnchorNode, getArEffectView, getChild, getChild, getChild, getChildCount, getContext, getElementName, getElementType, getId, getLocalScaleFactor, getOnRenderableLoadCompleteListener, getParentNode, getPosition, getPositionType, getRelativePosition, getRotationQuaternion, getScaleFactor, getSelectionColor, getVisualizerType, getWGSCoordinates, isOverlap, isSelected, isShadowCaster, isShadowReceiver, isTransformable, isVisible, removeChild, removeChild, removeChild, removeChild, removeOnTapListener, removeOnTouchListener, select, setElementName, setLocalScaleFactor, setOnRenderableLoadCompleteListener, setParentNode, setParentNode, setParentNode, setPosition, setPosition, setRelativePosition, setRelativePosition, setRotateAlwaysToCamera, setRotateToCameraType, setRotationAngle, setRotationAngle, setRotationAngleNoRepeat, setRotationAngleRelative, setRotationQuaternion, setScaleFactor, setSelectionColor, setShadowCaster, setShadowReceiver, setTransformable, setTransformable, setVisiblity, setVisualizerType, setWGSCoordinates, unSelect
-
-
-
-
方法详细资料
-
isLoopFlag
public boolean isLoopFlag()
获取循环状态- 返回:
-
setLoopFlag
public void setLoopFlag(boolean loopFlag)
设置是否循环播放- 参数:
loopFlag
-
-
loadModel
public void loadModel(int resourceId)
通过视频资源id加载- 参数:
resourceId
-
-
loadModel
public void loadModel(java.lang.String resourceUri)
通过视频uri 加载AR视频元素- 参数:
resourceUri
-
-
loadModel
public void loadModel(android.media.MediaPlayer mediaPlayer)
加载AR视频元素- 参数:
mediaPlayer
-
-
setBackGroundView
public 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);
- 参数:
resourceId
-
-
getBackGroundView
public int getBackGroundView()
获取背景视图view- 返回:
-
getMediaPlayer
public android.media.MediaPlayer getMediaPlayer()
获取播放器- 返回:
-
start
public void start()
播放video
-
pause
public void pause()
暂停
-
stop
public void stop()
停止
-
-