MCPcopy Create free account
hub / github.com/Wscats/chrome-devtools-cli / ArrayToWebM

Function ArrayToWebM

src/__tests__/MediaStreamRecorder.js:2278–2389  ·  view source on GitHub ↗
(frames)

Source from the content-addressed store, hash-verified

2276
2277 function whammyInWebWorker(frames) {
2278 function ArrayToWebM(frames) {
2279 var info = checkFrames(frames);
2280 if (!info) {
2281 return [];
2282 }
2283
2284 var clusterMaxDuration = 30000;
2285
2286 var EBML = [{
2287 'id': 0x1a45dfa3, // EBML
2288 'data': [{
2289 'data': 1,
2290 'id': 0x4286 // EBMLVersion
2291 }, {
2292 'data': 1,
2293 'id': 0x42f7 // EBMLReadVersion
2294 }, {
2295 'data': 4,
2296 'id': 0x42f2 // EBMLMaxIDLength
2297 }, {
2298 'data': 8,
2299 'id': 0x42f3 // EBMLMaxSizeLength
2300 }, {
2301 'data': 'webm',
2302 'id': 0x4282 // DocType
2303 }, {
2304 'data': 2,
2305 'id': 0x4287 // DocTypeVersion
2306 }, {
2307 'data': 2,
2308 'id': 0x4285 // DocTypeReadVersion
2309 }]
2310 }, {
2311 'id': 0x18538067, // Segment
2312 'data': [{
2313 'id': 0x1549a966, // Info
2314 'data': [{
2315 'data': 1e6, //do things in millisecs (num of nanosecs for duration scale)
2316 'id': 0x2ad7b1 // TimecodeScale
2317 }, {
2318 'data': 'whammy',
2319 'id': 0x4d80 // MuxingApp
2320 }, {
2321 'data': 'whammy',
2322 'id': 0x5741 // WritingApp
2323 }, {
2324 'data': doubleToString(info.duration),
2325 'id': 0x4489 // Duration
2326 }]
2327 }, {
2328 'id': 0x1654ae6b, // Tracks
2329 'data': [{
2330 'id': 0xae, // TrackEntry
2331 'data': [{
2332 'data': 1,
2333 'id': 0xd7 // TrackNumber
2334 }, {
2335 'data': 1,

Callers

nothing calls this directly

Calls 4

checkFramesFunction · 0.85
doubleToStringFunction · 0.85
getClusterDataFunction · 0.85
generateEBMLFunction · 0.85

Tested by

no test coverage detected