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

getSeekableBlob no longer working in Chrome 92 #760

Open
KrypticCoder opened this issue Jul 29, 2021 · 1 comment
Open

getSeekableBlob no longer working in Chrome 92 #760

KrypticCoder opened this issue Jul 29, 2021 · 1 comment

Comments

@KrypticCoder
Copy link

KrypticCoder commented Jul 29, 2021

After upgrade to Chrome 92, getSeekableBlob breaks on line 1923 in RecordRTC.js at tools.makeMetadataSeekable.

/**
 * @param {Blob} file - File or Blob object.
 * @param {function} callback - Callback function.
 * @example
 * getSeekableBlob(blob or file, callback);
 * @see {@link https://github.com/muaz-khan/RecordRTC|RecordRTC Source Code}
 */
function getSeekableBlob(inputBlob, callback) {
    // EBML.js copyrights goes to: https://github.com/legokichi/ts-ebml
    if (typeof EBML === 'undefined') {
        throw new Error('Please link: https://www.webrtc-experiment.com/EBML.js');
    }

    var reader = new EBML.Reader();
    var decoder = new EBML.Decoder();
    var tools = EBML.tools;

    var fileReader = new FileReader();
    fileReader.onload = function(e) {
        var ebmlElms = decoder.decode(this.result);
        ebmlElms.forEach(function(element) {
            reader.read(element);
        });
        reader.stop();

       /** --- Breaks here. --- */
        var refinedMetadataBuf = tools.makeMetadataSeekable(reader.metadatas, reader.duration, reader.cues);

        var body = this.result.slice(reader.metadataSize);
        var newBlob = new Blob([refinedMetadataBuf, body], {
            type: 'video/webm'
        });

        callback(newBlob);
    };
    fileReader.readAsArrayBuffer(inputBlob);
}

The following error is shown in console:
image

***** EDIT *****
Also broken in Safari Version 14.1.2 (16611.3.10.1.3)
Works in Firefox 90.0.2 (64-bit)

@angekouf
Copy link

angekouf commented Aug 3, 2021

fyi, this issue has apparently been reported to the ts-ebml package and after investigation the dependency packages are missing some schema definitions.

Here is the issue which also includes a temporary workaround legokichi/ts-ebml#33

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

No branches or pull requests

2 participants