2 Replies Latest reply on May 24, 2017 5:40 AM by sberic

    Parameter types for Track.insertClip and Track.overwriteClip?

    sberic Level 2

      What are the parameters for the Track.insertClip and Track.overwriteClip functions? Specifically I'm interested in understanding what parameters are allowed, what parameters are optional, parameter types, and the return value, if any, of the functions.

       

      Here's what I've been able to glean [in TypeScript format] from the Premiere.jsx examples:

       

      // insertClip's second parameter can be either a number or a string.

      insertClip(clipToInsert: ProjectItem, timeInSeconds: number): void;

      insertClip(clipToInsert: ProjectItem, time: string): void;

       

      // overwriteClip only has a single example (using a number for the

      //  time).Does it also accept a string?

      overwriteClip(clipToWrite: ProjectItem, time: number): void;

       

      The stuff I'm unsure of is colored red.

       

      Further, any documentation about what the APIs actually do would be very useful. For instance, if the time specified for overwriteClip is in the middle of another clip on the Track, does the entire clip get erased and the current clip inserted at the specified location, or is the existing clip get truncated at the point specified before insertion?

       

      Thanks!

        • 1. Re: Parameter types for Track.insertClip and Track.overwriteClip?
          andymees@aje Level 3

          sberic  wrote

           

          For instance, if the time specified for overwriteClip is in the middle of another clip on the Track, does the entire clip get erased and the current clip inserted at the specified location, or is the existing clip get truncated at the point specified before insertion?

           

           

          Hey sberic, am I right in guessing you are not a video editor? In NLE terms, an insert operation adds new media, starting at the specified frame, and retains all existing media by moving it after the newly inserted media. An overwrite operation adds new media, starting at the specified frame, and replaces (overwrites) any existing media that previously occupied that space. So with respect to your question, the existing clip gets truncated at the point specified, as will any following clips that also intersect in whole or in part with the new media added to that track.

           

          Hope that helps

          Andy

          1 person found this helpful
          • 2. Re: Parameter types for Track.insertClip and Track.overwriteClip?
            sberic Level 2

            andymees@aje wrote

             

            Hey sberic, am I right in guessing you are not a video editor?

            You are correct. I'm not a video editor by trade, no; more of a hobbyist. I first used Premiere Pro back in 2001 but it has never been my primary focus at work.

             

            andymees@aje wrote

             

            In NLE terms, an insert operation adds new media, starting at the specified frame, and retains all existing media by moving it after the newly inserted media. An overwrite operation adds new media, starting at the specified frame, and replaces (overwrites) any existing media that previously occupied that space. So with respect to your question, the existing clip gets truncated at the point specified, as will any following clips that also intersect in whole or in part with the new media added to that track.

            Awesome. Thanks so much for the explanation! That is very clear and helpful!