Skip to main content
Known Participant
July 22, 2010
Answered

What type of extension would this be?

  • July 22, 2010
  • 1 reply
  • 1646 views

Hi. I'm building an extension that will allow the user to insert an HTML5 video tag on the page along with a JavaScript script tag pointing to a library file. Here's what the user needs to be able to do:

  1. See a dialog box that allows the setting of any number of SOURCE tags. Each source tag can be of a number of types (MOV, MP4, OGG, WEBM). As a SOURCE tag is added, the dialog has option to add another blank one so the user can fill it out.
  2. For each SOURCE tag, the user can "Browse" and attach a video file of those formats.
  3. User can "Browse" for an optional POSTER image.
  4. User can set the width, height, LOOP property, CONTROLS property, AUTOPLAY, PRELOAD ("none", "metadata", "auto").
  5. Or the user can set the video tag's SRC property directly without setting any SOURCE tags.
  6. The user can insert any number of these video tags and then be able to select them and edit them via the dialog box later.

Would this be of the Behavior extension type or of the Insert type? I'm trying to look for a tutorial that will help in creating this. If someone knows of an extension tutorial for something similar to what I'm trying to create here, that will be much appreciated. Thanks.

This topic has been closed for replies.
Correct answer Randy Edmunds

Thanks again, Randy. Can we use jQuery inside an extension? For example, if you want to access a specific element by ID in an extension, you can use $("#myElement") in jQuery; or can we only use basic JavaScript? Thanks.


Can we use jQuery inside an extension? For example, if you want to access a specific element by ID in an extension, you can use $("#myElement") in jQuery; or can we only use basic JavaScript?

The DOM and JS API that DW provides for writing extensions is a subset of that available in browsers, so I suspect you'll eventually run into problems, but it's worth a try.   If not, you can probably tweak jQuery to get it to work in DW. Please let us know if it works because I suspect that many other extension authors would like to try it.

Randy

1 reply

Randy Edmunds
Adobe Employee
Adobe Employee
July 22, 2010

Hi. I'm building an extension that will allow the user to insert an HTML5 video tag on the page along with a JavaScript script tag pointing to a library file.

Inserting an object is an Insert type extension. Behavior type extensions apply a behavior to an existing object.

HTH,

Randy

ac361Author
Known Participant
July 23, 2010

Thanks, Randy. I'm still looking for examples of how to do this extension and best practices.

Randy Edmunds
Adobe Employee
Adobe Employee
July 24, 2010

I'm still looking for examples of how to do this extension and best practices.

Be sure to start by looking in the Configuration/Objects folder for examples of how DW builtin objects are defined.

HTH,

Randy