Skip to content
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

Merged
merged 6 commits into from
Jul 9, 2021

Conversation

brandonocasey
Copy link
Contributor

No description provided.

@@ -452,4 +460,6 @@ var CaptionParser = function() {
this.reset();
};

CaptionParser.prototype = new Stream();
Copy link
Contributor Author

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']();
Copy link
Contributor Author

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 🤷🏻

@@ -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.");
Copy link
Contributor Author

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),
Copy link
Contributor Author

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.

@brandonocasey brandonocasey merged commit 4995603 into main Jul 9, 2021
@brandonocasey brandonocasey deleted the refactor/warn-to-log branch July 9, 2021 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants