How to provide a custom launch template
Accurate.Video is launched with a custom launch template using the query parameter launchTemplate
like this:
https://apps.accurate.video/launch/{application}?launchTemplate=http://your-launch-template.com
For this to work however, the launch template must be publicly accessible and CORS must be configured properly so that Accurate.Video may retrieve it.
Also, remember to replace {application}
with the app you want to launch, like validate
, edit
or poster
.
Amazon S3 example setup
Let's exemplify this using an Amazon S3 bucket.
Step 1: Create a bucket
First create a bucket. This bucket will serve both media and launch templates.
Step 2: Configure CORS
Add a proper CORS configuration allowing our domain to request data. You can follow this guide. As an example this CORS configuration will work:
[
{
"AllowedHeaders": ["*"],
"AllowedMethods": ["GET", "HEAD"],
"AllowedOrigins": ["https://*.accurate.video"],
"ExposeHeaders": [],
"MaxAgeSeconds": 3000
}
]
Step 3: Upload media
Upload media to your bucket and get an url to each file that is publicly accessible. Either by granting public read access or by generating a presigned url.
Step 4: Create a custom launch template
Start out with the default template
https://apps.accurate.video/launch/{application}?launchTemplate=https://apps.accurate.video/assets/json/default-template.json&manual
and modify it to load your media.
You can read more about the launch template format here
Step 5: Upload launch template
Upload the launch template to your bucket and make it accessible just like in step 3.
Step 6: Load remote launch template
Open your launch template in Accurate.Video using the query parameter launchTemplate
https://apps.accurate.video/launch/{application}?launchTemplate=https://s3.eu-central-1.amazonaws.com/your-bucket/launchTemplate.json&manual