Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript XMLHttpRequest Status of 404 With BLOB URL

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #191977
    RickyYoder
    Participant

    Hello, and Happy New Year!

    I found a very interesting question on StackOverflow, with a very interesting answer. It was about recording a getUserMedia stream, by creating an object URL for the stream, and then using an XMLHttpRequest to retrieve the contents of the BLOB, and then convert the BLOB into a WebM data URI.

    That question from StackOverflow can be found here:
    http://stackoverflow.com/questions/14976460/html5-video-recording-and-upload

    I thought this was really cool, so I tried using it myself on my website. http://html5.rickyyoder.x10.mx/lab/videoRecording/

    However, I keep getting a 404 Not Found error trying to request the BLOB from the BLOB URL. I am using the Dev channel on my Chromebook, and normal Chrome on my Win 7 desktop, 32 bit.

    I can create a normal Blob through the constructor, and that URL works.

    I posted a question on StackOverflow myself regarding this issue, but has gotten no answers so far.
    http://stackoverflow.com/questions/27707322/xmlhttprequest-status-of-404-with-blob-url

    The code I am using is as follows:

    function XHR(){
    var xhr = new XMLHttpRequest();
    xhr.open(‘GET’,record.src); //404 ???
    xhr.responseType = ‘blob’;
    xhr.onload = function(e) {
    if (this.status == 200){
    //do some stuff
    result.innerText = this.response;
    }
    };
    xhr.send();
    }

    “record” is a video who’s src is a blob:// URL.

    I made a JSFiddle to show the code in action.
    http://jsfiddle.net/auoyjhzv/4/

    Can anybody tell me what’s going on? Something must be wrong because this seems to be discussed elsewhere on StackOverflow as well. It seems like it’s a topic for discussion!

Viewing 1 post (of 1 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.