a project by: José Manuel Blasco Galdón
ytCropper, the javascript library to crop YouTube videos inside your website. It is an opensource project, so you can feel free to download it, change it and use it.
Getting handle values

The ytCropper library has methods to obtain the handle values. The library has also one method that returns a embed YouTube video link prepared to play the interval specified in the cropper.

- ytCropper::getInitialValue()
Returns the first handle value in seconds (the first interval value).

- ytCropper::getFinalValue()
Returns the second handle value in seconds (the last interval value).

        // Prevent the default behaviour of a tag
        // Obtain the first value and put it into #firstInput
        // Obtain the first value and put it into #secondInput
        // Obtain the embed link and put it into #generatedCode

This code means that, when the generateButton is pressed, changes the #firstInput, #secondInput and #generatedCode with the first handle value, second handle value and embed YouTube link.

You can test it here: http://jsfiddle.net/BxQhy/11/

More information about this plugin on this wiki.

José Manuel Blasco Galdón, 10/04/2014