1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import Mux from "npm:@mux/mux-node";
const mux = new Mux({
tokenId: Deno.env.get("MUX_TOKEN_ID"),
tokenSecret: Deno.env.get("MUX_TOKEN_SECRET"),
});
const newAsset = await mux.video.assets.create({
// @ts-ignore the shorthand for input is actually fine.
input: "https://stream.mux.com/LRzgU4NGF2esRmJw28twvNefmNxdXw6Y/high.mp4",
playback_policy: [
"public"
],
encoding_tier: "smart",
mp4_support: "audio-only"
});
console.log(newAsset);
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
June 27, 2024