Chisle
코딩 에이전트 플러그인, 20개 실시간 작업에서 기본 모델 52% 활용, 간결한 페르소나와 출력 압축 제공
Mux Video SDK로 Node 앱에 스트리밍 영상을 몇 분 안에 구현하고, 손쉽게 확장해 수백만 사용자가 어떤 기기에서도 재생하도록 합니다
Build streaming video experiences into your Node app in minutes with Mux Video SDKs. Easily scale your live stream and make it playable by millions on any device.
개발 도구TypeScript · ShellGitHub @muxinc가동 상태 재확인 필요운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
Official Mux API wrapper for Node projects, supporting both Mux Data and Mux Video.
README 전체를 불러오는 중입니다.
README 전문 보기 ↗This library provides convenient access to the Mux REST API from server-side TypeScript or JavaScript.
The REST API documentation can be found on docs.mux.com. The full API of this library can be found in api.md.
Note: As of v14 of mux-node-sdk, we have changed some internal workings of the SDKs. You can read more about this here.
Use the Mux MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
Note: You may need to set environment variables in your MCP client.
npm install @mux/ts
The full API of this library can be found in api.md.
import Mux from '@mux/ts';
const client = new Mux({
tokenId: process.env['MUX_TOKEN_ID'], // This is the default and can be omitted
tokenSecret: process.env['MUX_TOKEN_SECRET'], // This is the default and can be omitted
});
const asset = await client.video.assets.create({
inputs: [{ url: 'https://storage.googleapis.com/muxdemofiles/mux-video-intro.mp4' }],
playback_policies: ['public'],
});
console.log(asset.id);
This library includes TypeScript definitions for all request params and response fields. You may import and use them like so:
import Mux from '@mux/ts';
const client = new Mux({
tokenId: process.env['MUX_TOKEN_ID'], // This is the default and can be omitted
tokenSecret: process.env['MUX_TOKEN_SECRET'], // This is the default and can be omitted
});
const params: Mux.Video.AssetCreateParams = {
inputs: [{ url: 'https://storage.googleapis.com/muxdemofiles/mux-video-intro.mp4' }],
playback_policies: ['public'],
};
const asset: Mux.Video.Asset = await client.video.assets.create(params);
Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
You can use any JWT-compatible library, but we've included some light helpers in the SDK to make it easier to get up and running.
// Assuming you have your signing key specified in your environment variables:
// Signing token ID: process.env.MUX_SIGNING_KEY
// Signing token secret: process.env.MUX_PRIVATE_KEY
// Most simple request, defaults to type video and is valid for 7 days.
const token = mux.jwt.signPlaybackId('some-playback-id');
// https://stream.mux.com/some-playback-id.m3u8?token=${token}
// If you wanted to sign a thumbnail
const thumbParams = { time: 14, width: 100 };
const thumbToken = mux.jwt.signPlaybackId('some-playback-id', {
type: 'thumbnail',
params: thumbParams,
});
// https://image.mux.com/some-playback-id/thumbnail.jpg?token=${token}
// If you wanted to sign a gif
const gifToken = mux.jwt.signPlaybackId('some-playback-id', { type: 'gif' });
// https://image.mux.com/some-playback-id/animated.gif?token=${token}
// Here's an example for a storyboard
const storyboardToken = mux.jwt.signPlaybackId('some-playback-id', {
type: 'storyboard',
});
// https://image.mux.com/some-playback-id/storyboard.jpg?token=${token}
// You can also use `signViewerCounts` to get a token
// used for requests to the Mux Engagement Counts API
// https://docs.mux.com/guides/see-how-many-people-are-watching
const statsToken = mux.jwt.signViewerCounts('some-live-stream-id', {
type: 'live_stream',
});
// https://stats.mux.com/counts?token={statsToken}
In cases you need multiple tokens, like when using Mux Player, things can get unwieldy pretty quickly. For example,
여기까지가 README 앞부분입니다. 나머지는 원문에서 읽을 수 있습니다. README 전문 보기 ↗