src/webm-writer-0.2.0.js
function rewriteDuration() {
                var
                    buffer = new ArrayBufferDataStream(8),
                    oldPos = blobBuffer.pos;
                
                // Rewrite the data payload (don't need to update the id or size)
                buffer.writeDoubleBE(clusterStartTime);
                
                // And write that through to the file
                blobBuffer.seek(segmentDuration.dataOffset);
                blobBuffer.write(buffer.getAsDataArray());
        
                blobBuffer.seek(oldPos);
            }
function rewriteDuration() {
                var
                    buffer = new ArrayBufferDataStream(8),
                    oldPos = blobBuffer.pos;
                
                // Rewrite the data payload (don't need to update the id or size)
                buffer.writeDoubleBE(clusterStartTime);
                
                // And write that through to the file
                blobBuffer.seek(segmentDuration.dataOffset);
                blobBuffer.write(buffer.getAsDataArray());
        
                blobBuffer.seek(oldPos);
            }
function rewriteDuration ( ) { var buffer = new ArrayBufferDataStream ( 8 ) , oldPos = blobBuffer . pos ; // Rewrite the data payload (don't need to update the id or size) buffer . writeDoubleBE ( clusterStartTime ) ; // And write that through to the file blobBuffer . seek ( segmentDuration . dataOffset ) ; blobBuffer . write ( buffer . getAsDataArray ( ) ) ; blobBuffer . seek ( oldPos ) ; }
Rewrite the Duration field of the Segment with the newly-discovered video duration.
Rewrite the Duration field of the Segment with the newly - discovered video duration .