-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: rename warn event to log, change console logs to log events #392
Conversation
lib/mp4/caption-parser.js
Outdated
@@ -452,4 +460,6 @@ var CaptionParser = function() { | |||
this.reset(); | |||
}; | |||
|
|||
CaptionParser.prototype = new Stream(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to make this a stream as we don't have a better way to get listeners right now.
@@ -10,6 +10,8 @@ var dashInit = segments['dash-608-captions-init.mp4'](); | |||
// This file includes 2 segments data to force a flush | |||
// of the first caption. The second caption is at 200s | |||
var dashSegment = segments['dash-608-captions-seg.m4s'](); | |||
var malformedSei = segments['malformed-sei.m4s'](); | |||
var malformedSeiInit = segments['malformed-sei-init.mp4'](); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added these from the old issue, we should have done it then 🤷🏻
lib/mp4/caption-parser.js
Outdated
@@ -97,8 +98,7 @@ var findSeiNals = function(avcStream, samples, trackId) { | |||
seiNal.pts = lastMatchedSample.pts; | |||
seiNal.dts = lastMatchedSample.dts; | |||
} else { | |||
// eslint-disable-next-line no-console | |||
console.log("We've encountered a nal unit without data. See mux.js#233."); | |||
logWarn("We've encountered a nal unit without data. See mux.js#223."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue number was wrong here. It was actually 223 not 233
@@ -91,8 +91,6 @@ var | |||
MetadataStream = function(options) { | |||
var | |||
settings = { | |||
debug: !!(options && options.debug), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debug was only used for this console.log, now we just trigger an event at any time and the user can choose what to do.
No description provided.