Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mux.js

Package Overview
Dependencies
Maintainers
15
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mux.js - npm Package Compare versions

Comparing version 5.7.0 to 5.8.0

2

lib/mp4/audio-frame-utils.js

@@ -90,2 +90,4 @@ /**

Math.floor(clock.videoTsToAudioTs(audioFillDuration, track.samplerate));
return audioFillDuration;
};

@@ -92,0 +94,0 @@

@@ -52,3 +52,3 @@ /**

var generateVideoSegmentTimingInfo = function(
var generateSegmentTimingInfo = function(
baseMediaDecodeTime,

@@ -136,3 +136,5 @@ startDts,

boxes,
frameDuration;
frameDuration,
segmentDuration,
videoClockCyclesOfSilencePrefixed;

@@ -150,3 +152,4 @@ // return early if no audio data has been observed

audioFrameUtils.prefixWithSilence(
// amount of audio filled but the value is in video clock rather than audio clock
videoClockCyclesOfSilencePrefixed = audioFrameUtils.prefixWithSilence(
track, frames, audioAppendStartTs, videoBaseMediaDecodeTime);

@@ -181,5 +184,23 @@

if (frames.length) {
segmentDuration = frames.length * frameDuration;
this.trigger(
'segmentTimingInfo',
generateSegmentTimingInfo(
// The audio track's baseMediaDecodeTime is in audio clock cycles, but the
// frame info is in video clock cycles. Convert to match expectation of
// listeners (that all timestamps will be based on video clock cycles).
clock.audioTsToVideoTs(track.baseMediaDecodeTime, track.samplerate),
// frame times are already in video clock, as is segment duration
frames[0].dts,
frames[0].pts,
frames[0].dts + segmentDuration,
frames[0].pts + segmentDuration,
videoClockCyclesOfSilencePrefixed || 0
)
);
this.trigger('timingInfo', {
start: frames[0].pts,
end: frames[0].pts + (frames.length * frameDuration)
end: frames[0].pts + segmentDuration
});

@@ -399,3 +420,3 @@ }

'segmentTimingInfo',
generateVideoSegmentTimingInfo(
generateSegmentTimingInfo(
track.baseMediaDecodeTime,

@@ -1059,2 +1080,4 @@ firstGop.dts,

self.trigger.bind(self, 'audioTimingInfo'));
pipeline.audioSegmentStream.on('segmentTimingInfo',
self.trigger.bind(self, 'audioSegmentTimingInfo'));

@@ -1189,3 +1212,3 @@ // Set up the final part of the audio pipeline

// exported for testing
generateVideoSegmentTimingInfo: generateVideoSegmentTimingInfo
generateSegmentTimingInfo: generateSegmentTimingInfo
};

2

package.json
{
"name": "mux.js",
"version": "5.7.0",
"version": "5.8.0",
"description": "A collection of lightweight utilities for inspecting and manipulating video container formats.",

@@ -5,0 +5,0 @@ "repository": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc