
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
googlevideo
Advanced tools
This is a collection of utilities for working with Google Video APIs, with a primary focus on UMP.
The protobuf definitions were extracted from YouTube's Android and iOS clients, and the UMP parser and buffer manager are based on the implementation currently found on youtube.com.
Usage examples can be found here.
npm install googlevideo
import GoogleVideo, { PART, Protos } from 'googlevideo';
const streamingUrl = 'https://abcd--a.googlevideo.com/videoplayback?...';
const response = await fetch(streamingUrl, { method: 'POST' });
const arrayBuffer = await response.arrayBuffer();
const dataBuffer = new GoogleVideo.ChunkedDataBuffer();
dataBuffer.append(new Uint8Array(arrayBuffer));
const googUmp = new GoogleVideo.UMP(dataBuffer);
googUmp.parse((part) => {
switch (part.type) {
case PART.MEDIA_HEADER: {
console.log('[MediaHeader]:', Protos.MediaHeader.decode(part.data.chunks[0]));
break;
}
case PART.MEDIA: {
const headerId = part.data.getUint8(0);
const streamData = part.data.split(1).remainingBuffer;
console.log('[Media]:', `Header ID: ${headerId}`, `length: ${streamData.getLength()}`);
break;
}
case PART.MEDIA_END: {
const headerId = part.data.getUint8(0);
console.log('[MediaEnd]:', `Header ID: ${headerId}`);
break;
}
default:
console.log('Unhandled part:', part.type);
break;
}
});
For more advanced examples, including scenarios beyond just parsing responses, check out the examples.
Distributed under the MIT License.
FAQs
A set of utilities for working with Google Video APIs.
The npm package googlevideo receives a total of 407 weekly downloads. As such, googlevideo popularity was classified as not popular.
We found that googlevideo demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.