884e8d3c by David LaPalomento

Remove console.logs

Use videojs.log instead of console.log but in general prefer quieter operation.
1 parent a02c09db
......@@ -25,10 +25,6 @@ window.videojs.hls.ExpGolomb = function(workingData) {
return (8 * workingBytesAvailable) + workingBitsAvailable;
};
this.logStuff = function() {
console.log('bits', workingBitsAvailable, 'word', (workingWord >>> 0));
};
// ():void
this.loadWord = function() {
var
......
......@@ -47,7 +47,6 @@ hls.FlvTag = function(type, extraData) {
try {
this.bytes.set(bytes.subarray(offset, offset + length), this.position);
} catch(e) {
console.log(e);
throw e;
}
this.position += length;
......
......@@ -90,8 +90,6 @@
} else if (0 !== sps0[offset + 0]) {
offset += 1;
} else {
console.log('found emulation bytes');
rbsp.set([0x00, 0x00], rbspCount);
spsCount += 2;
rbspCount += 2;
......@@ -311,7 +309,6 @@
};
this.finishFrame = function() {
console.log('finish frame');
if (h264Frame) {
// Push SPS before EVERY IDR frame fo seeking
if (newExtraData.extraDataExists()) {
......
......@@ -65,18 +65,8 @@
}
};
self.onM3U8LoadError = function(error) {
if(error)
{
console.log(error);
}
};
self.onM3U8Update = function(m3u8) {
if(m3u8)
{
console.log(m3u8);
}
};
self.onM3U8LoadError = function() {};
self.onM3U8Update = function() {};
self.loadSegment = function(segment) {
self.segmentController = new SegmentController();
......@@ -100,12 +90,7 @@
self.loadSegment(self.currentManifest.mediaItems[self.currentSegment]);
};
self.onSegmentLoadError = function(error) {
if(error)
{
console.log(error);
}
};
self.onSegmentLoadError = function() {};
};
})(this);
......
......@@ -53,7 +53,7 @@
self.onSegmentLoadError = function(error) {
if (error) {
console.log(error.message);
throw error;
}
if (self.onErrorCallback !== undefined) {
......
(function(window) {
var
FlvTag = window.videojs.hls.FlvTag,
H264Stream = window.videojs.hls.H264Stream,
AacStream = window.videojs.hls.AacStream,
videojs = window.videojs,
FlvTag = videojs.hls.FlvTag,
H264Stream = videojs.hls.H264Stream,
AacStream = videojs.hls.AacStream,
m2tsPacketSize = 188;
console.assert(H264Stream);
......@@ -150,7 +151,7 @@
// until we receive more
// ?? this seems to append streamBuffer onto data and then just give up. I'm not sure why that would be interesting.
console.log('data.length + streamBuffer.length < m2tsPacketSize ??');
videojs.log('data.length + streamBuffer.length < m2tsPacketSize ??');
streamBuffer.readBytes(data, data.length, streamBuffer.length);
return;
} else {
......@@ -194,7 +195,7 @@
// If there was an error parsing a TS packet. it could be
// because we are not TS packet aligned. Step one forward by
// one byte and allow the code above to find the next
console.log('error parsing m2ts packet, attempting to re-align');
videojs.log('error parsing m2ts packet, attempting to re-align');
dataPosition++;
}
}
......@@ -382,7 +383,7 @@
} else if (0x1FFF === pid) {
// NULL packet
} else {
console.log("Unknown PID " + pid);
videojs.log("Unknown PID parsing TS packet: " + pid);
}
return true;
......