Skip to content

Instantly share code, notes, and snippets.

View sbalko's full-sized avatar

sbalko

  • Clipchamp at Microsoft
View GitHub Profile
@sbalko
sbalko / shuffle_bug.c
Created August 24, 2020 00:51
Test case for WebAssembly SIMD shuffle issue
#include <wasm_simd128.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
static void print_v8(char *name, __u16x8 v) { \
printf("%s: {%u, %u, %u, %u, %u, %u, %u, %u}\n", name,
v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7]);
}
@sbalko
sbalko / index.html
Last active October 11, 2017 05:58
Uploading webcam recordings and compressed videos with the Clipchamp API using the FormData API
<!DOCTYPE html>
<html>
<head>
<title>Upload video to your form endpoint</title>
<script type="text/javascript" src="https://api.clipchamp.com/...YOUR_API_KEY.../button.js"></script>
</head>
<body>
<form>
<p>
@sbalko
sbalko / index.html
Created October 9, 2017 07:56
Uploading compressed videos or webcam recordings within HTML forms using hidden input field
<!DOCTYPE html>
<html>
<head>
<title>Upload video to your form endpoint</title>
<script type="text/javascript" src="https://api.clipchamp.com/...YOUR_API_KEY.../button.js"></script>
</head>
<body>
<form enctype="multipart/form-data" method="POST" action="...YOUR_FORM_ENDPOINT...">
<p>
@sbalko
sbalko / clipchamp_google_drive_redirect.html
Created September 1, 2017 05:13
Clipchamp API: Google Drive upload and playback by redirect example
<!DOCTYPE HTML>
<html>
<head>
<title>Simple YouTube video upload and playback</title>
<script src="https://api.clipchamp.com/YOUR_API_KEY/button.js"></script>
</head>
<body>
<div id="upload">Please wait...</div>
@sbalko
sbalko / clipchamp_youtube.html
Created August 20, 2017 03:43
Clipchamp API: YouTube upload and playback example
<!DOCTYPE HTML>
<html>
<head>
<title>Simple YouTube video upload and playback</title>
<script src="https://api.clipchamp.com/YOUR_API_KEY/button.js"></script>
</head>
<body>
<div id="upload">Please wait...</div>
<div id="player">Video will play back here.</div>
<html>
<head>
<script src="https://api.clipchamp.com/YOUR_API_KEY/button.js"></script>
</head>
<body>
<div id="clipchamp_wrapper">Please wait...</div>
<script>
clipchamp(document.getElementById('clipchamp_wrapper'), {
output: 'youtube', // or 's3', 'azure', 'dropbox', 'gdrive', 'blob'
onUploadComplete: function(data) {
var playerDiv = document.createElement('div');
document.body.appendChild(playerDiv);
var process = clipchamp({
output: 'youtube',
style: {
url: "https://api.test.clipchamp.com/static/button/themes/modern-light.css"
},
inputs: ['camera'],
enable: ['no-user-retry', 'no-thank-you', 'no-branding'],
@sbalko
sbalko / clipchamp_custom_ui.js
Created August 3, 2017 03:54
Customized User Interface
var playerDiv = document.createElement('div');
document.body.appendChild(playerDiv);
clipchamp(document.getElementById('clipchamp-button'), {
output: 'youtube',
style: {
url: "https://api.test.clipchamp.com/static/button/themes/modern-light.css"
},
inputs: ['camera'],
enable: ['no-user-retry', 'no-thank-you'],
@sbalko
sbalko / simple_video_recruiting.js
Last active August 3, 2017 01:45
Clipchamp API integration for a simple recruiting website
clipchamp(document.getElementById('clipchamp-button'), {
output: 'youtube',
style: {
url: "https://api.clipchamp.com/static/button/themes/modern-dark.css"
},
inputs: ['camera'],
enable: ['no-user-retry'],
camera: {
limit: 120
},
@sbalko
sbalko / clipchamp_simple.html
Created August 2, 2017 23:46
Simple Clipchamp video API integration example
<!DOCTYPE html>
<html>
<head>
<script type= "text/javascript" src= "https://api.clipchamp.com/YOUR_API_KEY/button.js"></script>
</head>
<body>
<div id="clipchamp-button"></div>