|
Adding a Screenjelly button to your site If you have a website to which you would like to add Screenjelly, this section is for you. You just need to add the following JavaScript snippet to your website where you want the button to be added: <script type="text/javascript"> This code will add the following button to your page: Go ahead and click it to see what it does! SPOILER: It opens a pop-up window with a "mini-version" of Screenjelly, which allows your visitors to create a screen recording right there and then, and add the link or the embed code to your website (in comments, forums posts, or anywhere else.) Advanced OptionsYou have access to couple more options to have a better control of what happens once the recording is uploaded. By default, as seen above, the user will get a link or an embed code to copy and paste in your site. You can make the integration even better by writing a callback function which will take care of adding that link or embed code wherever you need it. For example, if you have a blog and you want your users to be able to add a recording in the comments, the callback function could automatically insert the embed code in the body of the comment when the user clicks "Use it". After adding the JavaScript snippet from above, you can declare two callback functions: recorder.onSuccess = function(video) This function is called when the recording has been successfully uploaded.
recorder.onCancel = function() This function is called when the recorder has been closed without uploading a recording. ExampleThe example below will add the Screenjelly button, and, once the recording is uploaded, update the HTML elements with id 'videoUrl' and 'videoEmbed'. If the recorder is closed before finishing, an alert is displayed. You just need to adapt these callback functions to your own page. <script type="text/javascript"> |