Search completed in 0.89 seconds.
MediaRecorder.ondataavailable - Web APIs
the mediarecorder.on
dataavailable event handler (part of the mediastream recording api) handles the
dataavailable event, letting you run code in response to blob data being made available for use.
... the mediarecorder.on
dataavailable event handler (part of the mediastream recording api) handles the
dataavailable event, letting you run code in response to blob data being made available for use.
...ing api) handles the
dataavailable event, letting you run code in response to blob data being made available for use.
...And 9 more matches
MediaRecorder: dataavailable event - Web APIs
the mediarecorder interface's
dataavailable event is fired when the mediarecorder delivers media data to your application for its use.
... the mediarecorder interface's
dataavailable event is fired when the mediarecorder delivers media data to your application for its use.
... the mediarecorder interface's
dataavailable event is fired when the mediarecorder delivers media data to your application for its use.
...And 4 more matches
MediaStream Recording API - Web APIs
pture the data generated by a mediastream or htmlmediaelement object for analysis, processing, or saving to disk.
...ed.
...e process of recording a stream is simple: set up a mediastream or htmlmediaelement (in the form of an <audio> or <video> element) to serve as the source of the media data.
...And 6 more matches
HTML parser threading
s initialized by calling nshtml5parser::parse(nsiuri*, nsirequestobserver*, void*, nsdtdmode).
...oes all sorts of initialization on the main thread.
...lives fully on the main thread.
...And 3 more matches
nsIStreamListener
netwerk/base/public/nsistreamlistener.idlscriptable this interface is used to listen to data being received on a stream.
...ata being received on a stream.
...plement this interface.
...And 2 more matches
Index - Web APIs
le to successfully record.
...cording, property, reference, video, mimetype the mimetype read-only property returns the mime media type that was specified when creating the mediarecorder object, or, if none was specified, which was chosen by the browser.
...etype the mimetype read-only property returns the mime media type that was specified when creating the mediarecorder object, or, if none was specified, which was chosen by the browser.
...And 2 more matches
Necko Architecture
hronous api.
... is told when the uri transaction has "started," when data is available (in the case of reading data), and when it has "stopped." it is up to the nsistreamlistener implementation to decide what to do with these various notifications.
...sk, or it may be located somewhere else.
...hannel, you are handed back a stream that you can read or write from or to.
Necko walkthrough
docshell::internalload nsdocshell::douriload opens the nsichannel for the uri (ns_newchannel) if "http:", it will be an nsihttpchannel nsdocshell::dochannelload nsuriloader::openuri passes an nsistreamlistener pointer, 'loader' to nsuriloader::openchannel - it creates an nsdocumentopeninfo object, which implements nsistreamlistener, i.e.
...lling function.
...istener::onstartrequest (header info) nsistreamlistener::on
dataavailable (data in single or multiple chunks) nsistreamlistener::onstoprequest (no more data from http) this all happens on the main thread, in a non-blocking fashion: make your request on the main thread, then carry on and get the async response later, also on the main thread.
...in that function it created a proxy callback because it wished to have oninputstreamready called on the main thread.
MediaRecorder - Web APIs
ding of media after having been paused.
...media in a single large chunk.
...arecorder.stop() stops recording, at which point a
dataavailable event containing the final blob of saved data is fired.
...controls = true; var blob = new blob(chunks, { 'type' : 'audio/ogg; codecs=opus' }); chunks = []; var audiourl = url.createobjecturl(blob); audio.src = audiourl; console.log("recorder stopped"); deletebutton.onclick = function(e) { evttgt = e.target; evttgt.parentnode.parentnode.removechild(evttgt.parentnode); } } mediarecorder.on
dataavailable = function(e) { chunks.push(e.data); } }) .catch(function(err) { console.log('the following error occurred: ' + err); }) } this code sample is inspired by the web dictaphone demo.
XPCOM Stream Guide
you build to let you know when there is data in a stream ready for you to consume.
...ream and the number of bytes available.
... tells you when the request begins, while the .onstoprequest(request, context) method tells you when the request ends.
imgIDecoderObserver
ode notifications may or may not be synchronous, depending on the situation.
...est(in imgirequest arequest); void onstopcontainer(in imgirequest arequest, in imgicontainer acontainer); void onstopdecode(in imgirequest arequest, in nsresult status, in wstring statusarg); void onstopframe(in imgirequest arequest, in unsigned long aframe); void onstoprequest(in imgirequest arequest, in boolean aislastpart); methods native code only!on
dataavailable decode notification.
...equest, in imgicontainer acontainer); void onstopdecode(in imgirequest arequest, in nsresult status, in wstring statusarg); void onstopframe(in imgirequest arequest, in unsigned long aframe); void onstoprequest(in imgirequest arequest, in boolean aislastpart); methods native code only!on
dataavailable decode notification.
nsIStreamConverter
stream converter users there are currently two ways to use a stream converter: synchronous: stream to stream.
...utput type and return a converted (blocking) stream to you.
...to_mime_type method overview void asyncconvertdata(in string afromtype, in string atotype, in nsistreamlistener alistener, in nsisupports actxt); nsiinputstream convert(in nsiinputstream afromstream, in string afromtype, in string atotype, in nsisupports actxt); methods asyncconvertdata() asynchronous version: converts data arriving via the converter's nsistreamlistener.on
dataavailable() method from one type to another, pushing the converted data out to the caller via alistener::on
dataavailable().
nsITraceableChannel
er call through to the previous listener for every call, in order to establish a call chain to allow all interested parties a chance to act on each event.
...ebody; // we'll set this to the this.responsestatuscode; this.deferreddone = { promise: null, resolve: null, reject: null }; this.deferreddone.promise = new promise(function(resolve, reject) { this.resolve = resolve; this.reject = reject; }.bind(this.deferreddone)); object.freeze(this.deferreddone); this.promisedone = this.deferreddone.promise; } tracinglistener.prototype = { on
dataavailable: function(arequest, acontext, ainputstream, aoffset, acount) { var istream = new binaryinputstream(ainputstream) // binaryainputstream var sstream = new storagestream(8192, acount, null); // storagestream // not sure why its 8192 but thats how eveyrone is doing it, we should ask why var ostream = new binaryoutputstream(sstream.getoutputstream(0)); // binaryoutputstream // copy received d...
...w storagestream(8192, acount, null); // storagestream // not sure why its 8192 but thats how eveyrone is doing it, we should ask why var ostream = new binaryoutputstream(sstream.getoutputstream(0)); // binaryoutputstream // copy received data as they come.
MediaRecorder.requestData() - Web APIs
the mediarecorder.requestdata() method (part of the mediarecorder api) is used to raise a
dataavailable event containing a blob object of the captured media as it was when the method was called.
...object of the captured media as it was when the method was called.
...t.
MediaRecorder.start() - Web APIs
ext slice of the media assuming the mediarecorder's state is inactive, start() sets the state to recording, then begins capturing media from the input stream.
...a ends.
...the source is still playing, a new blob is created and recording continues into that, and so forth.
Recording a media element - Web APIs
omise's resolution handler as the timeout handler function.
...the recording to make.
... number of milliseconds of media, although if the media stops before that time is reached, mediarecorder automatically stops recording as well.
Using the MediaStream Recording API - Web APIs
() { mediarecorder.start(); console.log(mediarecorder.state); console.log("recorder started"); record.style.background = "red"; record.style.color = "black"; } when the mediarecorder is recording, the mediarecorder.state property will return a value of "recording".
...ecorder.state); console.log("recorder started"); record.style.background = "red"; record.style.color = "black"; } when the mediarecorder is recording, the mediarecorder.state property will return a value of "recording".
... record.style.color = "black"; } when the mediarecorder is recording, the mediarecorder.state property will return a value of "recording".
Writing a WebSocket server in C# - Web APIs
.accepttcpclient(); console.writeline("a client connected."); } } tcpclient methods: system.net.sockets.networkstream getstream() gets the stream which is the communication channel.
...message.
...er.start(); console.writeline("server has started on {0}:{1}, waiting for a connection...", ip, port); tcpclient client = server.accepttcpclient(); console.writeline("a client connected."); networkstream stream = client.getstream(); // enter to an infinite cycle to be able to handle every change in stream while (true) { while (!stream.
dataavailable); while (client.available < 3); // match against "get" byte[] bytes = new byte[client.available]; stream.read(bytes, 0, client.available); string s = encoding.utf8.getstring(bytes); if (regex.ismatch(s, "^get", regexoptions.ignorecase)) { console.writeline("=====handshaking from client=====\n{0}", s); /...
Introduction to events - Learn web development
he output is as follows (try clicking around on it — have fun): most event handlers you'll encounter have a standard set of properties and functions (methods) available on the event object; see the event object reference for a full list.
...ent object; see the event object reference for a full list.
Creating Sandboxed HTTP Connections
the connection, the asyncopen method is called.
...channelfromuri(uri); // get an listener var listener = new streamlistener(callbackfunc); gchannel.notificationcallbacks = listener; gchannel.asyncopen(listener, null); function streamlistener(acallbackfunc) { this.mcallbackfunc = acallbackfunc; } streamlistener.prototype = { mdata: "", // nsistreamlistener onstartrequest: function (arequest, acontext) { this.mdata = ""; }, on
dataavailable: function (arequest, acontext, astream, asourceoffset, alength) { var scriptableinputstream = components.classes["@mozilla.org/scriptableinputstream;1"] .createinstance(components.interfaces.nsiscriptableinputstream); scriptableinputstream.init(astream); this.mdata += scriptableinputstream.read(alength); }, onstoprequest: function (arequest, acontext, astatus) { ...
nsIMsgMessageService
consumer, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener, in boolean aconvertdata, in string aadditionalheader); parameters amessageuri uri of message to stream aconsumer generally, a stream listener listening to the message.
...ammessage(in string amessageuri, in nsistreamlistener aconsumer, in nsiurllistener aurllistener, in boolean alocalonly); parameters amessageuri uri of message to stream aconsumer nsistreamlistener generally, a stream listener listening to the message headers.
nsIScriptableInputStream
mozilla.org/scriptableinputstream;1", "nsiscriptableinputstream", "init"); let entry = this.getentry(name); let stream = new scriptableinputstream(this.getinputstream(name)); try { // use readbytes to get binary data, read to read a (null-terminated) string let contents = stream.readbytes(entry.realsize); } finally { stream.close(); } example usage in on
dataavailable remember: the nsiscriptableinputstream has a contract where `init` should only be called once, and should always be closed.
...am.close(); } example usage in on
dataavailable remember: the nsiscriptableinputstream has a contract where `init` should only be called once, and should always be closed.
AudioContext.createMediaStreamDestination() - Web APIs
de, an oscillatornode and a mediarecorder (the example will therefore only work in firefox and chrome at this time.) the mediarecorder is set up to record information from the mediastreamdestinationnode.
...(dest.stream); osc.connect(dest); b.addeventlistener("click", function(e) { if (!clicked) { mediarecorder.start(); osc.start(0); e.target.innerhtml = "stop recording"; clicked = true; } else { mediarecorder.stop(); osc.stop(0); e.target.disabled = true; } }); mediarecorder.on
dataavailable = function(evt) { // push each chunk (blobs) in an array chunks.push(evt.data); }; mediarecorder.onstop = function(evt) { // make blob out of our blobs, and open it.
MediaRecorder.onerror - Web APIs
notsupportederror an attempt was made to instantiate a mediarecorder using a mime type that isn't supported on the user's device; one or more of the requested container, codecs, or profiles as well as other information may be invalid.
...rding using the user agent's default media format.
MediaRecorder.onstop - Web APIs
the mediarecorder.onstop event handler (part of the mediarecorder api) handles the stop event, allowing you to run code in response to media recording via a mediarecorder being stopped.
....
Introduction to Layout in Mozilla
parser, returned as nsistreamlistener back to the docshell creates a content sink, which is linked to the parser and the document creates a documentviewerimpl object, which is returned as nsicontentviewer back to the docshell documentviewerimpl creates pres context and pres shell content model construction content arrives from network via nsistreamlistener::on
dataavailable parser tokenizes & processes content; invokes methods on nsicontentsink with parser node objects some buffering and fixup occurs here opencontainer, closecontainer, addleaf content sink creates and attaches content nodes using nsicontent interface content sink maintains stack of “live” elements more buffering and fixup occurs here insertchildat...
imgILoader
dimagewithchannel should make sure to cancel() the resulting request before the observer goes away.
nsICachingChannel
oad flag controls what happens when a document would be loaded from the cache to satisfy a call to asyncopen.
nsIProtocolHandler
is protocol can be loaded only by callers with a principal that subsumes this uri.
nsIRequest
ld normally pass ns_binding_aborted, although other errors may also be passed.
nsIResumableChannel
us of ns_error_not_resumable if the file cannot be resumed, for example because the server doesn't support this.