mediasource-worker-get-objecturl.js (525B)
1 importScripts("mediasource-worker-util.js"); 2 3 // Note, we do not use testharness.js utilities within the worker context 4 // because it also communicates using postMessage to the main HTML document's 5 // harness, and would confuse the test case message parsing there. 6 7 onmessage = function(evt) { 8 postMessage({ subject: messageSubject.ERROR, info: "No message expected by Worker"}); 9 }; 10 11 let util = new MediaSourceWorkerUtil(); 12 13 postMessage({ subject: messageSubject.OBJECT_URL, info: URL.createObjectURL(util.mediaSource) });