Viz Pilot User Guide

Version 8.1 | Published August 16, 2017 ©

Integrating Drag and Drop from External Applications

External applications can, if needed, integrate with the Viz Pilot system to provide resources such as images and videos using “Drag and Drop”. A typical scenario would be using a MAM (Media Asset Management) system to locate media resources and using Drag and Drop to ingest the resources to a template in a Viz Pilot workflow. The required data formats and drag and drop parameters are described in this document.

Note: The Drag and Drop integration in the Viz Pilot is not designed to accept common image and video files that typical applications work with. Its purpose is for developers to be able to support it by API integration. Consequently, this section is fairly technical and is intended audience is developers planning to integrate Drag and Drop (hereafter: DnD).

The integration uses the standard Microsoft Windows functions for OLE Drag and Drop, see https://msdn.microsoft.com/en-us/library/96826a87.aspx. For general information about the Windows Clipboard see MSDN Clipboard Formats.

The drop target of a DnD operation will always be an image control (TTWImage) on a template. Not every image control will accept drops. The accepted custom clipboard formats (https://msdn.microsoft.com/en-us/library/838a3whf.aspx), along with when each one is accepted, are listed in the following table:

Clipboard format

Accepting ImageSources

Media Type

CF_VIDEO_ASSET_ENTRY_XML

isVideoMediaSearch

video

CF_IMAGE_ASSET_ENTRY_XML

isImageMediaSearch

image

All the accepted custom clipboard formats are registered ones (see MSDN Registered Clipboard Formats). They are text formats, with the same characteristics as CF_UNICODETEXT.

The actual content needs to be an Asset Entry XML, describing a video, or an image asset, respectively.

The Asset Entry media type extends the Atom Entry media type defined by RFC 4287 and RFC 5023, by defining additional markup and additional processing rules. An Asset Entry has the Internet Media Type application/atom+xml with the RECOMMENDED type parameter type=entry.

Pilot Data Server Documentation should be consulted for the Asset Entry media types.

Tip: Assuming the Pilot Data Server is running on localhost, browse to _http://localhost:8177/help_ and _http://localhost:8177/AssetSearchDocumentation/_.

API Integration

The only Windows data transfer types accepted as input are enumeration values TYMED_HGLOBAL with DVASPECT_CONTENT. The accepted *DROPEFFECT*s are DROPEFFECT_COPY and DROPEFFECT_LINK.

Links to MSDN definitions for the required enumeration values and constants (these links could change over time):

  • TYMED_HGLOBAL

  • DVASPECT_CONTENT

  • DROPEFFECT

    Tip: If there is an error while processing dropped content an error message will be logged, as well as the "Errors" button will appear if it wasn't already visible. If this happens during development, you should check the error log as a trace of why the dropped resource was rejected will be logged. If the media container does not accept a drop, most likely because the resource being dropped is not a supported type, this will be indicated by the mouse pointer icon format showing a “stop sign”.

    Tip: Tools such as ClipSpy (to see what datatypes are provided by the DnD operation, see http://www.codeproject.com/Articles/168/ClipSpy), can be valuable while developing the integration.