|
|
|
|
|
|
65
|
|
65
|
|
|
66
|
jsmpeg.prototype.waitForIntraFrame = true;
|
66
|
jsmpeg.prototype.waitForIntraFrame = true;
|
|
67
|
jsmpeg.prototype.socketBufferSize = 512 * 1024; // 512kb each
|
67
|
jsmpeg.prototype.socketBufferSize = 512 * 1024; // 512kb each
|
|
68
|
-jsmpeg.prototype.onlostconnection = null;
|
|
|
|
69
|
|
68
|
|
|
70
|
jsmpeg.prototype.initSocketClient = function( client ) {
|
69
|
jsmpeg.prototype.initSocketClient = function( client ) {
|
|
71
|
this.buffer = new BitReader(new ArrayBuffer(this.socketBufferSize));
|
70
|
this.buffer = new BitReader(new ArrayBuffer(this.socketBufferSize));
|
|
|
|
|
|
|
324
|
this.firstSequenceHeader = this.buffer.index;
|
323
|
this.firstSequenceHeader = this.buffer.index;
|
|
325
|
this.decodeSequenceHeader();
|
324
|
this.decodeSequenceHeader();
|
|
326
|
|
325
|
|
|
327
|
- // Calculate the duration. This only works if the video is seekable and we have a frame count.
|
|
|
|
|
|
326
|
+ // Calculate the duration. This only works if the video is seekable and we have a frame count
|
|
328
|
this.duration = this.frameCount / this.pictureRate;
|
327
|
this.duration = this.frameCount / this.pictureRate;
|
|
329
|
|
328
|
|
|
330
|
// Load the first frame
|
329
|
// Load the first frame
|