Search
Video Class
Remarks See Also
 





A component that displays video stream.

Namespace: MindFusion.Drawing
File: Video.js

 Syntax

JavaScript  Copy Code

// class
Video.prototype = {}

 Remarks

The video does not play automatically. To start playing it, call the component's play method in response to user input events.

If autoProperty is enabled for a Video component in CompositeNode template, the template loader creates getter and setter wrapping the component's MediaLocation property.

 Example

The following template fragment adds a Video component to the node:

JavaScript  Copy Code

{
    component: "Video",
    name: "Video",
    autoProperty: true,
    mediaLocation: "video.webm",
    margin: "1"
},

It automatically adds getVideo and setVideo methods to the node class, which can be used to get or set the video stream URL:

JavaScript  Copy Code

var VideoNode = CompositeNode.classFromTemplate(
    "VideoNode", templateJson);
var node = new VideoNode();
node.setVideo("video2.webm");
diagram.addItem(node);

 Inheritance Hierarchy

MindFusion.Drawing.ComponentBase
    MindFusion.Drawing.Video

 See Also