-
Notifications
You must be signed in to change notification settings - Fork 438
SuperContainer
贾俊辉 edited this page Jun 10, 2018
·
4 revisions
SuperContainer内部承载了渲染视图Render、所有的Receiver组件ReceiverGroup、以及所有的事件生产者EventProducer组件ProducerGroup、以及**事件的分发(包含播放事件、错误事件、组件事件、Touch事件)**的分发等。
BaseVideoView以及RelationAssist均有方法getSuperContainer(),能获取到SuperContainer的对象引用,如有需要可对其进行相关设置。
------------------------------------------------------------
//设置是否开启手势,默认开启
void setGestureEnable(boolean enable);
------------------------------------------------------------
//设置是否开启滑动手势,默认开启
void setGestureScrollEnable(boolean enable);
------------------------------------------------------------
//设置渲染视图
void setRenderView(View view);
------------------------------------------------------------
//分发播放事件
void dispatchPlayEvent(int eventCode, Bundle bundle);
------------------------------------------------------------
//分发错误事件
void dispatchErrorEvent(int eventCode, Bundle bundle);
------------------------------------------------------------
//设置组件事件监听器
void setOnReceiverEventListener(OnReceiverEventListener onReceiverEventListener);
------------------------------------------------------------
//添加一个事件生产者
void addEventProducer(BaseEventProducer eventProducer);
------------------------------------------------------------
//移除指定的事件生产者
boolean removeEventProducer(BaseEventProducer eventProducer);
------------------------------------------------------------
//设置一个接收者组
void setReceiverGroup(ReceiverGroup receiverGroup);
------------------------------------------------------------
//销毁SuperContainer
void destroy();
------------------------------------------------------------