{{tag>motioncapture democap behavior}} [[:start|Start Page]] >> [[main|DEMoCap: Drag[en]gine Motion Capture]] >> [[democap:elementclasses|XML Element Classes]] >> ** ECBWindowVideoPlayer ** ====== ECBWindowVideoPlayer ====== Behavior adding video player to renderable desktop using a borderless window. ====== Instance Counts ====== This element behavior can be present multiple times in a BehaviorElement. In this case use a unique identifier to distinguish the individual behavior instances. ====== Element Class Properties ====== Element class properties have the prefix ''windowVideoPlayer.'' or ''windowVideoPlayer({id}).'' if id is not empty. ===== guitheme ===== Gui theme to use. * Full name: ''windowVideoPlayer.guitheme'' or ''windowVideoPlayer({id}).guitheme'' * Type: string * Default Value: ''/content/gui/videoplayer.guitheme.xml'' * Expected File Type: ''*.guitheme.xml'' * Example (*.deeclass) /content/gui/videoplayer.guitheme.xml ===== video ===== Video to play. Can be changed using behavior panel by the user. * Full name: ''windowVideoPlayer.video'' or ''windowVideoPlayer({id}).video'' * Type: string * Default Value: empty string * Expected File Type: ''*.webm'' (all video modules) * Example (*.deeclass) /content/video/myVideo.webm ====== Events ====== This behavior has no events. ====== Conversation Commands ====== This behavior adds no conversation commands. ====== Conversation Conditions ====== This behavior adds no conversation conditions. ====== Behavior Tree Actions ====== This behavior adds no behavior tree actions. ====== Behavior Tree Conditions ====== This behavior adds no behavior tree conditions. ====== Required Behaviors ====== * [[dragengine:modules:dragonscript:behavior_renderabledesktop|ECBehaviorRenderableDesktop]] * [[behavior_ecbbehaviorguipanels|ECBBehaviorGuiPanels]] ====== Optional Behaviors ====== This behavior does not support optional behaviors. ====== API Documentation ====== Since DEMoCap Version ''1.3'' ====== Use Cases ====== * Play back video the user can change in the behavior properties panel. ====== Element Class Example ====== class MyElement extends BehaviorElementClass public var ECBehaviorComponent component public var ECBehaviorCollider collider public var ECBehaviorDynamicSkin dynamicSkin public var ECBehaviorRenderableDesktop renderableDesktop public var ECBBehaviorGuiPanels guiPanels public var ECBWindowVideoPlayer windowVideoPlayer func new() component = ECBehaviorComponent.new(this) collider = ECBehaviorCollider.new(this, component) dynamicSkin = ECBehaviorDynamicSkin.new(this, component) renderableDesktop = ECBehaviorRenderableDesktop.new(this, dynamicSkin) renderableDesktop.getRenderable().setValue("board") renderableDesktop.getSize().setPoint(Point.new(512, 256)) renderableDesktop.getGuiTheme().setPath("/content/ui/adboard.guitheme.xml") guiPanels = ECBBehaviorGuiPanels.new(this) windowVideoPlayer = ECBWindowVideoPlayer.new(this, renderableDesktop, guiPanels) end end ====== Behavior Factory ====== Using element class supporting adding behaviors the behavior can be added like this (again create an example which creates a valid element class): display second /content/gui/videoplayer.guitheme.xml ====== Live Examples ======