AnnMediaObject Class (original) (raw)

Summary

Defines a media (Audio or Video) object.

Syntax

C#

Objective-C

C++/CLI

Java

Python

@interface LTAnnMediaObject : LTAnnHotspotObject<NSCoding, NSCopying> 
public class AnnMediaObject extends AnnHotspotObject 
class AnnMediaObject(AnnHotspotObject): 

Example

using Leadtools.Annotations.Automation; using Leadtools.Annotations.Engine; using Leadtools.Codecs; using Leadtools.Annotations; using Leadtools.Annotations.WinForms; public void AnnCore_AnnMediaObject() { // assumes _automation is valid double inch = 720.0; // Add a Media object AnnMediaObject mediaObj = new AnnMediaObject(); // Set the points for the MediaObject mediaObj.Points.Add(LeadPointD.Create(1 * inch, 1 * inch)); mediaObj.Points.Add(LeadPointD.Create(2 * inch, 1 * inch)); mediaObj.Points.Add(LeadPointD.Create(2 * inch, 2 * inch)); mediaObj.Points.Add(LeadPointD.Create(1 * inch, 2 * inch)); // create the AnnMedia with a source to the media to play AnnMedia media = new AnnMedia(); //Replace the source with your video file to be played on click media.Source1 = "ms-appx:///Videos/TestVideo.avi"; mediaObj.Media = media; // Add the object to the automation container _automation.Container.Children.Add(mediaObj); }