This article contains users' questions and answers regarding the Recorder Launcher API.
Table of Contents
The JavaScript library does not contain these settings. For available properties, see Setting Basic Uploader Properties. You can specify the maximum width of the upload during encoding. See basicupload.post.maxwidth.
As an example, regardless of the captured screen size, you may want a maximum width video size to be uploaded (the encoding process could pillar or letterbox as necessary). When you integrate the API into your website, the following code can be passed in through the option variable’s properties. For example, on your web page, add the following lines:
// Optional: Set max width to resize to if the recorded video too large "basicupload.post.maxwidth":"1280"
Use the basicupload.post.maxwidth
parameter to set the maximum width for captures during encoding. The above line reduces encoded video to 1280 px. Setting this parameter does not alter capture sizes with a width smaller than 1280 px.
For available properties, see Setting Basic Uploader Properties.
If the app launches correctly using the sample screencast‑o‑matic.com settings but not your partner settings, try changing hosting locations. If this does not correct the app launch, check the jarHostPath
setting. The jarHostPath
must point to a URL that matches your partner setting; for example, *.yourcompany.com
. If the URL for the jarHostPath
is different from the site in partner settings, the app cannot run.
If the upload (in the basicupload) specifies that it goes to localhost, but the app is not validating localhost as an acceptable development environment, try adding an entry in the host file for your computer and map a fake subdomain to 127.0.0.1.
You may be facing this issue when uploading to S3 using a presigned URL. A header mismatch typically causes this error. To correct this error, check that you set "ContentType" = "video/mp4"
.
Change the behavior of the launcher to open a window showing local recordings on the computer by adding this property to the launch properties:
properties: { "showManager": "true", ... }
There are two ways to open a URL after the upload is successful:
"app.upload.onexit.action": "http://yoururl/"
"app.upload.onexit.action": "gotoplayback"
Set the following two properties together to turn off the app auto-delete:
"showManager": "true", "som.*.app.upload.deleteafter": "false"
The upload message can provide users with information about what they need to do when they click Continue. To customize the success message, set this property:
"basicupload.success.message": "Some html message here"
Set the URL in JavaScript. The recorder app first calls this URL to send any title/description via POST, or if not collecting title/description, a GET request is made. For example, see the following JavaScript setup:
"basicupload.request.url":"http://.../basicuploadS3Upload.php?id=myid"
When you call the above URL, you get a text reply with the URL where the actual mp4 video is POSTed. This example makes a request to the above URL and returns a presigned Amazon S3 URL where you can post:
http://s3.amazonaws.com/.../basicupload.mp4?AWSAccessKeyId=PLACEHOLDER%20FOR%20ACTUAL%20KEY
When the app has this final URL, it makes a POST request with the body of the request being the mp4 file.
The body is not encoded like form data from a browser. It is the raw mp4 file.
Here's an example PHP script that reads the raw input stream of the POST request and writes to a local file. This script places the local file in /tmp, but it can be placed anywhere on the server that you have write permission:
<?php /* data comes in on the stdin stream */ $putdata = fopen(""php://input"", ""r""); $fp = fopen(""/tmp/test.mp4"", ""w""); /* Read the data 1 KB at a time and write to the file */ while ($data = fread($putdata, 1024)) fwrite($fp, $data); /* Close the streams */ fclose($fp); fclose($putdata);?>