Search completed in 1.09 seconds.
WritableStream.WritableStream() - Web APIs
the writable
stream() constructor creates a new writable
stream object instance. syntax var writable
stream = new writable
stream(underlyingsink[, queuingstrategy]); parameters underlyingsink an object containing methods and properties that define how the constructed
stream instance will behave. underlyingsink can contain the following: start(controller) optional this is a method, called immediately when the object is constructed. the contents of this method are defined by the developer, and should aim to get access to the underlying sink. if this process is to be done asynchronously, it can return a promise to signal success or failure. the controller parameter passed to this method is a writable
streamdefaultcontroller. ...
...od, called immediately when the object is constructed. the contents of this method are defined by the developer, and should aim to get access to the underlying sink. if this process is to be done asynchronously, it can return a promise to signal success or failure. the controller parameter passed to this method is a writable
streamdefaultcontroller. this can be used by the developer to control the
stream during set up. ...
...used by the developer to control the
stream during set up. write(chunk, controller) optional this method, also defined by the developer, will be called when a new chunk of data (specified in the chunk parameter) is ready to be written to the underlying sink. it can return a promise to signal success or failure of the write operation. the controller parameter passed to this method is a writable
streamdefaultcontroller that can be used by the developer to control the
stream as more chunks are submitted for writing. this method will be called only after previous writes have succeeded, and never after the
stream is closed or aborted (see below). close(controller) optional this method, also defined by the developer, will be called if the app signals that it has finished writing chunks to the s...
...And 17 more matches
ReadableStream.ReadableStream() - Web APIs
the readable
stream() constructor creates and returns a readable
stream object from the given handlers. syntax var readable
stream = new readable
stream(underlyingsource[, queuingstrategy]); parameters underlyingsource an object containing methods and properties that define how the constructed
stream instance will behave. underlyingsource can contain the following: start(controller) this is a method, called immediately when the object is constructed. the contents of this method are defined by the developer, and should aim to get access to the
stream source, and do anything else required to set up the
stream fuctionality. if this process is to be done asynchronously, it can return a promise to signal success or failure. ...
...s is a method, called immediately when the object is constructed. the contents of this method are defined by the developer, and should aim to get access to the
stream source, and do anything else required to set up the
stream fuctionality. if this process is to be done asynchronously, it can return a promise to signal success or failure. the controller parameter passed to this method is a readable
streamdefaultcontroller or a readablebyte
streamcontroller, depending on the value of the type property. this can be used by the developer to control the
stream during set up. pull(controller) optional this method, also defined by the developer, will be called repeatedly when the
stream's internal queue of chunks is not full, up until it reaches its high water mark. if pull() returns a promise, then ...
... type property. this can be used by the developer to control the
stream during set up. pull(controller) optional this method, also defined by the developer, will be called repeatedly when the
stream's internal queue of chunks is not full, up until it reaches its high water mark. if pull() returns a promise, then it won't be called again until that promise fulfills; if the promise rejects, the
stream will become errored. the controller parameter passed to this method is a readable
streamdefaultcontroller or a readablebyte
streamcontroller, depending on the value of the type property. this can be used by the developer to control the
stream as more chunks are fetched. ...
...And 12 more matches
WritableStreamDefaultWriter.WritableStreamDefaultWriter() - Web APIs
the writable
streamdefaultwriter() constructor creates a new writable
streamdefaultwriter object instance. note: you generally wouldn't use this constructor manually; instead, you'd use the writable
stream.getwriter() method. syntax var writable
streamdefaultwriter = new writable
streamdefaultwriter(
stream); parameters
stream the writable
stream to be written to. return value an instance of the writable
streamdefaultwriter object. exceptions typeerror the provided
stream value is not a writable
stream, or it is locked to another writer already. examples the following example shows the creation of a writable
stream with a custom sink and an api-supplied queuing strategy. it then calls a function called sendmessage(), passing the newly created
stream and a string. inside this funct...
...defaultwriter object. exceptions typeerror the provided
stream value is not a writable
stream, or it is locked to another writer already. examples the following example shows the creation of a writable
stream with a custom sink and an api-supplied queuing strategy. it then calls a function called sendmessage(), passing the newly created
stream and a string. inside this function it calls the
stream's getwriter() method, which returns an instance of writable
streamdefaultwriter. a foreach() call is used to write each chunk of the string to the
stream. finally, write() and close() return promises that are processed to deal with success or failure of chunks and
streams. ...
...inside this function it calls the
stream's getwriter() method, which returns an instance of writable
streamdefaultwriter. a foreach() call is used to write each chunk of the string to the
stream. finally, write() and close() return promises that are processed to deal with success or failure of chunks and
streams. ...
...And 10 more matches
Media Capture and Streams API (Media Stream) - Web APIs
the media capture and
streams api, often called the media
streams api or simply media
stream api, is an api related to webrtc which provides support for
streaming audio and video data. it provides the interfaces and methods for working with the
streams and their constituent tracks, the constraints associated with data formats, the success and error callbacks when using the data asynchronously, and the events that are fired during the process. concepts and usage the api is based on the manipulation of a media
stream object representing a flux of audio- or video-related data. see an example in get the video. a media
stream consists of zero or more media
streamtrack objects, representing various audio or video tracks. each media
streamtrack may have one or more channels. the channel represents the s...
...ing the process. concepts and usage the api is based on the manipulation of a media
stream object representing a flux of audio- or video-related data. see an example in get the video. a media
stream consists of zero or more media
streamtrack objects, representing various audio or video tracks. each media
streamtrack may have one or more channels. the channel represents the smallest unit of a media
stream, such as an audio signal associated with a given speaker, like left or right in a stereo audio track. media
stream objects have a single input and a single output. a media
stream object generated by getusermedia() is called local, and has as its source input one of the user's cameras or microphones. ...
...e one or more channels. the channel represents the smallest unit of a media
stream, such as an audio signal associated with a given speaker, like left or right in a stereo audio track. media
stream objects have a single input and a single output. a media
stream object generated by getusermedia() is called local, and has as its source input one of the user's cameras or microphones. a non-local media
stream may be representing to a media element, like <video> or <audio>, a
stream originating over the network, and obtained via the webrtc rtcpeerconnection api, or a
stream created using the web audio api media
streamaudiosourcenode. the output of the media
stream object is linked to a consumer. it can be a media elements, like <audio> or <video>, the webrtc rtcpeerconnection api or a web audio api medi...
...And 5 more matches
ReadableStreamDefaultReader.ReadableStreamDefaultReader() - Web APIs
the readable
streamdefaultreader() constructor creates and returns a readable
streamdefaultreader object instance. note: you generally wouldn't use this constructor manually; instead, you'd use the readable
stream.getreader() method. syntax var readable
streamdefaultreader = new readable
streamdefaultreader(
stream); parameters
stream the readable
stream to be read. return value an instance of the readable
streamdefaultreader object. exceptions typeerror the supplied
stream parameter is not a readable
stream, or it is already locked for reading by another reader. examples in the following simple example, a previously-created custom readable
stream is read using a readable
streamdefaultreader created using getreader(). (see our simple random
stream example for the full code). each chun...
...peerror the supplied
stream parameter is not a readable
stream, or it is already locked for reading by another reader. examples in the following simple example, a previously-created custom readable
stream is read using a readable
streamdefaultreader created using getreader(). (see our simple random
stream example for the full code). each chunk is read sequentially and output to the ui, until the
stream has finished being read, at which point we return out of the recursive function and print the entire
stream to another part of the ui. ...
... // value - some data. ...
...And 4 more matches
MediaStreamEvent.stream - Web APIs
the read-only property media
streamevent.
stream returns the media
stream associated with the event. ...
... the read-only property media
streamevent.
stream returns the media
stream associated with the event. ...
... the read-only property media
streamevent.
stream returns the media
stream associated with the event. ...
...And 3 more matches
MediaStreamTrackAudioSourceOptions.mediaStreamTrack - Web APIs
the media
streamtrackaudiosourceoptions dictionary's media
streamtrack property must contain a reference to the media
streamtrack from which the media
streamtrackaudiosourcenode being created using the media
streamtrackaudiosourcenode() constructor. syntax media
streamtrackaudiosourceoptions = { media
streamtrack: audiosourcetrack; } media
streamtrackaudiosourceoptions.media
streamtrack = audiosourcetrack; value a media
streamtrack from which the audio output of the new media
streamtrackaudiosourcenode will be taken. example this example uses getusermedia() to obtain access to the user's camera, then creates a new media
streamaudiosourcenode from the first audio track provided by the device. let audioctx = new (window.audiocontext || window.webkitaudiocontext)(); if (navigator.mediadevices.getus...
...xample this example uses getusermedia() to obtain access to the user's camera, then creates a new media
streamaudiosourcenode from the first audio track provided by the device. ...
...btain access to the user's camera, then creates a new media
streamaudiosourcenode from the first audio track provided by the device. ...
...And 3 more matches
MediaStreamAudioDestinationNode.MediaStreamAudioDestinationNode() - Web APIs
the media
streamaudiodestinationnode() constructor of the web audio api creates a new media
streamaudiodestinationnode object instance. syntax var myaudiodest = new media
streamaudiodestinationnode(context, options); parameters inherits parameters from the audionodeoptions dictionary. context an audiocontext representing the audio context you want the node to be associated with. options optional an audionodeoptions dictionary object defining the properties you want the media
streamaudiodestinationnode to have. return value a new media
streamaudiodestinationnode object instance. ...
...onodeoptions dictionary. context an audiocontext representing the audio context you want the node to be associated with. options optional an audionodeoptions dictionary object defining the properties you want the media
streamaudiodestinationnode to have. return value a new media
streamaudiodestinationnode object instance. example var ac = new audiocontext(); var mydestination = new media
streamaudiodestinationnode(ac); specifications specification status comment web audio apithe definition of 'media
streamaudiodestinationnode' in that specification. working draft ...
MediaStreamAudioSourceNode.mediaStream - Web APIs
the media
streamaudiosourcenode interface's read-only media
stream property indicates the media
stream that contains the audio track from which the node is receiving audio. this
stream was specified when the node was first created, either using the media
streamaudiosourcenode() constructor or the audiocontext.createmedia
streamsource() method. syntax audiosource
stream = media
streamaudiosourcenode.media
stream; value a media
stream representing the
stream which contains the media
streamtrack serving as the source of audio for the node. the user agent uses the first audio track it finds on the specified
stream as the audio source for this node. however, there is no way to be certain which track that will be on multi-track
streams. if the specific track matters to you, or you need to have access to t...
... the
stream which contains the media
streamtrack serving as the source of audio for the node. the user agent uses the first audio track it finds on the specified
stream as the audio source for this node. however, there is no way to be certain which track that will be on multi-track
streams. if the specific track matters to you, or you need to have access to the track itself, you should use a media
streamtrackaudiosourcenode instead. examples const audioctx = new window.audiocontext(); let options = { media
stream :
stream } let source = new media
streamaudiosourcenode(audioctx, options); console.log(source.media
stream); specifications specification status comment web audio apithe definition of 'media
streamaudiosourcenode.media
stream' in that specification. working ...
MediaStreamAudioDestinationNode.stream - Web APIs
the
stream property of the audiocontext interface represents a media
stream containing a single audiomedia
streamtrack with the same number of channels as the node itself. you can use this property to get a
stream out of the audio graph and feed it into another construct, such as a media recorder. syntax var audioctx = new audiocontext(); var destination = audioctx.createmedia
streamdestination(); var my
stream = destination.
stream; value a media
stream. example specifications specification status comment web audio apithe definition of '
stream' in that specification. working draft ...
MediaStreamAudioSourceOptions.mediaStream - Web APIs
the media
streamaudiosourceoptions dictionary's media
stream property must specify the media
stream from which to retrieve audio data when instantiating a media
streamaudiosourcenode using the media
streamaudiosourcenode() constructor. syntax media
streamaudiosourceoptions = { media
stream: audiosource
stream; } media
streamaudiosourceoptions.media
stream = audiosource
stream; value a media
stream representing the
stream from which to use a media
streamtrack as the source of audio for the node. example specifications specification status comment web audio apithe definition of 'media
streamaudiosourceoptions.media
stream' in that specification. working draft ...
ReadableStreamBYOBReader.ReadableStreamBYOBReader() - Web APIs
the readable
streambyobreader() constructor creates and returns a readable
streambyobreader object instance. note: you generally wouldn't use this constructor manually; instead, you'd use the readable
stream.getreader() method. syntax var readable
streambyobreader = new readable
streambyobreader(
stream); parameters
stream the readable
stream to be read. return value an instance of the readable
streambyobreader object. exceptions typeerror the supplied
stream parameter is not a readable
stream, or it is already locked for reading by another reader, or its
stream controller is not a readablebyte
streamcontroller. examples tbd specifications specification status comment
streamsthe definition of 'readable
streambyobreader()' in that specification. living s...
XPCOM Stream Guide
what are
streams? in mozilla code, a
stream is an object which represents access to a sequence of characters. it is not that sequence of characters, though: the characters may not all be available when you read from the
stream. think of a water tank with a spout: the tank may be full, or it may be half-full, or it may be empty. the spout controls how much water you can get out of the tank at a time. the spout is a source of water. if we think of the water as data, then the spout represents an input
stream: a controller for data coming out of something. at the same time, there may be some way to put water into the tank - say, a main water line. that water line represents an output
stream: a controller for data going into something. the actual data going in to and coming out of an ob...
... water. if we think of the water as data, then the spout represents an input
stream: a controller for data coming out of something. at the same time, there may be some way to put water into the tank - say, a main water line. that water line represents an output
stream: a controller for data going into something. the actual data going in to and coming out of an object isn't usually important to a
stream.
streams simply provide a way to read or write data to some object. in basic c++ programming for a console application, we usually talk about
streams to access files, or to interact with the user. mozilla's use of
streams is more complex. on the one hand, we don't interact with the user through
streams. ...
... to and coming out of an object isn't usually important to a
stream.
streams simply provide a way to read or write data to some object. in basic c++ programming for a console application, we usually talk about
streams to access files, or to interact with the user. mozilla's use of
streams is more complex. on the one hand, we don't interact with the user through
streams. on the other hand, we use
streams to access files within a zip archive, to store and provide data coming from websites, even to talk to other programs on the same computer through "pipes" (more on that later). we even have
streams that take input from other
streams and transform the data within them to something more useful. primitive
streams there are
streams for several different types of data storage. each of these impleme...
...And 69 more matches
Streams - Plugins
« previousnext » this chapter describes using plug-in api functions to receive and send
streams.
streams are objects that represent urls and the data they contain, or data sent by a plug-in without an associated url. although a single
stream is associated with one specific instance of a plug-in, a plug-in can have more than one
stream object per instance.
streams can be produced by the browser and consumed by a plug-in instance, or produced by an instance and consumed by the browser. each
stream has an associated mime type identifying the format of the data in the
stream.
streams produced by the browser can be automatically sent to or requested by the plug-in instance. ...
...n one
stream object per instance.
streams can be produced by the browser and consumed by a plug-in instance, or produced by an instance and consumed by the browser. each
stream has an associated mime type identifying the format of the data in the
stream.
streams produced by the browser can be automatically sent to or requested by the plug-in instance. the browser calls the plug-in methods npp_new
stream, npp_writeready, npp_write, and npp_destroy
stream to, respectively, create a
stream, find out how much data the plug-in can handle, push data into the
stream, and delete it. the plug-in instance selects a transmission mode for
streams produced by the browser.
stream data can be pushed by the browser, pulled by the plug-in, or saved to a local file and passed to the plug-in. normal mode: the b...
...y
stream to, respectively, create a
stream, find out how much data the plug-in can handle, push data into the
stream, and delete it. the plug-in instance selects a transmission mode for
streams produced by the browser.
stream data can be pushed by the browser, pulled by the plug-in, or saved to a local file and passed to the plug-in. normal mode: the browser uses the npp_write method to "push"
stream data to the instance incrementally as it is available. random-access mode: the plug-in calls the npn_requestread method to "pull"
stream data. in general, this mode is more expensive, because the entire
stream must be downloaded to a temporary file before use unless the
stream comes from a local file or an http server that supports the byte-range extension to http. file mode: the browser saves ...
...And 59 more matches
Using readable streams - Web APIs
as a javascript developer, programmatically reading and manipulating
streams of data received over the network, chunk by chunk, is very useful! but how do you use the
streams api’s readable
stream functionality? this article explains the basics. note: this article assumes that you understand the use cases of readable
streams, and are aware of the high-level concepts. if not, we suggest that you first read the
streams concepts and usage overview and dedicated
streams api concepts article, then come back. note: if you are looking for information on writable
streams try using writable
streams instead. browser support you can consume fetch body objects as
streams and create your own custom readable
streams in firefox 65+ and chrome 42+ (and equivalent chromium-based browsers). pipe chains...
...treams instead. browser support you can consume fetch body objects as
streams and create your own custom readable
streams in firefox 65+ and chrome 42+ (and equivalent chromium-based browsers). pipe chains are only supported in chrome at the moment, and that functionality is subject to change. finding some examples we will look at various examples in this article, taken from our dom-examples/
streams repo. you can find the full source code there, as well as links to the examples. consuming a fetch as a
stream the fetch api allows you to fetch resources across the network, providing a modern alternative to xhr. it has a number of advantages, and what is really nice about it is that browsers have recently added the ability to consume a fetch response as a readable
stream. the body mixin now...
... fetch as a
stream the fetch api allows you to fetch resources across the network, providing a modern alternative to xhr. it has a number of advantages, and what is really nice about it is that browsers have recently added the ability to consume a fetch response as a readable
stream. the body mixin now includes the body property, which is a simple getter exposing the body contents as a readable
stream. this mixin is implemented by both the request and response interfaces, so it is available on both, although consuming the
stream of a response body is perhaps a bit more obvious. ...
...And 50 more matches
Live streaming web audio and video - Developer guides
live
streaming technology is often employed to relay live events such as sports, concerts and more generally tv and radio programmes that are output live. often shortened to just
streaming, live
streaming is the process of transmitting media 'live' to computers and devices. this is a fairly complex and nascent subject with a lot of variables, so in this article, we'll introduce you to the subject and let you know how you can get started. the key consideration when
streaming media to a browser is the fact that rather than playing a finite file we are relaying a file that is being created on the fly and has no pre-determined start or end. ...
.... this is a fairly complex and nascent subject with a lot of variables, so in this article, we'll introduce you to the subject and let you know how you can get started. the key consideration when
streaming media to a browser is the fact that rather than playing a finite file we are relaying a file that is being created on the fly and has no pre-determined start or end. key differences between
streamed and static media in this case, we are using static media to describe media that is represented by a file, whether it be an mp3 or webm file. ...
...ile that is being created on the fly and has no pre-determined start or end. key differences between
streamed and static media in this case, we are using static media to describe media that is represented by a file, whether it be an mp3 or webm file. this file sits on a server and can be delivered — like most other files — to the browser. this is often known as a progressive download. live
streamed media lacks a finite start and end time as rather than a static file, it is a
stream of data that the server passes on down the line to the browser and is often adaptive (see below). usually, we require different formats and special server-side software to achieve this. ...
...And 29 more matches
Setting up adaptive streaming media sources - Developer guides
let's say you want to set up an adaptive
streaming media source on a server, to be consumed inside an html5 media element. how would you do that? ...
... let's say you want to set up an adaptive
streaming media source on a server, to be consumed inside an html5 media element. how would you do that? ...
... let's say you want to set up an adaptive
streaming media source on a server, to be consumed inside an html5 media element. how would you do that? ...
...And 23 more matches
Streams API concepts - Web APIs
the
streams api adds a very useful set of tools to the web platform, providing objects allowing javascript to programmatically access
streams of data received over the network and process them as desired by the developer. some of the concepts and terminology associated with
streams might be new to you — this article explains all you need to know. readable
streams a readable
stream is a data source represented in javascript by a readable
stream object that flows from an underlying source — this is a resource somewhere on the network or elsewhere on your domain that you want to get data from. there are two types of underlying source: push sources constantly push data at you when you’ve accessed them, and it is up to you to start, pause, or cancel access to the
stream. examples include ...
...ented in javascript by a readable
stream object that flows from an underlying source — this is a resource somewhere on the network or elsewhere on your domain that you want to get data from. there are two types of underlying source: push sources constantly push data at you when you’ve accessed them, and it is up to you to start, pause, or cancel access to the
stream. examples include video
streams and tcp/web sockets. pull sources require you to explicitly request data from them once connected to. examples include a file access operation via a fetch or xhr call. the data is read sequentially in small pieces called chunks. a chunk can be a single byte, or it can be something larger such as a typed array of a certain size. a single
stream can contain chunks of different sizes and types. ...
...ll sources require you to explicitly request data from them once connected to. examples include a file access operation via a fetch or xhr call. the data is read sequentially in small pieces called chunks. a chunk can be a single byte, or it can be something larger such as a typed array of a certain size. a single
stream can contain chunks of different sizes and types. the chunks placed in a
stream are said to be enqueued — this means they are waiting in a queue ready to be read. an internal queue keeps track of the chunks that have not yet been read (see the internal queues and queuing strategies section below). the chunks inside the
stream are read by a reader — this processes the data one chunk at a time, allowing you to do whatever kind of operation you want to do on it. the reader...
...And 22 more matches
Using writable streams - Web APIs
as a javascript developer, programmatically writing data to a
stream is very useful! this article explains the
streams api’s writable
stream functionality. note: this article assumes that you understand the use cases of writable
streams, and are aware of the high-level concepts. if not, we suggest that you first read the
streams concepts and usage overview and dedicated
streams api concepts article, then come back. note: if you are looking for information about readable
streams, try using readable
streams instead. browser support the
streams api is experimental, and support is at an early stage right now. only chrome currently has basic writable
streams implemented. introducing an example in our dom-examples/
streams repo you’ll find a simple writer example (see it live also). this...
...ormation about readable
streams, try using readable
streams instead. browser support the
streams api is experimental, and support is at an early stage right now. only chrome currently has basic writable
streams implemented. introducing an example in our dom-examples/
streams repo you’ll find a simple writer example (see it live also). this takes a given message and writes it into a writable
stream, displaying each chunk on the ui as it is written to the
stream and also displaying the whole message on the ui when writing has finished. how writable
streams work let’s look at how the writable
stream functionality in our demo works. ...
...
streams repo you’ll find a simple writer example (see it live also). this takes a given message and writes it into a writable
stream, displaying each chunk on the ui as it is written to the
stream and also displaying the whole message on the ui when writing has finished. how writable
streams work let’s look at how the writable
stream functionality in our demo works. constructing a writable
stream to create a writable
stream, we use the writable
stream() constructor; the syntax looks complex at first, but actually isn’t too bad. ...
...And 22 more matches
nsIScriptableInputStream
xpcom/io/nsiscriptableinput
stream.idlscriptable this interface provides scriptable access to a nsiinput
stream instance. inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview unsigned long available(); void close(); void init(in nsiinput
stream ainput
stream); string read(in unsigned long acount); acstring readbytes(in unsigned long acount); methods available() return the number of bytes currently available in the
stream. note: this method should not be used to determine the total size of a
stream, even if the
stream corresponds to a local file. ...
...void close(); void init(in nsiinput
stream ainput
stream); string read(in unsigned long acount); acstring readbytes(in unsigned long acount); methods available() return the number of bytes currently available in the
stream. note: this method should not be used to determine the total size of a
stream, even if the
stream corresponds to a local file. moreover, since a
stream may make available more than 2^32 bytes of data, this method is incapable of expressing the entire size of the underlying data source. unsigned long available(); parameters none. return value the number of bytes. exceptions thrown ns_base_
stream_closed if called after the
stream has been closed. close() closes the
stream. note: the close method may be called more than once, but subsequ...
...ing the entire size of the underlying data source. unsigned long available(); parameters none. return value the number of bytes. exceptions thrown ns_base_
stream_closed if called after the
stream has been closed. close() closes the
stream. note: the close method may be called more than once, but subsequent calls are ignored. void close(); parameters none. init() wrap the given nsiinput
stream with this nsiscriptableinput
stream. note: the init method may be called more than once, allowing a nsiscriptableinput
stream instance to be reused. void init( in nsiinput
stream ainput
stream ); parameters ainput
stream the nsiinput
stream to be wrapped. read() read data from the
stream. warning: if the data contains a null byte, then this method will return a truncated string. note...
...And 20 more matches
nsIOutputStream
xpcom/io/nsioutput
stream.idlscriptable an interface describing a writable
stream of data. inherits from: nsisupports last changed in gecko 1.0 an output
stream may be "blocking" or "non-blocking" (see the isnonblocking() method). a blocking output
stream may suspend the calling thread in order to satisfy a call to close(), flush(), write(), writefrom(), or writesegments(). a non-blocking output
stream, on the other hand, must not block the calling thread of execution. note: blocking output
streams are often written to on a background thread to avoid locking up the main application thread. for this reason, it is generally the case that a blocking output
stream should be implemented using thread-safe addref and release. method overview void close(); void flush...
...hread to avoid locking up the main application thread. for this reason, it is generally the case that a blocking output
stream should be implemented using thread-safe addref and release. method overview void close(); void flush(); boolean isnonblocking(); unsigned long write(in string abuf, in unsigned long acount); unsigned long writefrom(in nsiinput
stream afrom
stream, in unsigned long acount); unsigned long writesegments(in nsreadsegmentfun areader, in voidptr aclosure, in unsigned long acount); native code only! methods close() close the
stream. forces the output
stream to flush() any buffered data. note: this method may be called more than once, but subsequent calls are ignored. void close(); parameters none. exceptions t...
...unsigned long acount); unsigned long writesegments(in nsreadsegmentfun areader, in voidptr aclosure, in unsigned long acount); native code only! methods close() close the
stream. forces the output
stream to flush() any buffered data. note: this method may be called more than once, but subsequent calls are ignored. void close(); parameters none. exceptions thrown ns_base_
stream_would_block indicates that closing the output
stream would block the calling thread for an indeterminate amount of time. this exception may only be thrown if isnonblocking() returns true. flush() this method may be called to instruct the output
stream to write out the contents of any internal buffers to a low-level data sink, such as a file on disk. however, the flush method may simply do not...
...And 16 more matches
WritableStream - Web APIs
the writable
stream interface of the the
streams api provides a standard abstraction for writing
streaming data to a destination, known as a sink. this object comes with built-in backpressure and queuing. constructor writable
stream() creates a new writable
stream object. properties writable
stream.locked read only a boolean indicating whether the writable
stream is locked to a writer. methods writable
stream.abort() aborts the
stream, signaling that the producer can no longer successfully write to the
stream and it is to be immediately moved to an error state, with any queued writes discarded. writable
stream.close() closes the
stream. writable
stream.getwriter() returns a new instance of writable
streamdefaultwriter and locks the
stream to that instance. ...
...ter. methods writable
stream.abort() aborts the
stream, signaling that the producer can no longer successfully write to the
stream and it is to be immediately moved to an error state, with any queued writes discarded. writable
stream.close() closes the
stream. writable
stream.getwriter() returns a new instance of writable
streamdefaultwriter and locks the
stream to that instance. while the
stream is locked, no other writer can be acquired until this one is released. examples the following example illustrates several features of this interface. it shows the creation of the writable
stream with a custom sink and an api-supplied queueing strategy. it then calls a function called sendmessage(), passing the newly created
stream and a string. ...
...ile the
stream is locked, no other writer can be acquired until this one is released. examples the following example illustrates several features of this interface. it shows the creation of the writable
stream with a custom sink and an api-supplied queueing strategy. it then calls a function called sendmessage(), passing the newly created
stream and a string. inside this function it calls the
stream's getwriter() method, which returns an instance of writable
streamdefaultwriter. a foreach() call is used to write each chunk of the string to the
stream. finally, write() and close() return promises that are processed to deal with success or failure of chunks and
streams. ...
...And 16 more matches
NPP_NewStream - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary notifies a plug-in instance of a new data
stream. syntax #include <npapi.h> nperror npp_new
stream(npp instance, npmimetype type, np
stream*
stream, npbool seekable, uint16* stype); parameters the function has the following parameters: instance pointer to current plug-in instance. type pointer to mime type of the
stream.
stream pointer to new
stream. seekable boolean indicating whether the
stream is seekable: true: seekable.
stream supports random access through calls to npn_requestread (for example, local files or http servers that support byte-range requests). false: not seekable. the browser mus...
...pointer to current plug-in instance. type pointer to mime type of the
stream.
stream pointer to new
stream. seekable boolean indicating whether the
stream is seekable: true: seekable.
stream supports random access through calls to npn_requestread (for example, local files or http servers that support byte-range requests). false: not seekable. the browser must copy data in the
stream to the local cache to satisfy random access requests made through npn_requestread. stype out parameter. the plugin should set this value to request a mode for the
stream. for more information about each of these values, see directions in this section. np_normal (default): delivers
stream data to the instance in a series of calls to npp_writeready and npp_write. np_asfileonly: saves...
...to the local cache to satisfy random access requests made through npn_requestread. stype out parameter. the plugin should set this value to request a mode for the
stream. for more information about each of these values, see directions in this section. np_normal (default): delivers
stream data to the instance in a series of calls to npp_writeready and npp_write. np_asfileonly: saves
stream data to a file in the local cache. np_asfile: file download. like np_asfileonly except that data is delivered to the plug-in as it is saved to the file (as in mode np_normal). np_seek:
stream data randomly accessible by the plug-in as needed, through calls to npn_requestread. implementation note: some plugins, notably silverlight, do not set this outparam, and rely on the outparam being i...
...And 15 more matches
nsIBinaryOutputStream
xpcom/io/nsibinaryoutput
stream.idlscriptable this interface allows writing of primitive data types (integers, floating-point values, booleans, and so on.) to a
stream in a binary, untagged, fixed-endianness format. this might be used, for example, to implement network protocols or to produce architecture-neutral binary disk files, that is ones that can be read and written by both big-endian and little-endian platforms. output is written in big-endian order (high-order byte first), as this is traditional network order. ...
...n.) to a
stream in a binary, untagged, fixed-endianness format. this might be used, for example, to implement network protocols or to produce architecture-neutral binary disk files, that is ones that can be read and written by both big-endian and little-endian platforms. output is written in big-endian order (high-order byte first), as this is traditional network order. ...
... might be used, for example, to implement network protocols or to produce architecture-neutral binary disk files, that is ones that can be read and written by both big-endian and little-endian platforms. output is written in big-endian order (high-order byte first), as this is traditional network order. ...
...And 14 more matches
MediaStreamAudioSourceNode - Web APIs
see track ordering for more information about the order of tracks. the number of channels output by the node matches the number of tracks found in the selected audio track. ...
...see track ordering for more information about the order of tracks. the number of channels output by the node matches the number of tracks found in the selected audio track. ...
...see track ordering for more information about the order of tracks. the number of channels output by the node matches the number of tracks found in the selected audio track. ...
...And 14 more matches
WritableStreamDefaultWriter - Web APIs
the writable
streamdefaultwriter interface of the the
streams api is the object returned by writable
stream.getwriter() and once created locks the writer to the writable
stream ensuring that no other
streams can write to the underlying sink. constructor writable
streamdefaultwriter() creates a new writable
streamdefaultwriter object instance. properties writable
streamdefaultwriter.closedread only allows you to write code that responds to an end to the
streaming process. returns a promise that fulfills if the
stream becomes closed or the writer's lock is released, or rejects if the
stream errors. writable
streamdefaultwriter.desiredsizeread only returns the desired size required to fill the
stream's internal queue. ...
...roperties writable
streamdefaultwriter.closedread only allows you to write code that responds to an end to the
streaming process. returns a promise that fulfills if the
stream becomes closed or the writer's lock is released, or rejects if the
stream errors. writable
streamdefaultwriter.desiredsizeread only returns the desired size required to fill the
stream's internal queue. writable
streamdefaultwriter.readyread only returns a promise that resolves when the desired size of the
stream's internal queue transitions from non-positive to positive, signaling that it is no longer applying backpressure. ...
... the
stream errors. writable
streamdefaultwriter.desiredsizeread only returns the desired size required to fill the
stream's internal queue. writable
streamdefaultwriter.readyread only returns a promise that resolves when the desired size of the
stream's internal queue transitions from non-positive to positive, signaling that it is no longer applying backpressure. methods writable
streamdefaultwriter.abort() aborts the
stream, signaling that the producer can no longer successfully write to the
stream and it is to be immediately moved to an error state, with any queued writes discarded. writable
streamdefaultwriter.close() closes the associated writable
stream. writable
streamdefaultwriter.releaselock() releases the writer's lock on the corresponding
stream. after the lock...
...And 14 more matches
nsIBinaryInputStream
xpcom/io/nsibinaryinput
stream.idlscriptable this interface allows consumption of primitive data types from a "binary
stream" containing untagged, big-endian binary data, that is as produced by an implementation of nsibinaryoutput
stream. this might be used, for example, to implement network protocols or to read from architecture-neutral disk files, that is ones that can be read and written by both big-endian and little-endian platforms. ...
... consumption of primitive data types from a "binary
stream" containing untagged, big-endian binary data, that is as produced by an implementation of nsibinaryoutput
stream. this might be used, for example, to implement network protocols or to read from architecture-neutral disk files, that is ones that can be read and written by both big-endian and little-endian platforms. ...
... pruint32 read32(); parameters none. return value a 32-bit ...
...And 12 more matches
nsIInputStream
xpcom/io/nsiinput
stream.idlscriptable this interface represents a readable
stream of data. inherits from: nsisupports last changed in gecko 17.0 (firefox 17.0 / thunderbird 17.0 / seamonkey 2.14) an input
stream may be "blocking" or "non-blocking" (see the isnonblocking() method). a blocking input
stream may suspend the calling thread in order to satisfy a call to close(), available(), read(), or readsegments(). a non-blocking input
stream, on the other hand, must not block the calling thread of execution. note: blocking input
streams are often read on a background thread to avoid locking up the main application thread. for this reason, it is generally the case that a blocking input
stream should be implemented using thread-safe addref and release. method overview uns...
...ecko 17.0 unsigned long long available(); void close(); boolean isnonblocking(); unsigned long read(in charptr abuf, in unsigned long acount); native code only! unsigned long readsegments(in nswritesegmentfun awriter, in voidptr aclosure, in unsigned long acount); native code only! methods available() determine number of bytes available in the
stream. in addition to the number of bytes available in the
stream, this method also informs the caller of the current status of the
stream. a
stream that is closed will throw an exception when this method is called. that enables the caller to know the condition of the
stream before attempting to read from it. if a
stream is at end-of-file, but not closed, then this method returns 0 bytes available. ...
...he number of bytes available in the
stream, this method also informs the caller of the current status of the
stream. a
stream that is closed will throw an exception when this method is called. that enables the caller to know the condition of the
stream before attempting to read from it. if a
stream is at end-of-file, but not closed, then this method returns 0 bytes available. note: some nsiinput
stream implementations automatically close() when end-of-file is reached; others do not. note: this method should not be used to determine the total size of a
stream, even if the
stream corresponds to a local file. moreover, since a
stream may make available more than 2^32 bytes of data, this method is incapable of expressing the entire size of the underlying data source. unsigned long available(); ...
...And 12 more matches
Streams API - Web APIs
this is something browsers do anyway when receiving assets to be shown on webpages — videos buffer and more is gradually available to play, and sometimes you'll see images display gradually as more is loaded. but this has never been available to javascript before. ...
... available to play, and sometimes you'll see images display gradually as more is loaded. but this has never been available to javascript before. previously, if we wanted to process a resource of some kind (be it a video, or a text file, etc.), we'd have to download the entire file, wait for it to be deserialized into a suitable format, then process the whole lot after it is fully received. ...
...wait for it to be deserialized into a suitable format, then process the whole lot after it is fully received. with
streams being available to javascript, this all changes — you can now start processing raw data with javascript bit by bit as soon as it is available on the client-side, without needing to generate a buffer, string, or blob. there are more advantages too — you can detect when
streams start or end, chain
streams together, handle errors and cancel
streams as required, and react to the speed of the
stream is being read at. the basic usage of
streams hinges around making responses available as
streams. ...
...And 12 more matches
MediaStreamTrack - Web APIs
the media
streamtrack interface represents a single media track within a
stream; typically, these are audio or video tracks, but other track types may exist as well. properties in addition to the properties listed below, media
streamtrack has constrainable properties which can be set using applyconstraints() and accessed using getconstraints() and getsettings(). see capabilities, constraints, and settings to learn how to correctly work with constrainable properties. not doing so correctly will result in your code being unreliable. media
streamtrack.contenthint a string that may be used by the web application to provide a hint as to what type of content the track contains to guide how it should be treated by api consumers. ...
...ts() and getsettings(). see capabilities, constraints, and settings to learn how to correctly work with constrainable properties. not doing so correctly will result in your code being unreliable. media
streamtrack.contenthint a string that may be used by the web application to provide a hint as to what type of content the track contains to guide how it should be treated by api consumers. media
streamtrack.enabled a boolean whose value of true if the track is enabled, that is allowed to render the media source
stream; or false if it is disabled, that is not rendering the media source
stream but silence and blackness. if the track has been disconnected, this value can be changed but has no more effect. note: you can implement standard "mute" functionality by setting enabled to false. the mute...
...he media source
stream; or false if it is disabled, that is not rendering the media source
stream but silence and blackness. if the track has been disconnected, this value can be changed but has no more effect. note: you can implement standard "mute" functionality by setting enabled to false. the muted property refers to a condition in which there's no media because of a technical issue. media
streamtrack.id read only returns a domstring containing a unique identifier (guid) for the track; it is generated by the browser. media
streamtrack.isolated read only returns a boolean value which is true if the track is isolated; that is, the track cannot be accessed by the document that owns the media
streamtrack. this happens when the peeridentity property is set, or if the track comes from a cros...
...And 10 more matches
MediaStream Recording API - Web APIs
the data is delivered by a series of dataavailable events, already in the format you specify when creating the mediarecorder. ...
...the data is delivered by a series of dataavailable events, already in the format you specify when creating the mediarecorder. ...
...the data is delivered by a series of dataavailable events, already in the format you specify when creating the mediarecorder. ...
...And 10 more matches
RTCPeerConnection.addStream() - Web APIs
the obsolete rtcpeerconnection method add
stream() adds a media
stream as a local source of audio or video. instead of using this obsolete method, you should instead use addtrack() once for each track you wish to send to the remote peer. if the signalingstate is set to closed, an invalidstateerror is raised. if the signalingstate is set to stable, the event negotiationneeded is sent on the rtcpeerconnection to indicate that ice negotiation must be repeated to consider the new
stream. syntax rtcpeerconnection.add
stream(media
stream); parameters media
stream a media
stream object indicating the
stream to add to the webrtc peer connection. return value none. example this simple example adds the audio and video
stream coming from the user's camera to the connection. navigator.mediadevice...
...peated to consider the new
stream. syntax rtcpeerconnection.add
stream(media
stream); parameters media
stream a media
stream object indicating the
stream to add to the webrtc peer connection. return value none. example this simple example adds the audio and video
stream coming from the user's camera to the connection. ...
...nection.add
stream(media
stream); parameters media
stream a media
stream object indicating the
stream to add to the webrtc peer connection. return value none. example this simple example adds the audio and video
stream coming from the user's camera to the connection. ...
...And 10 more matches
WritableStreamDefaultWriter.write() - Web APIs
the write() property of the writable
streamdefaultwriter interface writes a passed chunk of data to a writable
stream and its underlying sink, then returns a promise that resolves to indicate the success or failure of the write operation. note that what "success" means is up to the underlying sink; it might indicate simply that the chunk has been accepted, and not necessarily that it is safely saved to its ultimate destination. syntax var promise = writable
streamdefaultwriter.write(chunk); parameters chunk a block of binary data to pass to the writable
stream. return value a promise, which fulfills with the undefined upon a successful write, or rejects if the write fails or
stream becomes errored before the writing process is initiated. ...
...ely saved to its ultimate destination. syntax var promise = writable
streamdefaultwriter.write(chunk); parameters chunk a block of binary data to pass to the writable
stream. return value a promise, which fulfills with the undefined upon a successful write, or rejects if the write fails or
stream becomes errored before the writing process is initiated. exceptions typeerror the target
stream is not a writable
stream, or it does not have an owner. examples the following example shows the creation of a writable
stream with a custom sink and an api-supplied queuing strategy. it then calls a function called sendmessage(), passing the newly created
stream and a string. ...
... before the writing process is initiated. exceptions typeerror the target
stream is not a writable
stream, or it does not have an owner. examples the following example shows the creation of a writable
stream with a custom sink and an api-supplied queuing strategy. it then calls a function called sendmessage(), passing the newly created
stream and a string. inside this function it calls the
stream's getwriter() method, which returns an instance of writable
streamdefaultwriter. a foreach() call is used to write each chunk of the string to the
stream. finally, write() and close() return promises that are processed to deal with success or failure of chunks and
streams. ...
...And 10 more matches
nsIStreamConverter
netwerk/
streamconv/public/nsi
streamconverter.idlscriptable provides an interface to implement when you have code that converts data from one type to another. inherits from: nsi
streamlistener last changed in gecko 1.7 suppose you had code that converted plain text into html. you could implement this interface to allow everyone else to use your conversion logic using a standard api.
stream converter users there are currently two ways to use a
stream converter: synchronous:
stream to
stream. you can supply the service with a
stream of type x and it will convert it to your desired output type and return a converted (blocking)
stream to you. asynchronous: nsi
streamlistener to nsi
streamlistener. ...
... a standard api.
stream converter users there are currently two ways to use a
stream converter: synchronous:
stream to
stream. you can supply the service with a
stream of type x and it will convert it to your desired output type and return a converted (blocking)
stream to you. asynchronous: nsi
streamlistener to nsi
streamlistener. you can supply data directly to the converter by calling it's nsi
streamlistener.ondataavailable() method. it will then convert that data from type x to your desired output type and return converted data to you via the nsi
streamlistener you passed in by calling its nsi
streamlistener.ondataavailable() method.
stream converter suppliers registering a
stream converter:
stream converter registration is a two step process. ...
...verter by calling it's nsi
streamlistener.ondataavailable() method. it will then convert that data from type x to your desired output type and return converted data to you via the nsi
streamlistener you passed in by calling its nsi
streamlistener.ondataavailable() method.
stream converter suppliers registering a
stream converter:
stream converter registration is a two step process. first of all the
stream converter implementation must register itself with the component manager using a contractid in the format below. second, the
stream converter must add the contractid to the registry. ...
...And 9 more matches
WritableStream.getWriter() - Web APIs
the getwriter() method of the writable
stream interface returns a new instance of writable
streamdefaultwriter and locks the
stream to that instance. while the
stream is locked, no other writer can be acquired until this one is released. syntax var writer = writable
stream.getwriter(); parameters none. return value a writable
streamdefaultwriter object instance. exceptions typeerror the
stream you are trying to create a writer for is not a writable
stream. examples the following example illustrates several features of this interface. it shows the creation of the writable
stream with a custom sink and an api-supplied queuing strategy. it then calls a function called sendmessage(), passing the newly created
stream and a string. ...
... typeerror the
stream you are trying to create a writer for is not a writable
stream. examples the following example illustrates several features of this interface. it shows the creation of the writable
stream with a custom sink and an api-supplied queuing strategy. it then calls a function called sendmessage(), passing the newly created
stream and a string. inside this function it calls the
stream's getwriter() method, which returns an instance of writable
streamdefaultwriter. a foreach() call is used to write each chunk of the string to the
stream. finally, write() and close() return promises that are processed to deal with success or failure of chunks and
streams. ...
...inside this function it calls the
stream's getwriter() method, which returns an instance of writable
streamdefaultwriter. a foreach() call is used to write each chunk of the string to the
stream. finally, write() and close() return promises that are processed to deal with success or failure of chunks and
streams. ...
...And 9 more matches
WritableStreamDefaultWriter.close() - Web APIs
the close() method of the writable
streamdefaultwriter interface closes the associated writable
stream. the underlying sink will finish processing any previously-written chunks, before invoking the close behavior. during this time any further attempts to write will fail (without erroring the
stream). syntax var promise = writable
streamdefaultwriter.close(); parameters none. return value a promise, which fulfills with the undefined if all remaining chunks were successfully written before the close, or rejects with an error if a problem was encountered during the process. exceptions typeerror the
stream you are trying to close is not a writable
stream. examples the following example shows the creation of a writable
stream with a custom sink and an api-supplied queuing strategy. it...
...ccessfully written before the close, or rejects with an error if a problem was encountered during the process. exceptions typeerror the
stream you are trying to close is not a writable
stream. examples the following example shows the creation of a writable
stream with a custom sink and an api-supplied queuing strategy. it then calls a function called sendmessage(), passing the newly created
stream and a string. inside this function it calls the
stream's getwriter() method, which returns an instance of writable
streamdefaultwriter. a foreach() call is used to write each chunk of the string to the
stream. finally, write() and close() return promises that are processed to deal with success or failure of chunks and
streams. const list = document.queryselector('ul'); function sendmessage(me...
...inside this function it calls the
stream's getwriter() method, which returns an instance of writable
streamdefaultwriter. a foreach() call is used to write each chunk of the string to the
stream. finally, write() and close() return promises that are processed to deal with success or failure of chunks and
streams. ...
...And 9 more matches
NPN NewStream - Archive of obsolete content
returns if successful, the function returns nperr_no_error. if unsuccessful, the plug-in is not loaded and the function returns an error code. ...
... returns if successful, the function returns nperr_no_error. if unsuccessful, the plug-in is not loaded and the function returns an error code. ...
... returns if successful, the function returns nperr_no_error. if unsuccessful, the plug-in is not loaded and the function returns an error code. ...
...And 8 more matches
Using the MediaStream Recording API - Web APIs
when used with navigator.mediadevices.getusermedia(), it provides an easy way to record from the user's input devices and instantly use the result in web apps. both audio and video may be recorded, separately or together. this article aims to provide a basic guide on how to use the mediarecorder interface, which provides this api. a sample application: web dictaphone to demonstrate basic usage of the mediarecorder api, we have built a web-based dictaphone. it allows you to record snippets of audio and then play them back. it even gives you a visualization of your device's sound input, using the web audio api. we'll concentrate on the recording and playback functionality for this article. ...
... we'll declare some variables for the record and stop buttons, and the <article> that will contain the generated audio players: const record = document.queryselector('.record'); const stop = do...
...a rule to say that when the checkbox is checked (when we click/focus the label), the adjacent <aside> element will have its horizontal translation value changed and transition smoothly into view: input[type=checkbox]:checked ~ aside { transform: translatex(0); } basic app setup to grab the media
stream we want to capture, we use getusermedia(). we then use the mediarecorder api to record the
stream, and output each recorded snippet into the source of a generated <audio> element so it can be played back. we'll declare some variables for the record and stop buttons, and the <article> that will contain the generated audio players: const record = document.queryselector('.record'); const stop = document.queryselector('.stop'); const soundclips = document.queryselector('.sound-clips'); finally...
...And 8 more matches
RTCPeerConnection.getStreamById() - Web APIs
the rtcpeerconnection.get
streambyid() method returns the media
stream with the given id that is associated with local or remote end of the connection. if no
stream matches, it returns null. this property has been replaced with the rtcpeerconnection.getlocal
streams and rtcpeerconnection.getremote
streams properties. if you have code that uses
stream, you will need to update, since browsers have begun to remove support for
stream. syntax var media
stream = pc.get
stream(id); parameters id is a domstring corresponding to the
stream to return. ...
...es, it returns null. this property has been replaced with the rtcpeerconnection.getlocal
streams and rtcpeerconnection.getremote
streams properties. if you have code that uses
stream, you will need to update, since browsers have begun to remove support for
stream. syntax var media
stream = pc.get
stream(id); parameters id is a domstring corresponding to the
stream to return. example var
stream = pc.get
streambyid(mytrackid); if (
stream) { console.log("found
stream: " +
stream.id); } polyfill running the following code before any other code will create rtcpeerconnection.prototype.get
streambyid() if it's not natively available. ...
...to the
stream to return. example var
stream = pc.get
streambyid(mytrackid); if (
stream) { console.log("found
stream: " +
stream.id); } polyfill running the following code before any other code will create rtcpeerconnection.prototype.get
streambyid() if it's not natively available. ...
...And 8 more matches
io/text-streams - Archive of obsolete content
experimental provides
streams for reading and writing text. function readtextfromfile(filename) { var fileio = require("sdk/io/file"); var text = null; if (fileio.exists(filename)) { var textreader = fileio.open(filename, "r"); if (!textreader.closed) { text = textreader.read(); textreader.close(); } } return text; } function writetexttofile(text, filename) { var fileio = require("sdk/io/file"); var textwriter = fileio.open(filename, "w"); if (!textwriter.closed) { textwriter.write(text); textwriter.close(); } } globals constructors textreader(input
stream, charset) creates a buffered input
stream that reads text from a backing
stream using a given text encoding. you can also create textreader objects using io/file's open() function. p...
...re("sdk/io/file"); var textwriter = fileio.open(filename, "w"); if (!textwriter.closed) { textwriter.write(text); textwriter.close(); } } globals constructors textreader(input
stream, charset) creates a buffered input
stream that reads text from a backing
stream using a given text encoding. you can also create textreader objects using io/file's open() function. parameters input
stream :
stream the backing
stream, an nsiinput
stream. it must already be opened. charset : string input
stream is expected to be in the character encoding named by this value. ...
...der objects using io/file's open() function. parameters input
stream :
stream the backing
stream, an nsiinput
stream. it must already be opened. charset : string input
stream is expected to be in the character encoding named by this value. if not specified, "utf-8" is assumed. see nsicharsetconvertermanager.idl for documentation on how to determine other valid values for this. textwriter(output
stream, charset) creates a buffered output
stream that writes text to a backing
stream using a given text encoding. you can also create textwriter objects using io/file's open() function. parameters output
stream :
stream the backing
stream, an nsioutput
stream. it must already be opened. charset : string text will be written to output
stream using the character encoding named by this value. if not ...
...And 7 more matches
NPStream - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary represents a
stream of data either produced by the browser and consumed by the plug-in, or produced by the plug-in and consumed by the browser. syntax typedef struct _np
stream { void* pdata; /* plug-in private data */ void* ndata; /* netscape private data */ const char* url; uint32 end; uint32 lastmodified; void* notifydata; const char *headers; } np
stream; fields the data structure has the following fields: plug-in-private value that the plug-in can use to store a pointer to private data associated with the instance; not modified by the browser. ndata browser-private value that can store data associated with the instance; should not be modified by the plug-in. url th...
... notifydata; const char *headers; } np
stream; fields the data structure has the following fields: plug-in-private value that the plug-in can use to store a pointer to private data associated with the instance; not modified by the browser. ndata browser-private value that can store data associated with the instance; should not be modified by the plug-in. url the url that the data in the
stream is read from or written to. end offset in bytes of the end of the
stream (equivalent to the length of the
stream in bytes). can be zero for
streams of unknown length, such as
streams returned from older ftp servers or generated "on the fly" by cgi scripts. lastmodified time the data in the url was last modified (if applicable), measured in seconds since 12:00 midnight gmt, january 1, 1970. not...
... headers the response headers from the host. ...
...And 7 more matches
MediaStream - Web APIs
the media
stream interface represents a
stream of media content. a
stream consists of several tracks such as video or audio tracks. each track is specified as an instance of media
streamtrack.you can obtain a media
stream object either by using the constructor or by calling mediadevices.getusermedia(). some user agents subclass this interface to provide more precise information or functionality, like in canvascapturemedia
stream. constructor media
stream() creates and returns a new media
stream object. you can create an empty
stream, a
stream which is based upon an existing
stream, or a
stream that contains a specified list of tracks (specified as an array of media
streamtrack objects). properties this interface inherits properties from its parent, eventtarget. ...
...functionality, like in canvascapturemedia
stream. constructor media
stream() creates and returns a new media
stream object. you can create an empty
stream, a
stream which is based upon an existing
stream, or a
stream that contains a specified list of tracks (specified as an array of media
streamtrack objects). properties this interface inherits properties from its parent, eventtarget. media
stream.active read only a boolean value that returns true if the media
stream is active, or false otherwise. media
stream.ended read only a boolean value set to true if the end of the
stream has been reached. ...
...objects). properties this interface inherits properties from its parent, eventtarget. media
stream.active read only a boolean value that returns true if the media
stream is active, or false otherwise. media
stream.ended read only a boolean value set to true if the end of the
stream has been reached. this has been removed from the specification; you should instead check the value of media
streamtrack.readystate to see if its value is ended for the track or tracks you want to ensure have finished playing. media
stream.id read only a domstring containing 36 characters denoting a universally unique identifier (uuid) for the object. ...
...And 7 more matches
MediaStreamTrackAudioSourceNode - Web APIs
the media
streamtrackaudiosourcenode interface is a type of audionode which represents a source of audio data taken from a specific media
streamtrack obtained through the webrtc or media capture and
streams apis. the audio itself might be input from a microphone or other audio sampling device, or might be received through a rtcpeerconnection, among other posible options. a media
streamtrackaudiosourcenode has no inputs and exactly one output, and is created using the audiocontext.createmedia
streamtracksource() method. this interface is similar to media
streamaudiosourcenode, except it lets you specifically state the track to use, rather than assuming the first audio track on a
stream. number of inputs 0 number of outputs 1 channel count defined by the first a...
... inputs and exactly one output, and is created using the audiocontext.createmedia
streamtracksource() method. this interface is similar to media
streamaudiosourcenode, except it lets you specifically state the track to use, rather than assuming the first audio track on a
stream. number of inputs 0 number of outputs 1 channel count defined by the first audio media
streamtrack passed to the audiocontext.createmedia
streamtracksource() method that created it. constructor new media
streamtrackaudiosourcenode() creates a new media
streamtrackaudiosourcenode object instance with the specified options. properties the media
streamtrackaudiosourcenode interface has no properties of its own; however, it inherits the properties of its parent, audionode. methods ...
...next, we feed this source audio into a low pass biquadfilternode (which effectively serves as a bass booster), then a audiodestinationnode. ...
...And 7 more matches
TransformStream - Web APIs
the transform
stream interface of the
streams api represents a set of transformable data. constructor transform
stream() creates and returns a transform
stream object from the given handlers. properties transform
stream.readable read only the readable end of a transform
stream. transform
stream.writable read only the writable end of a transform
stream. methods none examples anything-to-uint8array
stream in the following example, a transform
stream passes through all chunks it receives as uint8array values. const transformcontent = { start() {}, // required. ...
...only the writable end of a transform
stream. methods none examples anything-to-uint8array
stream in the following example, a transform
stream passes through all chunks it receives as uint8array values. const transformcontent = { start() {}, // required. ...
...this is intended as a polyfill for unsupported platforms. const tes = { start(){this.encoder = new textencoder()}, transform(chunk, controller) { controller.enqueu...
...And 7 more matches
The Publicity Stream API
it is not meant as a general application messaging system. accessing the api the publicity api can be enabled by including a javascript library. this library will detect whether native api support is enabled by the user's browser, if not it will shim in a pure html implementation. ...
...enabled by including a javascript library. this library will detect whether native api support is enabled by the user's browser, if not it will shim in a pure html implementation. [is this still doable?] the javascript library should be included from: https://myapps.mozillalabs.com/jsapi/publicity.js all apis related to open web applications are accessed under the navigator.apps object. publicity
stream api (navigator.apps.publicity.*) the publicity api is exposed as properties on the navigator.apps.publicity object. publicizeactivity( <activity>, [ { [ onsuccess: <function> ], [ onerror: <function> ] } ]): applications should call this method when an user-initiated activity deemed attractive to potential consumers occurs. this spawns a doorhanger which allows the user to specify which us...
...vigator.apps.publicity object. publicizeactivity( <activity>, [ { [ onsuccess: <function> ], [ onerror: <function> ] } ]): applications should call this method when an user-initiated activity deemed attractive to potential consumers occurs. this spawns a doorhanger which allows the user to specify which users can view the activity, and (following successful login and authorization with the
stream server) registers the activity in a
stream at [address]. this
stream can be pulled down by getpublicity
stream() and helps determine the results for getuserrecommendedapps(). example use cases: 'adam got a high score in mafia wars', 'bethany bought a plane ticket to the caribbean', etc. activity is an object, formatted as per the fixme: deadlinkactivity
streams open specification. onsuccess ...
...And 6 more matches
nsIAsyncOutputStream
xpcom/io/nsiasyncoutput
stream.idlscriptable please add a summary to this article. inherits from: nsioutput
stream last changed in gecko 1.7 if an output
stream is non-blocking, it may return ns_base_
stream_would_block when written to. the caller must then wait for the
stream to become writable. if the
stream implements nsiasyncoutput
stream, then the caller can use this interface to request an asynchronous notification when the
stream becomes writable or closed (via the asyncwait() method). while this interface is almost exclusively used with non-blocking
streams, it is not necessary that nsioutput
stream.isnonblocking() return true. nor is it necessary that a non-blocking nsioutput
stream implementation also implement nsiasyncoutput
stream. method overview void asyncwait(in nsiout...
...n asynchronous notification when the
stream becomes writable or closed (via the asyncwait() method). while this interface is almost exclusively used with non-blocking
streams, it is not necessary that nsioutput
stream.isnonblocking() return true. nor is it necessary that a non-blocking nsioutput
stream implementation also implement nsiasyncoutput
stream. ...
...o implement nsiasyncoutput
stream. method overview void asyncwait(in nsioutput
streamcallback acallback, in unsigned long aflags, in unsigned long arequestedcount, in nsieventtarget aeventtarget); void closewithstatus(in nsresult reason); constants constant value description wait_closure_only (1<<0) if passed to asyncwait(), this flag overrides the default behavior, causing the onoutput
streamready notification to be suppressed until the
stream becomes closed (either as a result of closewithstatus()/close being called on the
stream or possibly due to some error in the underlying
stream). methods asyncwait() asynchronously wait for the
stream to be writable or closed. the notification is one-shot, meaning that each asyncwait call will result in exactly one notification callback. afte...
...And 6 more matches
AudioContext.createMediaStreamSource() - Web APIs
the createmedia
streamsource() method of the audiocontext interface is used to create a new media
streamaudiosourcenode object, given a media
stream (say, from a mediadevices.getusermedia instance), the audio from which can then be played and manipulated. for more details about media
stream audio source nodes, check out the media
streamaudiosourcenode reference page. syntax audiosourcenode = audiocontext.createmedia
streamsource(
stream); parameters
stream a media
stream to serve as an audio source to be fed into an audio processing graph for use and manipulation. return value a new media
streamaudiosourcenode object representing the audio node whose media is obtained from the specified source
stream. ...
...next, we feed this source audio into a low pass biquadfilternode (which effectively serves as a bass booster), then a audiodestinationnode. ...
...next, we feed this source audio into a low pass biquadfilternode (which effectively serves as a bass booster), then a audiodestinationnode. ...
...And 6 more matches
AudioContext.createMediaStreamTrackSource() - Web APIs
the createmedia
streamtracksource() method of the audiocontext interface creates and returns a media
streamtrackaudiosourcenode which represents an audio source whose data comes from the specified media
streamtrack. this differs from createmedia
streamsource(), which creates a media
streamaudiosourcenode whose audio comes from the audio track in a specified media
stream whose id is first, lexicographically (alphabetically). syntax var audioctx = new audiocontext(); var track = audioctx.createmedia
streamtracksource(track); parameters track the media
streamtrack to use as the source of all audio data for the new node. return value a media
streamtrackaudiosourcenode object which acts as a source for audio data found in the specified audio track. example in this example, getusermedia() is ...
... then a biquadfilternode is created using createbiquadfilter(), and it's configured as desired to perform a lowshelf filter on the audio coming from the source. ...
... then a biquadfilternode is created using createbiquadfilter(), and it's configured as desired to perform a lowshelf filter on the audio coming from the source. ...
...And 6 more matches
MediaStreamConstraints.audio - Web APIs
if false, no audio track is included. ...
...if false, no audio track is included. ...
... a call to getusermedia(). to learn more about how constraints work, see capabilities, constraints, and settings. syntax var audioconstraints = true | false | mediatrackconstraints; value the value of the audio property can be specified as either of two types: boolean if a boolean value is specified, it simply indicates whether or not an audio track should be included in the returned
stream; if it's true, an audio track is included; if no audio source is available or if permission is not given to use the audio source, the call to getusermedia() will fail. if false, no audio track is included. mediatrackconstraints a constraints dictionary detailing the preferable and/or required values or ranges of values for the track's constrainable properties. if you specify constraints, an aud...
...And 6 more matches
MediaStreamConstraints.video - Web APIs
if false, no video track is included. ...
...if false, no video track is included. ...
...y a call to getusermedia(). to learn more about how constraints work, see capabilities, constraints, and settings. syntax var videoconstraints = true | false | mediatrackconstraints; value the value of the video property can be specified as either of two types: boolean if a boolean value is specified, it simply indicates whether or not a video track should be included in the returned
stream; if it's true, a video track is included; if no video source is available or if permission is not given to use the video source, the call to getusermedia() will fail. if false, no video track is included. mediatrackconstraints a constraints dictionary detailing the preferable and/or required values or ranges of values for the track's constrainable properties. if you specify constraints, a video...
...And 6 more matches
RTCPeerConnection.removeStream() - Web APIs
the rtcpeerconnection.remove
stream() method removes a media
stream as a local source of audio or video. if the negotiation already happened, a new one will be needed for the remote peer to be able to use it. because this method has been deprecated, you should instead use removetrack() if your target browser versions have implemented it. if the signalingstate is set to "closed", an invalidstateerror is raised. if the signalingstate is set to "stable", the event negotiationneeded is sent on the rtcpeerconnection. syntax rtcpeerconnection.remove
stream(media
stream); parameters media
stream a media
stream specifying the
stream to remove from the connection. return value undefined. ...
...have implemented it. if the signalingstate is set to "closed", an invalidstateerror is raised. if the signalingstate is set to "stable", the event negotiationneeded is sent on the rtcpeerconnection. syntax rtcpeerconnection.remove
stream(media
stream); parameters media
stream a media
stream specifying the
stream to remove from the connection. return value undefined. ...
...closed", an invalidstateerror is raised. if the signalingstate is set to "stable", the event negotiationneeded is sent on the rtcpeerconnection. syntax rtcpeerconnection.remove
stream(media
stream); parameters media
stream a media
stream specifying the
stream to remove from the connection. return value undefined. ...
...And 6 more matches
RTCRtpStreamStats - Web APIs
the rtcrtp
streamstats dictionary is returned by the rtcpeerconnection.getstats(), rtcrtpsender.getstats(), and rtcrtpreceiver.getstats() methods to provide detailed statistics about webrtc connectivity. while the dictionary has a base set of properties that are present in each of these cases, there are also additional properties added depending on which interface the method is called on. rtcrtp
streamstats is the base class for all rtp-related statistics reports. it's based on rtcstats and adds the following additional fields. note: this interface was called rtcrtp
streamstats until a specification update in the spring of 2017. check the browser compatibility table to know if and when the name change was implemented in specific browsers. ...
...hod is called on. rtcrtp
streamstats is the base class for all rtp-related statistics reports. it's based on rtcstats and adds the following additional fields. note: this interface was called rtcrtp
streamstats until a specification update in the spring of 2017. check the browser compatibility table to know if and when the name change was implemented in specific browsers. properties the rtcrtp
streamstats dictionary is based on rtcstats, and inherits its properties. in addition, some or all of the following properties are available. standard fields included for all media types codecid a domstring which uniquely identifies the object which was inspected to produce the rtccodecstats object associated with this rtp
stream. kind a domstring whose value is "audio" if the associated mediastr...
...bject associated with this rtp
stream. kind a domstring whose value is "audio" if the associated media
streamtrack is audio-only or "video" if the track contains video. this value will match that of the media type indicated by rtccodecstats.codec, as well as the track's kind property. previously called mediatype. ssrc the 32-bit integer which identifies the source of the rtp packets this rtcrtp
streamstats object covers. this value is generated per the rfc 3550 specification. trackid a domstring which uniquely identifies the rtcmedia
streamtrackstats object representing the associated media
streamtrack. this is not the same as the value of media
streamtrack.id. transportid a domstring uniquely identifying the object which was inspected to produce the rtctransportstats object associated with t...
...And 6 more matches
ReadableStream - Web APIs
the readable
stream interface of the
streams api represents a readable
stream of byte data. the fetch api offers a concrete instance of a readable
stream through the body property of a response object. constructor readable
stream() creates and returns a readable
stream object from the given handlers. properties readable
stream.locked read only the locked getter returns whether or not the readable
stream is locked to a reader. methods readable
stream.cancel() cancels the
stream, signaling a loss of interest in the
stream by a consumer. the supplied reason argument will be given to the underlying source, which may or may not use it. readable
stream.getiterator() creates a readable
stream async iterator instance and locks the
stream to it. ...
...eturns whether or not the readable
stream is locked to a reader. methods readable
stream.cancel() cancels the
stream, signaling a loss of interest in the
stream by a consumer. the supplied reason argument will be given to the underlying source, which may or may not use it. readable
stream.getiterator() creates a readable
stream async iterator instance and locks the
stream to it. while the
stream is locked, no other reader can be acquired until this one is released. readable
stream.getreader() creates a reader and locks the
stream to it. while the
stream is locked, no other reader can be acquired until this one is released. readable
stream.pipethrough() provides a chainable way of piping the current
stream through a transform
stream or any other writable/readable pair. readablestrea...
...uired until this one is released. readable
stream.getreader() creates a reader and locks the
stream to it. while the
stream is locked, no other reader can be acquired until this one is released. readable
stream.pipethrough() provides a chainable way of piping the current
stream through a transform
stream or any other writable/readable pair. readable
stream.pipeto() pipes the current readable
stream to a given writable
stream and returns a promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered. readable
stream.tee() the tee method tees this readable
stream, returning a two-element array containing the two resulting branches as new readable
stream instances. ...
...And 6 more matches
WebAssembly.compileStreaming() - JavaScript
return value a promise that resolves to a webassembly.module object representing the compiled module. exceptions if buffersource is not a typed array, a typeerror is thrown. ...
... return value a promise that resolves to a webassembly.module object representing the compiled module. exceptions if buffersource is not a typed array, a typeerror is thrown. ...
... return value a promise that resolves to a webassembly.module object representing the compiled module. exceptions if buffersource is not a typed array, a typeerror is thrown. ...
...And 6 more matches
NPP_DestroyStream - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary tells the plug-in that a
stream is about to be closed or destroyed. syntax #include <npapi.h> nperror npp_destroy
stream(npp instance, np
stream*
stream, npreason reason); parameters the function has the following parameters: instance pointer to current plug-in instance.
stream pointer to current
stream. reason reason the
stream was destroyed. values: npres_done (most common): completed normally; all data was sent to the instance. ...
... returns if successful, the plug-in should return nperr_no_error. ...
...g-in instance.
stream pointer to current
stream. reason reason the
stream was destroyed. values: npres_done (most common): completed normally; all data was sent to the instance. npres_user_break: user canceled
stream directly by clicking the stop button or indirectly by some action such as deleting the instance or initiating higher-priority network operations. npres_network_err:
stream failed due to problems with network, disk i/o, lack of memory, or other problems. returns if successful, the plug-in should return nperr_no_error. if unsuccessful, the plug-in should return an error code. for possible values, see error codes. ...
...And 5 more matches
nsIAsyncInputStream
xpcom/io/nsiasyncinput
stream.idlscriptable please add a summary to this article. inherits from: nsiinput
stream last changed in gecko 1.7 if an input
stream is non-blocking, it may return ns_base_
stream_would_block when read. the caller must then wait for the
stream to have some data to read. if the
stream implements nsiasyncinput
stream, then the caller can use this interface to request an asynchronous notification when the
stream becomes readable or closed (via the asyncwait() method). while this interface is almost exclusively used with non-blocking
streams, it is not necessary that nsiinput
stream.isnonblocking() return true. nor is it necessary that a non-blocking nsiinput
stream implementation also implement nsiasyncinput
stream. method overview void asyncwait(in nsiinputstre...
...lso implement nsiasyncinput
stream. method overview void asyncwait(in nsiinput
streamcallback acallback, in unsigned long aflags, in unsigned long arequestedcount, in nsieventtarget aeventtarget); void closewithstatus(in nsresult astatus); constants constant value description wait_closure_only (1<<0) if passed to asyncwait(), this flag overrides the default behavior, causing the oninput
streamready notification to be suppressed until the
stream becomes closed (either as a result of closewithstatus()/close being called on the
stream or possibly due to some error in the underlying
stream). methods asyncwait() asynchronously wait for the
stream to be readable or closed. the notification is one-shot, meaning that each asyncwait call will result in exactly one notification callback. afte...
...ation to be suppressed until the
stream becomes closed (either as a result of closewithstatus()/close being called on the
stream or possibly due to some error in the underlying
stream). methods asyncwait() asynchronously wait for the
stream to be readable or closed. the notification is one-shot, meaning that each asyncwait call will result in exactly one notification callback. after the oninput
streamready event is dispatched, the
stream releases its reference to the nsiinput
streamcallback object. it is safe to call asyncwait again from the notification handler. this method may be called at any time (even if read has not been called). in other words, this method may be called when the
stream already has data to read. ...
...And 5 more matches
nsIAsyncStreamCopier
the specified observer is notified when the copy completes. ...
...the specified observer is notified when the copy completes. ...
...the specified observer is notified when the copy completes. ...
...And 5 more matches
MediaStreamTrackAudioSourceNode() - Web APIs
the web audio api's media
streamtrackaudiosourcenode() constructor creates and returns a new media
streamtrackaudiosourcenode object whose audio is taken from the media
streamtrack specified in the given options object. another way to create a media
streamtrackaudiosourcenode is to call theaudiocontext.createmedia
streamtracksource() method, specifying the media
streamtrack from which you want to obtain audio. syntax audiotracknode = new media
streamtrackaudiosourcenode(context, options); parameters context an audiocontext representing the audio context you want the node to be associated with. ...
...her way to create a media
streamtrackaudiosourcenode is to call theaudiocontext.createmedia
streamtracksource() method, specifying the media
streamtrack from which you want to obtain audio. syntax audiotracknode = new media
streamtrackaudiosourcenode(context, options); parameters context an audiocontext representing the audio context you want the node to be associated with. options a media
streamtrackaudiosourceoptions object defining the properties you want the media
streamtrackaudiosourcenode to have: media
streamtrack the media
streamtrack from which to take audio data for this node's output. return value a new media
streamtrackaudiosourcenode object representing the audio node whose media is obtained from the specified media track. exceptions notsupportederror the specifie...
...
streamtrackaudiosourcenode to have: media
streamtrack the media
streamtrack from which to take audio data for this node's output. return value a new media
streamtrackaudiosourcenode object representing the audio node whose media is obtained from the specified media track. exceptions notsupportederror the specified context is not an audiocontext. invalidstateerror the specified media
streamtrack isn't an audio track (that is, its kind property isn't audio. example this example uses getusermedia() to obtain access to the user's camera, then creates a new media
streamaudiosourcenode from the first audio track provided by the device. let audioctx = new (window.audiocontext || window.webkitaudiocontext)(); if (navigator.mediadevices.getusermedia) { navigator.mediadevices.getuserme...
...And 5 more matches
RTCOutboundRtpStreamStats - Web APIs
the rtcoutboundrtp
streamstats dictionary is the rtcstats-based object which provides metrics and statistics related to an outbound rtp
stream being sent by an rtcrtpsender. properties the rtcoutboundrtp
streamstats dictionary includes the following properties in addition to those it inherits from rtcsentrtp
streamstats, rtcrtp
streamstats, and rtcstats. averagertcpinterval a floating-point value indicating the average rtcp interval between two consecutive compound rtcp packets. fircount an integer value which indicates the total number of full intra request (fir) packets which this rtcrtpsender has sent to the remote rtcrtpreceiver. this is an indicator of how often the
stream has lagged, requiring frames to be skipped in order to catch up. valid only for video
streams. framesencoded the...
...count an integer value which indicates the total number of full intra request (fir) packets which this rtcrtpsender has sent to the remote rtcrtpreceiver. this is an indicator of how often the
stream has lagged, requiring frames to be skipped in order to catch up. valid only for video
streams. framesencoded the number of frames that have been successfully encoded so far for sending on this rtp
stream. only valid for video
streams. lastpacketsenttimestamp a domhighrestimestamp indicating the time at which the last packet was sent for this ssrc. the timestamp property, on the other hand, indicates the time at which the rtcoutboundrtp
streamstats object was generated. nackcount an integer value indicating the total number of negative acknolwedgement (nack) packets this rtcrtpsender has receiv...
...s, each indicating the total number of packets this rtcrtpsender has transmitted for this source for each differentiated services code point (dscp). plicount an integer specifying the number of times the remote receiver has notified this rtcrtpsender that some amount of encoded video data for one or more frames has been lost, using picture loss indication (pli) packets. only available for video
streams. qpsum a 64-bit value containing the sum of the qp values for every frame encoded by this rtcrtpsender. valid only for video
streams. qualitylimitationdurations a record mapping each of the quality limitation reasons in the rtcremoteinboundrtp
streamstats enumeration to a floating-point value indicating the number of seconds the
stream has spent with its quality limited for that reason. qual...
...And 5 more matches
ReadableStream.tee() - Web APIs
the tee() method of the readable
stream interface tees the current readable
stream, returning a two-element array containing the two resulting branches as new readable
stream instances. this is useful for allowing two readers to read a
stream simultaneously, perhaps at different speeds. you might do this for example in a serviceworker if you want to fetch a response from the server and
stream it to the browser, but also
stream it to the serviceworker cache. since a response body cannot be consumed more than once, you’d need two copies to do this. to cancel the
stream you then need to cancel both resulting branches. teeing a
stream will generally lock it for the duration, preventing other readers from locking it. syntax var teed
streams = readable
stream.tee(); parameters none. return value...
... serviceworker cache. since a response body cannot be consumed more than once, you’d need two copies to do this. to cancel the
stream you then need to cancel both resulting branches. teeing a
stream will generally lock it for the duration, preventing other readers from locking it. syntax var teed
streams = readable
stream.tee(); parameters none. return value an array containing two readable
stream instances. exceptions typeerror the source
stream is not a readable
stream. examples in the following simple example, a previously-created
stream is teed, then both resulting
streams (contained in two members of a generated array) are passed to a function that reads the data out of the two
streams and prints each
stream's chunks sequentially to a different part of the ui. see simple tee ex...
...the source
stream is not a readable
stream. examples in the following simple example, a previously-created
stream is teed, then both resulting
streams (contained in two members of a generated array) are passed to a function that reads the data out of the two
streams and prints each
stream's chunks sequentially to a different part of the ui. see simple tee example for the full code. ...
...And 5 more matches
ReadableStreamDefaultController.close() - Web APIs
the close() method of the readable
streamdefaultcontroller interface closes the associated
stream. readers will still be able to read any previously-enqueued chunks from the
stream, but once those are read, the
stream will become closed. if you want to completely get rid of the
stream and discard any enqueued chunks, you'd use readable
stream.cancel() or readable
streamdefaultreader.cancel(). syntax readable
streamdefaultcontroller.close(); parameters none. return value undefined. exceptions typeerror the source object is not a readable
streamdefaultcontroller. examples in the following simple example, a custom readable
stream is created using a constructor (see our simple random
stream example for the full code). the start() function generates a random string of text every second an...
...ntroller.close(); parameters none. return value undefined. exceptions typeerror the source object is not a readable
streamdefaultcontroller. examples in the following simple example, a custom readable
stream is created using a constructor (see our simple random
stream example for the full code). the start() function generates a random string of text every second and enqueues it into the
stream. a cancel() function is also provided to stop the generation if readable
stream.cancel() is called for any reason. ...
...imple example, a custom readable
stream is created using a constructor (see our simple random
stream example for the full code). the start() function generates a random string of text every second and enqueues it into the
stream. a cancel() function is also provided to stop the generation if readable
stream.cancel() is called for any reason. when a button is pressed, the generation is stopped, the
stream is closed using readable
streamdefaultcontroller.close(), and another function is run, which reads the data back out of the
stream. ...
...And 5 more matches
ReadableStreamDefaultReader.cancel() - Web APIs
the cancel() method of the readable
streamdefaultreader interface cancels the
stream, signaling a loss of interest in the
stream by a consumer. the supplied reason argument will be given to the underlying source, which may or may not use it. cancel is used when you've completely finished with the
stream and don't need any more data from it, even if there are chunks enqueued waiting to be read. that data is lost after cancel is called, and the
stream is not readable any more. to read those chunks still and not completely get rid of the
stream, you'd use readable
streamdefaultcontroller.close(). note: if the reader is active, the cancel() method behaves the same as that for the associated
stream (readable
stream.cancel()). ...
...chunks enqueued waiting to be read. that data is lost after cancel is called, and the
stream is not readable any more. to read those chunks still and not completely get rid of the
stream, you'd use readable
streamdefaultcontroller.close(). note: if the reader is active, the cancel() method behaves the same as that for the associated
stream (readable
stream.cancel()). syntax var promise = readable
streamdefaultreader.cancel(reason); parameters reason optional a domstring providing a human-readable reason for the cancellation. return value a promise, which fulfills with the value given in the reason parameter. exceptions typeerror the source object is not a readable
streamdefaultreader, or the
stream has no owner. examples in the following simple example, a previously-created custom...
...ader.cancel(reason); parameters reason optional a domstring providing a human-readable reason for the cancellation. return value a promise, which fulfills with the value given in the reason parameter. exceptions typeerror the source object is not a readable
streamdefaultreader, or the
stream has no owner. examples in the following simple example, a previously-created custom readable
stream is read using a readable
streamdefaultreader created using getreader(). (this code is based on our simple random
stream example). ...
...And 5 more matches
ReadableStreamDefaultReader.read() - Web APIs
the read() method of the readable
streamdefaultreader interface returns a promise providing access to the next chunk in the
stream's internal queue. syntax var promise = readable
streamdefaultreader.read(); parameters none. return value a promise, which fulfills/rejects with a result depending on the state of the
stream. the different possibilities are as follows: if a chunk is available, the promise will be fulfilled with an object of the form { value: thechunk, done: false }. if the
stream becomes closed, the promise will be fulfilled with an object of the form { value: undefined, done: true }. if the
stream becomes errored, the promise will be rejected with the relevant error. ...
...s follows: if a chunk is available, the promise will be fulfilled with an object of the form { value: thechunk, done: false }. if the
stream becomes closed, the promise will be fulfilled with an object of the form { value: undefined, done: true }. if the
stream becomes errored, the promise will be rejected with the relevant error. exceptions typeerror the source object is not a readable
streamdefaultreader, or the
stream has no owner. examples example 1 - simple example this example shows the basic api usage, but doesn't try to deal with complications like
stream chunks not ending on line boundaries for example. in this example
stream is a previously-created custom readable
stream. it is read using a readable
streamdefaultreader created using getreader(). (see our simple random stre...
... but doesn't try to deal with complications like
stream chunks not ending on line boundaries for example. in this example
stream is a previously-created custom readable
stream. it is read using a readable
streamdefaultreader created using getreader(). (see our simple random
stream example for the full code). each chunk is read sequentially and output to the ui as an array of utf-8 bytes, until the
stream has finished being read, at which point we return out of the recursive function and print the entire
stream to another part of the ui. ...
...And 5 more matches
ReadableStreamDefaultReader - Web APIs
the readable
streamdefaultreader interface of the
streams api represents a default reader that can be used to read
stream data supplied from a network (e.g. a fetch request). constructor readable
streamdefaultreader() creates and returns a readable
streamdefaultreader object instance. properties readable
streamdefaultreader.closed read only allows you to write code that responds to an end to the
streaming process. returns a promise that fulfills if the
stream becomes closed or the reader's lock is released, or rejects if the
stream errors. methods readable
streamdefaultreader.cancel() cancels the
stream, signaling a loss of interest in the
stream by a consumer. the supplied reason argument will be given to the underlying source, which may or may not use it. ...
...to an end to the
streaming process. returns a promise that fulfills if the
stream becomes closed or the reader's lock is released, or rejects if the
stream errors. methods readable
streamdefaultreader.cancel() cancels the
stream, signaling a loss of interest in the
stream by a consumer. the supplied reason argument will be given to the underlying source, which may or may not use it. readable
streamdefaultreader.read() returns a promise providing access to the next chunk in the
stream's internal queue. readable
streamdefaultreader.releaselock() releases the reader's lock on the
stream. examples in the following example, an artifical response is created to
stream html fragments fetched from another resource to the browser. ...
...t use it. readable
streamdefaultreader.read() returns a promise providing access to the next chunk in the
stream's internal queue. readable
streamdefaultreader.releaselock() releases the reader's lock on the
stream. examples in the following example, an artifical response is created to
stream html fragments fetched from another resource to the browser. it demonstrates the usage of a readable
stream in combination with a uint8array. ...
...And 5 more matches
WebAssembly.instantiateStreaming() - JavaScript
importobject optional an object containing the values to be imported into the newly-created instance, such as functions or webassembly.memory objects. there must be one matching property for each declared import of the compiled module or else a webassembly.linkerror is thrown. ...
... importobject optional an object containing the values to be imported into the newly-created instance, such as functions or webassembly.memory objects. there must be one matching property for each declared import of the compiled module or else a webassembly.linkerror is thrown. ...
... instance: a webassembly.instance object that contains all the exported webassembly functions. exceptions if either of the parameters are not of the correct type or structure, a typeerror is thrown. if the operation fails, the promise rejects with a webassembly.compileerror, webassembly.linkerror, or webassembly.runtimeerror, depending on the cause of the failure. ...
...And 5 more matches
NPN_DestroyStream - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary closes and deletes a
stream. syntax #include <npapi.h> nperror npn_destroy
stream(npp instance, np
stream*
stream, nperror reason); parameters the function has the following parameters: instance pointer to current plug-in instance.
stream pointer to current
stream, initiated by either the browser or the plug-in. reason reason the
stream was stopped so the application can give the user appropriate feedback. values: npres_done (most common):
stream completed normally; all data was sent by the plug-in to the browser. ...
... pointer to current plug-in instance.
stream pointer to current
stream, initiated by either the browser or the plug-in. reason reason the
stream was stopped so the application can give the user appropriate feedback. values: npres_done (most common):
stream completed normally; all data was sent by the plug-in to the browser. npres_user_break: plug-in is terminating the
stream due to a user request. npres_network_err:
stream failed due to network problems. returns if successful, the function returns nperr_no_error. if unsuccessful, the plug-in is not loaded and the function returns an error code. for possible values, see error codes. ...
... plug-in to the browser. npres_user_break: plug-in is terminating the
stream due to a user request. npres_network_err:
stream failed due to network problems. returns if successful, the function returns nperr_no_error. if unsuccessful, the plug-in is not loaded and the function returns an error code. for possible values, see error codes. description the plug-in calls the npn_destroy
stream() function to close and delete a
stream. this
stream can be either a
stream that the browser created and passed to the plug-in in npp_new
stream(), or a
stream created by the plug-in through a call to npn_new
stream(). ...
...And 4 more matches
nsIConverterOutputStream
xpcom/io/nsiconverteroutput
stream.idlscriptable this interface allows writing strings to a
stream, doing automatic character encoding conversion. 1.0 66 introduced gecko 1.8 inherits from: nsiunicharoutput
stream last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) implemented by: @mozilla.org/intl/converter-output-
stream;1. to create an instance, use: var converteroutput
stream = components.classes["@mozilla.org/intl/converter-output-
stream;1"] .createinstance(components.interfaces.nsiconverteroutput
stream); method overview void init(in nsioutput
stream aout
stream, in string acharset, in unsigned long abuffersize, in prunichar areplacementcharacter); methods init() initialize this
stream. must be called befor...
...acharset the character set to use for encoding the characters. ...
...acharset the character set to use for encoding the characters. a null charset will be interpreted as utf-8. abuffersize how many bytes to buffer. ...
...And 4 more matches
DisplayMediaStreamConstraints.audio - Web APIs
note: the specification for the screen capture api does not define what the contents of the audio track should be. this is left up to the user agent to decide. ...
... note: the specification for the screen capture api does not define what the contents of the audio track should be. this is left up to the user agent to decide. ...
...een display contents also include an audio track. this value may simply be a boolean, where true indicates that an audio track should be included an false (the default) indicates that no audio should be included in the
stream. more precise control over the audio data may be exercised by instead providing a mediatrackconstraints object, which is used to process the audio prior to adding it to the
stream. note: the specification for the screen capture api does not define what the contents of the audio track should be. this is left up to the user agent to decide. ...
...And 4 more matches
DisplayMediaStreamConstraints.video - Web APIs
the displaymedia
streamconstraints dictionary's video property is used to configure the video track in the
stream returned by getdisplaymedia(). this value may simply be a boolean, where true specifies that a default selection of input source be made (typically the entire display area of the device in use, spanning every screen in a multiple screen configuration). since a video track must always be included, a value of false results in a typeerror exception being thrown. more precise control over the format of the returned video track may be exercised by instead providing a mediatrackconstraints object, which is used to process the video data after obtaining it from the device but prior to adding it to the
stream. ...
...reen configuration). since a video track must always be included, a value of false results in a typeerror exception being thrown. more precise control over the format of the returned video track may be exercised by instead providing a mediatrackconstraints object, which is used to process the video data after obtaining it from the device but prior to adding it to the
stream. ...
...e included, a value of false results in a typeerror exception being thrown. more precise control over the format of the returned video track may be exercised by instead providing a mediatrackconstraints object, which is used to process the video data after obtaining it from the device but prior to adding it to the
stream. syntax displaymedia
streamconstraints.video = allowvideoflag; displaymedia
streamconstraints.video = mediatrackconstraints; displaymedia
streamconstraints = { video: allowvideoflag | mediatrackconstraints; } value the value may be either a boolean or a mediatrackconstraints object. if a boolean is specified, a value of true (the default) indicates that the
stream returned by getdisplaymedia() should be in whatever format the user agent feels is best. a value of false is ...
...And 4 more matches
MediaStreamAudioSourceNode() - Web APIs
the web audio api's media
streamaudiosourcenode() constructor creates and returns a new media
streamaudiosourcenode object which uses the first audio track of a given media
stream as its source. note: another way to create a media
streamaudiosourcenode is to call theaudiocontext.createmedia
streamsource() method, specifying the
stream from which you want to obtain audio. syntax audiosourcenode = new media
streamaudiosourcenode(context, options); parameters context an audiocontext representing the audio context you want the node to be associated with. options a media
streamaudiosourceoptions object defining the properties you want the media
streamaudiosourcenode to have: media
stream a required property which specifies the media
stream from which to obtain audio for the node. retur...
...node(context, options); parameters context an audiocontext representing the audio context you want the node to be associated with. options a media
streamaudiosourceoptions object defining the properties you want the media
streamaudiosourcenode to have: media
stream a required property which specifies the media
stream from which to obtain audio for the node. return value a new media
streamaudiosourcenode object representing the audio node whose media is obtained from the specified source
stream. exceptions invalidstateerror the specified media
stream doesn't have any audio tracks. examples this example uses getusermedia() to obtain access to the user's camera, then creates a new media
streamaudiosourcenode from its media
stream. // define variables var audioctx = new (window.
...rom the specified source
stream. exceptions invalidstateerror the specified media
stream doesn't have any audio tracks. examples this example uses getusermedia() to obtain access to the user's camera, then creates a new media
streamaudiosourcenode from its media
stream. ...
...And 4 more matches
MediaStream Image Capture API - Web APIs
the example code is adapted from chrome's image capture examples. first, get a reference to a device by calling mediadevices.getusermedia(). ...
...re api is an api for capturing images or videos from a photographic device. in addition to capturing data, it also allows you to retrieve information about device capabilities such as image size, red-eye reduction and whether or not there is a flash and what they are currently set to. conversely, the api allows the capabilities to be configured within the constraints what the device allows. media
stream image capture concepts and usage the process of retrieving an image or video
stream happens as described below. the example code is adapted from chrome's image capture examples. first, get a reference to a device by calling mediadevices.getusermedia(). the example below simply says give me whatever video device is available, though the getusermedia() method allows more specific capabilities to ...
...or video
stream happens as described below. the example code is adapted from chrome's image capture examples. first, get a reference to a device by calling mediadevices.getusermedia(). the example below simply says give me whatever video device is available, though the getusermedia() method allows more specific capabilities to be requested. this method returns a promise that resolves with a media
stream object. navigator.mediadevices.getusermedia({ video: true }) .then(media
stream => { // do something with the
stream. }) next, isolate the visual part of the media
stream. do this by calling media
stream.getvideotracks(). this returns an array of media
streamtrack objects. the code below assumes that the first item in the media
streamtrack array is the one to use. you can use the propertie...
...And 4 more matches
RTCInboundRtpStreamStats - Web APIs
averagertcpinterval a floating-point value indicating the average rtcp interval between two consecutive compound rtcp packets. bytesreceived a 64-bit integer which indicats the total numer of bytes that have been received so far for this media source. ...
... averagertcpinterval a floating-point value indicating the average rtcp interval between two consecutive compound rtcp packets. bytesreceived a 64-bit integer which indicats the total numer of bytes that have been received so far for this media source. ...
...nteger value indicating the total number of rtp fec packets received for this source. this counter may also be incremented when fec packets arrive in-band along with media content; this can happen with opus, for example. fircount an integer value which indicates the total number of full intra request (fir) packets which this receiver has sent to the sender. this is an indicator of how often the
stream has lagged, requiring frames to be skipped in order to catch up. this value is only available for video
streams. framesdecoded a long integer value indicating the total number of frames of video which have been correctly decoded so far for this media source. this is the number of frames that would have been rendered if none were dropped. only valid for video
streams. lastpacketreceivedtimestam...
...And 4 more matches
ReadableStream.getReader() - Web APIs
the getreader() method of the readable
stream interface creates a reader and locks the
stream to it. while the
stream is locked, no other reader can be acquired until this one is released. syntax var reader = readable
stream.getreader({mode}); parameters {mode} optional an object containing a property mode, which takes as its value a domstring specifying the type of reader to create. values can be: "byob", which results in a readable
streambyobreader being created that can read readable byte
streams (i.e. can handle "bring your own buffer" reading). undefined (or not specified at all — this is the default), which results in a readable
streamdefaultreader being created that can read individual chunks from a
stream. ...
...type of reader to create. values can be: "byob", which results in a readable
streambyobreader being created that can read readable byte
streams (i.e. can handle "bring your own buffer" reading). undefined (or not specified at all — this is the default), which results in a readable
streamdefaultreader being created that can read individual chunks from a
stream. return value a readable
streamdefaultreader or readable
streambyobreader object instance, depending on the mode value. exceptions rangeerror the provided mode value is not "byob" or undefined. typeerror the
stream you are trying to create a reader for is not a readable
stream. ...
...ividual chunks from a
stream. return value a readable
streamdefaultreader or readable
streambyobreader object instance, depending on the mode value. exceptions rangeerror the provided mode value is not "byob" or undefined. typeerror the
stream you are trying to create a reader for is not a readable
stream. examples in the following simple example, a previously-created custom readable
stream is read using a readable
streamdefaultreader created using getreader(). (see our simple random
stream example for the full code). each chunk is read sequentially and output to the ui, until the
stream has finished being read, at which point we return out of the recursive function and print the entire
stream to another part of the ui. ...
...And 4 more matches
ReadableStream.pipeThrough() - Web APIs
the pipethrough() method of the readable
stream interface provides a chainable way of piping the current
stream through a transform
stream or any other writable/readable pair. piping a
stream will generally lock it for the duration of the pipe, preventing other readers from locking it. syntax var transformed
stream = readable
stream.pipethrough(transform
stream[, options]); parameters transform
stream a transform
stream (or an object with the structure {writable, readable}) consisting of a readable
stream and a writable
stream working together to transform some data from one form to another. data writen to the writable
stream can be read in some transformed state by the readable
stream. for example, a textdecoder, has bytes written to it and strings read from it, while a video decod...
...o transform some data from one form to another. data writen to the writable
stream can be read in some transformed state by the readable
stream. for example, a textdecoder, has bytes written to it and strings read from it, while a video decoder has encoded bytes written to it and uncompressed video frames read from it. options optional the options that should be used when piping to the writable
stream. available options are: preventclose: if this is set to true, the source readable
stream closing will no longer cause the destination writable
stream to be closed. the method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination in which case it will be rejected with that error. preventabort: if this is set to true, errors in...
...are: preventclose: if this is set to true, the source readable
stream closing will no longer cause the destination writable
stream to be closed. the method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination in which case it will be rejected with that error. preventabort: if this is set to true, errors in the source readable
stream will no longer abort the destination writable
stream. the method will return a promise rejected with the source’s error, or with any error that occurs during aborting the destination. preventcancel: if this is set to true, errors in the destination writable
stream will no longer cancel the source readable
stream. in this case the method will return a promise rejected with the source’s error, o...
...And 4 more matches
ReadableStreamDefaultController.enqueue() - Web APIs
the enqueue() method of the readable
streamdefaultcontroller interface enqueues a given chunk in the associated
stream. syntax readable
streamdefaultcontroller.enqueue(chunk); parameters chunk the chunk to enqueue. return value undefined. exceptions typeerror the source object is not a readable
streamdefaultcontroller. examples in the following simple example, a custom readable
stream is created using a constructor (see our simple random
stream example for the full code). the start() function generates a random string of text every second and enqueues it into the
stream — see controller.enqueue(string). a cancel() function is also provided to stop the generation if readable
stream.cancel() is called for any reason. ...
...eam is created using a constructor (see our simple random
stream example for the full code). the start() function generates a random string of text every second and enqueues it into the
stream — see controller.enqueue(string). a cancel() function is also provided to stop the generation if readable
stream.cancel() is called for any reason. when a button is pressed, the generation is stopped, the
stream is closed using readable
streamdefaultcontroller.close(), and another function is run, which reads the data back out of the
stream. ...
...xt every second and enqueues it into the
stream — see controller.enqueue(string). a cancel() function is also provided to stop the generation if readable
stream.cancel() is called for any reason. when a button is pressed, the generation is stopped, the
stream is closed using readable
streamdefaultcontroller.close(), and another function is run, which reads the data back out of the
stream. ...
...And 4 more matches
ReadableStreamDefaultController - Web APIs
the readable
streamdefaultcontroller interface of the
streams api represents a controller allowing control of a readable
stream's state and internal queue. default controllers are for
streams that are not byte
streams. constructor none. readable
streamdefaultcontroller instances are created automatically during readable
stream construction. properties readable
streamdefaultcontroller.desiredsize read only returns the desired size required to fill the
stream's internal queue. methods readable
streamdefaultcontroller.close() closes the associated
stream. readable
streamdefaultcontroller.enqueue() enqueues a given chunk in the associated
stream. readable
streamdefaultcontroller.error() causes any future interactions with the associated
stream to error. examples in the following si...
...size required to fill the
stream's internal queue. methods readable
streamdefaultcontroller.close() closes the associated
stream. readable
streamdefaultcontroller.enqueue() enqueues a given chunk in the associated
stream. readable
streamdefaultcontroller.error() causes any future interactions with the associated
stream to error. examples in the following simple example, a custom readable
stream is created using a constructor (see our simple random
stream example for the full code). the start() function generates a random string of text every second and enqueues it into the
stream. a cancel() function is also provided to stop the generation if readable
stream.cancel() is called for any reason. ...
...error. examples in the following simple example, a custom readable
stream is created using a constructor (see our simple random
stream example for the full code). the start() function generates a random string of text every second and enqueues it into the
stream. a cancel() function is also provided to stop the generation if readable
stream.cancel() is called for any reason. note that a readable
streamdefaultcontroller object is provided as the parameter of the start() and pull() functions. when a button is pressed, the generation is stopped, the
stream is closed using readable
streamdefaultcontroller.close(), and another function is run, which reads the data back out of the
stream. ...
...And 4 more matches
nsIMIMEInputStream
netwerk/base/public/nsimimeinput
stream.idlscriptable the mime
stream separates headers and a data
stream. it also allows automatic creation of the content-length header. inherits from: nsiinput
stream last changed in gecko 1.3 implemented by: @mozilla.org/network/mime-input-
stream;1. to create an instance, use: var mimeinput
stream = components.classes["@mozilla.org/network/mime-input-
stream;1"] .createinstance(components.interfaces.nsimimeinput
stream); method overview void addheader(in string name, in string value); void setdata(in nsiinput
stream stream); attributes attribute type description addcontentlength boolean when true a "content-length" header is automatically added to the
stream. the value of the...
...; method overview void addheader(in string name, in string value); void setdata(in nsiinput
stream stream); attributes attribute type description addcontentlength boolean when true a "content-length" header is automatically added to the
stream. the value of the content-length is automatically calculated using the available() method on the data
stream. the value is recalculated every time the
stream is rewound to the start. not allowed to be changed once the
stream has been started to be read. methods addheader() adds an additional header to the
stream on the form "name: value". may not be called once the
stream has been started to be read. void addheader( in string name, in string value ); parameters name name of the heade...
...d to the start. not allowed to be changed once the
stream has been started to be read. methods addheader() adds an additional header to the
stream on the form "name: value". may not be called once the
stream has been started to be read. void addheader( in string name, in string value ); parameters name name of the header. value value of the header. setdata() sets data-
stream. may not be called once the
stream has been started to be read. the cursor of the new
stream should be located at the beginning of the
stream if the implementation of the nsimimeinput
stream also is used as an nsiseekable
stream. void setdata( in nsiinput
stream stream ); parameters
stream stream containing the data for the
stream. example var postdata = components.classes["@mozilla.org...
...And 3 more matches
AudioContext.createMediaStreamDestination() - Web APIs
the createmedia
streamdestination() method of the audiocontext interface is used to create a new media
streamaudiodestinationnode object associated with a webrtc media
stream representing an audio
stream, which may be stored in a local file or sent to another computer. the media
stream is created when the node is created and is accessible via the media
streamaudiodestinationnode's
stream attribute. this
stream can be used in a similar way as a media
stream obtained via navigator.getusermedia — it can, for example, be sent to a remote peer using the rtcpeerconnection add
stream() method. for more details about media
stream destination nodes, check out the media
streamaudiodestinationnode reference page. ...
...ribute. this
stream can be used in a similar way as a media
stream obtained via navigator.getusermedia — it can, for example, be sent to a remote peer using the rtcpeerconnection add
stream() method. for more details about media
stream destination nodes, check out the media
streamaudiodestinationnode reference page. syntax var audioctx = new audiocontext(); var destination = audioctx.createmedia
streamdestination(); returns a media
streamaudiodestinationnode. examples in the following simple example, we create a media
streamaudiodestinationnode, 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 media
streamdestinationnode. when the button is clicked, the oscillator starts,...
...corder causes the dataavailable event to fire, and the event data is pushed into the chunks array. after that, the stop event fires, a new blob is made of type opus — which contains the data in the chunks array, and a new window (tab) is then opened that points to a url created from the blob. from here, you can play and save the opus file. ...
...And 3 more matches
HTMLCanvasElement.captureStream() - Web APIs
exceptions notsupportederror the value of framerate is negative. ...
... exceptions notsupportederror the value of framerate is negative. ...
... exceptions notsupportederror the value of framerate is negative. ...
...And 3 more matches
Guide to streaming audio and video - Web media technologies
hls may also be supported in other environments, although in some cases this support is conditional. ...
...hls may also be supported in other environments, although in some cases this support is conditional. ...
...hls may also be supported in other environments, although in some cases this support is conditional. ...
...And 3 more matches
io/byte-streams - Archive of obsolete content
experimental provides
streams for reading and writing bytes. function readbinarydatafromfile (filename) { var fileio = require("sdk/io/file"); var data = null; if (fileio.exists(filename)) { var bytereader = fileio.open(filename, "rb"); if (!bytereader.closed) { data = bytereader.read(); bytereader.close(); } } return data; } function writebinarydatatofile(data, filename) { var fileio = require("sdk/io/file"); var bytewriter = fileio.open(filename, "wb"); if (!bytewriter.closed) { bytewriter.write(data); bytewriter.close(); } } globals constructors bytereader(input
stream) creates a binary input
stream that reads bytes from a backing
stream. you can also create bytereader objects using io/file's open() function. parameters inputstrea...
...name) { var fileio = require("sdk/io/file"); var bytewriter = fileio.open(filename, "wb"); if (!bytewriter.closed) { bytewriter.write(data); bytewriter.close(); } } globals constructors bytereader(input
stream) creates a binary input
stream that reads bytes from a backing
stream. you can also create bytereader objects using io/file's open() function. parameters input
stream :
stream the backing
stream, an nsiinput
stream. bytewriter(output
stream) creates a binary output
stream that writes bytes to a backing
stream. ...
...s a binary input
stream that reads bytes from a backing
stream. you can also create bytereader objects using io/file's open() function. parameters input
stream :
stream the backing
stream, an nsiinput
stream. bytewriter(output
stream) creates a binary output
stream that writes bytes to a backing
stream. you can also create bytewriter objects using io/file's open() function. parameters output
stream :
stream the backing
stream, an nsioutput
stream. bytereader methods close() closes both the
stream and its backing
stream. if the
stream is already closed, an exception is thrown. read(numbytes) reads a string from the
stream. if the
stream is closed, an exception is thrown. parameters numbytes : number the number of bytes to read. ...
...And 2 more matches
nsScriptableInputStream
« xpcom api reference summary a component implementing nsiscriptableinput
stream. class id 7225c040-a9bf-11d3-a197-0050041caf44 contractid @mozilla.org/scriptableinput
stream;1 supported interfaces nsiscriptableinput
stream, nsiinput
stream remarks this component should be accessed via the xpcom component manager. ...
... « xpcom api reference summary a component implementing nsiscriptableinput
stream. class id 7225c040-a9bf-11d3-a197-0050041caf44 contractid @mozilla.org/scriptableinput
stream;1 supported interfaces nsiscriptableinput
stream, nsiinput
stream remarks this component should be accessed via the xpcom component manager. ...
...eference summary a component implementing nsiscriptableinput
stream. class id 7225c040-a9bf-11d3-a197-0050041caf44 contractid @mozilla.org/scriptableinput
stream;1 supported interfaces nsiscriptableinput
stream, nsiinput
stream remarks this component should be accessed via the xpcom component manager. example code const nsiscriptableinput
stream = components.interfaces.nsiscriptableinput
stream; function consume
stream(input
stream) { var factory = components.classes["@mozilla.org/scriptableinput
stream;1"]; var sis = factory.createinstance(nsiscriptableinput
stream); sis.init(input
stream); try { while (true) { var chunk = sis.read(512); if (chunk.length == 0) break; // ok, chunk now contains a portion of the
stream's data. // do somethi...
...And 2 more matches
nsIConverterInputStream
xpcom/io/nsiconverterinput
stream.idlscriptable a unichar input
stream that wraps an input
stream. this allows reading unicode strings from a
stream, automatically converting the bytes from a selected character encoding. 1.0 66 introduced gecko 1.8 inherits from: nsiunicharinput
stream last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) implemented by: @mozilla.org/intl/converter-input-
stream;1. ...
...t
stream. this allows reading unicode strings from a
stream, automatically converting the bytes from a selected character encoding. 1.0 66 introduced gecko 1.8 inherits from: nsiunicharinput
stream last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) implemented by: @mozilla.org/intl/converter-input-
stream;1. ...
...tomatically converting the bytes from a selected character encoding. 1.0 66 introduced gecko 1.8 inherits from: nsiunicharinput
stream last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) implemented by: @mozilla.org/intl/converter-input-
stream;1. to create an instance, use: var converterinput
stream = components.classes["@mozilla.org/intl/converter-input-
stream;1"] .createinstance(components.interfaces.nsiconverterinput
stream); method overview void init(in nsiinput
stream a
stream, in string acharset, in long abuffersize, in prunichar areplacementchar); constants constant value description default_replacement_character 0xfffd default replacement character value. methods init() initialize this
stream. void init( ...
...And 2 more matches
nsIFileInputStream
if open_on_read is defined, and the file was recreated after the first delete, the file will be deleted again when it is closed again. ...
...if open_on_read is defined, and the file was recreated after the first delete, the file will be deleted again when it is closed again. close_on_eof 1<<2 if this is set, the file will close automatically when the end of the file is reached. ...
...if open_on_read is defined, and the file was recreated after the first delete, the file will be deleted again when it is closed again. close_on_eof 1<<2 if this is set, the file will close automatically when the end of the file is reached. ...
...And 2 more matches
MediaStream.id - Web APIs
candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
... candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
...And 2 more matches
MediaStream.onremovetrack - Web APIs
the media
stream.onremovetrack property is an eventhandler which specifies a function to be called when the removetrack event occurs on a media
stream instance. this happens when a track of any kind is removed from the media
stream. this event is fired when the browser removes a track from the
stream (such as when a rtcpeerconnection is renegotiated or a
stream being captured using htmlmediaelement.capture
stream() gets a new set of tracks because the media element being captured loaded a new source. the removetrack event does not get fired when javascript code explicitly removes tracks from the
stream (by calling removetrack()). ...
... when the browser removes a track from the
stream (such as when a rtcpeerconnection is renegotiated or a
stream being captured using htmlmediaelement.capture
stream() gets a new set of tracks because the media element being captured loaded a new source. the removetrack event does not get fired when javascript code explicitly removes tracks from the
stream (by calling removetrack()). syntax media
stream.onremovetrack = eventhandler; value this should be set to a function which you provide that accepts as input a media
streamtrackevent object representing the removetrack event which has occurred. the media
streamtrack representing the track which was removed is specified in the event's track property. ...
...tax media
stream.onremovetrack = eventhandler; value this should be set to a function which you provide that accepts as input a media
streamtrackevent object representing the removetrack event which has occurred. the media
streamtrack representing the track which was removed is specified in the event's track property. example this example adds a listener which, when a track is removed from the
stream, logs the track that was removed. ...
...And 2 more matches
MediaStreamEvent() - Web APIs
the media
streamevent() constructor creates a new media
streamevent. syntax var event = new media
streamevent(type, media
streameventinit); values type is a domstring containing the name of the event, like add
stream or remove
stream. media
streameventinit is a media
streameventinit dictionary, having the following fields: "
stream" of type media
stream representing the
stream being concerned by the event. "bubbles", optional and defaulting to false, inherited from eventinit, and indicating if the event must bubble or not. "cancelable", optional and defaulting to false, inherited from eventinit, and indicating if the event can be canceled or not. ...
...ary, having the following fields: "
stream" of type media
stream representing the
stream being concerned by the event. "bubbles", optional and defaulting to false, inherited from eventinit, and indicating if the event must bubble or not. "cancelable", optional and defaulting to false, inherited from eventinit, and indicating if the event can be canceled or not. ...
...elds: "
stream" of type media
stream representing the
stream being concerned by the event. "bubbles", optional and defaulting to false, inherited from eventinit, and indicating if the event must bubble or not. "cancelable", optional and defaulting to false, inherited from eventinit, and indicating if the event can be canceled or not. ...
...And 2 more matches
MediaStreamTrack.applyConstraints() - Web APIs
constraints can be used to ensure that the media meets certain guidelines you prefer. for example, you may prefer high-density video but require that the frame rate be a little low to help keep the data rate low enough not overtax the network. constraints can also specify ideal and/or acceptable sizes or ranges of sizes. ...
...t represents the basic set of constraints that must apply for the promise to resolve. the object may contain an advanced property containing an array of additional mediatrackconstrants objects, which are treated as exact requires. return value a promise which resolves when the constraints have been successfully applied. if the constraints cannot be applied, the promise is rejected with a media
streamerror whose name is overconstrainederror, to indicate that the constraints could not be met. this can happen if the specified constraints are too strict to find a match when attempting to configure the track. examples the following shows how to specify a basic and advanced set of constraints. it specifies that the page or web app needs a width between 640 and 1280 and a height between 480 and 72...
...80 is the preferred or an aspect ratio of 1.333 if that is not available. note that these constraints also illustrate what the spec refers to as a backoff strategy. ...
...And 2 more matches
MediaStreamTrack.stop() - Web APIs
the media
streamtrack.stop() method stops the track. syntax track.stop() description calling stop() tells the user agent that the track's source—whatever that source may be, including files, network
streams, or a local camera or microphone—is no longer needed by the media
streamtrack. since multiple tracks may use the same source (for example, if two tabs are using the device's microphone), the source itself isn't necessarily immediately stopped. it is instead disassociated from the track and the track object is stopped. once no media tracks are using the source, the source may actually be completely stopped. immediately after calling stop(), the readystate property is set to ended. ...
...ame source (for example, if two tabs are using the device's microphone), the source itself isn't necessarily immediately stopped. it is instead disassociated from the track and the track object is stopped. once no media tracks are using the source, the source may actually be completely stopped. immediately after calling stop(), the readystate property is set to ended. ...
...'s microphone), the source itself isn't necessarily immediately stopped. it is instead disassociated from the track and the track object is stopped. once no media tracks are using the source, the source may actually be completely stopped. immediately after calling stop(), the readystate property is set to ended. ...
...And 2 more matches
RTCPeerConnection: addstream event - Web APIs
the obsolete add
stream event is sent to an rtcpeerconnection when new media, in the form of a media
stream object, has been added to it. important: this event has been removed from the webrtc specification. you should instead watch for the track event, which is sent for each media track added to the rtcpeerconnection. bubbles no cancelable no interface media
streamevent event handler property rtcpeerconnection.onadd
stream you can, similarly, watch for
streams to be removed from the connection by monitoring the remove
stream event. examples this example looks to determine if the user's browser supports the track event. if it does, a track event listener is set up; otherwise, an add
stream event listener is set up. pc is an rtcpeerconnect...
...eam you can, similarly, watch for
streams to be removed from the connection by monitoring the remove
stream event. examples this example looks to determine if the user's browser supports the track event. if it does, a track event listener is set up; otherwise, an add
stream event listener is set up. pc is an rtcpeerconnection. if (pc.addtrack !== undefined) { pc.ontrack = ev => { ev.
streams.foreach(
stream => doadd
stream(
stream)); } } else { pc.onadd
stream = ev => { doadd
stream(ev.
stream); } } this calls a function doadd
stream() once for each
stream being added to the rtcpeerconnection, regardless of whether the browser sends add
stream or track. ...
...rack = ev => { ev.
streams.foreach(
stream => doadd
stream(
stream)); } } else { pc.onadd
stream = ev => { doadd
stream(ev.
stream); } } this calls a function doadd
stream() once for each
stream being added to the rtcpeerconnection, regardless of whether the browser sends add
stream or track. ...
...And 2 more matches
RTCRtpStreamStats.firCount - Web APIs
this tells the sender to send a full frame instead of a delta frame, so that the receiver can catch up. ...
...this tells the sender to send a full frame instead of a delta frame, so that the receiver can catch up. ...
...this tells the sender to send a full frame instead of a delta frame, so that the receiver can catch up. ...
...And 2 more matches
RTCRtpStreamStats.qpSum - Web APIs
the qpsum property of the rtcrtp
streamstats dictionary is a value generated by adding the quantization parameter (qp) values for every frame sent or received to date on the video track corresponding to this rtcrtp
streamstats object. in general, the higher this number is, the more heavily compressed the video data is. syntax var qpsum = rtcrtp
streamstats.qpsum; value an unsigned 64-bit integer value which indicates the sum of the quantization parameter (qp) value for every frame sent or received so far on the track described by the rtcrtp
streamstats object. since the value of qp is typically larger to indicate higher compression factors, the larger this sum is, the more heavily compressed the
stream generally has been. note: this value is only available for video media. usage notes quan...
...ng the data more compressible. the quantization process and the amount of compression can be controlled using one or more parameters. it's important to keep in mind that the value of qp can change periodically—even every frame—so it's difficult to know for certain how substantial the compression is. the best you can do is make an estimate. you can, for example, use the value of rtcreceivedrtp
streamstats.framesdecoded if receiving the media or rtcsentrtp
streamstats.framesencoded if sending it to get the number of frames handled so far, and compute an average from there. see calculating average quantization below for a function that does this. also, the exact meaning of the qp value depends on the codec being used. for example, for the vp8 codec, the qp value can be anywhere from 1 to 127 an...
...es from 0 to 51; in this case, it's an index used to derive a scaling matrix used during the quantization process. additionally, qp is not likely to be the only parameter the codec uses to adjust the compression. see the individual codec specifications for details. example calculating average quantization the calculateaverageqp() function shown below computes the average qp for the given rtcrtp
streamstats object, returning 0 if the object doesn't describe an rtp
stream. function calculateaverageqp(stats) { let framecount = 0; switch(stats.type) { case "inbound-rtp": case "remote-inbound-rtp": framecount = stats.framesdecoded; break; case "outbound-rtp": case "remote-outbound-rtp": framecount = stats.framesencoded; break; default: return ...
...And 2 more matches
RTCRtpStreamStats.ssrc - Web APIs
the manner in which these values are generated is not mandated by the specification, although it does make recommendations. ...
... the manner in which these values are generated is not mandated by the specification, although it does make recommendations. ...
... the manner in which these values are generated is not mandated by the specification, although it does make recommendations. ...
...And 2 more matches
ReadableStream.pipeTo() - Web APIs
the pipeto() method of the readable
stream interface pipes the current readable
stream to a given writable
stream and returns a promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered. piping a
stream will generally lock it for the duration of the pipe, preventing other readers from locking it. syntax var promise = readable
stream.pipeto(destination[, options]); parameters destination a writable
stream that acts as the final destination for the readable
stream. options optional the options that should be used when piping to the writable
stream. available options are: preventclose: if this is set to true, the source readable
stream closing will no longer cause the destination writable
stream to be closed. the method will ret...
...are: preventclose: if this is set to true, the source readable
stream closing will no longer cause the destination writable
stream to be closed. the method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination in which case it will be rejected with that error. preventabort: if this is set to true, errors in the source readable
stream will no longer abort the destination writable
stream. the method will return a promise rejected with the source’s error, or with any error that occurs during aborting the destination. preventcancel: if this is set to true, errors in the destination writable
stream will no longer cancel the source readable
stream. in this case the method will return a promise rejected with the source’s error, o...
...h the source’s error, or with any error that occurs during aborting the destination. preventcancel: if this is set to true, errors in the destination writable
stream will no longer cancel the source readable
stream. in this case the method will return a promise rejected with the source’s error, or with any error that occurs during canceling the source. in addition, if the destination writable
stream starts out closed or closing, the source readable
stream will no longer be canceled. in this case the method will return a promise rejected with an error indicating piping to a closed
stream failed, or with any error that occurs during canceling the source. signal: if set to an abortsignal object, ongoing pipe operations can then be aborted via the corresponding abortcontroller. return va...
...And 2 more matches
SourceBuffer.appendStream() - Web APIs
maxsize an unsigned long value indicating the maximum number of bytes that can be appended in this operation. return value undefined. exceptions none. ...
... maxsize an unsigned long value indicating the maximum number of bytes that can be appended in this operation. return value undefined. exceptions none. ...
... maxsize an unsigned long value indicating the maximum number of bytes that can be appended in this operation. return value undefined. exceptions none. ...
...And 2 more matches
NPP_StreamAsFile - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary provides a local file name for the data from a
stream. syntax #include <npapi.h> void npp_
streamasfile(npp instance, np
stream*
stream, const char* fname); parameters the function has the following parameters: instance pointer to current plug-in instance.
stream pointer to current
stream. fname pointer to full path to a local file. if an error occurs while retrieving the data or writing the file, fname may be null. ...
... instance, np
stream*
stream, const char* fname); parameters the function has the following parameters: instance pointer to current plug-in instance.
stream pointer to current
stream. fname pointer to full path to a local file. if an error occurs while retrieving the data or writing the file, fname may be null. description when the
stream is complete, the browser calls npp_
streamasfile to provide the instance with a full path name for a local file for the
stream. npp_
streamasfile is called for
streams whose mode is set to np_asfileonly or np_asfile only in a previous call to npp_new
stream. if an error occurs while retrieving the data or writing the file, the file name (fname) is null. ...
...escription when the
stream is complete, the browser calls npp_
streamasfile to provide the instance with a full path name for a local file for the
stream. npp_
streamasfile is called for
streams whose mode is set to np_asfileonly or np_asfile only in a previous call to npp_new
stream. if an error occurs while retrieving the data or writing the file, the file name (fname) is null. ...
...te, the browser calls npp_
streamasfile to provide the instance with a full path name for a local file for the
stream. npp_
streamasfile is called for
streams whose mode is set to np_asfileonly or np_asfile only in a previous call to npp_new
stream. if an error occurs while retrieving the data or writing the file, the file name (fname) is null. ...
nsIFileStreams
if open_on_read is defined, and the file was recreated after the first delete, the file will be deleted again when it is closed again. ...
...if open_on_read is defined, and the file was recreated after the first delete, the file will be deleted again when it is closed again. close_on_eof 1<<2 if this is set, the file will close automatically when the end of the file is reached. ...
...ms.idlscriptable please add a summary to this article. last changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview void init(in nsifile file, in long ioflags, in long perm, in long behaviorflags); constants constants value description delete_on_close 1<<1 if this is set, the file will be deleted by the time the
stream is closed. it may be removed before the
stream is closed if it is possible to delete it and still read from it. if open_on_read is defined, and the file was recreated after the first delete, the file will be deleted again when it is closed again. close_on_eof 1<<2 if this is set, the file will close automatically when the end of the file is reached. reopen_on_rewind 1<<3 if this is set, the file will be reopened whenever seek(0) occurs. i...
...behaviorflags ); parameters file file to read from (must qi to nsilocalfile). ioflags file open flags listed in prio.h (see pr_open documentation) or -1 to open the file in default mode (pr_rdonly). perm file mode bits listed in prio.h or -1 to use the default value (0). behaviorflags flags specifying various behaviors of the class (see enumerations in the class). see also nsifileoutput
stream ...
nsISeekableStream
xpcom/io/nsiseekable
stream.idlscriptable provides seeking support in data
streams. inherits from: nsisupports last changed in gecko 1.7 method overview void seek(in long whence, in long long offset); void seteof(); long long tell(); constants constant value description ns_seek_set 0 specifies that the offset is relative to the start of the
stream. ns_seek_cur 1 specifies that the offset is relative to the current position in the
stream. ns_seek_end 2 specifies that the offset is relative to the end of the
stream. methods seek() this method moves the
stream offset of the
stream implementing this interface. void seek( in long whence, in long long offset ); parameters whence ...
...e offset is relative to the current position in the
stream. ns_seek_end 2 specifies that the offset is relative to the end of the
stream. methods seek() this method moves the
stream offset of the
stream implementing this interface. void seek( in long whence, in long long offset ); parameters whence specifies how to interpret the 'offset' parameter in setting the
stream offset associated with the implementing
stream, according to the table of constants above. offset specifies a value, in bytes, that is used in conjunction with the 'whence' parameter to set the
stream offset of the implementing
stream. a negative value causes seeking in the reverse direction. exceptions thrown ns_base_
stream_closed if called on a closed
stream. seteof() this me...
...with the implementing
stream, according to the table of constants above. offset specifies a value, in bytes, that is used in conjunction with the 'whence' parameter to set the
stream offset of the implementing
stream. a negative value causes seeking in the reverse direction. exceptions thrown ns_base_
stream_closed if called on a closed
stream. seteof() this method truncates the
stream at the current offset. void seteof(); parameters none. exceptions thrown ns_base_
stream_closed if called on a closed
stream. tell() this method reports the current offset, in bytes, from the start of the
stream. long long tell(); parameters none. return value the current offset, in bytes, from the start of the
stream. ...
...f() this method truncates the
stream at the current offset. void seteof(); parameters none. exceptions thrown ns_base_
stream_closed if called on a closed
stream. tell() this method reports the current offset, in bytes, from the start of the
stream. long long tell(); parameters none. return value the current offset, in bytes, from the start of the
stream. exceptions thrown ns_base_
stream_closed if called on a closed
stream. ...
nsIStreamListener
netwerk/base/public/nsi
streamlistener.idlscriptable this interface is used to listen to data being received on a
stream. inherits from: nsirequestobserver last changed in gecko 1.0 classes which want to consume data from a nsichannel need to implement this interface. nsirequestobserver contains two methods. so, in all the three methods - ondataavailable(), nsirequestobserver.onstartrequest() and nsirequestobserver.onstoprequest() have to be implemented. method overview void ondataavailable(in nsirequest arequest, in nsisupports acontext, in nsiinput
stream ainput
stream, in unsigned long aoffset, in unsigned long acount); methods ondataavailable() this method is called when the next chunk of data for the ongoing request may be read without blocking the calling thread. the dat...
...toprequest() have to be implemented. method overview void ondataavailable(in nsirequest arequest, in nsisupports acontext, in nsiinput
stream ainput
stream, in unsigned long aoffset, in unsigned long acount); methods ondataavailable() this method is called when the next chunk of data for the ongoing request may be read without blocking the calling thread. the data can be read from the nsiinput
stream object passed as the argument to this method. note: your implementation of this method must read exactly acount bytes of data before returning. void ondataavailable( in nsirequest arequest, in nsisupports acontext, in nsiinput
stream ainput
stream, in unsigned long aoffset, in unsigned long acount ); parameters arequest an nsirequest indicating the source of the data. acontext a user-de...
...aoffset number of bytes that were sent in previous ondataavailable() calls for this request. ...
...aoffset number of bytes that were sent in previous ondataavailable() calls for this request. in other words, the sum of all previous count parameters. ...
LocalMediaStream - Web APIs
the localmedia
stream interface was part of the media capture and
streams api, representing a
stream of data being generated locally (such as by getusermedia(). however, getusermedia() now returns a media
stream instead, and this interface has been removed from the specification. warning: this interface is no longer available in any main
stream browser. do not use localmedia
stream; you need to update any code that does use it as soon as possible or your content or application will stop working. see stopping a video
stream in media
streamtrack to learn how. all other functionality is found in media
stream. the primary reason for this interface to exist was to add a stop() method to its media
stream parent interface. however, control over playback of media has been moved to the individual...
...e any code that does use it as soon as possible or your content or application will stop working. see stopping a video
stream in media
streamtrack to learn how. all other functionality is found in media
stream. the primary reason for this interface to exist was to add a stop() method to its media
stream parent interface. however, control over playback of media has been moved to the individual media
streamtrack objects, so this is no longer necessary. instead, media is stopped by calling media
streamtrack.stop() on each track that needs to be stopped. ...
...ionality is found in media
stream. the primary reason for this interface to exist was to add a stop() method to its media
stream parent interface. however, control over playback of media has been moved to the individual media
streamtrack objects, so this is no longer necessary. instead, media is stopped by calling media
streamtrack.stop() on each track that needs to be stopped. the example for media
streamtrack.stop() demonstrates how to stop a multi-track
stream, which is what localmedia
stream.stop() used to be used for. methods localmedia
stream.stop() stops the
stream. when the source of the
stream is a connected device (such as a camera or microphone), capture of media from the device is halted. this method is no longer available with the deprecation of localmedia
stream. see stopping a vide...
...ack.stop() demonstrates how to stop a multi-track
stream, which is what localmedia
stream.stop() used to be used for. methods localmedia
stream.stop() stops the
stream. when the source of the
stream is a connected device (such as a camera or microphone), capture of media from the device is halted. this method is no longer available with the deprecation of localmedia
stream. see stopping a video
stream in media
streamtrack to learn how to stop an entire
stream. specifications not part of any specification. this interface was previously part of media capture and
streams but was removed in 2013. ...
MediaSource.endOfStream() - Web APIs
the endof
stream() method of the mediasource interface signals the end of the
stream. syntax mediasource.endof
stream(endof
streamerror); parameters endof
streamerror optional a domstring representing an error to throw when the end of the
stream is reached. the possible values are: network: terminates playback and signals that a network error has occured. this can be used create a custom error handler related to media
streams. for example, you might have a function that handles media chunk requests, separate from other network requests. ...
...ssible values are: network: terminates playback and signals that a network error has occured. this can be used create a custom error handler related to media
streams. for example, you might have a function that handles media chunk requests, separate from other network requests. when you make an xmlhttprequest call for a media chunk, and onabort or onerror triggers, you might want to call endof
stream('network'), display a descriptive message in the ui, and maybe retry the network request immediately or wait until the network is back up (via some kind of polling.) decode: terminates playback and signals that a decoding error has occured. this can be used to indicate that a parsing error has occured while fetching media data; maybe the data is corrupt, or is encoded using a codec that the bro...
... recommendation initial definition. ...
... recommendation initial definition. ...
MediaStream.getVideoTracks() - Web APIs
the getvideotracks() method of the media
stream interface returns a sequence of media
streamtrack objects representing the video tracks in this
stream. syntax var media
streamtracks[] = media
stream.getvideotracks(); parameters none. return value an array of media
streamtrack objects, one for each video track contained in the media
stream. video tracks are those tracks whose kind property is video. the array is empty if the
stream contains no video tracks. note: the order of the tracks is not defined by the specification, and may not be the same from one call to getvideotracks() to another. ...
... example the following example, extracted from chrome's image capture / photo resolution sample, uses getvideotracks() to retrieve a track for passing to the imagecapture() constructor. ...
...am. video tracks are those tracks whose kind property is video. the array is empty if the
stream contains no video tracks. note: the order of the tracks is not defined by the specification, and may not be the same from one call to getvideotracks() to another. early versions of this api included a special video
streamtrack interface which was used as the type for each entry in the list of video
streams; however, this has since been merged into the main media
streamtrack interface. example the following example, extracted from chrome's image capture / photo resolution sample, uses getvideotracks() to retrieve a track for passing to the imagecapture() constructor. ...
...e type for each entry in the list of video
streams; however, this has since been merged into the main media
streamtrack interface. example the following example, extracted from chrome's image capture / photo resolution sample, uses getvideotracks() to retrieve a track for passing to the imagecapture() constructor. var imagecapture; navigator.mediadevices.getusermedia({video: true}) .then(media
stream => { document.queryselector('video').srcobject = media
stream; const track = media
stream.getvideotracks()[0]; imagecapture = new imagecapture(track); return imagecapture.getphotocapabilities(); }) specifications specification status comment media capture and
streamsthe definition of 'getvideotracks()' in that specification. candidate recommendation initial...
MediaStream.onaddtrack - Web APIs
the media
stream.onaddtrack property is an eventhandler which specifies a function to be called when the addtrack event occurs on a media
stream instance. this happens when a new track of any kind is added to the media
stream. this event is fired when the browser adds a track to the
stream (such as when a rtcpeerconnection is renegotiated or a
stream being captured using htmlmediaelement.capture
stream() gets a new set of tracks because the media element being captured loaded a new source. the addtrack event does not get fired when javascript code explicitly adds tracks to the
stream (by calling addtrack()). ...
...s event is fired when the browser adds a track to the
stream (such as when a rtcpeerconnection is renegotiated or a
stream being captured using htmlmediaelement.capture
stream() gets a new set of tracks because the media element being captured loaded a new source. the addtrack event does not get fired when javascript code explicitly adds tracks to the
stream (by calling addtrack()). syntax media
stream.onaddtrack = eventhandler; value this should be set to a function which you provide that accepts as input a media
streamtrackevent object representing the addtrack event which has occurred. the media
streamtrack representing the track which was added is specified in the event's track property. ...
...)). syntax media
stream.onaddtrack = eventhandler; value this should be set to a function which you provide that accepts as input a media
streamtrackevent object representing the addtrack event which has occurred. the media
streamtrack representing the track which was added is specified in the event's track property. example this example adds a listener which, when a new track is added to the
stream, appends a new item to a list of tracks; the new item shows the track's kind ("audio" or "video") and label. ...
...accepts as input a media
streamtrackevent object representing the addtrack event which has occurred. the media
streamtrack representing the track which was added is specified in the event's track property. example this example adds a listener which, when a new track is added to the
stream, appends a new item to a list of tracks; the new item shows the track's kind ("audio" or "video") and label.
stream.onaddtrack = function(event) { let tracklist = document.getelementbyid("tracks"); let label = document.createelement("li"); label.innerhtml = event.track.kind + ": " + event.track.label; tracklist.appendchild(label); }; specifications specification status comment media capture and
streamsthe definition of 'media
stream.onaddtrack' in that specification. c...
MediaStreamConstraints - Web APIs
if constraints are specified, an audio track is inherently requested. ...
...if constraints are specified, an audio track is inherently requested. ...
...ts work, see capabilities, constraints, and settings. properties some combination—but not necessarily all—of the following properties will exist on the object. track constraints audio either a boolean (which indicates whether or not an audio track is requested) or a mediatrackconstraints object providing the constraints which must be met by the audio track included in the returned media
stream. if constraints are specified, an audio track is inherently requested. video either a boolean (which indicates whether or not a video track is requested) or a mediatrackconstraints object providing the constraints which must be met by the video track included in the returned media
stream. if constraints are specified, a video track is inherently requested. security peeridentity a domstring...
... inherently requested. video either a boolean (which indicates whether or not a video track is requested) or a mediatrackconstraints object providing the constraints which must be met by the video track included in the returned media
stream. if constraints are specified, a video track is inherently requested. security peeridentity a domstring identifying the peer who has sole access to the
stream. if this property is specified, only the indicated peer can receive and use the
stream.
streams isolated in this way can only be displayed in a media element (<audio> or <video>) where the content is protected just as if cors cross-origin rules were in effect. when a peer identity is set, media
streamtracks from that peer have their isolated flag set to true. ...
MediaStreamEvent - Web APIs
the media
streamevent interface represents events that occurs in relation to a media
stream. two events of this type can be thrown: add
stream and remove
stream. properties a media
streamevent being an event, this event also implements these properties. media
streamevent.
stream read only contains the media
stream containing the
stream associated with the event. constructors media
streamevent() returns a new media
streamevent. it takes two parameters, the first being a domstring representing the type of the event; the second a dictionary containing the media
stream it refers to. methods a media
streamevent being an event, this event also implements these properties. there is no specific media
streamevent method. ...
...ed with the event. constructors media
streamevent() returns a new media
streamevent. it takes two parameters, the first being a domstring representing the type of the event; the second a dictionary containing the media
stream it refers to. methods a media
streamevent being an event, this event also implements these properties. there is no specific media
streamevent method. ...
...media
streamevent() returns a new media
streamevent. it takes two parameters, the first being a domstring representing the type of the event; the second a dictionary containing the media
stream it refers to. methods a media
streamevent being an event, this event also implements these properties. there is no specific media
streamevent method. ...
...returns a new media
streamevent. it takes two parameters, the first being a domstring representing the type of the event; the second a dictionary containing the media
stream it refers to. methods a media
streamevent being an event, this event also implements these properties. there is no specific media
streamevent method. ...
MediaStreamTrack: ended event - Web APIs
there are various ways this can happen, including: there is no more data left to send. the user revoked the permissions needed for the data to be sent. the hardware generating the source data has been removed or ejected. a remote peer has permanently stopped sending data; pausing media does not generate an ended event. ...
...there are various ways this can happen, including: there is no more data left to send. the user revoked the permissions needed for the data to be sent. the hardware generating the source data has been removed or ejected. a remote peer has permanently stopped sending data; pausing media does not generate an ended event. ...
...there are various ways this can happen, including: there is no more data left to send. the user revoked the permissions needed for the data to be sent. the hardware generating the source data has been removed or ejected. a remote peer has permanently stopped sending data; pausing media does not generate an ended event. ...
...sing media does not generate an ended event. examples this example sets up an event handler for the ended event, which changes an on-screen icon to indicate that the track is no longer active. track.addeventlistener('ended', () => { let statuselem = document.getelementbyid("status-icon"); statuselem.src = "/images/stopped-icon.png"; }) you can also set up the event handler using the media
streamtrack.onended property: track.onended = function() { let statuselem = document.getelementbyid("status-icon"); statuselem.src = "/images/stopped-icon.png"; } specifications specification status comment media capture and
streamsthe definition of 'ended' in that specification. candidate recommendation initial specification. ...
RTCInboundRtpStreamStats.packetsDuplicated - Web APIs
these duplicate packets are not included in the packetsdiscarded property. usage notes duplicate packets are detected when a packet has the same rtp sequence number as another packet that has previously been processed. ...
...these duplicate packets are not included in the packetsdiscarded property. usage notes duplicate packets are detected when a packet has the same rtp sequence number as another packet that has previously been processed. ...
...these duplicate packets are not included in the packetsdiscarded property. usage notes duplicate packets are detected when a packet has the same rtp sequence number as another packet that has previously been processed. each time a packet is repeated, the value of packetsduplicated is incremented, even if the same packet is received more than twice. ...
...t included in the packetsdiscarded property. usage notes duplicate packets are detected when a packet has the same rtp sequence number as another packet that has previously been processed. each time a packet is repeated, the value of packetsduplicated is incremented, even if the same packet is received more than twice. you can get a more accurate tally of how many packets have been lost on the
stream by adding packetsduplicated to packetslost. the resulting value will be positive, although it will not match the count as computed in rfc 3660. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtp
streamstats.packetsduplicated' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.qpSum - Web APIs
the qpsum property of the rtcinboundrtp
streamstats dictionary is a value generated by adding the quantization parameter (qp) values for every frame sent or received to date on the video track corresponding to this rtcinboundrtp
streamstats object. in general, the higher this number is, the more heavily compressed the video data is. syntax var qpsum = rtcinboundrtp
streamstats.qpsum; value an unsigned 64-bit integer value which indicates the sum of the quantization parameter (qp) value for every frame sent or received so far on the track described by the rtcinboundrtp
streamstats object. since the value of qp is typically larger to indicate higher compression factors, the larger this sum is, the more heavily compressed the
stream generally has been. note: this value is only available for vide...
...ng the data more compressible. the quantization process and the amount of compression can be controlled using one or more parameters. it's important to keep in mind that the value of qp can change periodically—even every frame—so it's difficult to know for certain how substantial the compression is. the best you can do is make an estimate. you can, for example, use the value of rtcreceivedrtp
streamstats.framesdecoded if receiving the media or rtcsentrtp
streamstats.framesencoded if sending it to get the number of frames handled so far, and compute an average from there. see calculating average quantization below for a function that does this. also, the exact meaning of the qp value depends on the codec being used. for example, for the vp8 codec, the qp value can be anywhere from 1 to 127 an...
...e, it's an index used to derive a scaling matrix used during the quantization process. additionally, qp is not likely to be the only parameter the codec uses to adjust the compression. see the individual codec specifications for details. example calculating average quantization the calculateaverageqp() function shown below computes the average qp for the given rtcstats object that contains rtp
stream statistics, returning 0 if the object doesn't describe an rtp
stream. function calculateaverageqp(stats) { let framecount = 0; switch(stats.type) { case "inbound-rtp": case "remote-inbound-rtp": framecount = stats.framesdecoded; break; case "outbound-rtp": case "remote-outbound-rtp": framecount = stats.framesencoded; break; default: return 0...
... candidate recommendation initial definition. ...
RTCOutboundRtpStreamStats.qpSum - Web APIs
the qpsum property of the rtcoutboundrtp
streamstats dictionary is a value generated by adding the quantization parameter (qp) values for every frame this sender has produced to date on the video track corresponding to this rtcoutboundrtp
streamstats object. in general, the higher this number is, the more heavily compressed the video data is. syntax var qpsum = rtcoutboundrtp
streamstats.qpsum; value an unsigned 64-bit integer value which indicates the sum of the quantization parameter (qp) value for every frame sent so far on the track described by the rtcoutboundrtp
streamstats object. since the value of qp is typically larger to indicate higher compression factors, the larger this sum is, the more heavily compressed the
stream generally has been. note: this value is only available for vide...
...all data set, making the data more compressible. the quantization process and the amount of compression can be controlled using one or more parameters. it's important to keep in mind that the value of qp can change periodically—even every frame—so it's difficult to know for certain how substantial the compression is. the best you can do is make an estimate. you can use the value of rtcsentrtp
streamstats.framesencoded to get the number of frames that have been encoded so far, and compute an average from there. see calculating average quantization below for a function that does this. also, the exact meaning of the qp value depends on the codec being used. for example, for the vp8 codec, the qp value can be anywhere from 1 to 127 and is found in the frame header element "y_ac_qi", whose value...
...e, it's an index used to derive a scaling matrix used during the quantization process. additionally, qp is not likely to be the only parameter the codec uses to adjust the compression. see the individual codec specifications for details. example calculating average quantization the calculateaverageqp() function shown below computes the average qp for the given rtcstats object that contains rtp
stream statistics, returning 0 if the object doesn't describe an rtp
stream. function calculateaverageqp(stats) { let framecount = 0; switch(stats.type) { case "inbound-rtp": case "remote-inbound-rtp": framecount = stats.framesdecoded; break; case "outbound-rtp": case "remote-outbound-rtp": framecount = stats.framesencoded; break; default: return 0...
... candidate recommendation initial definition. ...
RTCPeerConnection.onaddstream - Web APIs
the rtcpeerconnection.onadd
stream event handler is a property containing the code to execute when the add
stream event, of type media
streamevent, is received by this rtcpeerconnection. such an event is sent when a media
stream is added to this connection by the remote peer. the event is sent immediately after the call setremotedescription() and doesn't wait for the result of the sdp negotiation. important: this property has been removed from the specification; you should now use rtcpeerconnection.ontrack to watch for track events instead. it is included here in order to help you adapt existing code and understand existing samples, which may not be up-to-date yet. syntax rtcpeerconnection.onadd
stream = eventhandler; value a function which handles add
stream events. these events, of type m...
...t: this property has been removed from the specification; you should now use rtcpeerconnection.ontrack to watch for track events instead. it is included here in order to help you adapt existing code and understand existing samples, which may not be up-to-date yet. syntax rtcpeerconnection.onadd
stream = eventhandler; value a function which handles add
stream events. these events, of type media
streamevent, are sent when
streams are added to the connection by the remote peer. the first time an event occurs may be nearly immediately after the remote end of the connection is set using rtcpeerconnection.setremotedescription(); it doesn't wait for a particular
stream to be accepted or rejected using sdp negotiation. example this code, based on an older version of our signaling and video calling ...
...reams are added to the connection by the remote peer. the first time an event occurs may be nearly immediately after the remote end of the connection is set using rtcpeerconnection.setremotedescription(); it doesn't wait for a particular
stream to be accepted or rejected using sdp negotiation. example this code, based on an older version of our signaling and video calling sample, responds to add
stream events by setting the video source for a <video> element to the
stream specified in the event, and then enabling a "hang up" button in the app's user interface. ...
...ion.setremotedescription(); it doesn't wait for a particular
stream to be accepted or rejected using sdp negotiation. example this code, based on an older version of our signaling and video calling sample, responds to add
stream events by setting the video source for a <video> element to the
stream specified in the event, and then enabling a "hang up" button in the app's user interface. pc.onadd
stream = function(event) { document.getelementbyid("received_video").srcobject = event.
stream; document.getelementbyid("hangup-button").disabled = false; }; you can also use addeventlistener() to add a handler for add
stream events to an rtcpeerconnection. ...
RTCPeerConnection.onremovestream - Web APIs
the remove
stream event has been removed from the webrtc specification in favor of the existing removetrack event on the remote media
stream and the corresponding media
stream.onremovetrack event handler property of the remote media
stream. the rtcpeerconnection api is now track-based, so having zero tracks in the remote
stream is equivalent to the remote
stream being removed and the old remove
stream event. the rtcpeerconnection.onremove
stream event handler is a property containing the code to execute when the remove
stream event, of type media
streamevent, is received by this rtcpeerconnection. such an event is sent when a media
stream is removed from this connection. ...
...in the remote
stream is equivalent to the remote
stream being removed and the old remove
stream event. the rtcpeerconnection.onremove
stream event handler is a property containing the code to execute when the remove
stream event, of type media
streamevent, is received by this rtcpeerconnection. such an event is sent when a media
stream is removed from this connection. syntax peerconnection.onremove
stream = function; values function is the name of a user-defined function, without the () suffix or any parameters, or an anonymous function declaration, such as function(event) {...}. an event handler always has one single parameter, containing the event, here of type media
streamevent. ...
... when a media
stream is removed from this connection. syntax peerconnection.onremove
stream = function; values function is the name of a user-defined function, without the () suffix or any parameters, or an anonymous function declaration, such as function(event) {...}. an event handler always has one single parameter, containing the event, here of type media
streamevent. ...
...s connection. syntax peerconnection.onremove
stream = function; values function is the name of a user-defined function, without the () suffix or any parameters, or an anonymous function declaration, such as function(event) {...}. an event handler always has one single parameter, containing the event, here of type media
streamevent. ...
RTCRemoteOutboundRtpStreamStats.localId - Web APIs
the rtcremoteoutboundrtp
streamstats dictionary's localid property is a string which can be used to identify the rtcinboundrtp
streamstats object whose remoteid matches this value. together, these two objects provide statistics about the inbound and outbound sides of the same synchronization source (ssrc). syntax let localid = rtcremoteoutboundrtp
streamstats.localid; value a domstring which can be compared to the value of an rtcinboundrtp
streamstats object's remoteid property to see if the two represent statistics for each of the two sides of the same set of data received by the local peer. usage notes you can think of the local and remote views of the same rtp
stream as pairs, each of which has a reference back to the other one. thus, if an rtcstatsreport includes an remote-outbound-rtp s...
...stats object's remoteid property to see if the two represent statistics for each of the two sides of the same set of data received by the local peer. usage notes you can think of the local and remote views of the same rtp
stream as pairs, each of which has a reference back to the other one. thus, if an rtcstatsreport includes an remote-outbound-rtp statistics object (of type rtcremoteoutboundrtp
streamstats), it should also have a corresponding inbound-rtp object. both of these provide information about the same batch of packets being transmitted from the remote peer to the local device. the difference is that remote-outbound-rtp describes statistics about the transmission(s) from the perspective of the remote peer, while inbound-rtp offers statistics about the incoming data from the local pee...
...erated type to objects of the corresponding rtcstats-based type. now we can begin to process the results, starting with the ending statistics found in endreport. in this case, we're looking for statistics records whose type is remote-outbound-rtp, so we iterate over the entries in the statistics report until we find an entry of that type. this object is, specifically, of type rtcremoteoutboundrtp
streamstats, and it provides statistics giving details about the state of things from the perspective of the remote peer. this statistics record is stored in endremoteoutbound. once the ending remote-outbound-rtp record is found, we use its id property to get its id. with that in hand, we can look up the remote-outbound-rtp record in the starting statistics record (startreport), which we store into sta...
...hat's much time we're waiting between calling networkteststart() and networkteststop()). try it and fork it this example is available on glitch for you to try out, examine, or remix. you can also access it directly using glitch's git server. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcremoteoutboundrtp
streamstats.localid' in that specification. candidate recommendation initial definition. ...
RTCRtpSender.setStreams() - Web APIs
the rtcrtpsender method set
streams() associates the sender's track with the specified media
stream or array of media
stream objects. syntax rtcrtpsender.set
streams(media
stream); rtcrtpsender.set
streams([media
stream...]); parameters media
stream or [media
stream...] optional an media
stream object—or an array of multiple media
stream objects—identifying the
streams to which the rtcrtpsender's track belongs. if this parameter isn't specified, no new
streams will be associated with the track. return value none. exceptions invalidstateerror the sender's connection is closed. description set
streams() is purely additive. it doesn't remove the track from any
streams; it simply adds it to new ones. if you specify
streams to which the track already belongs, that
stream is unaffected. o...
...d, no new
streams will be associated with the track. return value none. exceptions invalidstateerror the sender's connection is closed. description set
streams() is purely additive. it doesn't remove the track from any
streams; it simply adds it to new ones. if you specify
streams to which the track already belongs, that
stream is unaffected. once the track has been added to all of the
streams, renegotiation of the connection will be triggered by the negotiationneeded event being dispatched to the rtcpeerconnection to which the sender belongs. example this example adds all of an rtcpeerconnection's tracks to the specified
stream. ...
...you specify
streams to which the track already belongs, that
stream is unaffected. once the track has been added to all of the
streams, renegotiation of the connection will be triggered by the negotiationneeded event being dispatched to the rtcpeerconnection to which the sender belongs. example this example adds all of an rtcpeerconnection's tracks to the specified
stream. function addtracksto
stream(
stream) { let senders = pc.getsenders(); senders.foreach((sender) => { if (sender.track && (sender.transport.state === connected)) { sender.set
streams(
stream); } }); } after calling the rtcpeerconnection method getsenders() to get the list of the connection's senders, the addtracksto
stream() function iterates over the list. for each sender, if the sender's track is non-null...
...rs.foreach((sender) => { if (sender.track && (sender.transport.state === connected)) { sender.set
streams(
stream); } }); } after calling the rtcpeerconnection method getsenders() to get the list of the connection's senders, the addtracksto
stream() function iterates over the list. for each sender, if the sender's track is non-null and its transport's state is connected, we call set
streams() to add the track to the
stream specified. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsender.set
streams()' in that specification. candidate recommendation ...
ReadableStream.cancel() - Web APIs
the cancel() method of the readable
stream interface cancels the associated
stream. the supplied reason parameter will be given to the underlying source, which may or may not use it. cancel is used when you've completely finished with the
stream and don't need any more data from it, even if there are chunks enqueued waiting to be read. that data is lost after cancel is called, and the
stream is not readable any more. to read those chunks still and not completely get rid of the
stream, you'd use readable
streamdefaultcontroller.close(). syntax var promise = readable
stream.cancel(reason); parameters reason a domstring providing a human-readable reason for the cancellation. return value a promise, which fulfills with the value given in the reason parameter. exceptions typeerror the s...
...ot completely get rid of the
stream, you'd use readable
streamdefaultcontroller.close(). syntax var promise = readable
stream.cancel(reason); parameters reason a domstring providing a human-readable reason for the cancellation. return value a promise, which fulfills with the value given in the reason parameter. exceptions typeerror the
stream you are trying to cancel is not a readable
stream, or it is locked. examples in jake archibald's cancelling a fetch example, a
stream is used to fetch the whatwg html spec chunk by chunk; each chunk is searched for the string "service workers". when the search terms is found, cancel() is used to cancel the
stream — the job is finished so it is no longer needed. var searchterm = "service workers"; // chars to show either side of the result ...
... if (matchfoundat === -1) { matchfoundat = (caseinsensitive ? buffer.tolowercase() : buffer).indexof(tomatch); } if (matchfoundat === -1) { buffer = buffer.slice(-buffersize); } else if (buffer.slice(matchfoundat + tomatch.length).length >= contextafter) { console.log("here's the match:") co...
... living standard initial definition. ...
DASH Adaptive Streaming for HTML 5 Video - HTML: Hypertext Markup Language
browser support firefox 21 includes an implementation of dash for html5 webm video which is turned off by default. it can be enabled via "about:config" and the "media.dash.enabled" preference. firefox 23 removed support for dash for html5 webm video. it will be replaced by an implementation of the media source extensions api which will allow support for dash via javascript libraries such as dash.js. see bug 778617 for details. ...
...ing video files in various bit rates. to start with you'll only need the ffpmeg program from ffmpeg.org, with libvpx and libvorbis support for webm video and audio, at least version 2.5 (probably; this was tested ith 3.2.5). 1. use your existing webm file to create one audio file and multiple video files. for example: the file in.video can be any container with at least one audio and one video
stream that can be decoded by ffmpeg, create the audio using: ffmpeg -i in.video -vn -acodec libvorbis -ab 128k -dash 1 my_audio.webm create each video variant. ffmpeg -i in.video -c:v libvpx-vp9 -keyint_min 150 -g 150 -tile-columns 4 -frame-parallel 1 -f webm -dash 1 \ -an -vf scale=160:90 -b:v 250k -dash 1 video_160x90_250k.webm ffmpeg -i in.video -c:v libvpx-vp9 -keyint_min 150 -g 150 -tile-c...
...m 2. create the manifest file: ffmpeg \ -f webm_dash_manifest -i video_160x90_250k.webm \ -f webm_dash_manifest -i video_320x180_500k.webm \ -f webm_dash_manifest -i video_640x360_750k.webm \ -f webm_dash_manifest -i video_1280x720_1500k.webm \ -f webm_dash_manifest -i my_audio.webm \ -c copy \ -map 0 -map 1 -map 2 -map 3 -map 4 \ -f webm_dash_manifest \ -adaptation_sets "id=0,
streams=0,1,2,3 id=1,
streams=4" \ my_video_manifest.mpd the -map arguments correspond to the input files in the sequence they are given; you should have one for each file. the -adaptation_sets argument assigns them into adaptation sets; for example, this creates one set (0) that contains the
streams 0, 1, 2 and 3 (the videos), and another set (1) that contains only
stream 4, the audio
stream. put t...
...les with mimetype="application/dash+xml", then you're all set. using dash - client side you'll want to modify your web page to point to the dash manifest first, instead of directly to a particular video file: <video> <source src="movie.mpd"> <source src="movie.webm"> your browser does not support the video tag. </video> that's it! if dash is supported by the browser, your video will now
stream adaptively. links webm dash specification at the webm project dash industry forum webm project description of how to create dash files with ffmpeg ...
DisplayMediaStreamConstraints - Web APIs
the displaymedia
streamconstraints dictionary is used to specify whether or not to include video and/or audio tracks in the media
stream to be returned by getdisplaymedia(), as well as what type of processing must be applied to the tracks. processing information is specified using mediatrackconstraints objects providing options which are applied to the track after the media data is received but before it is made available on the media
stream. properties audio a boolean or mediatrackconstraints value; if a boolean, this value simply indicates whether or not to include an audio track in the media
stream returned by getdisplaymedia(). ...
... which are applied to the track after the media data is received but before it is made available on the media
stream. properties audio a boolean or mediatrackconstraints value; if a boolean, this value simply indicates whether or not to include an audio track in the media
stream returned by getdisplaymedia(). if a mediatrackconstraints object is provided here, an audio track is included in the
stream, but the audio is processed to match the specified constraints after being retrieved from the hardware but before being added to the media
stream. the default value is false. video if true (the default), the display contents are included in a media
streamtrack within the
stream provided by getdisplaymedia(). optionally, a mediatrackconstraints object may be given, providing options specifying pro...
...ter being retrieved from the hardware but before being added to the media
stream. the default value is false. video if true (the default), the display contents are included in a media
streamtrack within the
stream provided by getdisplaymedia(). optionally, a mediatrackconstraints object may be given, providing options specifying processing to be performed on the video data before adding it to the
stream. a value of false is not permitted, and results in a typeerror being thrown. specifications specification status comment unknownthe definition of 'displaymedia
streamconstraints' in that specification. unknown initial definition ...
HTMLMediaElement.captureStream() - Web APIs
the capture
stream() property of the htmlmediaelement interface returns a media
stream object which is
streaming a real-time capture of the content being rendered in the media element. this can be used, for example, as a source for a webrtc rtcpeerconnection. syntax var media
stream = mediaelement.capture
stream() parameters none. return value a media
stream object which can be used as a source for audio and/or video data by other media processing code, or as a source for webrtc. example in this example, an event handler is established so that clicking a button starts capturing the contents of a media element with the id "playback" into a media
stream. ...
...var media
stream = mediaelement.capture
stream() parameters none. return value a media
stream object which can be used as a source for audio and/or video data by other media processing code, or as a source for webrtc. example in this example, an event handler is established so that clicking a button starts capturing the contents of a media element with the id "playback" into a media
stream. the
stream can then be used for other purposes—like a source for
streaming over webrtc, to allow sharing prerecorded videos with another person during a video call. ...
...ng the contents of a media element with the id "playback" into a media
stream. the
stream can then be used for other purposes—like a source for
streaming over webrtc, to allow sharing prerecorded videos with another person during a video call. document.queryselector('.playandrecord').addeventlistener('click', function() { var playbackelement = document.getelementbyid("playback"); var capture
stream = playbackelement.capture
stream(); playbackelement.play(); }); see recording a media element for a longer and more intricate example and explanation. specifications specification status comment media capture from dom elementsthe definition of 'capture
stream()' in that specification. working draft initial definition. ...
MediaStream.getAudioTracks() - Web APIs
the getaudiotracks() method of the media
stream interface returns a sequence that represents all the media
streamtrack objects in this
stream's track set where media
streamtrack.kind is audio. syntax var media
streamtracks = media
stream.getaudiotracks() parameters none. return value an array of media
streamtrack objects, one for each audio track contained in the
stream. audio tracks are those tracks whose kind property is audio. the array is empty if the
stream contains no audio tracks. note: the order of the returned tracks is not defined by the specification and may, in fact, change from one call to getaudiotracks() to the next. ...
...of media
streamtrack objects, one for each audio track contained in the
stream. audio tracks are those tracks whose kind property is audio. the array is empty if the
stream contains no audio tracks. note: the order of the returned tracks is not defined by the specification and may, in fact, change from one call to getaudiotracks() to the next. early versions of this api included a special audio
streamtrack interface which was used as the type for each entry in the list of audio
streams; however, this has since been merged into the main media
streamtrack interface. example this example gets a webcam's audio and video in a
stream using getusermedia(), attaches the
stream to a <video> element, then sets a timer that, upon expiring, will stop the first audio track found on the
stream. navigator.
...list of audio
streams; however, this has since been merged into the main media
streamtrack interface. example this example gets a webcam's audio and video in a
stream using getusermedia(), attaches the
stream to a <video> element, then sets a timer that, upon expiring, will stop the first audio track found on the
stream. navigator.mediadevices.getusermedia({audio: true, video: true}) .then(media
stream => { document.queryselector('video').srcobject = media
stream; // stop the audio
stream after 5 seconds settimeout(() => { const tracks = media
stream.getaudiotracks() tracks[0].stop() }, 5000) }) specifications specification status comment media capture and
streamsthe definition of 'getaudiotracks()' in that specification. candidate recommendation ...
MediaStreamAudioDestinationNode - Web APIs
the media
streamaudiodestinationnode interface represents an audio destination consisting of a webrtc media
stream with a single audiomedia
streamtrack, which can be used in a similar way to a media
stream obtained from navigator.getusermedia. it is an audionode that acts as an audio destination, created using the audiocontext.createmedia
streamdestination method. number of inputs 1 number of outputs 0 channel count 2 channel count mode "explicit" channel count interpretation "speakers" constructor media
streamaudiodestinationnode.media
streamaudiodestinationnode() creates a new media
streamaudiodestinationnode object instance. properties inherits properties from its parent, audionode. ...
... number of inputs 1 number of outputs 0 channel count 2 channel count mode "explicit" channel count interpretation "speakers" constructor media
streamaudiodestinationnode.media
streamaudiodestinationnode() creates a new media
streamaudiodestinationnode object instance. properties inherits properties from its parent, audionode. media
streamaudiodestinationnode.
stream is a media
stream containing a single audiomedia
streamtrack with the same number of channels as the node itself. you can use this property to get a
stream out of the audio graph and feed it into another construct, such as a media recorder. methods inherits methods from its parent, audionode. example specification specification status comment ...
...ream containing a single audiomedia
streamtrack with the same number of channels as the node itself. you can use this property to get a
stream out of the audio graph and feed it into another construct, such as a media recorder. methods inherits methods from its parent, audionode. example specification specification status comment web audio apithe definition of 'media
streamaudiodestinationnode' in that specification. working draft ...
MediaStreamTrack.enabled - Web APIs
this can be used to intentionally mute a track. when enabled, a track's data is output from the source to the destination; otherwise, empty frames are output. in the case of audio, a disabled track generates frames of silence (that is, frames in which every sample's value is 0). for video tracks, every frame is filled entirely with black pixels. ...
...lse] value when true, enabled indicates that the track is permitted to render its actual media to the output. when enabled is set to false, the track only generates empty frames. empty audio frames have every sample's value set to 0. empty video frames have every pixel set to black. note: when implementing a mute/unmute feature, you should use the enabled property. usage notes if the media
streamtrack represents the video input from a camera, disabling the track by setting enabled to false also updates device activity indicators to show that the camera is not currently recording or
streaming. for example, the green "in use" light next to the camera in imac and macbook computers turns off while the track is muted in this way. example this example demonstrates a click event handler for a ...
... candidate recommendation initial specification. ...
MediaStreamTrack: mute event - Web APIs
the mute event is sent to a media
streamtrack when the track's source is temporarily unable to provide media data. when the track is once again able to produce media output, an unmute event is sent. during the time between the mute event and the unmute event, the value of the track's muted property is true. note: the condition that most people think of as "muted" (that is, a user-toggled state of silencing a track) is actually managed using the media
streamtrack.enabled property, for which there are no events. bubbles no cancelable no interface event event handler property onmute examples in this example, event handlers are established for the mute and unmute events in order to detect when the media is not flowing from the source for th...
...a track) is actually managed using the media
streamtrack.enabled property, for which there are no events. bubbles no cancelable no interface event event handler property onmute examples in this example, event handlers are established for the mute and unmute events in order to detect when the media is not flowing from the source for the media
streamtrack referenced by musictrack. musictrack.addeventlistener("mute", event => { document.getelementbyid("timeline-widget").style.backgroundcolor = "#aaa"; }, false); musictrack.addeventlistener("unmute", event => { document.getelementbyid("timeline-widget").style.backgroundcolor = "#fff"; }, false); with these event handlers in place, when the track musictrack enters its muted state, the ele...
...able for setting up a handler for the unmute event. the following example shows this: musictrack.onmute = event => { document.getelementbyid("timeline-widget").style.backgroundcolor = "#aaa"; } musictrack.mute = event = > { document.getelementbyid("timeline-widget").style.backgroundcolor = "#fff"; } specifications specification status comment media capture and
streamsthe definition of 'mute' in that specification. candidate recommendation initial specification. ...
MediaStreamTrack.onended - Web APIs
the event handler function receives a single parameter: the event object, which is a simple event object. examples this example sets up an event handler for the ended event which changes an on-screen icon to indicate that the track is no longer active. ...
...the event handler function receives a single parameter: the event object, which is a simple event object. ...
...event object. examples this example sets up an event handler for the ended event which changes an on-screen icon to indicate that the track is no longer active. track.onended = function(event) { let statuselem = document.getelementbyid("status-icon"); statuselem.src = "/images/stopped-icon.png"; } specifications specification status comment media capture and
streamsthe definition of 'media
streamtrack.onended' in that specification. candidate recommendation initial specification. ...
MediaStreamTrack.onunmute - Web APIs
the event handler receives as input a single parameter: an event whose kind is "unmute". example this example creates an unmute event handler which changes the state of a visual indicator to display the emoji character representing a "speaker" icon. ...
...the event handler receives as input a single parameter: an event whose kind is "unmute". example this example creates an unmute event handler which changes the state of a visual indicator to display the emoji character representing a "speaker" icon. ...
...s as input a single parameter: an event whose kind is "unmute". example this example creates an unmute event handler which changes the state of a visual indicator to display the emoji character representing a "speaker" icon. mytrack.onunmute = function(evt) { playstateicon.innerhtml = "🔈"; }; specifications specification status comment media capture and
streamsthe definition of 'media
streamtrack.onunmute' in that specification. candidate recommendation initial specification. ...
MediaStreamTrackEvent - Web APIs
the media
streamtrackevent interface represents events which indicate that a media
stream has had tracks added to or removed from the
stream through calls to media
stream api methods. these events are sent to the
stream when these changes occur. <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-a...
...eight="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/media
streamtrackevent" target="_top"><rect x="116" y="1" width="210" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="221" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">media
streamtrackevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} the events base...
...-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">media
streamtrackevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} the events based on this interface are addtrack and removetrack properties also inherits properties from its parent interface, event. track read only a media
streamtrack object representing the track which was added to the
stream. constructor media
streamtrackevent() constructs a new media
streamtrackevent with the specified configuration. methods also inherits methods from its parent event. specifications specification status comment media capture and
streamsthe definition of 'media
streamtrackevent' in that specification. ...
RTCDataChannel.stream - Web APIs
the deprecated (and never part of the official specification) read-only rtcdatachannel property
stream returns an id number (between 0 and 65,535) which uniquely identifies the rtcdatachannel. this id is set at the time the data channel is created, either by the user agent (if rtcdatachannel.negotiated is false) or by the site or app script (if negotiated is true). this property has been replaced with the rtcdatachannel.id property. if you have code that uses
stream, you will need to update, since browsers have begun to remove support for
stream. syntax var
stream = adatachannel.
stream; value an unsigned short value (that is, an integer between 0 and 65,535) which uniquely identifies the data channel. example var datachannel = pc.createdatachannel("samplechannel"); console.log("da...
...cdatachannel.id property. if you have code that uses
stream, you will need to update, since browsers have begun to remove support for
stream. syntax var
stream = adatachannel.
stream; value an unsigned short value (that is, an integer between 0 and 65,535) which uniquely identifies the data channel. ...
...f you have code that uses
stream, you will need to update, since browsers have begun to remove support for
stream. syntax var
stream = adatachannel.
stream; value an unsigned short value (that is, an integer between 0 and 65,535) which uniquely identifies the data channel. ...
RTCInboundRtpStreamStats.averageRtcpInterval - Web APIs
the averagertcpinterval property of the rtcinboundrtp
streamstats dictionary is a floating-point value indicating the average rtcp transmission interval, in seconds. the rtcp interval is the amount of time that should elapse between transmissions of rtcp packets. syntax var averagertcpinterval = rtcinboundrtp
streamstats.averagertcpinterval; value a floating-point value indicating the average interval, in seconds, between transmissions of rtcp packets. this interval is computed following the formula outlined in rfc 1889: a.7. because the interval's value is determined in part by the number of active senders, it will be different for each user of a service. ...
...l; value a floating-point value indicating the average interval, in seconds, between transmissions of rtcp packets. this interval is computed following the formula outlined in rfc 1889: a.7. because the interval's value is determined in part by the number of active senders, it will be different for each user of a service. since this value is also used to determine the number of seconds after a
stream starts to flow before the first rtcp packet should be sent, the result is that if many users try to start using the service at the same time, the server won't be flooded with rtcp packets coming in all at once. the sending endpoint computes this value when sending compound rtcp packets, which must contain at least an rtcp rr or sr packet and an sdes packet with the cname item. specifications ...
...e at the same time, the server won't be flooded with rtcp packets coming in all at once. the sending endpoint computes this value when sending compound rtcp packets, which must contain at least an rtcp rr or sr packet and an sdes packet with the cname item. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtp
streamstats.averagertcpinterval' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.fecPacketsReceived - Web APIs
forward error correction uses an exclusive-or method to perform parity checks on the received data. ...
...forward error correction uses an exclusive-or method to perform parity checks on the received data. ...
...received fec packet. this may also happen if the fec packet arrives outside the window of time in which the client will attempt to use it. if you wish to know how many of the received packets were discarded, you can examine the value of fecpacketsdiscarded. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtp
streamstats.fecpacketsreceived' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.perDscpPacketsReceived - Web APIs
each key is the string representation of a single differentiated services code point (dscp)'s id number. ...
...each key is the string representation of a single differentiated services code point (dscp)'s id number. note: due to network bleaching and remapping, the numbers seen on this record are not necessarily going to match the values as they were when the data was sent. ...
...s the string representation of a single differentiated services code point (dscp)'s id number. note: due to network bleaching and remapping, the numbers seen on this record are not necessarily going to match the values as they were when the data was sent. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtp
streamstats.perdscppacketsreceived' in that specification. candidate recommendation initial definition. ...
RTCOutboundRtpStreamStats.averageRtcpInterval - Web APIs
the averagertcpinterval property of the rtcoutboundrtp
streamstats dictionary is a floating-point value indicating the average time that should pass between transmissions of rtcp packets on this
stream. syntax var averagertcpinterval = rtcoutboundrtp
streamstats.averagertcpinterval; value a floating-point value indicating the average interval, in seconds, between transmissions of rtcp packets. this interval is computed following the formula outlined in rfc 1889: a.7. because the interval's value is determined in part by the number of active senders, it will be different for each user of a service. ...
...l; value a floating-point value indicating the average interval, in seconds, between transmissions of rtcp packets. this interval is computed following the formula outlined in rfc 1889: a.7. because the interval's value is determined in part by the number of active senders, it will be different for each user of a service. since this value is also used to determine the number of seconds after a
stream starts to flow before the first rtcp packet should be sent, the result is that if many users try to start using the service at the same time, the server won't be flooded with rtcp packets coming in all at once. the sending endpoint computes this value when sending compound rtcp packets, which must contain at least an rtcp rr or sr packet and an sdes packet with the cname item. specifications ...
... at the same time, the server won't be flooded with rtcp packets coming in all at once. the sending endpoint computes this value when sending compound rtcp packets, which must contain at least an rtcp rr or sr packet and an sdes packet with the cname item. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtp
streamstats.averagertcpinterval' in that specification. candidate recommendation initial definition. ...
RTCOutboundRtpStreamStats.perDscpPacketsSent - Web APIs
each key is the string representation of a single differentiated services code point (dscp)'s id number. ...
...each key is the string representation of a single differentiated services code point (dscp)'s id number. note: due to network bleaching and remapping, the numbers seen on this record are not necessarily going to match the values as they were when the data was sent. ...
... the string representation of a single differentiated services code point (dscp)'s id number. note: due to network bleaching and remapping, the numbers seen on this record are not necessarily going to match the values as they were when the data was sent. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtp
streamstats.perdscppacketssent' in that specification. candidate recommendation initial definition. ...
RTCOutboundRtpStreamStats.pliCount - Web APIs
the plicount property of the rtcoutboundrtp
streamstats dictionary states the number of times the remote peer's rtcrtpreceiver sent a picture loss indication (pli) packet to the rtcrtpsender for which this object provides statistics. a pli packet indicates that some amount of encoded video data has been lost for one or more frames. syntax var plicount = rtcoutboundrtp
streamstats.plicount; value an integer value indicating the number of times a pli packet was sent to this sender by the remote peer's rtcrtpreceiver. these are sent by the receiver's decoder to notify the sender's encoder that an undefined amount of coded video data, which may span frame boundaries, has been lost. note: this property is only used for video
streams. usage notes upon receiving a pli packet, the sender may hav...
...ned amount of coded video data, which may span frame boundaries, has been lost. note: this property is only used for video
streams. usage notes upon receiving a pli packet, the sender may have responded by sending a full frame to the remote peer to allow it to re-synchronize with the media. however, the primary purpose of a pli packet is to allow the rtcrtpsender for which this rtcoutboundrtp
streamstats object provides statistics to consider techniques to mitigate network performance issues. this is often achieved by methods such as increasing the compression or lowering resolution, although the mechanisms available to reduce the bit rate of the
stream vary from codec to codec. specifications specification status comment identifiers for webrtc's statistics apithe d...
...tics to consider techniques to mitigate network performance issues. this is often achieved by methods such as increasing the compression or lowering resolution, although the mechanisms available to reduce the bit rate of the
stream vary from codec to codec. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtp
streamstats.plicount' in that specification. candidate recommendation initial definition. ...
RTCOutboundRtpStreamStats.qualityLimitationReason - Web APIs
the qualitylimitationreason property of the rtcoutboundrtp
streamstats dictionary is a string indicating the reason why the media quality in the
stream is currently being reduced by the codec during encoding, or none if no quality reduction is being performed. this quality reduction may include changes such as reduced frame rate or resolution, or an increase in compression factor. the amount of time the encoded media has had its quality reduced in each of the potential ways that can be done can be found in qualitylimitationdurations. ...
...ring encoding, or none if no quality reduction is being performed. this quality reduction may include changes such as reduced frame rate or resolution, or an increase in compression factor. the amount of time the encoded media has had its quality reduced in each of the potential ways that can be done can be found in qualitylimitationdurations. syntax var qualitylimitationreason = rtcoutboundrtp
streamstats.qualitylimitationreason; value a map whose keys are domstrings whose values come from the rtcqualitylimitationreason enumerated type, and whose values are the duration of the media, in seconds, whose quality was reduced for that reason. examples specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundr...
... candidate recommendation initial definition. ...
RTCOutboundRtpStreamStats.sliCount - Web APIs
the slicount property of the rtcoutboundrtp
streamstats dictionary indicates how many slice loss indication (sli) packets the rtcrtpsender received from the remote rtcrtpreceiver for the rtp
stream described by this object. an sli packet is used by a decoder to let the encoder (the sender) know that it's detected corruption of one or more consecutive macroblocks, in scan order, in the received media.in general, what's usually of interest is that the higher this number is, the more the
stream data is becoming corrupted between the sender and the receiver, causing the receiver to request retransmits or to drop frames entirely. ...
...ncoder (the sender) know that it's detected corruption of one or more consecutive macroblocks, in scan order, in the received media.in general, what's usually of interest is that the higher this number is, the more the
stream data is becoming corrupted between the sender and the receiver, causing the receiver to request retransmits or to drop frames entirely. syntax var slicount = rtcoutboundrtp
streamstats.slicount; value an unsigned integer indicating the number of sli packets the sender received from the receiver due to lost runs of macroblocks. a high value of slicount may be an indication of an unreliable network. this is a very technical part of how video codecs work. for details, see rfc 4585: 6.3.2. note: this value is only present for video media. specifications specif...
...receiver due to lost runs of macroblocks. a high value of slicount may be an indication of an unreliable network. this is a very technical part of how video codecs work. for details, see rfc 4585: 6.3.2. note: this value is only present for video media. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtp
streamstats.slicount' in that specification. candidate recommendation initial definition. ...
RTCRemoteOutboundRtpStreamStats.remoteTimestamp - Web APIs
this is different from the value timestamp, which gives the time at which the statistics were generated or received by the local peer. if this property is present, it comes from the rtcp sender report (sr) block, which reflects the clock on the remote peer at the time the message was sent. ...
...this is different from the value timestamp, which gives the time at which the statistics were generated or received by the local peer. if this property is present, it comes from the rtcp sender report (sr) block, which reflects the clock on the remote peer at the time the message was sent. ...
...reflects the clock on the remote peer at the time the message was sent. keep in mind that this means the clock may not be synchronized with the local clock, and that both the current time and the pace at which the clock runs may differ to some extent. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcremoteoutboundrtp
streamstats.remotetimestamp' in that specification. candidate recommendation initial definition. ...
RTCRemoteOutboundRtpStreamStats - Web APIs
the webrtc statistics model's rtcremoteoutboundrtp
streamstats dictionary extends the underlying rtcsentrtp
streamstats dictionary with properties measuring metrics specific to outgoing rtp
streams. properties in addition to the properties defined by rtcsentrtp
streamstats and its underlying rtcrtp
streamstats and rtcstats dictionaries, rtcremoteoutboundrtp
streamstats defines the following properties. localid a domstring which is used to find the local rtcinboundrtp
streamstats object which shares the same synchronization source (ssrc). remotetimestamp a domhighrestimestamp specifying the timestamp (on the remote device) at which the statistics in the rtcremoteoutboundrtp
streamstats object were sent by the remote endpoint. this is different from the timestamp found in the base rtcstats dicti...
...be aware that the remote clock may not be synchronized with the local clock (either in current time or speed at which time elapses). ...
... candidate recommendation initial definition. ...
RTCRtpStreamStats.pliCount - Web APIs
the plicount property of the rtcrtp
streamstats dictionary states the number of times the
stream's receiving end sent a picture loss indication (pli) packet to the sender. a pli packet indicates that some amount of encoded video data has been lost for one or more frames. syntax var plicount = rtcrtp
streamstats.plicount; value an integer value indicating the number of times a pli packet was sent by the
stream's receiver to the sender. a pli message is used by video decoders (running on the receiving end of the
stream) to notify the encoder (the sender) that an undefined amount of coded video data, which may span frame boundaries, has been lost. this may trigger the sender to send a full frame in order to allow the receiver to re-synchronize, since lost data may be an irrecoverable situation...
...frame in order to allow the receiver to re-synchronize, since lost data may be an irrecoverable situation for decoding media. however, the primary purpose of this message is to allow the sender to consider techniques to mitigate network performance issues. this is often achieved by methods such as increasing the compression, lowering resolution, or finding other ways to reduce the bit rate of the
stream. note: this value is only available on the receiver, and only for video media. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtp
streamstats: plicount' in that specification. candidate recommendation initial definition. identifiers for webrtc's statistics apithe definition of 'rtcoutboundr...
... note: this value is only available on the receiver, and only for video media. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtp
streamstats: plicount' in that specification. candidate recommendation initial definition. identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtp
streamstats: plicount' in that specification. candidate recommendation initial definition. ...
RTCRtpStreamStats.sliCount - Web APIs
a high value of slicount may be an indication of an unreliable network. for technical details, see rfc 4585: 6.3.2. note: this value is sent by the sender to the receiver and is only present for video media. ...
...a high value of slicount may be an indication of an unreliable network. for technical details, see rfc 4585: 6.3.2. note: this value is sent by the sender to the receiver and is only present for video media. ...
... the receiver due to lost runs of macroblocks. a high value of slicount may be an indication of an unreliable network. for technical details, see rfc 4585: 6.3.2. note: this value is sent by the sender to the receiver and is only present for video media. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtp
streamstats: slicount' in that specification. candidate recommendation initial definition. identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtp
streamstats: slicount' in that specification. candidate recommendation initial definition. ...
ReadableStreamDefaultController.error() - Web APIs
the error() method of the readable
streamdefaultcontroller interface causes any future interactions with the associated
stream to error. note: the error() method can be called more than once, and can be called when the
stream is not readable. syntax readable
streamdefaultcontroller.error(e); parameters e the error you want future interactions to fail with. return value undefined. exceptions typeerror the source object is not a readable
streamdefaultcontroller, or the
stream is not readable for some other reason. ...
...od can be called more than once, and can be called when the
stream is not readable. syntax readable
streamdefaultcontroller.error(e); parameters e the error you want future interactions to fail with. return value undefined. exceptions typeerror the source object is not a readable
streamdefaultcontroller, or the
stream is not readable for some other reason. examples the a readable
stream with an underlying push source and backpressure support example in the spec provides a good example of using readable
streamdefaultcontroller.desiredsize to manually detect when the
stream is full and apply backpressure, and also of using error() to manually trigger a
stream error if another part of the system it relies on fails. specifications specification status comment ...
...ith an underlying push source and backpressure support example in the spec provides a good example of using readable
streamdefaultcontroller.desiredsize to manually detect when the
stream is full and apply backpressure, and also of using error() to manually trigger a
stream error if another part of the system it relies on fails. specifications specification status comment
streamsthe definition of 'error()' in that specification. living standard initial definition. ...
WritableStreamDefaultWriter.abort() - Web APIs
the abort() method of the writable
streamdefaultwriter interface aborts the
stream, signaling that the producer can no longer successfully write to the
stream and it is to be immediately moved to an error state, with any queued writes discarded. if the writer is active, the abort() method behaves the same as that for the associated
stream (writable
stream.abort()). if not, it returns a rejected promise. syntax var promise = writable
streamdefaultwriter.abort(reason); parameters reason optional a domstring representing a human-readable reason for the abort. return value a promise, which fulfills with the value given in the reason parameter. exceptions typeerror the
stream you are trying to abort is not a writable
stream, or it is locked. ...
... a rejected promise. syntax var promise = writable
streamdefaultwriter.abort(reason); parameters reason optional a domstring representing a human-readable reason for the abort. return value a promise, which fulfills with the value given in the reason parameter. exceptions typeerror the
stream you are trying to abort is not a writable
stream, or it is locked. examples const writable
stream = new writable
stream({ write(chunk) { ... }, close() { ... }, abort(err) { ... } }, queuingstrategy); ... const writer = writable
stream.getwriter(); ... ...
...promise, which fulfills with the value given in the reason parameter. exceptions typeerror the
stream you are trying to abort is not a writable
stream, or it is locked. examples const writable
stream = new writable
stream({ write(chunk) { ... }, close() { ... }, abort(err) { ... } }, queuingstrategy); ... const writer = writable
stream.getwriter(); ... // abort the
stream when desired writer.abort.then((reason) => { console.log(reason); }) specifications specification status comment
streamsthe definition of 'abort()' in that specification. living standard initial definition. ...
WritableStreamDefaultWriter.ready - Web APIs
the ready read-only property of the writable
streamdefaultwriter interface returns a promise that resolves when the desired size of the
stream's internal queue transitions from non-positive to positive, signaling that it is no longer applying backpressure. syntax var promise = writable
streamdefaultwriter.ready; value a promise. example the following example shows two uses of the ready property. the first uses ready to ensure that the writable
stream is done writing and thus able to receive data before sending a binary chunk. the second also checks whether the the writable
stream is done writing, but this time because the writing must be finished before the writer can be closed. ...
...se. example the following example shows two uses of the ready property. the first uses ready to ensure that the writable
stream is done writing and thus able to receive data before sending a binary chunk. the second also checks whether the the writable
stream is done writing, but this time because the writing must be finished before the writer can be closed. function sendmessage(message, writable
stream) { // defaultwriter is of type writable
streamdefaultwriter var defaultwriter = writable
stream.getwriter(); var encoder = new textencoder(); var encoded = encoder.encode(message, {
stream: true}); encoded.foreach(function(chunk) { // make sure the
stream and its writer are able to // receive data. defaultwriter.ready .then(function() { defaultwriter.write(chunk) ...
... }) .catch(function(err) { console.log("chunk error: " + err); }); }); // call ready again to ensure that all chunks are written // before closing the writer. defaultwriter.ready .then(function() { defaultwriter.close() .then(function() { console.log("all chunks written"); }) .catch(function(err) { console.log("
stream error: " + err); }); }); }); } specifications specification status comment
streamsthe definition of 'ready' in that specification. living standard initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/brows...
nsIFileOutputStream
netwerk/base/public/nsifile
streams.idlscriptable this interface is an output
stream that lets you
stream to a file. inherits from: nsioutput
stream last changed in gecko 1.7 method overview void init(in nsifile file, in long ioflags, in long perm, in long behaviorflags); constants behavior flag constants constant value description defer_open 1<<0 see the same constant in nsifileinput
stream. the deferred open will be performed when one of the following is called: seek() tell() write() flush() defer_open is useful if we use the
stream on a background thread, so that the opening and possible stating of the file happens there as well. ...
...are listed in the pr_open() documentation. use -1 to open the file in default mode (pr_wronly | pr_create_file | pr_truncate). perm file mode bits are described in the pr_open documentation. if set to -1 the default permissions (0664) will be used. behaviorflags flags specifying various behaviors of the class; see behavior flag constants above. see also nsifileinput
stream ...
nsIInputStreamCallback
xpcom/io/nsiasyncinput
stream.idlscriptable this is a companion interface for nsiasyncinput
stream.asyncwait(). inherits from: nsisupports last changed in gecko 1.7 method overview void oninput
streamready(in nsiasyncinput
stream a
stream); methods oninput
streamready() called to indicate that the
stream is either readable or closed. void oninput
streamready( in nsiasyncinput
stream a
stream ); parameters a
stream the
stream whose nsiasyncinput
stream.asyncwait() method was called. ...
...ged in gecko 1.7 method overview void oninput
streamready(in nsiasyncinput
stream a
stream); methods oninput
streamready() called to indicate that the
stream is either readable or closed. void oninput
streamready( in nsiasyncinput
stream a
stream ); parameters a
stream the
stream whose nsiasyncinput
stream.asyncwait() method was called. ...
Blob.stream() - Web APIs
the blob interface's
stream() method returns a readable
stream which upon reading returns the data contained within the blob. syntax var
stream = blob.
stream(); parameters none. returns a readable
stream which, upon reading, returns the contents of the blob. usage notes with
stream() and the returned readable
stream, you gain several interesting capabilities: call getreader() on the returned
stream to get an object to use to read the data from the blob using methods such as the readable
streamdefaultreader interface's read() method. call the returned
stream's pipeto() method to pipe the blob's data to a writable
stream. call the returned
stream's tee() method to tee the readable
stream. ...
...apabilities: call getreader() on the returned
stream to get an object to use to read the data from the blob using methods such as the readable
streamdefaultreader interface's read() method. call the returned
stream's pipeto() method to pipe the blob's data to a writable
stream. call the returned
stream's tee() method to tee the readable
stream. this returns an array containing two new readable
stream objects, each of which returns the contents of the blob. call the returned
stream's pipethrough() method to pipe the
stream through a transform
stream or any other readable and writable pair. specifications specification status comment file apithe definition of 'blob.
stream()' in that specification. working draft ...
CanvasCaptureMediaStreamTrack.requestFrame() - Web APIs
the canvascapturemedia
streamtrack method requestframe() requests that a frame be captured from the canvas and sent to the
stream. applications that need to carefully control the timing of rendering and frame capture can use requestframe() to directly specify when it's time to capture a frame. to prevent automatic capture of frames, so that frames are only captured when requestframe() is called, specify a value of 0 for the capture
stream() method when creating the
stream. syntax
stream.requestframe(); return value undefined usage notes there is currently an issue flagged in the specification pointing out that at this time, no exceptions are being thrown if the canvas isn't origin-clean. this may change in the future, so it would be wise to plan ahead and watch for exceptions such as secu...
...eptions are being thrown if the canvas isn't origin-clean. this may change in the future, so it would be wise to plan ahead and watch for exceptions such as securityerror (although the specific error that might be thrown is not mentioned in the spec, this is a likely candidate). example // find the canvas element to capture var canvaselt = document.getelementsbytagname("canvas")[0]; // get the
stream var
stream = canvaselt.capture
stream(25); // 25 fps // send the current state of the canvas as a frame to the
stream stream.getvideotracks()[0].requestframe(); specifications specification status comment media capture from dom elementsthe definition of 'canvascapturemedia
stream.requestframe()' in that specification. working draft initial definition ...
CanvasCaptureMediaStreamTrack - Web APIs
the canvascapturemedia
streamtrack interface represents the video track contained in a media
stream being generated from a <canvas> following a call to htmlcanvaselement.capture
stream(). part of the media capture and
streams api. properties this interface inherits the properties of its parent, media
streamtrack. canvascapturemedia
streamtrack.canvas read only returns the htmlcanvaselement object whose surface is captured in real-time. methods this interface inherits the methods of its parent, media
streamtrack. canvascapturemedia
streamtrack.requestframe() manually forces a frame to be captured and sent to the
stream. this lets applications that wish to specify the frame capture times directly do so, if they specified a framerate of 0 when calling capture
stream(). specifications ...
...anvascapturemedia
streamtrack.requestframe() manually forces a frame to be captured and sent to the
stream. this lets applications that wish to specify the frame capture times directly do so, if they specified a framerate of 0 when calling capture
stream(). specifications specification status comment media capture from dom elementsthe definition of 'canvascapturemedia
streamtrack' in that specification. working draft initial definition ...
MediaRecorder.stream - Web APIs
the mediarecorder.
stream read-only property returns the
stream that was passed into the mediarecorder() constructor when the mediarecorder was created. syntax var
stream = mediarecorder.
stream values the media
stream passed into the mediarecorder() constructor when the mediarecorder was originally created. example if (navigator.getusermedia) { console.log('getusermedia supported.'); navigator.getusermedia ( // constraints - only audio needed for this app { audio: true }, // success callback function(
stream) { var mediarecorder = new mediarecorder(
stream); var my
stream = mediarecorder.
stream; console.log(my
stream); ... ...
...ed.'); navigator.getusermedia ( // constraints - only audio needed for this app { audio: true }, // success callback function(
stream) { var mediarecorder = new mediarecorder(
stream); var my
stream = mediarecorder.
stream; console.log(my
stream); ... specifications specification status comment media
stream recordingthe definition of 'mediarecorder.
stream' in that specification. working draft initial definition ...
MediaStream() - Web APIs
the media
stream() constructor returns a newly-created media
stream, which serves as a collection of media tracks, each represented by a media
streamtrack object. if any parameters are given, the specified tracks are added to the new
stream. otherwise, the
stream has no tracks. syntax new
stream = new media
stream(); new
stream = new media
stream(
stream); new
stream = new media
stream(tracks[]); parameters
stream a different media
stream object whose tracks are added to the newly-created
stream automatically. the tracks are not removed from the original
stream, so they're shared by the two
streams. tracks an array of media
streamtrack objects, one for each track to add to the
stream. return value a newly-created media
stream object, either empty, or containing the tracks provided, if any. spe...
...ream automatically. the tracks are not removed from the original
stream, so they're shared by the two
streams. tracks an array of media
streamtrack objects, one for each track to add to the
stream. return value a newly-created media
stream object, either empty, or containing the tracks provided, if any. specifications specification status comment media capture and
streamsthe definition of 'media
stream' in that specification. candidate recommendation ...
MediaStream.getTrackById() - Web APIs
the media
stream.gettrackbyid() method returns a media
streamtrack object representing the track with the specified id string. if there is no track with the specified id, this method returns null. syntax var track = media
stream.gettrackbyid(id); parameters id a domstring which identifies the track to be returned. return value if a track is found for which media
streamtrack.id matches the specified id string, that media
streamtrack object is returned. otherwise, the returned value is null. example this example activates a commentary track on a video by ducking the audio level of the main audio track to 50%, then enabling the commentary track. ...
... id a domstring which identifies the track to be returned. return value if a track is found for which media
streamtrack.id matches the specified id string, that media
streamtrack object is returned. otherwise, the returned value is null. example this example activates a commentary track on a video by ducking the audio level of the main audio track to 50%, then enabling the commentary track.
stream.gettrackbyid("primary-audio-track").applyconstraints({ volume: 0.5 });
stream.gettrackbyid("commentary-track").enabled = true; specifications specification status comment media capture and
streamsthe definition of 'gettrackbyid()' in that specification. candidate recommendation initial specification. ...
MediaStreamTrack.getCapabilities() - Web APIs
once you know what the browser's capabilities are, your script can use applyconstraints() to ask for the track to be configured to match ideal or acceptable settings. see capabilities, constraints, and settings for details on how to work with constrainable properties. syntax const capabilities = track.getcapabilities() return value a mediatrackcapabilities object which specifies the value or range of values which are supported for each of the user agent's supported constrainable properties. ...
...straints, and settings for details on how to work with constrainable properties. syntax const capabilities = track.getcapabilities() return value a mediatrackcapabilities object which specifies the value or range of values which are supported for each of the user agent's supported constrainable properties. specifications specification status comment media capture and
streamsthe definition of 'getcapabilities()' in that specification. candidate recommendation initial definition. ...
MediaStreamTrack.getConstraints() - Web APIs
these constraints indicate values and ranges of values that the web site or application has specified are required or acceptable for the included constrainable properties. constraints can be used to ensure that the media meets certain guidelines you prefer. for example, you may prefer high definition video but require that the frame rate be a little low to help keep the data rate low enough not overtax the network. constraints can also specify ideal and/or acceptable sizes or ranges of sizes. ...
...d call getsettings(). example this example obtains the current constraints for a track, sets the facingmode, and applies the updated constraints. function switchcameras(track, camera) { const constraints = track.getconstraints(); constraints.facingmode = camera; track.applyconstraints(constraints); } specifications specification status comment media capture and
streamsthe definition of 'getconstraints()' in that specification. candidate recommendation initial definition. ...
MediaStreamTrack.getSettings() - Web APIs
see capabilities, constraints, and settings for details on how to work with constrainable properties. syntax const settings = track.getsettings() returns a mediatracksettings object describing the current configuration of the track's constrainable properties. note: the returned object identifies the current values of every constrainable property, including those which are platform defaults rather than having been expressly set by the site's code. ...
... candidate recommendation initial definition. ...
MediaStreamTrack.muted - Web APIs
the muted read-only property of the media
streamtrack interface returns a boolean value indicating whether or not the track is currently unable to provide media output. to implement a way for users to mute and unmute a track, use the enabled property. when a track is disabled by setting enabled to false, it generates only empty frames (audio frames in which every sample is 0, or video frames in which every pixel is black). syntax const mutedflag = track.muted value a boolean which is true if the track is currently muted, or false if the track is currently unmuted. when possible, avoid polling muted to monitor the track's muting status. instead, add event listeners for the mute and unmute events. ...
...deo frames in which every pixel is black). syntax const mutedflag = track.muted value a boolean which is true if the track is currently muted, or false if the track is currently unmuted. when possible, avoid polling muted to monitor the track's muting status. instead, add event listeners for the mute and unmute events. example this example counts the number of tracks in an array of media
streamtrack objects which are currently muted. let mutedcount = 0; tracklist.foreach((track) => { if (track.muted) { mutedcount += 1; } }); specifications specification status comment media capture and
streamsthe definition of 'muted' in that specification. candidate recommendation initial definition. ...
MediaStreamTrack: unmute event - Web APIs
the unmute event is sent to a media
streamtrack when the track's source is once again able to provide media data after a period of not being able to do so. this ends the muted state that began with the mute event. bubbles no cancelable no interface event event handler property onunmute note: the condition that most people think of as "muted" (that is, a user-controllable way to silence a track) is actually managed using the media
streamtrack.enabled property, for which there are no events. examples in this example, event handlers are established for the mute and unmute events in order to detect when the media is not flowing from the source for the media
streamtrack stored in the variable musictrack. musictrack.addeventlistener("mute", ev...
...ilable for setting up a handler for the mute event. the following example shows this: musictrack.onmute = event => { document.getelementbyid("timeline-widget").style.backgroundcolor = "#aaa"; } musictrack.mute = event = > { document.getelementbyid("timeline-widget").style.backgroundcolor = "#fff"; } specifications specification status comment media capture and
streamsthe definition of 'unmute' in that specification. candidate recommendation initial specification. ...
MediaStreamTrackEvent() - Web APIs
the media
streamtrackevent() constructor returns a newly created media
streamtrackevent object, which represents an event announcing that a media
streamtrack has been added to or removed from a media
stream. syntax var trackevent = new media
streamtrackevent(type, {track: amedia
streamtrack}); parameters the media
streamtrackevent() constructor also inherits arguments from event(). type a domstring representing the name of the type of the media
streamtrackevent. it is case-sensitive and can be "addtrack" or "removetrack". track a media
streamtrack object representing the track which was added to or removed from the
stream. return value a new media
streamtrackevent, initialized based on the provided options. specifications specification status comment media capture ...
...senting the name of the type of the media
streamtrackevent. it is case-sensitive and can be "addtrack" or "removetrack". track a media
streamtrack object representing the track which was added to or removed from the
stream. return value a new media
streamtrackevent, initialized based on the provided options. specifications specification status comment media capture and
streamsthe definition of 'media
streamtrackevent()' in that specification. candidate recommendation ...
RTCInboundRtpStreamStats.bytesReceived - Web APIs
the rtcinboundrtp
streamstats dictionary's bytesreceived property is an integer value which indicates the total number of bytes received so far from this synchronization source (ssrc). syntax var bytesreceived = rtcinboundrtp
streamstats.bytesreceived; value an unsigned integer value indicating the total number of bytes received so far on this rtp
stream, not including header and padding bytes. this value can be used to calculate an approximation of the average media data rate: avgdatarate = rtcinboundrtp
streamstats.bytesreceived / elapsedtime; this value gets reset to zero if the sender's ssrc identifier changes for any reason. ...
...nd padding bytes. this value can be used to calculate an approximation of the average media data rate: avgdatarate = rtcinboundrtp
streamstats.bytesreceived / elapsedtime; this value gets reset to zero if the sender's ssrc identifier changes for any reason. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtp
streamstats.bytesreceived' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.fecPacketsDiscarded - Web APIs
this can happen if all the packets covered by the fec packet have already been received or recovered using another fec packet, or if the fec packet arrived outside the recovery window and the lost rtp packets have already been skipped during playback as a result. the value of fecpacketsreceived includes these discarded packets. ...
... candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.firCount - Web APIs
the fircount property of the rtcinboundrtp
streamstats dictionary indicates the number of full intra request (fir) packets have been sent by the receiver to the sender. the receiver sends a fir packet when the
stream falls behind and needs to skip frames in order to catch up. syntax var fircount = rtcinboundrtp
streamstats.fircount; value an integer value indicating how many fir packets have been received by the sender during the current connection. this statistic is available only for video tracks. the receiver sends a fir packet to the sender any time it falls bahind or loses packets and cannot decode the incoming
stream any longer because of the lost data. this tells the sender to send a full frame instead of a delta frame, so that the receiver can catch up. the higher fircount is, the m...
... up. the higher fircount is, the more often frames were dropped, which may be an indication that the media's bit rate is too high for the available bandwidth, or that the receiving device is overburdened and is therefore unable to process the incoming data. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtp
streamstats.fircount' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.pliCount - Web APIs
the plicount property of the rtcinboundrtp
streamstats dictionary states the number of times the rtcrtpreceiver described by these statistics sent a picture loss indication (pli) packet to the sender. a pli packet indicates that some amount of encoded video data has been lost for one or more frames. syntax var plicount = rtcinboundrtp
streamstats.plicount; value an integer value indicating the number of times a pli packet was sent by the rtcrtpreceiver to the sender. these are sent by the receiver's decoder to notify the encoder (the sender) that an undefined amount of coded video data, which may span frame boundaries, has been lost. this information is only available for video
streams. this may trigger the sender to send a full frame in order to allow the receiver to re-synchronize, since l...
...frame in order to allow the receiver to re-synchronize, since lost data may be an irrecoverable situation for decoding media. however, the primary purpose of this message is to allow the sender to consider techniques to mitigate network performance issues. this is often achieved by methods such as increasing the compression, lowering resolution, or finding other ways to reduce the bit rate of the
stream. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtp
streamstats.plicount' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.sliCount - Web APIs
the slicount property of the rtcinboundrtp
streamstats dictionary indicates how many slice loss indication (sli) packets the rtcrtpreceiver for which this object provdes statistics sent to the remote rtcrtpsender. an sli packet is used by a decoder to let the encoder know that it's detected corruption of one or more consecutive macroblocks (in scan order) in the received media. in general, what's usually of interest is that the higher this number is, the more the
stream data is becoming corrupted between the sender and the receiver, requiring resends or dropping frames. syntax var slicount = rtcinboundrtp
streamstats.slicount; value an unsigned integer indicating the number of sli packets this receiver sent to the remote sender due to lost runs of macroblocks. a high value of slicount may be...
...te sender due to lost runs of macroblocks. a high value of slicount may be an indication of an unreliable network. this is a very technical part of how video codecs work. for details, see rfc 4585: 6.3.2. note: this value is only present for video media. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtp
streamstats.slicount' in that specification. candidate recommendation initial definition. ...
RTCOutboundRtpStreamStats.firCount - Web APIs
the fircount property of the rtcoutboundrtp
streamstats dictionary indicates the number of full intra request (fir) that the remote rtcrtpreceiver has sent to this rtcrtpsender. a fir packet is sent when the receiver finds that it has fallen behind and needs to skip frames in order to catch up; the sender should respond by sending a full frame instead of a delta frame. available only on video media. syntax var fircount = rtcoutboundrtp
streamstats.fircount; value an integer value indicating how many fir packets have been received by the sender during the current connection. this statistic is available only for video tracks. the receiver sends a fir packet to the sender any time it falls bahind or loses packets and cannot decode the incoming
stream any longer because of the lost data. this t...
...up. the higher fircount is, the more often frames were dropped, which may be an indication that the media's bit rate is too high for the available bandwidth, or that the receiving device is overburdened and is therefore unable to process the incoming data. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtp
streamstats.fircount' in that specification. candidate recommendation initial definition. ...
RTCPeerConnection: removestream event - Web APIs
the obsolete remove
stream event was sent to an rtcpeerconnection to inform it that a media
stream had been removed from the connection. you can use the rtcpeerconnection interface's onremove
stream property to set a handler for this event. this is the counterpart to the add
stream event, which is also obsolete. bubbles no cancelable no interface media
streamevent event handler property rtcpeerconnection.onremove
stream important: this event has been removed from the webrtc specification in favor of the existing removetrack event on the remote media
stream and the corresponding media
stream.onremovetrack event handler property of the remote media
stream. ...
...event event handler property rtcpeerconnection.onremove
stream important: this event has been removed from the webrtc specification in favor of the existing removetrack event on the remote media
stream and the corresponding media
stream.onremovetrack event handler property of the remote media
stream. the rtcpeerconnection api is now track-based, so having zero tracks in the remote
stream is equivalent to the remote
stream being removed, which caused a remove
stream event. ...
RTCRtpStreamStats.kind - Web APIs
the kind property of the rtcrtp
streamstats dictionary is a string indicating whether the described rtp
stream contains audio or video media. its value is always either "audio" or "video". this property was previously called mediatype. the name was changed in the specification in february, 2018. see browser compatibility below to determine how this affects the browsers you're targeting. syntax mediakind = rtcrtp
streamstats.kind; value a domstring whose value is "audio" if the track whose statistics are given by the rtcrtp
streamstats object contains audio, or "video" if the track contains video media. this string will always be the same as the one provided by the associated media
streamtrack object's kind property. it will also match the statistics object's rtccodecstats.codec property's med...
...t contains audio, or "video" if the track contains video media. this string will always be the same as the one provided by the associated media
streamtrack object's kind property. it will also match the statistics object's rtccodecstats.codec property's media type. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcrtp
streamstats.kind' in that specification. candidate recommendation initial definition. ...
RTCRtpStreamStats.nackCount - Web APIs
the nackcount property of the rtcrtp
streamstats dictionary is a numeric value indicating the number of times the receiver sent a nack packet to the sender. a nack (negative acknowledgement, also called "generic nack") packet tells the sender that one or more of the rtp packets it sent were lost in transport. syntax var nackcount = rtcrtp
streamstats.nackcount; value an integer value indicating how many times the receiver sent a nack packet to the sender after detecting that one or more packets were lost during transport. note: this value is only available on the receiver. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtp
streamstats: nackcount' in that specification. candidate recommendation i...
...e lost during transport. note: this value is only available on the receiver. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtp
streamstats: nackcount' in that specification. candidate recommendation initial definition. identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtp
streamstats: nackcount' in that specification. candidate recommendation initial definition. ...
ReadableByteStreamController - Web APIs
the readablebyte
streamcontroller interface of the
streams api represents a controller allowing control of a readable
stream's state and internal queue. byte
stream controllers are for byte
streams. constructor none. readablebyte
streamcontroller instances are created automatically during readable
stream construction. properties readablebyte
streamcontroller.byobrequest read only returns the current byob pull request. readablebyte
streamcontroller.desiredsize read only returns the desired size required to fill the
stream's internal queue. methods readablebyte
streamcontroller.close() closes the associated
stream. readablebyte
streamcontroller.enqueue() enqueues a given chunk in the associated
stream. ...
...eadablebyte
streamcontroller.byobrequest read only returns the current byob pull request. readablebyte
streamcontroller.desiredsize read only returns the desired size required to fill the
stream's internal queue. methods readablebyte
streamcontroller.close() closes the associated
stream. readablebyte
streamcontroller.enqueue() enqueues a given chunk in the associated
stream. readablebyte
streamcontroller.error() causes any future interactions with the associated
stream to error. examples tbd. specifications specification status comment
streamsthe definition of 'readablebyte
streamcontroller' in that specification. living standard initial definition ...
ReadableStreamBYOBReader.read() - Web APIs
the read() method of the readable
streambyobreader interface returns a promise providing access to the next chunk in the byte
stream's internal queue. syntax var promise = readable
streambyobreader.read(view); parameters view the view to be read into. return value a promise, which fulfills/rejects with a result depending on the state of the
stream. the different possibilities are as follows: if a chunk is available, the promise will be fulfilled with an object of the form { value: thechunk, done: false }. if the
stream becomes closed, the promise will be fulfilled with an object of the form { value: undefined, done: true }. if the
stream becomes errored, the promise will be rejected with the relevant error. ...
...s follows: if a chunk is available, the promise will be fulfilled with an object of the form { value: thechunk, done: false }. if the
stream becomes closed, the promise will be fulfilled with an object of the form { value: undefined, done: true }. if the
stream becomes errored, the promise will be rejected with the relevant error. exceptions typeerror the source object is not a readable
streambyobreader, the
stream has no owner, the view is not an object or has become detached, or the view's length is 0. examples tbd. specifications specification status comment
streamsthe definition of 'read()' in that specification. living standard initial definition. ...
ReadableStreamBYOBReader.releaseLock() - Web APIs
the releaselock() method of the readable
streambyobreader interface releases the reader's lock on the
stream. after the lock is released, the reader is no longer active. if the associated
stream is errored when the lock is released, the reader will appear errored in that same way subsequently; otherwise, the reader will appear closed. a reader’s lock cannot be released while it still has a pending read request, i.e., if a promise returned by the reader’s readable
streambyobreader.read() method has not finished. this will result in a typeerror being thrown. syntax readable
streambyobreader.releaselock(); parameters none. return value undefined. exceptions typeerror the source object is not a readable
streambyobreader, or a read request is pending. examples tbd. specifications...
...er’s readable
streambyobreader.read() method has not finished. this will result in a typeerror being thrown. syntax readable
streambyobreader.releaselock(); parameters none. return value undefined. exceptions typeerror the source object is not a readable
streambyobreader, or a read request is pending. examples tbd. specifications specification status comment
streamsthe definition of 'releaselock()' in that specification. living standard initial definition. ...
ReadableStreamBYOBReader - Web APIs
the readable
streambyobreader interface of the
streams api represents a byob ("bring your own buffer") reader that can be used to read
stream data supplied by the developer (e.g. a custom readable
stream() constructor). constructor readable
streambyobreader() creates and returns a readable
streambyobreader object instance. properties readable
streambyobreader.closed read only allows you to write code that responds to an end to the
streaming process. returns a promise that fulfills if the
stream becomes closed or the reader's lock is released, or rejects if the
stream errors. methods readable
streambyobreader.cancel() cancels the
stream, signaling a loss of interest in the
stream by a consumer. the supplied reason argument will be given to the underlying source, which may or may no...
...ds to an end to the
streaming process. returns a promise that fulfills if the
stream becomes closed or the reader's lock is released, or rejects if the
stream errors. methods readable
streambyobreader.cancel() cancels the
stream, signaling a loss of interest in the
stream by a consumer. the supplied reason argument will be given to the underlying source, which may or may not use it. readable
streambyobreader.read() returns a promise providing access to the next chunk in the
stream's internal queue. readable
streambyobreader.releaselock() releases the reader's lock on the
stream. examples tbd. specifications specification status comment
streamsthe definition of 'readable
streambyobreader' in that specification. living standard initial definition ...
ReadableStreamDefaultReader.releaseLock() - Web APIs
the releaselock() method of the readable
streamdefaultreader interface releases the reader's lock on the
stream. if the associated
stream is errored when the lock is released, the reader will appear errored in that same way subsequently; otherwise, the reader will appear closed. a reader’s lock cannot be released while it still has a pending read request, i.e., if a promise returned by the reader’s readable
streamdefaultreader.read() method has not finished. this will result in a typeerror being thrown. syntax readable
streamdefaultreader.releaselock(); parameters none. return value undefined. exceptions typeerror the source object is not a readable
streamdefaultreader, or a read request is pending. examples function fetch
stream() { const reader =
stream.getreader(); ... ...
...hrown. syntax readable
streamdefaultreader.releaselock(); parameters none. return value undefined. exceptions typeerror the source object is not a readable
streamdefaultreader, or a read request is pending. examples function fetch
stream() { const reader =
stream.getreader(); ... reader.releaselock() ... } specifications specification status comment
streamsthe definition of 'releaselock()' in that specification. living standard initial definition. ...
WritableStream.abort() - Web APIs
the abort() method of the writable
stream interface aborts the
stream, signaling that the producer can no longer successfully write to the
stream and it is to be immediately moved to an error state, with any queued writes discarded. syntax var promise = writable
stream.abort(reason); parameters reason a domstring providing a human-readable reason for the abort. return value a promise, which fulfills with the value given in the reason parameter. exceptions typeerror the
stream you are trying to abort is not a writable
stream, or it is locked. examples const writable
stream = new writable
stream({ write(chunk) { ... }, close() { ... }, abort(err) { ... } }, queuingstrategy); ... ...
...readable reason for the abort. return value a promise, which fulfills with the value given in the reason parameter. exceptions typeerror the
stream you are trying to abort is not a writable
stream, or it is locked. examples const writable
stream = new writable
stream({ write(chunk) { ... }, close() { ... }, abort(err) { ... } }, queuingstrategy); ... // abort the
stream later on, when required writable
stream.abort(); specifications specification status comment
streamsthe definition of 'abort()' in that specification. living standard initial definition. ...
WritableStreamDefaultController.error() - Web APIs
the error() method of the writable
streamdefaultcontroller interface causes any future interactions with the associated
stream to error. this method is rarely used, since usually it suffices to return a rejected promise from one of the underlying sink’s methods. however, it can be useful for suddenly shutting down a
stream in response to an event outside the normal lifecycle of interactions with the underlying sink. syntax writable
streamdefaultcontroller.error(e); parameters e a domstring representing the error you want future interactions to fail with. return value undefined. exceptions typeerror the
stream you are trying to error is not a writable
stream. ...
...ting down a
stream in response to an event outside the normal lifecycle of interactions with the underlying sink. syntax writable
streamdefaultcontroller.error(e); parameters e a domstring representing the error you want future interactions to fail with. return value undefined. exceptions typeerror the
stream you are trying to error is not a writable
stream. examples const writable
stream = new writable
stream({ start(controller) { // do stuff with controller // error
stream if necessary controller.error('my error is broken'); }, write(chunk, controller) { ... }, close(controller) { ... }, abort(err) { ... } }); specifications specification status comment
streamsthe definition of 'error()' in that specification. ...
WritableStreamDefaultController - Web APIs
the writable
streamdefaultcontroller interface of the the
streams api represents a controller allowing control of a writable
stream's state. when constructing a writable
stream, the underlying sink is given a corresponding writable
streamdefaultcontroller instance to manipulate. constructor none. writable
streamdefaultcontroller instances are created automatically during writable
stream construction. properties none. methods writable
streamdefaultcontroller.error() causes any future interactions with the associated
stream to error. examples const writable
stream = new writable
stream({ start(controller) { // do stuff with controller // error
stream if necessary controller.error('my
stream is broken'); }, write(chunk, controller) { ... }, close(controller) {...
...associated
stream to error. examples const writable
stream = new writable
stream({ start(controller) { // do stuff with controller // error
stream if necessary controller.error('my
stream is broken'); }, write(chunk, controller) { ... }, close(controller) { ... }, abort(err) { ... } }); specifications specification status comment
streamsthe definition of 'writable
streamdefaultcontroller' in that specification. living standard initial definition. ...
WritableStreamDefaultWriter.desiredSize - Web APIs
the desiredsize read-only property of the writable
streamdefaultwriter interface returns the desired size required to fill the
stream's internal queue. syntax var desiredsize = writable
streamdefaultwriter.desiredsize; value an integer. note that this can be negative if the queue is over-full. the value will be null if the
stream cannot be successfully written to (due to either being errored, or having an abort queued up), and zero if the
stream is closed. exceptions typeerror the writer’s lock is released. examples const writable
stream = new writable
stream({ write(chunk) { ... }, close() { ... }, abort(err) { ... } }, queuingstrategy); ... const writer = writable
stream.getwriter(); ... ...
...ccessfully written to (due to either being errored, or having an abort queued up), and zero if the
stream is closed. exceptions typeerror the writer’s lock is released. examples const writable
stream = new writable
stream({ write(chunk) { ... }, close() { ... }, abort(err) { ... } }, queuingstrategy); ... const writer = writable
stream.getwriter(); ... // return
stream's desired size let size = writer.desiredsize; specifications specification status comment
streamsthe definition of 'desiredsize' in that specification. living standard initial definition. ...
WritableStreamDefaultWriter.releaseLock() - Web APIs
the releaselock() method of the writable
streamdefaultwriter interface releases the writer's lock on the corresponding
stream. after the lock is released, the writer is no longer active. if the associated
stream is errored when the lock is released, the writer will appear errored in the same way from now on; otherwise, the writer will appear closed. syntax writable
streamdefaultwritere.releaselock() parameters none. return value undefined. examples const writable
stream = new writable
stream({ write(chunk) { ... }, close() { ... }, abort(err) { ... } }, queuingstrategy); ... const writer = writable
stream.getwriter(); ... ...
...ay from now on; otherwise, the writer will appear closed. syntax writable
streamdefaultwritere.releaselock() parameters none. return value undefined. examples const writable
stream = new writable
stream({ write(chunk) { ... }, close() { ... }, abort(err) { ... } }, queuingstrategy); ... const writer = writable
stream.getwriter(); ... // release writer's lock on the
stream when desired writer.releaselock(); specifications specification status comment
streamsthe definition of 'releaselock()' in that specification. living standard initial definition. ...
RTSP: Real-time streaming protocol - MDN Web Docs Glossary: Definitions of Web-related terms
real-time
streaming protocol (rtsp) is a network protocol that controls how the
streaming of a media should occur between a server and a client. basically, rtsp is the protocol that describes what happens when you click "pause"/"play" when
streaming a video. if your computer were a remote control and the
streaming server a television, rtsp would describe how the instruction of the remote control affects the tv. learn more general knowledge rtsp on wikipedia rfc 7826 (one of the documents that specifies precisely how the protocol works) ...
nsIDiskCacheStreamInternal
netwerk/cache/nsidiskcache
streaminternal.idlscriptable please add a summary to this article. 1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void closeinternal(); methods closeinternal() we use this method internally to close nsdiskcacheoutput
stream under the cache service lock. void closeinternal(); parameters none. ...
nsIOutputStreamCallback
xpcom/io/nsiasyncoutput
stream.idlscriptable this is a companion interface for nsiasyncoutput
stream.asyncwait. inherits from: nsisupports last changed in gecko 1.7 method overview void onoutput
streamready(in nsiasyncoutput
stream a
stream); methods onoutput
streamready() called to indicate that the
stream is either writable or closed. void onoutput
streamready( in nsiasyncoutput
stream a
stream ); parameters a
stream the
stream whose nsiasyncoutput
stream.asyncwait() method was called. ...
CanvasCaptureMediaStreamTrack.canvas - Web APIs
the canvascapturemedia
streamtrack canvas read-only property returns the htmlcanvaselement from which frames are being captured. syntax var elt =
stream.canvas; value an htmlcanvaselement indicating the canvas which is the source of the frames being captured. example // find the canvas element to capture var canvaselt = document.getelementsbytagname("canvas")[0]; // get the
stream var
stream = canvaselt.capture
stream(25); // 25 fps // do things to the
stream ... // obtain the canvas associated with the
stream var canvas =
stream.canvas; specifications specification status comment media capture from dom elementsthe definition of 'canvascapturemedia
streamtrack.canvas' in that specification. working draft initial definition ...
MediaStream.addTrack() - Web APIs
the media
stream.addtrack() method adds a new track to the
stream. the track is specified as a parameter of type media
streamtrack. if the specified track is already in the
stream's track set, this method has no effect. syntax
stream.addtrack(track); parameters track a media
streamtrack to add to the
stream. return value undefined example specifications specification status comment media capture and
streamsthe definition of 'addtrack()' in that specification. candidate recommendation initial specification. ...
MediaStream: addtrack event - Web APIs
the addtrack event is fired when a new media
streamtrack object has been added to a media
stream. bubbles no cancelable no interface media
streamtrackevent event handler property onaddtrack examples using addeventlistener(): let
stream = new media
stream();
stream.addeventlistener('addtrack', (event) => { console.log(`new ${event.track.kind} track added`); }); using the onaddtrack event handler property: let
stream = new media
stream();
stream.onaddtrack = (event) => { console.log(`new ${event.track.kind} track added`); }; specifications specification status media capture and
streamsthe definition of 'addtrack' in that specification. candidate recommendation ...
MediaStream.clone() - Web APIs
the clone() method of the media
stream interface creates a duplicate of the media
stream. this new media
stream object has a new unique id and contains clones of every media
streamtrack contained by the media
stream on which clone() was called. syntax var
stream = media
stream.clone(); parameters none. return value a new media
stream instance which has a new unique id and contains clones of every media
streamtrack contained by the media
stream on which clone() was called. specifications specification status comment media capture and
streamsthe definition of 'media
stream.clone()' in that specification. candidate recommendation initial definition. ...
MediaStream.ended - Web APIs
the ended read-only property of the media
stream interface returns a boolean value which is true if the
stream has been completely read, or false if the end of the
stream has not been reached. this value once the ended event has been fired. this property has been removed from the specification; you should instead rely on the ended event or check the value of media
streamtrack.readystate to see if its value is "ended" for the track or tracks you want to ensure have finished playing. syntax var hasended = media
stream.ended; value a boolean value that returns true if the end of the
stream has been reached. specifications no longer part of any specification. this property was part of earlier drafts of the media capture and
streams specification. ...
MediaStream.getTracks() - Web APIs
the gettracks() method of the media
stream interface returns a sequence that represents all the media
streamtrack objects in this
stream's track set, regardless of media
streamtrack.kind. syntax var media
streamtracks = media
stream.gettracks() parameters none. return value an array of media
streamtrack objects. example navigator.mediadevices.getusermedia({audio: false, video: true}) .then(media
stream => { document.queryselector('video').srcobject = media
stream; // stop the
stream after 5 seconds settimeout(() => { const tracks = media
stream.gettracks() tracks[0].stop() }, 5000) }) specifications specification status comment media capture and
streamsthe definition of 'gettracks()' in that specification. candidate recommendation initial de...
MediaStream: removetrack event - Web APIs
the removetrack event is fired when a new media
streamtrack object has been removed from a media
stream. bubbles no cancelable no interface media
streamtrackevent event handler property onremovetrack examples using addeventlistener(): let
stream = new media
stream();
stream.addeventlistener('removetrack', (event) => { console.log(`${event.track.kind} track removed`); }); using the onremovetrack event handler property: let
stream = new media
stream();
stream.onremovetrack = (event) => { console.log(`${event.track.kind} track removed`); }; specifications specification status media capture and
streamsthe definition of 'removetrack' in that specification. candidate recommendation ...
MediaStreamAudioSourceOptions - Web APIs
the media
streamaudiosourceoptions dictionary provides configuration options used when creating a media
streamaudiosourcenode using its constructor. it is not needed when using the audiocontext.createmedia
streamsource() method. properties media
stream a required property which specifies the media
stream from which to obtain audio for the node. specifications specification status comment web audio apithe definition of 'media
streamaudiosourceoptions' in that specification. working draft ...
MediaStreamTrack.clone() - Web APIs
the clone() method of the media
streamtrack interface creates a duplicate of the media
streamtrack. this new media
streamtrack object is identical except for its unique id. syntax const newtrack = track.clone() return value a new media
streamtrack instance which is identical to the one clone() was called, except for its new unique id. specifications specification status comment media capture and
streamsthe definition of 'clone()' in that specification. candidate recommendation initial definition. ...
MediaStreamTrack.id - Web APIs
the media
streamtrack.id read-only property returns a domstring containing a unique identifier (guid) for the track, which is generated by the user agent. syntax const id = track.id specifications specification status comment media capture and
streamsthe definition of 'media
streamtrack.id' in that specification. candidate recommendation initial specification. ...
MediaStreamTrack.kind - Web APIs
the media
streamtrack.kind read-only property returns a domstring set to "audio" if the track is an audio track and to "video", if it is a video track. it doesn't change if the track is deassociated from its source. syntax const type = track.kind value the possible values are a domstring with on of the following values: "audio": the track is an audio track. "video": the track is a video track. specifications specification status comment media capture and
streamsthe definition of 'media
streamtrack.kind' in that specification. candidate recommendation initial specification. ...
MediaStreamTrack.label - Web APIs
the media
streamtrack.label read-only property returns a domstring containing a user agent-assigned label that identifies the track source, as in "internal microphone". the string may be left empty and is empty as long as no source has been connected. when the track is deassociated from its source, the label is not changed. syntax const label = track.label specifications specification status comment media capture and
streamsthe definition of 'media
streamtrack.label' in that specification. candidate recommendation initial specification. ...
MediaStreamTrack.onmute - Web APIs
media
streamtrack's onmute event handler is called when the mute event is received. such an event is sent when the track is temporarily not able to send data. syntax track.onmute = mutehandler; value a function to serve as an eventhandler for the mute event. the event handler function receives a single parameter: the event object, which is a simple event object. example in this example, an onmute handler is established to set the content html of an element to display the "muted speaker" emoji. mytrack.onmute = function(evt) { playstateicon.innerhtml = "f507;"; }; specifications specification status comment media capture and
streamsthe definition of 'media
streamtrack.onmute' in that specification. candidate recommendation initial specification. ...
MediaStreamTrack.onoverconstrained - Web APIs
the media
streamtrack.onoverconstrained event handler is a property called when the overconstrained event is received. such an event is sent when the track is again able to send data. syntax track.onoverconstrained = function; values function is the name of a user-defined function, without the () suffix or any parameters, or an anonymous function declaration, such as function(event) {...}. an event handler always has one single parameter, containing the event, here of type media
streamerrorevent. example dc.onoverconstrained = function() { alert("overconstrained event detected!"); }; ...
MediaStreamTrack.readyState - Web APIs
the media
streamtrack.readystate read-only property returns an enumerated value giving the status of the track. syntax const state = track.readystate value it takes one of the following values: "live" which indicates that an input is connected and does its best-effort in providing real-time data. in that case, the output of data can be switched on or off using the media
streamtrack.enabled property. "ended" which indicates that the input is not giving any more data and will never provide new data. specifications specification status comment media capture and
streamsthe definition of 'media
streamtrack.readystate' in that specification. candidate recommendation initial specification. ...
MediaStreamTrack.remote - Web APIs
it returns a boolean with a value of true if the track is sourced remotely (that is, sourced by an rtcpeerconnection), or false if it is sourced locally. ...
MediaStreamTrackAudioSourceOptions - Web APIs
the media
streamtrackaudiosourceoptions dictionary is used when specifying options to the media
streamtrackaudiosourcenode() constructor. it isn't needed when using the audiocontext.createmedia
streamtracksource() method. properties media
streamtrack the media
streamtrack from which to take audio data for this node's output. specifications specification status comment web audio apithe definition of 'media
streamtrackaudiosourceoptions' in that specification. working draft ...
RTCInboundRtpStreamStats.framesDecoded - Web APIs
the framesdecoded property of the rtcinboundrtp
streamstats dictionary indicates the total number of frames which have been decoded successfully for this media source. syntax var framesdecoded = rtcinboundrtp
streamstats.framesdecoded; value an integer value indicating the total number of video frames which have been decoded for this
stream so far. this represents the number of frames that would have been displayed assuming no frames were skipped. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtp
streamstats.framesdecoded' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.lastPacketReceivedTimestamp - Web APIs
the lastpacketreceivedtimestamp property of the rtcinboundrtp
streamstats dictionary indicates the time at which the most recently received packet arrived from this source. syntax var lastpackettimestamp = rtcinboundrtp
streamstats.lastpacketreceivedtimestamp; value a domhighrestimestamp which specifies the time at which the most recently received packet arrived on this rtp
stream. note: this value differs from the timestamp, which represents the time at which the statistics object was created. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtp
streamstats.lastpacketreceivedtimestamp' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.nackCount - Web APIs
the nackcount property of the rtcinboundrtp
streamstats dictionary is a numeric value indicating the number of times the receiver sent a nack packet to the sender. a nack (negative acknowledgement, also called "generic nack") packet tells the sender that one or more of the rtp packets it sent were lost in transport. syntax var nackcount = rtcinboundrtp
streamstats.nackcount; value an integer value indicating how many times the receiver sent a nack packet to the sender after detecting that one or more packets were lost during transport. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtp
streamstats.nackcount' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.packetsFailedDecryption - Web APIs
the packetsfaileddecryption property of the rtcinboundrtp
streamstats dictionary indicates the total number of rtp packets which failed to be decrypted successfully after being received by the local end of the connection during this session. syntax var packetsfaileddecryption = rtcinboundrtp
streamstats.packetsfaileddecryption; value an integer value which indicates how many packets the local end of the rtp connection could not be successfully decrypted. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtp
streamstats.packetsfaileddecryption' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.receiverId - Web APIs
the receiverid property of the rtcinboundrtp
streamstats dictionary specifies the id of the rtcaudioreceiverstats or rtcvideoreceiverstats object representing the rtcrtpreceiver receiving the
stream. syntax var receiverstatsid = rtcinboundrtp
streamstats.receiverid; value a domstring which contains the id of the rtcaudioreceiverstats or rtcvideoreceiverstats object which provides information about the rtcrtpreceiver which is receiving the
streamed media. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtp
streamstats.receiverid' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.remoteId - Web APIs
the remoteid property of the rtcinboundrtp
streamstats dictionary specifies the id of the rtcremoteoutboundrtp
streamstats object representing the remote peer's rtcrtpsender which is sending the media to the local peer. syntax var remotestatsid = rtcinboundrtp
streamstats.remoteid; value a domstring containing the id of the rtcremoteoutboundrtp
streamstats object that represents the remote peer's rtcrtpsender for the synchronization source represented by this stats object. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtp
streamstats.remoteid' in that specification. candidate recommendation initial definition. ...
RTCInboundRtpStreamStats.trackId - Web APIs
the trackid property of the rtcinboundrtp
streamstats dictionary indicates the id of the rtcreceiveraudiotrackattachmentstats or rtcreceivervideotrackattachmentstats object representing the media
streamtrack which is receiving the incoming media. syntax var trackstatsid = rtcinboundrtp
streamstats.trackid; value a domstring containing the id of the rtcreceiveraudiotrackattachmentstats or rtcreceivervideotrackattachmentstats object representing the track which is receiving the media from this rtp session. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtp
streamstats.trackid' in that specification. candidate recommendation initial definition. ...
RTCOutboundRtpStreamStats.framesEncoded - Web APIs
the framesencoded property of the rtcoutboundrtp
streamstats dictionary indicates the total number of frames that have been encoded by this rtcrtpsender for this media source. syntax var framesencoded = rtcoutboundrtp
streamstats.framesencoded; value an integer value indicating the total number of video frames that this sender has encoded so far for this
stream. note: this property is only valid for video
streams. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtp
streamstats.framesencoded' in that specification. candidate recommendation initial definition. ...
RTCOutboundRtpStreamStats.lastPacketSentTimestamp - Web APIs
the lastpacketsenttimestamp property of the rtcoutboundrtp
streamstats dictionary indicates the time at which the rtcrtpsender described by this rtcoutboundrtp
streamstats object last transmitted a packet to the remote receiver. syntax var lastpackettimestamp = rtcoutboundrtp
streamstats.lastpacketsenttimestamp; value a domhighrestimestamp which specifies the time at which the most recently received packet arrived on this rtp
stream. note: this value differs from the timestamp, which represents the time at which the statistics object was created. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtp
streamstats.lastpacketsenttimestamp' in that specification. candidate recommendation initial definit...
RTCOutboundRtpStreamStats.nackCount - Web APIs
the nackcount property of the rtcoutboundrtp
streamstats dictionary is a numeric value indicating the number of times the rtcrtpsender described by this object received a nack packet from the remote receiver. a nack (negative acknowledgement, also called "generic nack") packet is used by the rtcrtpreceiver to inform the sender that one or more rtp packets it sent were lost in transport. syntax var nackcount = rtcoutboundrtp
streamstats.nackcount; value an integer value indicating how many times the sender received a nack packet from the receiver, indicating the loss of one or more packets. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtp
streamstats.nackcount' in that specification. candidate recom...
RTCOutboundRtpStreamStats.remoteId - Web APIs
the remoteid property of the rtcoutboundrtp
streamstats dictionary specifies the id of the rtcremoteinboundrtp
streamstats object representing the remote peer's rtcrtpreceiver which is sending the media to the local peer for this ssrc. syntax var remotestatsid = rtcoutboundrtp
streamstats.remoteid; value a domstring containing the id of the rtcremoteinboundrtp
streamstats object that represents the remote peer's rtcrtpreceiver for the synchronization source represented by this stats object. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtp
streamstats.remoteid' in that specification. candidate recommendation initial definition. ...
RTCOutboundRtpStreamStats.trackId - Web APIs
the trackid property of the rtcoutboundrtp
streamstats dictionary indicates the id of the rtcsenderaudiotrackattachmentstats or rtcsendervideotrackattachmentstats object representing the media
streamtrack which is being sent on this
stream. syntax var trackstatsid = rtcoutboundrtp
streamstats.trackid; value a domstring containing the id of the rtcsenderaudiotrackattachmentstats or rtcsendervideotrackattachmentstats object representing the track which is the source of the media being sent on this
stream. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtp
streamstats.trackid' in that specification. candidate recommendation initial definition. ...
RTCRemoteOutboundRtpStreamStats.reportsSent - Web APIs
usage notes sender reports, described in rfc 3550, section 6.4.1 with an overview in rfc 3550, section 6.4, are used by rtp to share data transmission quality feedback between the two peers. the data in these reports is used by webrtc to fill out various fields within the statistics objects, and this property's value indicates how many times that information was shared. ...
RTCRtpStreamStats.codecId - Web APIs
the rtcrtp
streamstats dictionary's codecid property is a string which uniquely identifies the object that was inspected to produce the data in the rtccodecstats for the rtp
stream. syntax var codecid = rtcrtp
streamstats.codecid; value a domstring which uniquely identifies the object from which the contents of the
stream's rtccodecstats are derived. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcrtp
streamstats.codecid' in that specification. candidate recommendation initial definition. ...
RTCRtpStreamStats.trackId - Web APIs
the rtcrtp
streamstats dictionary's trackid property is a string which uniquely identifies the rtcmedia
streamtrackstats object which contains the track statistics for the media
streamtrack for which statistics are provided in this object. syntax var trackid = rtcrtp
streamstats.trackid; value a domstring which uniquely identifies the rtcmedia
streamtrackstats object that provides statistics for the track for which statistics are being collected by this rtcstatsreport. note: this value is not the same as the value of mediastramtrack.id. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcrtp
streamstats.trackid' in that specification. candidate recommendation initial definition. ...
RTCRtpStreamStats.transportId - Web APIs
the rtcrtp
streamstats dictionary's transportid property is a string which uniquely identifies the object from which the statistics contained in the rtctransportstats properties in the rtcstatsreport. syntax var transportid = rtcrtp
streamstats.transportid; value a domstring uniquely identifying the source of the statistics contained the rtctransportstats properties in the rtcstatsreport. specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcrtp
streamstats.transportid' in that specification. candidate recommendation initial definition. ...
RTCTrackEvent.streams - Web APIs
the webrtc api interface rtctrackevent's read-only
streams property specifies an array of media
stream objects, one for each of the
streams that comprise the track being added to the rtcpeerconnection. syntax var
streams = trackevent.
streams; value an array of media
stream objects, one for each
stream that make up the new track. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackevent.
streams' in that specification. candidate recommendation initial specification. ...
RTCTrackEventInit.streams - Web APIs
the rtctrackeventinit dictionary's optional
streams property provides an array containing a media
stream object for each of the
streams associated with the event's track. syntax var trackeventinit = { receiver: rtpreceiver, track: media
streamtrack,
streams: [video
stream], transceiver: rtptransceiver }; var
streamlist = trackeventinit.
streams; value an array of media
stream objects, one for each
stream which make up the track. if
streams is not specified, its default value is an empty array. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackeventinit.
streams' in that specification. candidate recommendation initial specification. ...
ReadableByteStreamController.byobRequest - Web APIs
the byobrequest read-only property of the readablebyte
streamcontroller interface returns the current byob pull request, or undefined if there are no pending requests. syntax var request = readablebyte
streamcontroller.byobrequest; value a readable
streambyobrequest object instance, or undefined. examples tbd. specifications specification status comment
streamsthe definition of 'byobrequest' in that specification. living standard initial definition. ...
ReadableByteStreamController.close() - Web APIs
the close() method of the readablebyte
streamcontroller interface closes the associated
stream. note: readers will still be able to read any previously-enqueued chunks from the
stream, but once those are read, the
stream will become closed. syntax readablebyte
streamcontroller.close(); parameters none. return value undefined. exceptions typeerror the source object is not a readablebyte
streamcontroller, or the
stream is not readable for some other reason. examples tbd. specifications specification status comment
streamsthe definition of 'close()' in that specification. living standard initial definition. ...
ReadableByteStreamController.desiredSize - Web APIs
the desiredsize read-only property of the readablebyte
streamcontroller interface returns the desired size required to fill the
stream's internal queue. syntax var desiredsize = readablebyte
streamcontroller.desiredsize; value an integer. note that this can be negative if the queue is over-full. examples tbd. specifications specification status comment
streamsthe definition of 'desiredsize' in that specification. living standard initial definition. ...
ReadableByteStreamController.enqueue() - Web APIs
the enqueue() method of the readablebyte
streamcontroller interface enqueues a given chunk in the associated
stream. syntax readablebyte
streamcontroller.enqueue(chunk); parameters chunk the chunk to enqueue. return value undefined. exceptions typeerror the source object is not a readablebyte
streamcontroller, or the
stream cannot be read for some other reason, or the chunk is not an object, or the chunk's internal array buffer is non-existant or detached. examples tbd. specifications specification status comment
streamsthe definition of 'enqueue()' in that specification. living standard initial definition. ...
ReadableByteStreamController.error() - Web APIs
the error() method of the readablebyte
streamcontroller interface causes any future interactions with the associated
stream to error. syntax readablebyte
streamcontroller.error(e); parameters e the error you want future interactions to fail with. return value undefined. exceptions typeerror the source object is not a readablebyte
streamcontroller, or the
stream is not readable for some other reason. examples tbd. specifications specification status comment
streamsthe definition of 'error()' in that specification. living standard initial definition. ...
ReadableStream.locked - Web APIs
the locked read-only property of the readable
stream interface returns whether or not the readable
stream is locked to a reader. syntax var locked = readable
stream.locked; value a boolean indicating whether or not the readable
stream is locked. examples const
stream = new readable
stream({ ... }); const reader =
stream.getreader();
stream.locked // should return true, as the
stream has been locked to a reader specifications specification status comment
streamsthe definition of 'locked' in that specification. living standard initial definition. ...
ReadableStreamBYOBReader.closed - Web APIs
the closed read-only property of the readable
streambyobreader interface returns a promise that fulfills if the
stream becomes closed or the reader's lock is released, or rejects if the
stream errors. syntax var closed = readable
streambyobreader.closed; value a promise. examples tbd. specifications specification status comment
streamsthe definition of 'closed' in that specification. living standard initial definition. ...
ReadableStreamBYOBRequest.respond() - Web APIs
the error() method of the readable
streambyobrequest interface xxx syntax readable
streambyobrequestinstance.respond(byteswritten); parameters byteswritten xxx return value void. exceptions typeerror the source object is not a readable
streambyobrequest, or there is no associated controller, or the associated internal array buffer is detached. examples tbd. specifications specification status comment
streamsthe definition of 'respond()' in that specification. living standard initial definition. ...
ReadableStreamBYOBRequest.respondWithNewView() - Web APIs
the respondwithnewview() method of the readable
streambyobrequest interface xxx syntax readable
streambyobrequestinstance.respondwithnewview(view); parameters view xxx return value void. exceptions typeerror the source object is not a readable
streambyobrequest, or there is no associated controller, or the associated internal array buffer is non-existant or detached. examples tbd. specifications specification status comment
streamsthe definition of 'respondwithnewview()' in that specification. living standard initial definition. ...
ReadableStreamBYOBRequest.view - Web APIs
the view getter property of the readable
streambyobrequest interface returns the current view. syntax var view = readable
streambyobrequestinstance.view; value a typed array representing the destination region to which the controller can write generated data. examples tbd. specifications specification status comment
streamsthe definition of 'view' in that specification. living standard initial definition. ...
ReadableStreamBYOBRequest - Web APIs
the readable
streambyobrequest interface of the
streams api represents a pull request into a readablebyte
streamcontroller view. a view, as mentioned below, refers to a typed array representing the destination region to which the associated readablebyte
streamcontroller controller can write generated data. constructor none. readable
streambyobrequest instance is created automatically by readablebyte
streamcontroller as needed. properties readable
streambyobrequest.view read only returns the current view. methods readable
streambyobrequest.respond() xxx readable
streambyobrequest.respondwithnewview() xxx examples tbd. specifications specification status comment
streamsthe definition of 'readable
streambyobrequest' in that specification. living standa...
ReadableStreamDefaultController.desiredSize - Web APIs
the desiredsize read-only property of the readable
streamdefaultcontroller interface returns the desired size required to fill the
stream's internal queue. syntax var desiredsize = readable
streamdefaultcontroller.desiredsize; value an integer. note that this can be negative if the queue is over-full. examples the a readable
stream with an underlying push source and backpressure support example in the spec provides a good example of using desiredsize to manually detect when the
stream is full and apply backpressure, and also of using readable
streamdefaultcontroller.error() to manually trigger a
stream error if another part of the system it relies on fails. specifications specification status comment
streamsthe definition of 'desiredsize' in that specification. l...
ReadableStreamDefaultReader.closed - Web APIs
the closed read-only property of the readable
streamdefaultreader interface returns a promise that fulfills if the
stream becomes closed or the reader's lock is released, or rejects if the
stream errors. syntax var closed = readable
streamdefaultreader.closed; value a promise. examples in this snippet, a previously-created reader is queried to see if the
stream has been closed. when it is closed, the promise fulfills and the message is logged to the console. reader.closed.then(() => { console.log('reader closed'); }) specifications specification status comment
streamsthe definition of 'closed' in that specification. living standard initial definition. ...
TrackDefault.byteStreamTrackID - Web APIs
the byte
streamtrackid read-only property of the trackdefault interface returns the id of the specific track that the sourcebuffer should apply to. if not specified in the constructor, this value will be an empty string and the sourcebuffer can contain any tracks of the specified trackdefault.type. syntax var myid = trackdefault.byte
streamtrackid; value a domstring. example tbd ...
WritableStream.locked - Web APIs
the locked read-only property of the writable
stream interface returns a boolean indicating whether the writable
stream is locked to a writer. syntax var locked = writable
stream.locked; value a boolean indicating whether or not the writable
stream is locked. examples const writable
stream = new writable
stream({ write(chunk) { ... }, close() { ... }, abort(err) { ... } }, queuingstrategy); ... const writer = writable
stream.getwriter(); writable
stream.locked // should return true, as the
stream has been locked to a writer specifications specification status comment
streamsthe definition of 'locked' in that specification. living standard initial definition. ...
WritableStreamDefaultWriter.closed - Web APIs
the closed read-only property of the writable
streamdefaultwriter interface returns a promise that fulfills if the
stream becomes closed or the writer's lock is released, or rejects if the
stream errors. syntax var closed = writable
streamdefaultwriter.closed; value a promise. examples const writable
stream = new writable
stream({ start(controller) { }, write(chunk, controller) { ... }, close(controller) { ... }, abort(err) { ... } }, queuingstrategy); ... const writer = writable
stream.getwriter(); .. // check if the
stream is closed writer.closed.then(() => { console.log('writer closed'); }) specifications specification status comment
streamsthe definition of 'closed' in that specification. living standard initial definitio...
Index - Web APIs
the abortcontroller() constructor creates a new abortcontroller object instance. 8 abortcontroller.abort() api, abortcontroller, experimental, fetch, method, reference, abort() the abort() method of the abortcontroller interface aborts a dom request (e.g. a fetch request) before it has completed. this is able to abort fetch requests, consumption of any response body, and
streams. 9 abortcontroller.signal api, abortcontroller, experimental, fetch, property, reference, signal the signal read-only property of the abortcontroller interface returns an abortsignal object instance, which can be used to communicate with/abort a dom request as desired. 10 abortsignal api, abortsignal, dom, experimental, interface, reference the abortsign...
...luminance property of the ambientlightsensor interface returns the current light level in lux of the ambient light level around the hosting device. 51 analysernode api, analysernode, interface, reference, web audio api the analysernode interface represents a node able to provide real-time frequency and time-domain analysis information. it is an audionode that passes the audio
stream unchanged from the input to the output, but allows you to take the generated data, process it, and create audio visualizations. 52 analysernode.analysernode() api, analysernode, audio, constructor, media, reference, web audio api the analysernode constructor of the web audio api creates a new analysernode object instance. 53 analysernode.fftsize api, analyserno...
...vascriptnode the following script illustrates the use of createjavascriptnode(): 127 audiocontext.createmediaelementsource() api, audiocontext, method, reference, référence(2), web audio api, createmediaelementsource for more details about media element audio source nodes, check out the mediaelementaudiosourcenode reference page. ...
...And 431 more matches
Index
o code within the mozilla codebase (code which is linked into libxul). 118 receiving startup notifications component manager, embedding mozilla, needsupdate, xpcom sometimes it's necessary for xpcom components to receive notifications as to the progress of the application's startup process, so they can start new services at appropriate times, for example. 119 xpcom
stream guide guide, needscontent, xpcom in mozilla code, a
stream is an object which represents access to a sequence of characters. it is not that sequence of characters, though: the characters may not all be available when you read from the
stream. 120 xpcom array guide guide, needscontent, needsmarkupwork, xpcom mozilla has many array classes because each array is optim...
... the path of the system's temporary directory, desktop directory, current working directory, and so on. 155 nslocalfile components, components:frozen, xpcom, xpcom api reference a component implementing nsilocalfile. 156 nsobserverservice components, needscontent, reference, référence(2), xpcom the xpcom observer service. 157 nsscriptableinput
stream components, components:frozen, xpcom, xpcom api reference a component implementing nsiscriptableinput
stream. 158 xpcom interface reference xpcom, xpcom interface reference this is a reference to the xpcom interfaces provided by the mozilla platform. 159 component; nsiprefbranch interfaces, interfaces:scriptable, web development, xpcom, xpcom api refer...
...s of an update. 336 nsiarray interfaces, interfaces:scriptable, xpcom, xpcom api reference, xpcom interface reference an indexed collection of elements. provides basic functionality for retrieving elements at a specific position, searching for elements. indexes are zero-based, such that the last element in the array is stored at the index length-1. ...
...And 29 more matches
File I/O - Archive of obsolete content
ven directory. you can tell files from folders by calling nsifile.isdirectory() and nsifile.isfile() methods on each entry. // file is the given directory (nsifile) var entries = file.directoryentries; var array = []; while(entries.hasmoreelements()) { var entry = entries.getnext(); entry.queryinterface(components.interfaces.nsifile); array.push(entry); } reading from a file read into a
stream or a string this will allow you to read a file without locking up the ui thread while reading. please note that some i/o, such as getting file information and opening the file can still happen on the main thread and therefore block the ui for periods of time. this sample code uses netutil.jsm. so therefore for the first parameter, file, you can pass an nsifile object or a string (such as a jar p...
...tting file information and opening the file can still happen on the main thread and therefore block the ui for periods of time. this sample code uses netutil.jsm. ...
...e uses netutil.jsm. so therefore for the first parameter, file, you can pass an nsifile object or a string (such as a jar path) see: netutil.asyncfetch: components.utils.import("resource://gre/modules/netutil.jsm"); netutil.asyncfetch(file, function(input
stream, status) { if (!components.issuccesscode(status)) { // handle error! return; } // the file data is contained within input
stream. // you can read it into a string with var data = netutil.readinput
streamtostring(input
stream, input
stream.available()); }); read with content type hint it's useful to provide a content type hint to prevent the file system from doing a potentially expensive content type look up (which would be synchronous i/o). in this case an nsichannel object has to be explicitly created from the file: ...
...And 28 more matches
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
opening binary files listing 13 shows how to get a files contents as a bytestring (where 1 byte = an array of 8 bits). save a text file containing only the ascii characters "xul" and put in the path to that file. running this code should produce the output "58 55 4c" so you can check your results. note: here, we assume that the file is named temp.txt and is...
...ay of 8 bits). save a text file containing only the ascii characters "xul" and put in the path to that file. running this code should produce the output "58 55 4c" so you can check your results. note: here, we assume that the file is named temp.txt and is saved in the temp folder on the c: drive. ...
...racters "xul" and put in the path to that file. running this code should produce the output "58 55 4c" so you can check your results. note: here, we assume that the file is named temp.txt and is saved in the temp folder on the c: drive. ...
...And 24 more matches
Reading from Files - Archive of obsolete content
there are alternative xpcom apis you can use, your help in updating this pages to use the supported api is very much welcome! other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes. ...
...apis you can use, your help in updating this pages to use the supported api is very much welcome! other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes. ...
...dating this pages to use the supported api is very much welcome! other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes. reading data from a file involves getting a reference to a file and then creating an input
stream to read from it. ...
...And 23 more matches
Index - Archive of obsolete content
adcast events. 84 frame/hidden-frame creates firefox frames (i.e. xul <iframe> elements) that are not displayed to the user. 85 frame/utils provides helper functions for working with platform internals like frames and browsers. 86 fs/path provides access to the local filesystem with the nodejs path module api. 87 io/byte-
streams provides
streams for reading and writing bytes. 88 io/file provides access to the local filesystem. 89 io/text-
streams provides
streams for reading and writing text. 90 lang/functional functional helper methods. 91 lang/type functions for working with type detection. 92 loader/cuddlefish...
... call its nsiwebbrowserpersist.saveuri() method, passing it a url to download and an nsifile instance representing the local file name/path. ...
...add the following variables to your environment to disable gecko interruptible reflow: 444 document loading - from load start to finding a handler docshell, outdated_articles, uriloader this document describes the beginning of the document loading process. we start with the request to load a particular link in a particular window, and proceed up to the point at which the data
stream is dispatched to the proper handler. the final goal is to find the correct
stream listener to pump the data into when necko calls ondataavailable (e.g., we may find the html parser as the
stream listener to give the data to). 445 documentation for bidi mozilla developing mozilla, internationalization this is preliminary documentation of the changes introduced to mozilla as pa...
...And 22 more matches
Signaling and video calling - Web APIs
y establishment (ice) comes in. exchanging ice candidates two peers need to exchange ice candidates to negotiate the actual connection between them. every ice candidate describes a method that the sending peer is able to use to communicate. each peer sends candidates in the order they're discovered, and keeps sending candidates until it runs out of suggestions, even if media has already started
streaming. an icecandidate event is sent to the rtcpeerconnection to complete the process of adding a local description using pc.setlocaldescription(offer). once the two peers agree upon a mutually-compatible candidate, that candidate's sdp is used by each peer to construct and open a connection, through which media then begins to flow. if they later agree on a better (usually higher-performance) cand...
...ecandidate event is sent to the rtcpeerconnection to complete the process of adding a local description using pc.setlocaldescription(offer). once the two peers agree upon a mutually-compatible candidate, that candidate's sdp is used by each peer to construct and open a connection, through which media then begins to flow. if they later agree on a better (usually higher-performance) candidate, the
stream may change formats as needed. though not currently supported, a candidate received after media is already flowing could theoretically also be used to downgrade to a lower-bandwidth connection if needed. each ice candidate is sent to the other peer by sending a json message of type "new-ice-candidate" over the signaling server to the remote peer. each candidate message include these fields: t...
... call because you already have one open!"); } else { var clickedusername = evt.target.textcontent; if (clickedusername === myusername) { alert("i'm afraid i can't let you talk to yourself. that would be weird."); return; } targetusername = clickedusername; createpeerconnection(); navigator.mediadevices.getusermedia(mediaconstraints) .then(function(local
stream) { document.getelementbyid("local_video").srcobject = local
stream; local
stream.gettracks().foreach(track => mypeerconnection.addtrack(track, local
stream)); }) .catch(handlegetusermediaerror); } } this begins with a basic sanity check: is the user already connected? if there's already a rtcpeerconnection, they obviously can't make a call. then the name of the user that was c...
...And 22 more matches
Reading textual data - Archive of obsolete content
note that not all channels know the character encoding of the data. ...
...note that not all channels know the character encoding of the data. ...
...note that not all channels know the character encoding of the data. ...
...And 21 more matches
Capabilities, constraints, and settings - Web APIs
rticle discusses capabilities and constraints, as well as media settings, and includes an example we call the constraint exerciser. the constraint exerciser lets you experiment with the results of different constraint sets being applied to the audio and video tracks coming from the computer's a/v input devices (such as its webcam and microphone). overview the process works like this (using media
streamtrack as an example): if needed, call mediadevices.getsupportedconstraints() to get the list of supported constraints, which tells you what constrainable properties the browser knows about. this isn't always necessary, since any that aren't known will simply be ignored when you specify them—but if you have any that you can't get by without, you can start by checking to be sure they're on the ...
... track's getconstraints() method returns the set of constraints passed into the most recent call to applyconstraints(). this may not represent the actual current state of the track, due to properties whose requested values had to be adjusted and because platform default values aren't represented. for a complete representation of the track's current configuration, use getsettings(). in the media
stream api, both media
stream and media
streamtrack have constrainable properties. determining if a constraint is supported if you need to know whether or not a given constriant is supported by the user agent, you can find out by calling navigator.mediadevices.getsupportedconstraints() to get a list of the constrainable properties which the browser knows, like this: let supported = navigator.mediadevic...
... if the browser running the code above couldn't provide a 1920x1080 track but could do 1920x900, then that's what would be provided. simple constraints like these, specifying a single value, are always treated as non-required. the user agent will try to provide what you request but will not guarantee that what you get will match. however, if you use simple values for properties when calling media
streamtrack.applyconstraints(), the request will always succeed, because these values will be considered a request, not a requirement. specifying a range of values sometimes, any value within a range is acceptable for a property's value. you can specify ranges with either or both minimum and maximum values, and you can even specify an ideal value within the range, if you choose. if you provide an idea...
...And 21 more matches
Using DTMF with WebRTC - Web APIs
ment to play the audio received by the rtcpeerconnection being "called." a <button> element to trigger creating and connecting the two rtcpeerconnection objects, then sending the dtmf tones. a <div> to receive and display log text to show status information. <p>this example demonstrates the use of dtmf in webrtc. note that this example is "cheating" by generating both peers in one code
stream, rather than having each be a truly separate entity.</p> <audio id="audio" autoplay controls></audio><br/> <button name="dial" id="dial">dial</button> <div class="log"></div> javascript let's take a look at the javascript code next. keep in mind that the process of establishing the connection is somewhat contrived here; you normally don't build both ends of the connection in the sa...
...he "dial" button is clicked. callerpc and receiverpc the rtcpeerconnection objects representing the caller and the receiver, respectively. these will be initialized when the call starts up, in our connectanddial() function, as shown in starting the connection process below. dtmfsender the rtcdtmfsender object for the connection. this will be obtained while setting up the connection, in the got
stream() function shown in adding the audio to the connection. hasaddtrack because some browsers have not yet implemented rtcpeerconnection.addtrack(), therefore requiring the use of the obsolete add
stream() method, we use this boolean to determine whether or not the user agent supports addtrack(); if it doesn't, we'll fall back to add
stream(). this gets figured out in connectanddial(), as shown in st...
...if it does, we set hasaddtrack to true; otherwise, we set it to false. this variable will let the example operate even on browsers not ye...
...And 21 more matches
nsIScriptableIO
there are alternative xpcom apis you can use, your help in updating this pages to use the supported api is very much welcome! other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes. ...
...ere are alternative xpcom apis you can use, your help in updating this pages to use the supported api is very much welcome! other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes. nsiscriptableio provides a convenient api for creating files and
streams, as well as for reading and writing data to them. for your convenience, this api is published through a global io object. for more details about how to use this object, see the file and
stream guide. network/base/public/nsiscriptableio.idlscriptable please add a summary to this article. last changed in gecko 1.9 (firefox 3) inherits from: nsisupports a scriptable io object can be use...
... get a reference as with other components: var scriptableio = components.classes["@mozilla.org/io/scriptable-io;1"] .getservice(); scriptableio.getfile("profile", "cookies.txt"); method overview nsifile getfile(in astring alocation, in astring afilename); nsifile getfilewithpath(in astring afilepath); nsisupports newinput
stream(in nsivariant abase, in astring amode, [optional] in astring acharset, [optional] in astring areplacechar, [optional] in unsigned long abuffersize); nsisupports newoutput
stream(in nsivariant abase, in astring amode, [optional] in astring acharset, [optional] in astring areplacechar, [optional] in unsigned long abuffersize, [optional] in unsigned long apermissions); ...
...And 20 more matches
NetUtil.jsm
the netutil.jsm javascript code module provides easy-to-use apis for performing common network related tasks. to use these utilities, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/netutil.jsm"); once you've imported the module, you can then use its methods. ...
... the netutil.jsm javascript code module provides easy-to-use apis for performing common network related tasks. to use these utilities, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/netutil.jsm"); once you've imported the module, you can then use its methods. ...
...pt code module provides easy-to-use apis for performing common network related tasks. to use these utilities, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/netutil.jsm"); once you've imported the module, you can then use its methods. ...
...And 19 more matches
Using the Screen Capture API - Web APIs
in this article, we will examine how to use the screen capture api and its getdisplaymedia() method to capture part or all of a screen for
streaming, recording, or sharing during a webrtc conference session. note: it may be useful to note that recent versions of the webrtc adapter.js shim include implementations of getdisplaymedia() to enable screen sharing on browsers that support it but do not implement the current standard api. this works with at least chrome, edge, and firefox. capturing screen contents capturing screen contents as a live media
stream is initiated by calling navigator.mediadevices.getdisplaymedia(), which returns a promise that resolves to a
stream containing the live screen contents. starting screen capture: async/await style async function startcapture(displaymedia...
...rd api. this works with at least chrome, edge, and firefox. capturing screen contents capturing screen contents as a live media
stream is initiated by calling navigator.mediadevices.getdisplaymedia(), which returns a promise that resolves to a
stream containing the live screen contents. starting screen capture: async/await style async function startcapture(displaymediaoptions) { let capture
stream = null; try { capture
stream = await navigator.mediadevices.getdisplaymedia(displaymediaoptions); } catch(err) { console.error("error: " + err); } return capture
stream; } you can write this code either using an asynchronous function and the await operator, as shown above, or using the promise directly, as seen below. starting screen capture: promise style function startcapture...
...= await navigator.mediadevices.getdisplaymedia(displaymediaoptions); } catch(err) { console.error("error: " + err); } return capture
stream; } you can write this code either using an asynchronous function and the await operator, as shown above, or using the promise directly, as seen below. starting screen capture: promise style function startcapture(displaymediaoptions) { let capture
stream = null; return navigator.mediadevices.getdisplaymedia(displaymediaoptions) .catch(err => { console.error("error:" + err); return null; }); } either way, the user agent responds by presenting a user interface that prompts the user to choose the screen area to share. both of these implementations of startcapture() return the media
stream containing the captured display imagery. see options a...
...And 19 more matches
nsIMsgMessageService
objects that implements nsimsgmessageservice give the user top level routines related to messages like copying, displaying, attachment's manipulation, printing,
streaming the message content to eml format string, etc. ...
... objects that implements nsimsgmessageservice give the user top level routines related to messages like copying, displaying, attachment's manipulation, printing,
streaming the message content to eml format string, etc. ...
...tion, printing,
streaming the message content to eml format string, etc. ...
...And 18 more matches
RTCPeerConnection.addTrack() - Web APIs
the rtcpeerconnection method addtrack() adds a new media track to the set of tracks which will be transmitted to the other peer. note: adding a track to a connection triggers renegotiation by firing a negotiationneeded event. see starting negotiation in signaling and video calling for details. syntax rtpsender = rtcpeerconnection.addtrack(track,
stream...); parameters track a media
streamtrack object representing the media track to add to the peer connection.
stream... optional one or more local media
stream objects to which the track should be added. the specified track doesn't necessarily have to already be part of any of the specified
streams. instead, the
streams are simply a way to group tracks together on the receiving end of the connection, making sure they are synchronized. ...
...o add to the peer connection.
stream... optional one or more local media
stream objects to which the track should be added. the specified track doesn't necessarily have to already be part of any of the specified
streams. instead, the
streams are simply a way to group tracks together on the receiving end of the connection, making sure they are synchronized. any tracks that are added to the same
stream on the local end of the connection will be on the same
stream on the remote end. return value the rtcrtpsender object which will be used to transmit the media data. note: every rtcrtpsender is paired with an rtcrtpreceiver to make up an rtcrtptransceiver. ...
... added to the same
stream on the local end of the connection will be on the same
stream on the remote end. return value the rtcrtpsender object which will be used to transmit the media data. note: every rtcrtpsender is paired with an rtcrtpreceiver to make up an rtcrtptransceiver. the associated receiver is muted (indicating that it is not able to deliver packets) until and unless one or more
streams are added to the receiver by the remote peer. exceptions invalidaccesserror the specified track (or all of its underlying
streams) is already part of the rtcpeerconnection. invalidstateerror the rtcpeerconnection is closed. usage notes adding tracks to multiple
streams after the track parameter, you can optionally specify one or more media
stream objects to add the track to. only trac...
...And 18 more matches
Recording a media element - Web APIs
in this article, we'll look at an example that does just that. html content <p>click the "start" button to begin video recording for a few seconds. you can stop the video by clicking the creatively-named "stop" button. the "download" button will download the received data (although it's in a raw, unwrapped form that isn't very useful). </p> <br> let's start by looking at the key bits of the html. ...
...t"> <div id="startbutton" class="button"> start </div> <h2>preview</h2> <video id="preview" width="160" height="120" autoplay muted></video> </div> we present our main interface in two columns. on the left is a start button and a <video> element which displays the video preview; this is the video the user's camera sees. note that the autoplay attribute is used so that as soon as the
stream starts to arrive from the camera, it immediately gets displayed, and the muted attribute is specified to ensure that the sound from the user's microphone isn't output to their speakers, causing an ugly feedback loop. <div class="right"> <div id="stopbutton" class="button"> stop </div> <h2>recording</h2> <video id="recording" width="160" height="120" controls></video> <a id="downloa...
...e elapsed. it works by using an arrow function which calls window.settimeout(), specifying the promise's resolution handler as the timeout handler function. that lets us use promise syntax when using timeouts, which can be very handy when chaining promises, as we'll see later. ...
...And 17 more matches
Audio and Video Delivery - Developer guides
currently, to support all browsers we need to specify two formats, although with the adoption of mp3 and mp4 formats in firefox and opera, this is changing fast. ...
...currently, to support all browsers we need to specify two formats, although with the adoption of mp3 and mp4 formats in firefox and opera, this is changing fast. ...
...urce.connect(context.destination); // auto play source.start(0); // start was previously noteon }); }; request.send(); } catch(e) { alert('web audio api not supported'); } in this example we retrieve an mp3 file via xhr, load it into a source and play it (try it for yourself). find more about web audio api basics in using the web audio api. ...
...And 16 more matches
Taking still photos with WebRTC - Web APIs
this article shows how to use webrtc to access the camera on a computer or mobile phone with webrtc support and take a photo with it. try this sample then read on to learn how it works. you can also jump straight to the code on github if you like. the html markup our html interface has two main operational sections: the
stream and capture panel and the presentation panel. each of these is presented side-by-side in its own <div> to facilitate styling and control. ...
...arn how it works. you can also jump straight to the code on github if you like. the html markup our html interface has two main operational sections: the
stream and capture panel and the presentation panel. each of these is presented side-by-side in its own <div> to facilitate styling and control. the first panel on the left contains two components: a <video> element, which will receive the
stream from webrtc, and a <button> the user clicks to capture a video frame. <div class="camera"> <video id="video">video
stream not available.</video> <button id="startbutton">take photo</button> </div> this is straightforward, and we'll see how it ties together when we get into the javascript code. next, we have a <canvas> element into which the captured frames are stored, potentially m...
... the javascript code. we'll break it up into a few bite-sized pieces to make it easier to explain. initialization we start by wrapping the whole script in an anonymous function to avoid global variables, then setting up various variables we'll be using. ...
...And 15 more matches
WebRTC API - Web APIs
the set of standards that comprise webrtc makes it possible to share data and perform teleconferencing peer-to-peer, without requiring that the user installs plug-ins or any other third-party software. webrtc consists of several interrelated apis and protocols which work together to achieve this. ...
...upporting it. adapter.js also handles prefixes and other naming differences to make the entire webrtc development process easier, with more broadly compatible results. the library is also available as an npm package. to learn more about adapter.js, see improving compatibility using webrtc adapter.js. webrtc concepts and usage webrtc serves multiple purposes; together with the media capture and
streams api, they provide powerful multimedia capabilities to the web, including support for audio and video conferencing, file exchange, screen sharing, identity management, and interfacing with legacy telephone systems including support for sending dtmf (touch-tone dialing) signals. connections between peers can be made without requiring any special drivers or plug-ins, and can often be made without a...
... legacy telephone systems including support for sending dtmf (touch-tone dialing) signals. connections between peers can be made without requiring any special drivers or plug-ins, and can often be made without any intermediary servers. connections between two peers are represented by the rtcpeerconnection interface. ...
...And 15 more matches
Writing to Files - Archive of obsolete content
file and
stream guide: [ nsiscriptableio | accessing files | getting file information | reading from files | writing to files | moving, copying and deleting files | uploading and downloading files | working with directories ] important note: the pages from the file and
stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes). there are alternative xpcom apis you can use, your help in updating this pages to use the supported api is very much welcome! other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes. to write to a file, an output
stream is used. an o...
...xes). there are alternative xpcom apis you can use, your help in updating this pages to use the supported api is very much welcome! other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes. to write to a file, an output
stream is used. ...
...is very much welcome! other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes. to write to a file, an output
stream is used. an output
stream is an object which can be used to write bytes, strings and other values to a file. to create an output
stream, use nsiscriptableio.newoutput
stream(). this method has a number of options to specify text or binary writing, the character set, and whether to append to an existing file or create a new one. to create an input
stream, first get a reference to a nsifile, and then use nsiscriptableio.newoutput
stream() to open a
stream for writing to it. to learn more about file objects, see files and
streams. try...
...And 14 more matches
HTML parser threading
e network off the main thread. (there's currently one parser thread serving all parser instances.) data received from document.write() is parsed on the main thread. main objects nshtml5parser contains the code for dealing with data from document.write(). (for historical reasons, it also contains unrelated fragment parsing code that should be refactored into a separate class in due course.) nshtml5
streamparser contains the code for dealing with data from the network. nshtml5parser owns nshtml5
streamparser. script-created parsers (i.e. parsers created using document.open()) don't have an nshtml5
streamparser instance. nshtml5parser has one tokenizer/tree builder pair for parsing data from document.write(). it also has another lazily initialized tokenizer/tree builder for speculatively scanning the ...
...ed parsers (i.e. parsers created using document.open()) don't have an nshtml5
streamparser instance. nshtml5parser has one tokenizer/tree builder pair for parsing data from document.write(). it also has another lazily initialized tokenizer/tree builder for speculatively scanning the tail of document.write() data when the parser blocks without parsing the document.write() data to completion. nshtml5
streamparser has one tokenizer/tree builder pair for parsing data from the network. additionally, each nshtml5parser has an associated nshtml5treeopexecutor that turns the output (tree operations; discussed later) of the portable parser core into actions performed on the gecko dom. ...
...ing the document.write() data to completion. nshtml5
streamparser has one tokenizer/tree builder pair for parsing data from the network. additionally, each nshtml5parser has an associated nshtml5treeopexecutor that turns the output (tree operations; discussed later) of the portable parser core into actions performed on the gecko dom. initialization an nshtml5parser is constructed without an nshtml5
streamparser due to legacy code structure around parser creation. if the parser is not script-created, nshtml5parser::markasnotscriptcreated() is called to create an nshtml5
streamparser for the nshtml5parser. due to legacy interface design oddities, an nshtml5parser is initialized by calling nshtml5parser::parse(nsiuri*, nsirequestobserver*, void*, nsdtdmode). that method call doesn't yet cause anything...
...And 14 more matches
Components.Constructor
uctor() varies depending upon the arguments given to components.constructor() when called. if only one argument is given, that argument is the contract id of the xpcom component to create. the component is then returned immediately, with only the base interface nsisupports available on it; you must call nsisupports.queryinterface() on it to call methods on the object. ...
...onents.constructor() when called. if only one argument is given, that argument is the contract id of the xpcom component to create. the component is then returned immediately, with only the base interface nsisupports available on it; you must call nsisupports.queryinterface() on it to call methods on the object. ...
...only one argument is given, that argument is the contract id of the xpcom component to create. the component is then returned immediately, with only the base interface nsisupports available on it; you must call nsisupports.queryinterface() on it to call methods on the object. ...
...And 14 more matches
Necko walkthrough
nsdocshell as an example client of the nsihttpchannel api nsdocshell::loaduri(string) create nsiuri from string nsdocshell::loaduri(nsiuri) creates 2 nsiinput
stream for read response from; passes them with uri to ... nsdocshell::internalload nsdocshell::douriload opens the nsichannel for the uri (ns_newchannel) if "http:", it will be an nsihttpchannel nsdocshell::dochannelload nsuriloader::openuri passes an nsi
streamlistener pointer, 'loader' to nsuriloader::openchannel - it creates an nsdocumentopeninfo object, which implements nsi
streamlistener, i.e. has onstartrequest, onstoprequest, ondataavailable, the three functions in which channel responses are received asynchronously. nshttpchannel::asyncopen called from openuri; open...
...d the best, since the opening happens in the context of openuri, its calling function. this is where it hits necko code. but the interface for clients of necko is important to consider: send request uri helps creates channel setup channel (headers, request data, response callback...) channel->asyncopen. receive response get a callback to each of these: nsi
streamlistener::onstartrequest (header info) nsi
streamlistener::ondataavailable (data in single or multiple chunks) nsi
streamlistener::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. there is an option to receive o...
... we're proxying or not fires off the dns prefetch request (dispatched to dns thread pool) some other things nshttpchannel::connect might to a speculativeconnect (pre open tcp socket) nshttpchannel::continueconnect some cache stuff nshttpchannel::setuptransaction creates new nshttptransaction, and inits it with mrequesthead (the request headers) and mupload
stream (which was created from the request data in channel setup) gets an nsiasyncinput
stream (for the response; corresponds to the nspipeinput
stream for the response
stream pipe) passes it to nsinput
streampump nshttpchannel::ghttphandler->initiatetransaction (called from connect) this is the global nshttphandler object, which adds the transaction to the nshttpconnectionmgr (one of the...
...And 13 more matches
RTCPeerConnection - Web APIs
rtcpeerconnection interface returns one of the string values specified by the rtcsignalingstate enum; these values describe the state of the signaling process on the local end of the connection while connecting or reconnecting to another peer. see signaling in lifetime of a webrtc session for more details about the signaling process.event handlersalso inherits event handlers from: eventtargetonadd
stream the rtcpeerconnection.onadd
stream event handler is a property containing the code to execute when the add
stream event, of type media
streamevent, is received by this rtcpeerconnection. such an event is sent when a media
stream is added to this connection by the remote peer. the event is sent immediately after the call setremotedescription() and doesn't wait for the result of the sdp negotiation.on...
...rried out as the offerer, because some session changes cannot be negotiated as the answerer.onpeeridentity the rtcpeerconnection.onpeeridentity event handler is a property containing the code to execute whent the peeridentity event, of type event, is received by this rtcpeerconnection. ...
... session changes cannot be negotiated as the answerer.onpeeridentity the rtcpeerconnection.onpeeridentity event handler is a property containing the code to execute whent the peeridentity event, of type event, is received by this rtcpeerconnection. ...
...And 13 more matches
Document Loading - From Load Start to Finding a Handler - Archive of obsolete content
dramatis personae this document focuses on the interaction of three classes with each other, but other mozilla components are also involved. ...
...dramatis personae this document focuses on the interaction of three classes with each other, but other mozilla components are also involved. ...
...dramatis personae this document focuses on the interaction of three classes with each other, but other mozilla components are also involved. ...
...And 12 more matches
Creating Sandboxed HTTP Connections
n be generated from it using nsiioservice's newchannelfromuri method: // get a channel for that nsiuri var channel = ioservice.newchannelfromuri(uri); to initiate the connection, the asyncopen method is called. it takes two arguments: a listener and a context that is passed to the listener's methods. channel.asyncopen(listener, null); http notifications the above mentioned listener is a nsi
streamlistener, which gets notified about events such as http redirects and data availability. onstartrequest - gets called when a new request is initiated. ondataavailable - new data is available. since this is a
stream, it could be called multiple times (depending on the size of the returned data, networking conditions, etc). onstoprequest - the request has finished. onchannelredirect - when...
...ed when a new request is initiated. ondataavailable - new data is available. since this is a
stream, it could be called multiple times (depending on the size of the returned data, networking conditions, etc). onstoprequest - the request has finished. onchannelredirect - when a redirect happens, a new nsichannel is created, and both the old and new ones are passed in as arguments. since nsi
streamlistener does not cover cookies, the current channel being used will need to be stored as a global, since another listener will be used for cookie notifications (covered in the next section). it is usually best to use a javascript wrapper that implements all the required methods and calls the specified callback function when the connection has completed. below is an example: // global channel var...
...hannel var gchannel; // init the channel // the io service var ioservice = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); // create an nsiuri var uri = ioservice.newuri(myurlstring, null, null); // get a channel for that nsiuri gchannel = ioservice.newchannelfromuri(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: "", // nsi
streamlistener onstartrequest: function (arequest, acontext) { this.mdata = ""; }, ondataavailable: function (arequest, acontext, a
stream, asourceoffse...
...And 12 more matches
nsIMsgFolder
bel); nsimsgdatabase getmsgdatabase(in nsimsgwindow msgwindow); void setmsgdatabase(in nsimsgdatabase msgdatabase); nsimsgdatabase getdbfolderinfoanddb(out nsidbfolderinfo folderinfo); nsimsgdbhdr getmessageheader(in nsmsgkey msgkey); boolean shouldstoremsgoffline(in nsmsgkey msgkey); boolean hasmsgoffline(in nsmsgkey msgkey); nsiinput
stream getofflinefile
stream(in nsmsgkey msgkey, out pruint32 offset, out pruint32 size); void downloadmessagesforoffline(in nsisupportsarray messages, in nsimsgwindow window); nsimsgfolder getchildwithuri(in acstring uri, in boolean deep, in boolean caseinsensitive); void downloadallforoffline(in nsiurllistener listener, in nsimsgwindow window); void enablenotificatio...
... void notifyitemadded(in nsisupports item); void notifyitemremoved(in nsisupports item); void notifyfolderevent(in nsiatom event); void listdescendents(in nsisupportsarray descendents); void shutdown(in boolean shutdownchildren); void setinvfeditsearchscope(in boolean asearchthisfolder, in boolean asetonsubfolders); void copydatatooutput
streamforappend(in nsiinput
stream ai
stream, in long alength, in nsioutput
stream output
stream); void copydatadone(); void setjunkscoreformessages(in nsisupportsarray amessages, in acstring ajunkscore); void applyretentionsettings(); boolean fetchmsgpreviewtext([array, size_is (anumkeys)] in nsmsgkey akeystofetch, in unsigned long anumkeys, in boolean alocalonly, in nsi...
...(); boolean fetchmsgpreviewtext([array, size_is (anumkeys)] in nsmsgkey akeystofetch, in unsigned long anumkeys, in boolean alocalonly, in nsiurllistener aurllistener); void addkeywordstomessages(in nsisupportsarray amessages, in acstring akeywords); void removekeywordsfrommessages(in nsisupportsarray amessages, in acstring akeywords); autf8string getmsgtextfrom
stream(in nsimsgdbhdr amsghdr, in nsiinput
stream a
stream, in long abytestoread, in long amaxoutputlen, in boolean acompressquotes); attributes attribute type description supportsoffline boolean readonly offlinestoreoutput
stream nsioutput
stream readonly offlinestoreinput
stream nsiinput
stream readonly retentionsettings nsimsgr...
...And 12 more matches
NPN_RequestRead - Archive of obsolete content
rangelist range of bytes in the form of a linked list of npbyterange objects, each of which specifies a request for a range of bytes. ...
... rangelist range of bytes in the form of a linked list of npbyterange objects, each of which specifies a request for a range of bytes. ...
... rangelist range of bytes in the form of a linked list of npbyterange objects, each of which specifies a request for a range of bytes. ...
...And 11 more matches
ByteLengthQueuingStrategy - Web APIs
the bytelengthqueuingstrategy interface of the the
streams api provides a built-in byte length queuing strategy that can be used when constructing
streams. constructor bytelengthqueuingstrategy() creates a new bytelengthqueuingstrategy object instance. properties none. methods bytelengthqueuingstrategy.size() returns the given chunk’s bytelength property. examples const queueingstrategy = new bytelengthqueuingstrategy({ highwatermark: 1 }); const readable
stream = new readable
stream({ start(controller) { ... }, pull(controller) { ... ...
... new bytelengthqueuingstrategy object instance. properties none. methods bytelengthqueuingstrategy.size() returns the given chunk’s bytelength property. examples const queueingstrategy = new bytelengthqueuingstrategy({ highwatermark: 1 }); const readable
stream = new readable
stream({ start(controller) { ... }, pull(controller) { ... }, cancel(err) { console.log("
stream error:", err); } }, queueingstrategy); var size = queueingstrategy.size(chunk); specifications specification status comment
streamsthe definition of 'bytelengthqueuingstrategy' in that specification. living standard initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribu...
...to change preferences in firefox, visit about:config.ie no support noopera full support 46safari ? webview android full support ...
...And 11 more matches
Miscellaneous - Archive of obsolete content
ed tab var history = mainwindow.gbrowser.selectedbrowser.webnavigation.sessionhistory; and then get the page you want, and it's postdata. this example obtains the post data of the last page. ...
...of the last page. var postdata = history.getentryatindex(history.index-1,false).queryinterface(ci.nsishentry).postdata; if you got here all by yourself, your problem must be at reading the postdata, because it's a nsiinput
stream object, whose available function always returns 0. and if you read it directly, you always got nothing. ...
...data = history.getentryatindex(history.index-1,false).queryinterface(ci.nsishentry).postdata; if you got here all by yourself, your problem must be at reading the postdata, because it's a nsiinput
stream object, whose available function always returns 0. and if you read it directly, you always got nothing. ...
...And 10 more matches
nsITransport
a transport can have an event sink associated with it. ...
...a transport can have an event sink associated with it. ...
...y way specify the resource. inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) this interface provides methods to open blocking or non-blocking, buffered or unbuffered
streams to the resource. the name "transport" is meant to connote the inherent data transfer implied by this interface (that is, data is being transfered in some fashion via the
streams exposed by this interface). a transport can have an event sink associated with it. the event sink receives transport-specific events as the transfer is occurring. ...
...And 10 more matches
CountQueuingStrategy - Web APIs
the countqueuingstrategy interface of the the
streams api provides a built-in chunk counting queuing strategy that can be used when constructing
streams. constructor countqueuingstrategy() creates a new countqueuingstrategy object instance. properties none. methods countqueuingstrategy.size() returns 1. examples const queueingstrategy = new countqueuingstrategy({ highwatermark: 1 }); const writable
stream = new writable
stream({ // implement the sink write(chunk) { ... }, close() { ... }, abort(err) { console.log("sink error:", err); } }, queueingstrategy); var size = queueingstrategy.size(); specifications specification status comment
streamsthe definition of 'countqueuingstrategy' in that specification. living standard ...
...to change preferences in firefox, visit about:config.ie no support noopera full support 46safari ? webview android full support ...
... full support 59edge full support 16firefox full support 57disabled full support 57disabled disabled from version 57: this feature is behind the dom.
streams.enabled preference (needs to be set to true) and the javascript.options.
streams preference (needs to be set to true). to change preferences in firefox, visit about:config.ie no support noopera full support 46safari ? webview android full support 59chrome android full support ...
...And 10 more matches
Introduction to the Real-time Transport Protocol (RTP) - Web APIs
sed atop udp for its performance as well as its multiplexing and checksum features. rtp supports multicast; while this isn't yet important for webrtc, it's likely to matter in the future, when webrtc is (hopefully) enhanced to support multi-user conversations. rtp isn't limited to use in audiovisual communication. it can be used for any form of continuous or active data transfer, including data
streaming, active badges or status display updates, or control and measurement information transport. things rtp doesn't do rtp itself doesn't provide every possible feature, which is why other protocols are also used by webrtc. some of the more noteworthy things rtp doesn't include: editor's note: we should add information about where these deficiencies are compensated for, if they are at all. r...
...f places within the webrtc infrastructure. for example, rtcp handles qos monitoring. rtcpeerconnection and rtp each rtcpeerconnection has methods which provide access to the list of rtp transports that service the peer connection. these correspond to the following three types of transport supported by rtcpeerconnection: rtcrtpsender rtcrtpsenders handle the encoding and transmission of media
streamtrack data to a remote peer. the senders for a given connection can be obtained by calling rtcpeerconnection.getsenders(). rtcrtpreceiver rtcrtpreceivers provide the ability to inspect and obtain information about incoming media
streamtrack data. a connection's receivers can be obtained by calling rtcpeerconnection.getreceivers(). rtcrtptransceiver an rtcrtptransceiver is a pair of one rtp send...
...crtpreceivers provide the ability to inspect and obtain information about incoming media
streamtrack data. a connection's receivers can be obtained by calling rtcpeerconnection.getreceivers(). rtcrtptransceiver an rtcrtptransceiver is a pair of one rtp sender and one rtp receiver which share an sdp mid attribute, which means they share the same sdp media m-line (representing a bidirectional srtp
stream). these are returned by the rtcpeerconnection.gettransceivers() method, and each mid and transceiver share a one-to-one relationship, with the mid being unique for each rtcpeerconnection. ...
...And 10 more matches
nsITraceableChannel
see nsitraceablechannel...
...tatus = 3xx on nsihttpchannel), since otherwise you may end up with two listeners registered for a channel; qi the channel passed as the "subject" to your observer to nsitraceablechannel, and replace the default nsi
streamlistener (that passes the data to the original requester - e.g. to xmlhttprequest or to the browser tab that made the request) with your own implementation (see "implementing nsi
streamlistener" below). after that your nsi
streamlistener implementation will get the response data and will be able to pass the data on to the original nsi
streamlistener (possibly modifying it). see nsitraceablechannel, intercept http traffic for a more detailed description with code samples. see modify url before loading page in firefox for an overview of how to modify a request before it is made...
...our nsi
streamlistener implementation will get the response data and will be able to pass the data on to the original nsi
streamlistener (possibly modifying it). see nsitraceablechannel, intercept http traffic for a more detailed description with code samples. see modify url before loading page in firefox for an overview of how to modify a request before it is made. method overview nsi
streamlistener setnewlistener(in nsi
streamlistener alistener); methods setnewlistener() replaces the channel's current listener with a new one, returning the listener previously assigned to the channel. nsi
streamlistener setnewlistener( in nsi
streamlistener alistener ); parameters alistener an nsi
streamlistener to be notified of events on the http channel. return value the previous ...
...And 9 more matches
nsIZipReader
rn); nsiutf8stringenumerator findentries(in string apattern); obsolete since gecko 10 nsiprincipal getcertificateprincipal(in autf8string aentryname); nsiprincipal getcertificateprincipal(in string aentryname); obsolete since gecko 10 nsizipentry getentry(in autf8string zipentry); nsizipentry getentry(in string zipentry); obsolete since gecko 10 nsiinput
stream getinput
stream(in autf8string zipentry); nsiinput
stream getinput
stream(in string zipentry); obsolete since gecko 10 nsiinput
stream getinput
streamwithspec(in autf8string ajarspec, in autf8string zipentry); nsiinput
stream getinput
streamwithspec(in autf8string ajarspec, in string zipentry); obsolete since gecko 10 boolean hasentry(in autf8string zipentry); void...
...ete since gecko 10 attributes attribute type description file nsifile the file that represents the zip with which this zip reader was initialized. read only. manifestentriescount pruint32 the number of entries in the manifest. read only. methods close() closes a zip reader. subsequent attempts to extract() files or read from its input
stream will result in an error. subsequent attempts to access a nsizipentry obtained from this zip reader will cause unspecified behavior. void close(); parameters none. example demonstrating this function: list contents of xpi and read file contents extract() extracts a zip entry into a local file specified by outfile. the entry must be stored in the zip in either uncompressed or deflate-compr...
...t conforming to this syntax has undefined behavior. return value the nsiutf8stringenumerator containing the matching entry names. exceptions thrown ns_error_illegal_value on many but not all invalid apattern values. getcertificateprincipal() returns an object describing the entity which signed an entry. parsemanifest must be called first. if aentryname is an entry in the jar, getinput
stream() must be called after parsemanifest. if aentryname is an external file which has meta-information stored in the jar, verifyexternalfile (not yet implemented) must be called before getprincipal. nsiprincipal getcertificateprincipal( in string aentryname ); parameters aentryname missing description return value an nsiprincipal. example demonstrating this function: list contents of xp...
...And 9 more matches
MediaDevices.getUserMedia() - Web APIs
the mediadevices.getusermedia() method prompts the user for permission to use a media input which produces a media
stream with tracks containing the requested types of media. that
stream can include, for example, a video track (produced by either a hardware or virtual video source such as a camera, video recording device, screen sharing service, and so forth), an audio track (similarly, produced by a physical or virtual audio source like a microphone, a/d converter, or the like), and possibly other track types. it returns a promise that resolves to a media
stream object. if the user denies permission, or matching media is not available, then the promise is rejected with notallowederror or notfounderror respectively. note: it's possible for the returned promise to neither resolve nor reject, as...
...le, then the promise is rejected with notallowederror or notfounderror respectively. note: it's possible for the returned promise to neither resolve nor reject, as the user is not required to make a choice at all and may simply ignore the request. ...
...cted with notallowederror or notfounderror respectively. note: it's possible for the returned promise to neither resolve nor reject, as the user is not required to make a choice at all and may simply ignore the request. ...
...And 9 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
le); file.remove(false); // debug dump("sessionstore> clear: " + file.leafname + "\n"); } }, _readfile method reads the nslfile object passed as a parameter, and returns its contents as a text string. when the file is read in, its contents are converted from utf-8 to unicode. ...
...sionstore> clear: " + file.leafname + "\n"); } }, _readfile method reads the nslfile object passed as a parameter, and returns its contents as a text string. when the file is read in, its contents are converted from utf-8 to unicode. listing 22: content for _readfile method _readfile: function(afile) { try { var
stream = components.classes["@mozilla.org/network/file-input-
stream;1"]. ...
...ads the nslfile object passed as a parameter, and returns its contents as a text string. when the file is read in, its contents are converted from utf-8 to unicode. listing 22: content for _readfile method _readfile: function(afile) { try { var
stream = components.classes["@mozilla.org/network/file-input-
stream;1"]. createinstance(components.interfaces.nsifileinput
stream);
stream.init(afile, 0x01, 0, 0); var cv
stream = components.classes["@mozilla.org/intl/converter-input-
stream;1"]. ...
...And 8 more matches
nsIJSON
he idl file has portions of the idl commented out because they represent things that can't actually be properly described by idl; however, for the purposes of this article, we'll pretend they can be and ignore that issue. ...
...rtions of the idl commented out because they represent things that can't actually be properly described by idl; however, for the purposes of this article, we'll pretend they can be and ignore that issue. ...
...of the idl commented out because they represent things that can't actually be properly described by idl; however, for the purposes of this article, we'll pretend they can be and ignore that issue. ...
...And 8 more matches
Writing textual data - Archive of obsolete content
this article describes how to write textual data to
streams, files and sockets in an internationalization-aware way. when writing textual data to an output
stream or to a file, you need to pick a character encoding. some character encodings (utf-8, utf-16, utf-32) can represent "all" characters (the full repertoire of unicode) while others can only represent a subset of the full repertoire. when the file is to be read only by the application/extension itself, using utf-8 is often the best choice — it can represent all characters, and ascii characters are represented efficiently. ...
...r encoding. some character encodings (utf-8, utf-16, utf-32) can represent "all" characters (the full repertoire of unicode) while others can only represent a subset of the full repertoire. when the file is to be read only by the application/extension itself, using utf-8 is often the best choice — it can represent all characters, and ascii characters are represented efficiently. ...
... characters (the full repertoire of unicode) while others can only represent a subset of the full repertoire. when the file is to be read only by the application/extension itself, using utf-8 is often the best choice — it can represent all characters, and ascii characters are represented efficiently. ...
...And 7 more matches
NPN_Write - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary pushes data into a
stream produced by the plug-in and consumed by the browser. syntax #include <npapi.h> int32 npn_write(npp instance, np
stream*
stream, int32 len, void* buf); parameters the function has the following parameters: instance pointer to the current plug-in instance.
stream pointer to the
stream into which to push the data. len length in bytes of the data specified by buf. buf a pointer to a buffer of data to deliver to the
stream. returns if successful, the function returns a positive integer representing the number of bytes written (consumed by the browser). this number depends on the size of the browser's memory buffers, the nu...
...ointer to the
stream into which to push the data. len length in bytes of the data specified by buf. buf a pointer to a buffer of data to deliver to the
stream. returns if successful, the function returns a positive integer representing the number of bytes written (consumed by the browser). this number depends on the size of the browser's memory buffers, the number of active
streams, and other factors. if unsuccessful, the plug-in returns a negative integer. this indicates that the browser encountered an error while processing the data, so the plug-in should terminate the
stream by calling npn_destroy
stream(). description npn_write() delivers a buffer from the
stream to the instance. ...
... number of active
streams, and other factors. if unsuccessful, the plug-in returns a negative integer. this indicates that the browser encountered an error while processing the data, so the plug-in should terminate the
stream by calling npn_destroy
stream(). description npn_write() delivers a buffer from the
stream to the instance. a plug-in can call this function multiple times after creating a
stream with npn_new
stream(). the browser makes a copy of the buffer if necessary, so the plug-in can free the buffer as the method returns, if desired. see "example of sending a
stream" for an example that includes npn_write(). example this example pushes a snippet of html over a newly created
stream, then destroys the
stream when it's done. note: you should actually handle errors, which this example ...
...And 7 more matches
NPP_Write - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary delivers data to a plug-in instance. (remark: hence the name "npp_write" is misleading - just think of:"data_arrived") syntax #include <npapi.h> int32 npp_write(npp instance, np
stream*
stream, int32 offset, int32 len, void* buf); parameters the function has the following parameters: instance pointer to the current plug-in instance.
stream pointer to the current
stream. ...
...rrived") syntax #include <npapi.h> int32 npp_write(npp instance, np
stream*
stream, int32 offset, int32 len, void* buf); parameters the function has the following parameters: instance pointer to the current plug-in instance.
stream pointer to the current
stream. offset offset in bytes of buf from the beginning of the data in the
stream. can be used to check
stream progress or by range requests from npn_requestread. len length in bytes of buf; number of bytes accepted. buf buffer of data, delivered by the
stream, that contains len bytes of data offset bytes from the start of the
stream. the buffer is allocated by the browser and is deleted after returning from the function, so the plug-in should make a copy of the data it need...
... of the data it needs to keep. returns the plug-in should return the number of bytes written (consumed by the instance). if the return value is smaller than the size of the buffer, the browser sends the remaining data to the plug-in through subsequent calls to npp_writeready and npp_write. if unsuccessful, the function signals an error by returning a negative value. ...
...And 7 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
(aom) aom, accessibility, dom, glossary, reference the accessibility tree, or accessibility object model (aom), contains accessibility-related information for most html elements. 13 adobe flash adobe, codingscripting, flash, glossary, infrastructure flash is an obsolescent technology developed by adobe for viewing expressive web applications, multimedia content, and
streaming media. adobe flash can run from supporting web browsers via a browser plug-in. 14 ajax ajax, codingscripting, glossary, infrastructure, l10n:priority ajax, which initially stood for asynchronous javascript and xml, is a programming practice of building complex, dynamic webpages using a technology known as xmlhttprequest. 15 algorithm codingscripting, glossar...
.... 81 code splitting glossary, reference, web performance, code splitting, latency code splitting is the splitting of code into various bundles or components which can then be loaded on demand or in parallel. 82 codec glossary, webmechanics a codec (a blend word derived from "coder-decoder") is a program, algorithm, or device that encodes or decodes a data
stream. a given codec knows how to handle a specific encoding or compression technology. 83 compile codingscripting, glossary compiling is the process of transforming a computer program written in a given language into an equivalent program of another language. a compiler is a software to execute this task. sometimes, this task is also referred to as "assembling" or "build", which t...
...cript is usually declared at the instance of a class. 89 continuous media glossary, media continuous media is data where there is a timing relationship between source and destination. the most common examples of continuous media are audio and motion video. continuous media can be real-time (interactive), where there is a "tight" timing relationship between source and sink, or
streaming (playback), where the relationship is less strict. 90 control flow codingscripting, glossary, javascript the control flow is the order in which the computer executes statements in a script. 91 cookie glossary, webmechanics a cookie is a small piece of information left on a visitor's computer by a website, via a web browser. 92 copyleft g...
...And 7 more matches
nsICacheEntryDescriptor
netwerk/cache/nsicacheentrydescriptor.idlscriptable this interface provides a cache entry descriptor. ...
...k/cache/nsicacheentrydescriptor.idlscriptable this interface provides a cache entry descriptor. ...
...e this interface provides a cache entry descriptor. inherits from: nsicacheentryinfo last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void close(); void doom(); void doomandfailpendingrequests(in nsresult status); string getmetadataelement(in string key); void markvalid(); nsiinput
stream openinput
stream(in unsigned long offset); nsioutput
stream openoutput
stream(in unsigned long offset); void setdatasize(in unsigned long size); void setexpirationtime(in pruint32 expirationtime); void setmetadataelement(in string key, in string value); void visitmetadata(in nsicachemetadatavisitor visitor); attributes attribute type description accessgranted nscacheaccessmode get the access granted to this descriptor. see nsicache for the ...
...And 7 more matches
ImageCapture - Web APIs
methods the imagecapture interface is based on eventtarget, so it includes the methods defined by that interface as well as the ones listed below. ...
... methods the imagecapture interface is based on eventtarget, so it includes the methods defined by that interface as well as the ones listed below. ...
... methods the imagecapture interface is based on eventtarget, so it includes the methods defined by that interface as well as the ones listed below. ...
...And 7 more matches
Web APIs
nter stylescss font loading api cssomcanvas apichannel messaging apiconsole apicredential management apiddomeencoding apiencrypted media extensionsffetch apifile system api frame timing apifullscreen apiggamepad api geolocation apihhtml drag and drop apihigh resolution timehistory apiiimage capture apiindexeddbintersection observer apillong tasks api mmedia capabilities api media capture and
streamsmedia session apimedia source extensions media
stream recordingnnavigation timingnetwork information api ppage visibility apipayment request apiperformance apiperformance timeline apipermissions apipointer eventspointer lock apiproximity events push api rresize observer apiresource timing apisserver sent eventsservice workers apistoragestorage access api
streams ttouch eventsuurl apivvibration...
...mathproduct cssmathsum cssmathvalue cssmediarule cssnamespacerule cssnumericvalue cssomstring csspagerule csspositionvalue cssprimitivevalue csspseudoelement cssrule cssrulelist cssstyledeclaration cssstylerule cssstylesheet cssstylevalue csssupportsrule cssunitvalue cssunparsedvalue cssvalue cssvaluelist cssvariablereferencevalue cache cachestorage canvascapturemedia
streamtrack canvasgradient canvasimagesource canvaspattern canvasrenderingcontext2d caretposition channelmergernode channelsplitternode characterdata childnode client clients clipboard clipboardevent clipboarditem closeevent comment compositionevent constantsourcenode constrainboolean constraindomstring constraindouble constrainulong contentindex contentindexevent convolvernode countqueuings...
...ctreadonly domstring domstringlist domstringmap domtimestamp domtokenlist domuserdata datatransfer datatransferitem datatransferitemlist dedicatedworkerglobalscope delaynode deprecationreportbody devicelightevent devicemotionevent devicemotioneventacceleration devicemotioneventrotationrate deviceorientationevent deviceproximityevent directoryentrysync directoryreadersync displaymedia
streamconstraints document documentfragment documentorshadowroot documenttimeline documenttouch documenttype doublerange dragevent dynamicscompressornode e ext_blend_minmax ext_color_buffer_float ext_color_buffer_half_float ext_disjoint_timer_query ext_float_blend ext_frag_depth ext_srgb ext_shader_texture_lod ext_texture_compression_bptc ext_texture_compression_rgtc ext_texture_filter_anisotropic ec...
...And 7 more matches
Introducing the Audio API extension - Archive of obsolete content
isting code if possible; see the compatibility table at the bottom of this page to guide your decision. be aware that this feature may cease to work at any time. please note that this document describes a non-standard experimental api. this api has been deprecated since gecko 22, disabled since gecko 28, and removed from gecko 31. you should use the web audio api instead. reading audio
streams the loadedmetadata event when the metadata of the media element is available, it triggers a loadedmetadata event. this event has the following attributes: mozchannels: number of channels mozsamplerate: sample rate per second mozframebufferlength: number of samples collected in all channels this information is needed later to decode the audio data
stream. the following example extracts t...
... in mozframebufferlength) gets filled with those samples. once the buffer is full, the event mozaudioavailable is triggered. this event therefore contains the raw samples of a period of time. those samples may or may not have been played yet at the time of the event and have not been adjusted for mute or volume settings on the media element. playing, pausing, and seeking the audio also affect the
streaming of this raw audio data. the mozaudioavailable event has 2 attributes: framebuffer: framebuffer (i.e., an array) containing decoded audio sample data (i.e., floats) time: timestamp for these samples measured from the start in seconds the framebuffer contains an array of audio samples. it's important to note that the samples are not separated by channels; they are all delivered together. ...
...users must create an audio object and then use the mozsetup() function to specify the number of channels and the frequency (in hz). for example: // create a new audio element var audioou...
...And 6 more matches
NPAPI plugin reference - Archive of obsolete content
required during embedded mode printing. npapi plug-in side api this chapter describes methods in the plug-in api that are available from the plug-in object; these allow plug-ins to interact with the browser. the names of all of these methods begin with npp_ to indicate that they are implemented by the plug-in and called by the browser. npbyterange represents a particular range of bytes from a
stream. npclass npclass is a structure that holds a set of pointers to functions that make up the behavior of an instance of an npclass (i.e. an npobject). npembedprint substructure of npprint that contains platform-specific information used during embedded mode printing. npevent represents an event passed by npp_handleevent() to a windowless plug-in. npfullprint substructure of npprint that con...
...fullprint substructure of npprint that contains platform-specific information used during full-page mode printing. npidentifier npidentifier is an opaque type used for method and property identifiers, such as strings or integers. npidentifiers are unique, in that for any given string or integer, there is only one npidentifier. the lifetime of npidentifiers is controlled by the browser. npn new
stream requests the creation of a new data
stream produced by the plug-in and consumed by the browser. npn_createobject allocates a new npobject. npn_destroy
stream closes and deletes a
stream. npn_enumerate gets the names of the properties and methods of the specified npobject. npn_evaluate evaluates a script in the scope of the specified npobject. npn_forceredraw asks the plugin host to imme...
...rowser. npn_getintidentifier returns an opaque identifier for the integer that is passed in. npn_getproperty gets the value of a property on the specified npobject. npn_getstringidentifier returns an opaque identifier for the string that is passed in. npn_getstringidentifiers returns an array of opaque identifiers for the names that are passed in. npn_geturl asks the browser to create a
stream for the specified url. npn_geturlnotify requests creation of a new
stream with the contents of the specified url; gets notification of the result. npn_getvalue allows the plug-in to query the browser for information. npn_getvalueforurl provides information to a plugin which is associated with a given url, for example the cookies or preferred proxy. npn_hasmethod determines whether or not ...
...And 6 more matches
FileUtils.jsm
; the file constructor if you have a path to a file (or directory) you want to obtain an nsifile for, you can do so using the file constructor, like this: var f = new fileutils.file(mypath); method overview nsifile getfile(string key, array patharray, bool followlinks); nsifile getdir(string key, array patharray, bool shouldcreate, bool followlinks); nsifileoutput
stream openfileoutput
stream(nsifile file, int modeflags); nsifileoutput
stream openatomicfileoutput
stream(nsifile file, int modeflags); nsifileoutput
stream opensafefileoutput
stream(nsifile file, int modeflags); void closeatomicfileoutput
stream(nsifileoutput
stream stream); void closesafefileoutput
stream(nsifileoutput
stream stream); constants constant ...
...e object for the location specified. if the directory requested does not exist, it is created, along with any parent directories that need to be created. note: if you want to use the full path to get to the directory you cannot use getdir. instead use the file constructor, so simply: var dir = new fileutils.file('c:\\blah\\blah'); if (dir.exists()) { //yes directory exists } openfileoutput
stream() opens a file output
stream for writing. the
stream is opened with the defer_open nsifileoutput
stream.behavior flag constant this means the file is not actually opened until the first time it's accessed. nsifileoutput
stream openfileoutput
stream( nsifile file, int modeflags ); parameters file the file to write to. modeflags optional file open flags (see constants above) return va...
...ream for writing. the
stream is opened with the defer_open nsifileoutput
stream.behavior flag constant this means the file is not actually opened until the first time it's accessed. nsifileoutput
stream openfileoutput
stream( nsifile file, int modeflags ); parameters file the file to write to. modeflags optional file open flags (see constants above) return value returns nsifileoutput
stream (the non-safe variant) to write to. openatomicfileoutput
stream() opens an atomic file output
stream for writing. note: 'safe' and 'atomic' file output
streams will never append; they will always overwrite an existing file. starting in gecko 38.0, passing mode_append without mode_truncate will throw an exception. ...
...And 6 more matches
nsICryptoHash
the values map directly onto the values defined in mozilla/security/nss/lib/cryptohi/hasht.h. constant value description md2 1 message digest algorithm 2 md5 2 message-digest alg...
...the values map directly onto the values defined in mozilla/security/nss/lib/cryptohi/hasht.h. constant value description md2 1 message digest algorithm 2 md5 2 message-digest algorithm 5 ...
...the values map directly onto the values defined in mozilla/security/nss/lib/cryptohi/hasht.h. constant value description md2 1 message digest algorithm 2 md5 2 message-digest algorithm 5 sha1 ...
...And 6 more matches
XPCOM Interface Reference
sibletextnsiaccessibletextchangeeventnsiaccessibletreecachensiaccessiblevaluensiaccessiblewin32objectnsialertsservicensiannotationobservernsiannotationservicensiappshellnsiappshellservicensiappstartupnsiappstartup_mozilla_2_0nsiapplicationcachensiapplicationcachechannelnsiapplicationcachecontainernsiapplicationcachenamespacensiapplicationcacheservicensiapplicationupdateservicensiarraynsiasyncinput
streamnsiasyncoutput
streamnsiasync
streamcopiernsiasyncverifyredirectcallbacknsiauthinformationnsiauthmodulensiauthpromptnsiauthprompt2nsiauthpromptadapterfactorynsiauthpromptcallbacknsiauthpromptprovidernsiauthpromptwrappernsiautocompletecontrollernsiautocompleteinputnsiautocompleteitemnsiautocompletelistenernsiautocompleteobservernsiautocompleteresultnsiautocompletesearchnsibadcertlistener2nsibidikeybo...
...eamnsiasync
streamcopiernsiasyncverifyredirectcallbacknsiauthinformationnsiauthmodulensiauthpromptnsiauthprompt2nsiauthpromptadapterfactorynsiauthpromptcallbacknsiauthpromptprovidernsiauthpromptwrappernsiautocompletecontrollernsiautocompleteinputnsiautocompleteitemnsiautocompletelistenernsiautocompleteobservernsiautocompleteresultnsiautocompletesearchnsibadcertlistener2nsibidikeyboardnsibinaryinput
streamnsibinaryoutput
streamnsiblocklistpromptnsiblocklistservicensiboxobjectnsibrowserboxobjectnsibrowserhistorynsibrowsersearchservicensicrlinfonsicrlmanagernsicachensicachedeviceinfonsicacheentrydescriptornsicacheentryinfonsicachelistenernsicachemetadatavisitornsicacheservicensicachesessionnsicachevisitornsicachingchannelnsicancelablensicategorymanagernsichannelnsichanneleventsinknsichannelpolicynsich...
...tmanagernsicomponentregistrarnsicompositionstringsynthesizernsiconsolelistenernsiconsolemessagensiconsoleservicensicontainerboxobjectnsicontentframemessagemanagernsicontentprefnsicontentprefcallback2nsicontentprefobservernsicontentprefservicensicontentprefservice2nsicontentsecuritypolicynsicontentsniffernsicontentviewnsicontentviewmanagernsicontentviewernsicontrollernsicontrollersnsiconverterinput
streamnsiconverteroutput
streamnsicookiensicookie2nsicookieacceptdialognsicookieconsentnsicookiemanagernsicookiemanager2nsicookiepermissionnsicookiepromptservicensicookieservicensicookiestoragensicrashreporternsicryptohmacnsicryptohashnsicurrentcharsetlistenernsicyclecollectorlistenernsidbchangelistenernsidbfolderinfonsidnslistenernsidnsrecordnsidnsrequestnsidnsservicensidomcanvasrenderingcontext2dnsidom...
...And 6 more matches
Gecko Plugin API Reference - Plugins
g the object element for plug-in display nesting rules for html elements using the appropriate attributes using the embed element for plug-in display using custom embed attributes plug-in references plug-in development overview writing plug-ins registering plug-ins ms windows unix mac os x drawing a plug-in instance handling memory sending and receiving
streams working with urls getting version and ui information displaying messages on the status line making plug-ins scriptable building plug-ins building, platforms, and compilers building carbonized plug-ins for mac os x type libraries installing plug-ins native installers xpi plug-ins installations plug-in installation and the windows registry initialization and...
... getting information windowed plug-ins mac os windows unix event handling for windowed plug-ins windowless plug-ins specifying that a plug-in is windowless invalidating the drawing area forcing a paint message making a plug-in opaque making a plug-in transparent creating pop-up menus and dialog boxes event handling for windowless plug-ins
streams receiving a
stream telling the plug-in when a
stream is created telling the plug-in when a
stream is deleted finding out how much data the plug-in can accept writing the
stream to the plug-in sending the
stream in random-access mode sending the
stream in file mode sending a
stream creating a
stream pushing data into the
stream deleting the
stream example of sending a
stream urls ...
...ter describes methods in the plug-in api that are available from the plug-in object. the names of all of these methods begin with npp_ to indicate that they are implemented by the plug-in and called by the browser. for an overview of how these two sides of the plug-in api interact, see the how plug-ins work and overview of plug-in structure sections in the introduction. npp_destroy npp_destroy
stream npp_getvalue np_getvalue npp_handleevent np_initialize npp_new npp_new
stream npp_print npp_setvalue npp_setwindow np_shutdown npp_
streamasfile npp_urlnotify npp_write npp_writeready browser side plug-in api this chapter describes methods in the plug-in api that are available from the browser. the names of all of these methods begin with npn_ to indicate that they are implemente...
...And 6 more matches
MediaRecorder.start() - Web APIs
a blob is created and the data is collected in it until the time slice period elapses or the source media ends. ...
...questdata()), or you can specify the number of milliseconds to record at a time. then, each time that amount of media has been recorded, an event will be delivered to let you act upon the recorded media, while a new blob is created to record the next 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 blob is created and the data is collected in it until the time slice period elapses or the source media ends. each time a blob is filled up to that point (the timeslice duration or the end-of-media, if no slice duration was provided), a dataavailable event is sent to the mediarecorder with the recorded data. if the source is still playing, a new blob is created and recording continues into tha...
...s collected in it until the time slice period elapses or the source media ends. each time a blob is filled up to that point (the timeslice duration or the end-of-media, if no slice duration was provided), a dataavailable event is sent to the mediarecorder with the recorded data. if the source is still playing, a new blob is created and recording continues into that, and so forth. when the source
stream ends, state is set to inactive and data gathering stops. a final dataavailable event is sent to the mediarecorder, followed by a stop event. note: if the browser is unable to start recording or continue recording, it will raise a domerror event, followed by a mediarecorder.dataavailable event containing the blob it has gathered, followed by the mediarecorder.stop event. syntax mediarecorder.
...And 6 more matches
RTCStatsReport - Web APIs
tics report obtained by calling one of the rtcpeerconnection.getstats(), rtcrtpreceiver.getstats(), and rtcrtpsender.getstats() methods. this statistics report contains a mapping of statistic category string names to objects containing the corresponding statistics data. calling getstats() on an rtcpeerconnection lets you specify whether you wish to obtain statistics for outbound, inbound, or all
streams on the connection. the rtcrtpreceiver and rtcrtpsender versions of getstats() specifically only return statistics available to the incoming or outgoing
stream on which you call them. the statistics objects for each category of statistic information, there is a dictionary whose properties provide the relevant information. properties common to all statistic categories all webrtc statistics obj...
...gatheringstate to new during an ice restart. the active candidate pair is deleted after the transport switches to another candidate pair; this change cannot be detected otherwise. certificate an rtccertificatestats object providing statistics related to a certificate being used by an rtcicetransport. ...
...ificatestats object providing statistics related to a certificate being used by an rtcicetransport. codec an rtccodecstats object containing statistics about a codec currently being used by rtp
streams to send or receive data for the rtcpeerconnection. csrc an rtccontributingsourcestats object which contains statistics related to a contributing source (csrc) that contributed to an inbound rtp
stream. data-channel an rtcdatachannelstats object which contains statistics about each rtcdatachannel on the connection. inbound-rtp an rtcinboundrtp
streamstats object providing statistics about inbound data being received from remote peers. since this only provides statistics related to inbound data, without considering the local peer's state, any values that require knowledge of both, such as rou...
...And 6 more matches
Web Audio API - Web APIs
le webs by their inputs and outputs. they typically start with one or more sources. sources provide arrays of sound intensities (samples) at very small timeslices, often tens of thousands of them per second. these could be either computed mathematically (such as oscillatornode), or they can be recordings from sound/video files (like audiobuffersourcenode and mediaelementaudiosourcenode) and audio
streams (media
streamaudiosourcenode). in fact, sound files are just recordings of sound intensities themselves, which come in from microphones or electric instruments, and get mixed down into a single, complicated wave. outputs of these nodes could be linked to inputs of others, which mix or modify these
streams of sound samples into different
streams. a common modification is multiplying the samples b...
...r the intended effect, it can be linked to the input of a destination (audiocontext.destination), which sends the sound to the speakers or headphones. this last connection is only necessary if the user is supposed to hear the audio. a simple, typical workflow for web audio would look something like this: create audio context inside the context, create sources — such as <audio>, oscillator,
stream create effects nodes, such as reverb, biquad filter, panner, compressor choose final destination of audio, for example your system speakers connect the sources up to the effects, and the effects to the destination. timing is controlled with high precision and low latency, allowing developers to write code that responds accurately to events and is able to target specific samples, even at a ...
...diobuffersourcenode the audiobuffersourcenode interface represents an audio source consisting of in-memory audio data, stored in an audiobuffer. it is an audionode that acts as an audio source. mediaelementaudiosourcenode the mediaelementaudiosourcenode interface represents an audio source consisting of an html5 <audio> or <video> element. it is an audionode that acts as an audio source. ...
...And 6 more matches
Web audio codec guide - Web media technologies
the processing of audio data to encode and decode it is handled by an audio codec (coder/decoder). in this article, we look at audio codecs used on the web to compress and decompress audio, what their capabilities and use cases are, and offer guidance when choosing audio codecs to use for your content. ...
...dio which is output by an audio codec's encoder: details about the source audio's format and contents, and the codec and its configuration during the encoding process. for each factor that affects the encoded audio, there is a simple rule that is nearly always true: because the fidelity of digital audio is determined by the granularity and precision of the samples taken to convert it into a data
stream, the more data used to represent the digital version of the audio, the more closely the sampled sound will match the source material. the effect of source audio format on encoded audio output because encoded audio inherently uses fewer bits to represent each sample, the source audio format may actually have less impact on the encoded audio size than one might expect. however, a number of factor...
... compression, lossy codecs nearly always result in significantly smaller compressed audio than lossless codecs do. generally speaking, the most common reasons to choose lossless audio are because you require archival-quality storage, or because the audio samples will be remixed and recompressed, and you wish to avoid the amplification of artifacts in the audio due to recompression. for real-time
streaming of audio, a lossy codec is usually required in order to ensure the flow of data can keep up with the audio playback rate regardless of network performance. maximum number of channels the audio delivered to each speaker in a sound system is provided by one audio channel in a
stream. monaural sound is a single channel. stereo sound is two. 5.1 surround sound has five audio channels, plus one l...
...And 6 more matches
Codecs used by WebRTC - Web media technologies
ell as optional data and other information. to communicate, the two devices need to be able to agree upon a mutually-understood codec for each track so they can successfully communicate and present the shared media. this guide reviews the codecs that browsers are required to implement as well as other codecs that some or all browsers support for webrtc. containerless media webrtc uses bare media
streamtrack objects for each track being shared from one peer to another, without a container or even a media
stream associated with the tracks. which codecs can be within those tracks is not mandated by the webrtc specification. however, rfc 7742 specifies that all webrtc-compatible browsers must support vp8 and h.264's constrained baseline profile for video, and rfc 7874 specifies that browsers must su...
...y ancillary information (such as slides or a projection) are presented at the same time as the audio that corresponds. general codec requirements before looking at codec-specific capabilities and requirements, there are a few overall requirements that must be met by any codec configuration used with webrtc. unless the sdp specifically signals otherwise, the web browser receiving a webrtc video
stream must be able to handle video at at least 20 fps at a minimum resolution of 320 pixels wide by 240 pixels tall. it's encouraged that video be encoded at a frame rate and size no lower than that, since that's essentially the lower bound of what webrtc generally is expected to handle. sdp supports a codec-independent way to specify preferred video resolutions (rfc 6236. this is done by sending an a...
...equired. unless signaled otherwise, the pixel aspect ratio is 1:1, indicating that pixels are square. other notes the payload format used for avc in webrtc is described in rfc 6184: rtp payload format for h.264 video. avc implementations for webrtc are required to support the special "filler payload" and "full frame freeze" sei messages; these are used to support switching among multiple input
streams seamlessly. supported audio codecs the audio codecs which rfc 7874 mandates that all webrtc-compatible browsers must support are shown in the table below. mandatory audio codecs codec name browser compatibility opus chrome, edge, firefox, safari g.711 pcm (a-law) chrome, firefox, safari g.711 pcm (µ-law) chrome, firefox, safari see ...
...And 6 more matches
Using the WebAssembly JavaScript API - WebAssembly
at the import has a two-level namespace — the internal function $i is imported from imports.imported_func. we need to reflect this two-level namespace in javascript when writing the object to be imported into the wasm module. ...
...be imported into the wasm module. create a <script></script> element in your html file, and add the following code to it: var importobject = { imports: { imported_func: arg => console.log(arg) } };
streaming the webassembly module new in firefox 58 is the ability to compile and instantiate webassembly modules directly from underlying sources. this is achieved using the webassembly.compile
streaming() and webassembly.instantiate
streaming() methods. ...
...following code to it: var importobject = { imports: { imported_func: arg => console.log(arg) } };
streaming the webassembly module new in firefox 58 is the ability to compile and instantiate webassembly modules directly from underlying sources. this is achieved using the webassembly.compile
streaming() and webassembly.instantiate
streaming() methods. these methods are easier than their non-
streaming counterparts, because they can turn the byte code directly into module/instance instances, cutting out the need to separately put the response into an arraybuffer. ...
...And 6 more matches
Graceful asynchronous programming with Promises - Learn web development
call to getusermedia() is made from the browser's main thread, the entire browser is blocked until getusermedia() returns! obviously, that's not an acceptable option; without promises, everything in the browser becomes unusable until the user decides what to do about the camera and microphone. ...
...rmedia() is made from the browser's main thread, the entire browser is blocked until getusermedia() returns! obviously, that's not an acceptable option; without promises, everything in the browser becomes unusable until the user decides what to do about the camera and microphone. ...
...! ...
...And 5 more matches
Rhino serialization
la.javascript.tools.shell.main js> function f() { return 3; } js> serialize(f, "f.ser") js> quit() $ java org.mozilla.javascript.tools.shell.main js> f = deserialize("f.ser") function f() { return 3;} js> f() 3 js> here we see a simple case of a function being serialized to a file and then read into a new instance of rhino and called. ...
...main js> function f() { return 3; } js> serialize(f, "f.ser") js> quit() $ java org.mozilla.javascript.tools.shell.main js> f = deserialize("f.ser") function f() { return 3;} js> f() 3 js> here we see a simple case of a function being serialized to a file and then read into a new instance of rhino and called. ...
...ript.tools.shell.main js> f = deserialize("f.ser") function f() { return 3;} js> f() 3 js> here we see a simple case of a function being serialized to a file and then read into a new instance of rhino and called. rhino serialization apis two new classes, scriptableoutput
stream and scriptableinput
stream, were introduced to handle serialization of rhino classes. these classes extend objectoutput
stream and objectinput
stream respectively. writing an object to a file can be done in a few lines of java code: fileoutput
stream fos = new fileoutput
stream(filename); scriptableoutput
stream out = new scriptableoutput
stream(fos, scope); out.writeobject(obj); out.close(); here filename is the file to write to, obj is the object or function to write, and scope is the top-level scope containing obj. readin...
...And 5 more matches
nsIDocShell
nstorageforprincipal(in nsiprincipal principal, in domstring documenturi, in boolean create); nsidomstorage getsessionstorageforuri(in nsiuri uri, in domstring documenturi); void historypurged(in long numentries); void internalload(in nsiuri auri, in nsiuri areferrer, in nsisupports aowner, in pruint32 aflags, in wstring awindowtarget, in string atypehint, in nsiinput
stream apostdata
stream, in nsiinput
stream aheaders
stream, in unsigned long aloadflags, in nsishentry ashentry, in boolean firstparty, out nsidocshell adocshell, out nsirequest arequest); native code only! boolean isbeingdestroyed(); void load
stream(in nsiinput
stream a
stream, in nsiuri auri, in acstring acontenttype, in acstring acontentcharset, in nsidocshellloadinfo aloadinfo); native...
...number of entries removed. native code only!internalload loads the given uri. this method is identical to loaduri() except that its parameter list is broken out instead of being packaged inside of an nsidocshellloadinfo object. void internalload( in nsiuri auri, in nsiuri areferrer, in nsisupports aowner, in pruint32 aflags, in wstring awindowtarget, in string atypehint, in nsiinput
stream apostdata
stream, in nsiinput
stream aheaders
stream, in unsigned long aloadflags, in nsishentry ashentry, in boolean firstparty, out nsidocshell adocshell, out nsirequest arequest ); parameters auri the uri to load. areferrer referring uri. aowner owner (security principal) aflags a combination of the internal load flags as detailed in the constants sec...
...sirequest arequest ); parameters auri the uri to load. areferrer referring uri. aowner owner (security principal) aflags a combination of the internal load flags as detailed in the constants secion. awindowtarget window target for the load. atypehint a hint as to the content-type of the resulting data. may be null or empty if no hint. apostdata
stream post data
stream (if posting) aheaders
stream stream containing "extra" request headers. aloadflags flags to modify load behaviour. flags are defined in nsiwebnavigation. ashentry active session history entry (if loading from sh) firstparty true if this is the master top-level document. adocshell if the load was succesfully initiated, this receives the n...
...And 5 more matches
MediaDevices.getDisplayMedia() - Web APIs
the mediadevices interface's getdisplaymedia() method prompts the user to select and grant permission to capture the contents of a display or portion thereof (such as a window) as a media
stream. the resulting
stream can then be recorded using the media
stream recording api or transmitted as part of a webrtc session. see using the screen capture api for more details and an example. syntax var promise = navigator.mediadevices.getdisplaymedia(constraints); parameters constraints optional an optional media
streamconstraints object specifying requirements for the returned media
stream. ...
...eam recording api or transmitted as part of a webrtc session. see using the screen capture api for more details and an example. syntax var promise = navigator.mediadevices.getdisplaymedia(constraints); parameters constraints optional an optional media
streamconstraints object specifying requirements for the returned media
stream. since getdisplaymedia() requires a video track, the returned
stream will have one even if no video track is expressly requested by the constraints object. return value a promise that resolves to a media
stream containing a video track whose contents come from a user-selected screen area, as well as an optional audio track. note: browser support for audio tracks varies, both in terms of whether or not they're supported at all by the media recorder and in terms...
...ser, or the current browsing instance is not permitted access to screen sharing. notfounderror no sources of screen video are available for capture. notreadableerror the user selected a screen, window, tab, or other source of screen data, but a hardware or operating system level error or lockout occurred, preventing the sharing of the selected source. overconstrainederror after creating the
stream, applying the specified constraints fails because no compatible
stream could be generated. typeerror the specified constraints include constraints which are not permitted when calling getdisplaymedia(). these unsupported constraints are advanced and any constraints which in turn have a member named min or exact. usage notes privacy and security because getdisplaymedia() could be used in nef...
...And 5 more matches
RTCStatsType - Web APIs
gatheringstate to new during an ice restart. the active candidate pair is deleted after the transport switches to another candidate pair; this change cannot be detected otherwise. certificate an rtccertificatestats object providing statistics related to a certificate being used by an rtcicetransport. ...
...ificatestats object providing statistics related to a certificate being used by an rtcicetransport. codec an rtccodecstats object containing statistics about a codec currently being used by rtp
streams to send or receive data for the rtcpeerconnection. csrc an rtccontributingsourcestats object which contains statistics related to a contributing source (csrc) that contributed to an inbound rtp
stream. data-channel an rtcdatachannelstats object which contains statistics about each rtcdatachannel on the connection. inbound-rtp an rtcinboundrtp
streamstats object providing statistics about inbound data being received from remote peers. since this only provides statistics related to inbound data, without considering the local peer's state, any values that require knowledge of both, such as rou...
...ng the local peer's state, any values that require knowledge of both, such as round-trip time, is not included. this report isn't available if there are no connected peers. local-candidate an rtcicecandidatestats object giving statistics about an ice local candidate; these candidates are found in the output from rtcicetransport.getlocalcandidates(). outbound-rtp the report is an rtcoutboundrtp
streamstats object providing statistics based on the local peer's outgoing data being sent to its peers. this information considers only the outbound rtp
stream, so any data which requires information about the state of the remote peers (such as round-trip time) is unavailable, since those values can't be computed without knowing about the other peers' states. peer-connection a rtcpeerconnectionstats ...
...And 5 more matches
WebRTC Statistics API - Web APIs
ion handler receives as input an rtcstatsreport object containing the statistics information. this object contains a map of named dictionaries based on rtcstats and its affiliated types. this example specifically looks for the report whose type is inbound-rtp and whose kind is video. this way, we look only at the video-related statistics for the local rtcrtpreceiver responsible for receiving the
streamed media. commonly used statistics reference the rtcstatsreport object contains a map of named objects based one of the rtcstats dictionary's subclasses. upon looking up a statistic category by name, you get an object containing the corresponding data. the table below shows the statistic categories and the corresponding dictionaries; for each statistic category, the full hierarchy of rtcstats-b...
... the change from one rtcicetransport to another, such as during an ice restart. rtcicecandidatepairstats rtcstats certificate statistics about a certificate being used by an rtcicetransport. rtccertificatestats rtcstats codec statistics about a specific codec being used by
streams being sent or received by this connection. rtccodecstats rtcstats csrc statistics for a single contributing source (csrc) that contributed to one of the connection's inbound rtp
streams. rtcrtpcontributingsourcestats rtcstats data-channel statistics related to one rtcdatachannel on the connection. rtc...
...tatistics related to one rtcdatachannel on the connection. rtcdatachannelstats rtcstats ice-server statistics about the connection to an ice server (stun or turn. rtciceserverstats rtcstats inbound-rtp statistics describing the state of one of the connection's inbound data
streams. rtcinboundrtp
streamstats rtcreceivedrtp
streamstats rtcrtp
streamstats rtcstats local-candidate statistics about a local ice candidate associated with the connection's rtcicetransports. rtcicecandidatestats rtcstats ...
...And 5 more matches
Sending and Receiving Binary Data - Web APIs
logspot.com] req.overridemimetype('text\/plain; charset=x-user-defined'); req.send(null); if (req.status != 200) return ''; return req.responsetext; } the magic happens in line 5, which overrides the mime type, forcing the browser to treat it as plain text, using a user-defined character set. this tells the browser not to parse it, and to let the bytes pass through unprocessed. var file
stream = load_binary_resource(url); var abyte = file
stream.charcodeat(x) & 0xff; // throw away high-order byte (f7) the example above fetches the byte at offset x within the loaded binary data. the valid range for x is from 0 to file
stream.length-1. see downloading binary
streams with xmlhttprequest for a detailed explanation. see also downloading files. sending binary data the send method of the x...
...e of the data being sent. line 5 uses the sendasbinary() method to initiate the request. note: this non-standard sendasbinary method is considered deprecated as of gecko 31 (firefox 31 / thunderbird 31 / seamonkey 2.28) and will be removed soon. the standard send(blob data) method can be used instead as explained above. ...
...ethod is considered deprecated as of gecko 31 (firefox 31 / thunderbird 31 / seamonkey 2.28) and will be removed soon. the standard send(blob data) method can be used instead as explained above. you can also send binary content by passing an instance of the nsifileinput
stream to send(). in that case, you don't have to set the content-length header yourself, as the information is fetched from the
stream automatically: // make a
stream from a file. ...
...And 5 more matches
Web video codec guide - Web media technologies
specific capabilities and compatibility issues you may need to be aware of. ...
... special features such as support for multiple views of the same scene (multiview video coding), which allows, among other things, the production of stereoscopic video. avc is a proprietary format, however, and numerous patents are owned by multiple parties regarding its technologies. commercial use of avc media requires a license, though the mpeg la patent pool does not require license fees for
streaming internet video in avc format as long as the video is free for end users. non-web browser implementations of webrtc (any implementation which doesn't include the javascript apis) are required to support avc as a codec in webrtc calls. while web browsers are not required to do so, some do. in html content for web browsers, avc is broadly compatible and many platforms support hardware encoding ...
...tu.int/rec/t-rec-h.265 https://www.iso.org/standard/69668.html licensing proprietary; confirm your compliance with the licensing requirements. note that multiple patent pools may apply. [1] internet explorer and edge only supports hevc on devices with a hardware codec. [2] mozilla will not support hevc while it is encumbered by patents. mp4v-es the mpeg-4 video elemental
stream (mp4v-es) format is part of the mpeg-4 part 2 visual standard. while in general, mpeg-4 part 2 video is not used by anyone because of its lack of compelling value related to other codecs, mp4v-es does have some usage on mobile. mp4v is essentially h.263 encoding in an mpeg-4 container. its primary purpose is to be used to
stream mpeg-4 audio and video over an rtp session. however, mp4v-es is als...
...And 5 more matches
Creating Reusable Modules - Archive of obsolete content
lating an md5 hash of a file's contents, given its path. ...
...n its path. ...
...uire("chrome"); // return the two-digit hexadecimal code for a byte function tohexstring(charcode) { return ("0" + charcode.tostring(16)).slice(-2); } function md5file(path) { var f = cc["@mozilla.org/file/local;1"] .createinstance(ci.nsilocalfile); f.initwithpath(path); var i
stream = cc["@mozilla.org/network/file-input-
stream;1"] .createinstance(ci.nsifileinput
stream); // open for reading i
stream.init(f, 0x01, 0444, 0); var ch = cc["@mozilla.org/security/hash;1"] .createinstance(ci.nsicryptohash); // we want to use the md5 algorithm ch.init(ch.md5); // this tells updatefrom
stream to read the entire file const pr_uint32_max = 0xffffffff; ch.updatefrom
stream(i
stream, pr_uint32_max); // pass false here to get binary data back var h...
...And 4 more matches
How to convert an overlay extension to restartless - Archive of obsolete content
audit any remaining resource:// uri usage internal to your extension if you don't need resource:// uris for anything else, then you may be able to skip the next step. if not, see if you still can't do things any other way. as with jsms, a chrome:// uri may be more appropriate. if you want to also make your add-on extractionless then you may need "step 3" if you're loading files with nsifileinput
stream or something similar, or a jar: uri might work. if not, a file:// uri might be fine for you. restartless add-ons can easily get a uri for their install location on startup, so you should look into what you can do with that. step 3: no more nsifile access for files internal to your bundle for an extractionless extension, access to files internal to your bundle will not be possible using the nsif...
...what you can do with that. step 3: no more nsifile access for files internal to your bundle for an extractionless extension, access to files internal to your bundle will not be possible using the nsifile interface. if you need to read data, or otherwise access files within your bundle, there are two options. the first is to use the nsizipreader interface which permits continuing to use nsiinput
streams, etc. the second is to re-code to use xmlhttprequest. a file:// uri to the install location, or .xpi file, is available in installpath property of the bootstrap data structure passed to the startup(), shutdown(), install(), and uninstall() functions in what will be your bootstrap.js file (see below). how to get and load the data of of your add-on's files using the add-on manager api: // this ...
...g one of your files const myaddonid = ...; // just store a constant with your id components.utils.import("resource://gre/modules/addonmanager.jsm"); addonmanager.getaddonbyid(myaddonid,function(addon) { var file = services.io.newuri("resource://myaddon/filename.ext",null,null) .queryinterface(components.interfaces.nsifileurl) .file; var
stream = components.classes["@mozilla.org/network/file-input-
stream;1"] .createinstance(components.interfaces.nsifileinput
stream) .queryinterface(components.interfaces.nsiseekable
stream);
stream.init(file, 0x01, 0444, 0); // read-only, read by owner/group/others, normal behavior /* do stuff */ }); this bit of code is paraphrased and probabl...
...And 4 more matches
Plug-in Development Overview - Gecko Plugin API Reference
memory plug-in developers can take advantage of the memory features provided in the plug-in api to allocate and free memory. use the npn_memalloc method to allocate memory from the browser. use the npn_memfree method to free memory allocated with npn_memalloc. use the npn_memflush method to free memory (mac os only) before calling memory-intensive mac toolbox calls. ...
...plug-in developers can take advantage of the memory features provided in the plug-in api to allocate and free memory. use the npn_memalloc method to allocate memory from the browser. use the npn_memfree method to free memory allocated with npn_memalloc. use the npn_memflush method to free memory (mac os only) before calling memory-intensive mac toolbox calls. ...
... in the plug-in api to allocate and free memory. use the npn_memalloc method to allocate memory from the browser. use the npn_memfree method to free memory allocated with npn_memalloc. use the npn_memflush method to free memory (mac os only) before calling memory-intensive mac toolbox calls. sending and receiving
streams
streams are objects that represent urls and the data they contain. ...
...And 4 more matches
Error codes returned by Mozilla APIs
o. ns_error_file_dir_not_empty (0x80520014) when calling nsifile.remove() on a directory and the 'recursive' argument to this method is false, this error will occur if the directory is not empty. ns_error_file_access_denied (0x80520015) an operation was not performed on a file because the file cannot be accessed, typically because the permissions set for the file do not allow the operation. ...
..._empty (0x80520014) when calling nsifile.remove() on a directory and the 'recursive' argument to this method is false, this error will occur if the directory is not empty. ns_error_file_access_denied (0x80520015) an operation was not performed on a file because the file cannot be accessed, typically because the permissions set for the file do not allow the operation. ...
...ve' argument to this method is false, this error will occur if the directory is not empty. ns_error_file_access_denied (0x80520015) an operation was not performed on a file because the file cannot be accessed, typically because the permissions set for the file do not allow the operation.
stream errors ns_base_
stream_closed (0x80470002) this error occurs when an operation is performed on a
stream that has already been closed. ...
...And 4 more matches
imgIDecoder
void flush(); parameters none. init() initializes an image decoder. ...
...void flush(); parameters none. init() initializes an image decoder. void init( in imgiload aload ); parameters aload an imgiload object to receive the decoded image data. ...
...void flush(); parameters none. init() initializes an image decoder. void init( in imgiload aload ); parameters aload an imgiload object to receive the decoded image data. ...
...And 4 more matches
nsIChannel
annel is still valid for accessing protocol-specific results. for example, queryinterfacing to nsihttpchannel allows response headers to be retrieved for the corresponding http transaction. this interface must be used only from the xpcom main thread. implemented by netwerk/base/src/nsbasechannel.cpp and netwerk/protocol/http/src/nshttpchannel.cpp. method overview void asyncopen(in nsi
streamlistener alistener, in nsisupports acontext); nsiinput
stream open(); attributes attribute type description contentcharset acstring the character set of the channel's content if available and if applicable. this attribute only applies to textual data. setting contentcharset before the channel has been opened provides a hint to the channel on ...
...(for example by the docshell) to indicate whether or not the channel corresponds to a document uri. load_retargeted_document_uri 17 if the end consumer for this load has been retargeted after discovering its content, this flag will be set: load_replace 18 this flag is set to indicate that this channel is replacing another channel. this means that: the
stream listener this channel will be notifying was initially passed to the asyncopen() method of some other channel this channel's uri is a better identifier of the resource being accessed than this channel's originaluri. this flag can be set, for example, for redirects or for cases when a single channel has multiple parts to it (and thus can follow onstoprequest with another onstartreques...
...nt_sniffer_category. see nsicontentsniffer [en-us] note: channels may ignore this flag; however, new channel implementations should only do so with good reason. load_classify_uri 22 this flag tells the channel to use uri classifier service to check the uri when opening the channel. methods asyncopen() asynchronously open this channel. ...
...And 4 more matches
nsIFeedProcessor
toolkit/components/feeds/public/nsifeedprocessor.idlscriptable this interface parses rss or atom feeds, triggering callbacks based on their contents during and after the processing. 1.0 66 introduced gecko 1.8.1 inherits from: nsi
streamlistener last changed in gecko 1.8.1 (firefox 2 / thunderbird 2 / seamonkey 1.1) implemented by: @mozilla.org/feed-processor;1. ...
...o 1.8.1 (firefox 2 / thunderbird 2 / seamonkey 1.1) implemented by: @mozilla.org/feed-processor;1. ...
... / thunderbird 2 / seamonkey 1.1) implemented by: @mozilla.org/feed-processor;1. ...
...And 4 more matches
nsIUploadChannel2
netwerk/base/public/nsiuploadchannel2.idlscriptable please add a summary to this article. ...
... netwerk/base/public/nsiuploadchannel2.idlscriptable please add a summary to this article. ...
... netwerk/base/public/nsiuploadchannel2.idlscriptable please add a summary to this article. ...
...And 4 more matches
Plug-in Development Overview - Plugins
memory plug-in developers can take advantage of the memory features provided in the plug-in api to allocate and free memory. use the npn_memalloc method to allocate memory from the browser. use the npn_memfree method to free memory allocated with npn_memalloc. use the npn_memflush method to free memory (mac os only) before calling memory-intensive mac toolbox calls. ...
...plug-in developers can take advantage of the memory features provided in the plug-in api to allocate and free memory. use the npn_memalloc method to allocate memory from the browser. use the npn_memfree method to free memory allocated with npn_memalloc. use the npn_memflush method to free memory (mac os only) before calling memory-intensive mac toolbox calls. ...
... in the plug-in api to allocate and free memory. use the npn_memalloc method to allocate memory from the browser. use the npn_memfree method to free memory allocated with npn_memalloc. use the npn_memflush method to free memory (mac os only) before calling memory-intensive mac toolbox calls. sending and receiving
streams
streams are objects that represent urls and the data they contain. ...
...And 4 more matches
URLs - Plugins
a url and display it on a specified target page, use the npn_geturl, npn_geturlnotify, and npp_urlnotify functions. this section describes the methods and procedures used for getting the url and displaying the page. the plug-in uses the npn_geturl function to ask the browser to display data retrieved from a url in a specified target window or frame, or deliver it to the plug-in instance in a new
stream. this is the way that plug-ins provide hyperlinks to other documents or retrieve data from the network. if the browser cannot locate the url and retrieve the data, it does not create a
stream for the instance; in this case, the plug-in receives notification of the result. to request a
stream and receive notification of the result in all cases, use npn_geturlnotify. for http urls, the browser re...
...for this reason as well, calling npn_geturlnotify may be more useful than npn_geturl; the plug-in is notified upon either successful or unsuccessful completion of the request. ...
...e url parameter is the url of the request, which can be of any type, including http, ftp, news, or mailto. the target parameter represents the destination where the url will be displayed, a window or frame. if target refers to the window or frame containing the plug-in instance, it is destroyed and the plug-in may be unloaded. if the target parameter is set to null, the application creates a new
stream and delivers the data to the plug-in instance, through calls to npp_new
stream, npp_writeready and npp_write, and npp_destroy
stream. in general, if a url works in the location box of the navigator, it works as a target for npn_geturl, except for the _self target. make sure that the target matches the url type sent to it. for example, a null target does not make sense for some url types (such as ...
...And 4 more matches
MediaDevices - Web APIs
r. also available via the ondevicechange property. methods inherits methods from its parent interface, eventtarget. enumeratedevices() obtains an array of information about the media input and output devices available on the system. getsupportedconstraints() returns an object conforming to mediatracksupportedconstraints indicating which constrainable properties are supported on the media
streamtrack interface. see capabilities and constraints in media capture and
streams api (media
stream) to learn more about constraints and how to use them. getdisplaymedia() prompts the user to select a display or portion of a display (such as a window) to capture as a media
stream for sharing or recording purposes. returns a promise that resolves to a media
stream. getusermedia() with the user's per...
... example 'use strict'; // put variables in global scope to make them available to the browser console. ...
...g a video track and/or an audio track with the input. example 'use strict'; // put variables in global scope to make them available to the browser console. ...
...And 4 more matches
MediaRecorder - Web APIs
the mediarecorder interface of the media
stream recording api provides functionality to easily record media. it is created using the mediarecorder() constructor. constructor mediarecorder() creates a new mediarecorder object, given a media
stream to record. options are available to do things like set the container's mime type (such as "video/webm" or "video/mp4") and the bit rates of the audio and video tracks or a single overall bit rate. properties mediarecorder.mimetype read only returns the mime type that was selected as the recording container for the mediarecorder object when it was created. ...
..." or "video/mp4") and the bit rates of the audio and video tracks or a single overall bit rate. properties mediarecorder.mimetype read only returns the mime type that was selected as the recording container for the mediarecorder object when it was created. mediarecorder.state read only returns the current state of the mediarecorder object (inactive, recording, or paused.) mediarecorder.
stream read only returns the
stream that was passed into the constructor when the mediarecorder was created. mediarecorder.ignoremutedmedia indicates whether the mediarecorder instance will record input when the input media
streamtrack is muted. if this attribute is false, mediarecorder will record silence for audio and black frames for video. the default is false. mediarecorder.videobitspersecond r...
...g is paused. mediarecorder.onresume an eventhandler called to handle the resume event, which occurs when media recording resumes after being paused. mediarecorder.onstart an eventhandler called to handle the start event, which occurs when media recording starts. mediarecorder.onstop an eventhandler called to handle the stop event, which occurs when media recording ends, either when the media
stream ends — or after the mediarecorder.stop() method is called. events listen to these events using addeventlistener() or by assigning an event listener to the oneventname property of this interface. error fired when an error occurs: for example because recording wasn't allowed or was attempted using an unsupported codec. also available via the onerror property. example if (navigator.medi...
...And 4 more matches
MediaRecorderErrorEvent.error - Web APIs
r in the corresponding method references. invalidstateerror an operation was attempted in a context in which it isn't allowed, or a request has been made on an object that's deleted or removed. notsupportederror a mediarecorder couldn't be created because the specified options weren't valid. the message atttribute should provide additional information, if it exists. ...
...ederror a mediarecorder couldn't be created because the specified options weren't valid. the message atttribute should provide additional information, if it exists. securityerror the media
stream is configured to disallow recording. this may be the case, for example, with sources obtained using getusermedia() when the user denies permission to use an input device. this also happens when a media
streamtrack within the
stream is marked as isolated due to the peeridentity constraint on the source
stream. ...
...edia
stream is configured to disallow recording. this may be the case, for example, with sources obtained using getusermedia() when the user denies permission to use an input device. this also happens when a media
streamtrack within the
stream is marked as isolated due to the peeridentity constraint on the source
stream. example this function creates and returns a mediarecorder for a given media
stream, configured to buffer data into an array and to watch for errors. ...
...And 4 more matches
PhotoCapabilities - Web APIs
a photocapabilities object is retrieved by calling imagecapture.getphotocapabilities(). properties photocapabilities.redeyereduction read only returns one of "never", "always", or "controllable". the "controllable" value means the device's read-eye reduction is controllable by the user. photocapabilities.imageheight read only returns a mediasettingsrange object indicating the image height range supported by the user agent. photocapabilities.imagewidth read only returns a mediasettingsrange object indicating the image width range supported by the user agent. ...
...gent. photocapabilities.filllightmode read only returns an array of available fill light options. options may include auto, off, or flash. example the following example, extracted from chrome's image capture / photo resolution sample, uses the results from getphotocapabilities() to modify the size of an input range. ...
... only returns an array of available fill light options. options may include auto, off, or flash. example the following example, extracted from chrome's image capture / photo resolution sample, uses the results from getphotocapabilities() to modify the size of an input range. this example also shows how the imagecapture object is created using a media
streamtrack retrieved from a device's media
stream. ...
...And 4 more matches
Establishing a connection: The WebRTC perfect negotiation pattern - Web APIs
tld" }] }; const selfvideo = document.queryselector("video.selfview"); const remotevideo = document.queryselector("video.remoteview"); const signaler = new signalingchannel(); const pc = new rtcpeerconnection(config); this code also gets the <video> elements using the classes "selfview" and "remoteview"; these will contain, respectively, the local user's self-view and the view of the incoming
stream from the remote peer. connecting to a remote peer the start() function shown here can be called by either of the two end-points that want to talk to one another. it doesn't matter who does it first; the negotiation will just work. async function start() { try { const
stream = await navigator.mediadevices.getusermedia(constraints); for (const track of
stream.gettracks()) { pc.a...
...e peer. connecting to a remote peer the start() function shown here can be called by either of the two end-points that want to talk to one another. it doesn't matter who does it first; the negotiation will just work. async function start() { try { const
stream = await navigator.mediadevices.getusermedia(constraints); for (const track of
stream.gettracks()) { pc.addtrack(track,
stream); } selfvideo.srcobject =
stream; } catch(err) { console.error(err); } } this isn't appreciably different from older webrtc connection establishment code. the user's camera and microphone are obtained by calling getusermedia(). the resulting media tracks are then added to the rtcpeerconnection by passing them into addtrack(). then, finally, the media source for the self-view <vi...
... } } this isn't appreciably different from older webrtc connection establishment code. the user's camera and microphone are obtained by calling getusermedia(). the resulting media tracks are then added to the rtcpeerconnection by passing them into addtrack(). ...
...And 4 more matches
Writing a WebSocket server in Java - Web APIs
websockets communicate over a tcp (transmission control protocol) connection. java's serversocket class is located in the java.net package. serversocket constructor: serversocket(int port) when you instantiate the serversocket class, it is bound to the port number you specified by the port argument. ...
... a tcp (transmission control protocol) connection. java's serversocket class is located in the java.net package. serversocket constructor: serversocket(int port) when you instantiate the serversocket class, it is bound to the port number you specified by the port argument. ...
...gex.pattern; public class websocket { public static void main(string[] args) throws ioexception, nosuchalgorithmexception { serversocket server = new serversocket(80); try { system.out.println("server has started on 127.0.0.1:80.\r\nwaiting for a connection..."); socket client = server.accept(); system.out.println("a client connected."); socket methods: java.net.socket getinput
stream() returns an input
stream for this socket. java.net.socket getoutput
stream() returns an output
stream for this socket. output
stream methods: write(byte[] b, int off, int len) writes len bytes from the specified byte array starting at offset off to this output
stream. input
stream methods: read(byte[] b, int off, int len) reads up to len bytes of data from the input
stream into an arr...
...And 4 more matches
Index - Developer guides
s and gives you some simple hands-on examples to get you started. 5 wai aria live regions/api support ajax, accessibility firefox 3 contains important improvements to the way the mozilla engine exposes live changes in a document. 6 audio and video delivery audio, guide, html, html5, media, video whether we are dealing with pre-recorded audio files or live
streams, the mechanism for making them available through the browser's <audio> and <video> elements remains pretty much the same. currently, to support all browsers we need to specify two formats, although with the adoption of mp3 and mp4 formats in firefox and opera, this is changing fast. you can find compatibility information in the guide to media types and formats on the web. 7 adding cap...
...ing; full styling of the player will be taken care of in a future article. 9 cross-browser audio basics apps, audio, guide, html5, media, events this article provides: a basic guide to creating a cross-browser html5 audio player with all the associated attributes, properties, and events explained a guide to custom controls created using the media api 10 live
streaming web audio and video guide, adaptive
streaming live
streaming technology is often employed to relay live events such as sports, concerts and more generally tv and radio programmes that are output live. often shortened to just
streaming, live
streaming is the process of transmitting media 'live' to computers and devices. this is a fairly complex and nascent subject with a lot of variab...
... apps, buffer, html5, timeranges, video, buffering, seeking sometimes it's useful to know how much <audio> or <video> has downloaded or is playable without delay — a good example of this is the buffered progress bar of an audio or video player. this article discusses how to build a buffer/seek bar using timeranges, and other features of the media api. ...
...And 4 more matches
WebAssembly - JavaScript
times. webassembly.runtimeerror() error type that is thrown whenever webassembly specifies a trap. webassembly.table() an array-like structure representing a webassembly table, which stores function references. static methods webassembly.instantiate() the primary api for compiling and instantiating webassembly code, returning both a module and its first instance. ...
...sembly specifies a trap. webassembly.table() an array-like structure representing a webassembly table, which stores function references. static methods webassembly.instantiate() the primary api for compiling and instantiating webassembly code, returning both a module and its first instance. webassembly.instantiate
streaming() compiles and instantiates a webassembly module directly from a
streamed underlying source, returning both a module and its first instance. webassembly.compile() compiles a webassembly.module from webassembly binary code, leaving instantiation as a separate step. webassembly.compile
streaming() compiles a webassembly.module directly from a
streamed underlying source, leaving instantiation as a separate step. webassembly.validate() validates a given typed array ...
...odule from webassembly binary code, leaving instantiation as a separate step. webassembly.compile
streaming() compiles a webassembly.module directly from a
streamed underlying source, leaving instantiation as a separate step. webassembly.validate() validates a given typed array of webassembly binary code, returning whether the bytes are valid webassembly code (true) or not (false). examples
stream a .wasm module then compile and instantiate it the following example (see our instantiate-
streaming.html demo on github, and view it live also) directly
streams a .wasm module from an underlying source then compiles and instantiates it, the promise fulfilling with a resultobject. ...
...And 4 more matches
The "codecs" parameter in common media types - Web media technologies
of characters long; if the value is less than that length, it must be padded with leading zeros. av1 codec parameter string components component details p the one-digit profile number: av1 profile numbers profile number description 0 "main" profile; supports yuv 4:2:0 or monochrome bit
streams with bit depth of 8 or 10 bits per component. 1 "high" profile adds support for 4:4:4 chroma subsampling. 2 "professional" profile adds support for 4:2:2 chroma subsampling and 12 bit per component color. ll the two-digit level number, which is converted to the x.y format level format, where x = 2 + (ll >> ...
...d each successive bit being numbered one higher. currently, only flags 0 through 2 are used; the other five bits must be zero. the meanings of the flags vary depending on the profile being used. the level is a fixed-point number, so a value of 14 (decimal 20) means level 2.0 while a value of 3d (decimal 61) means level 6.1. generally speaking, the higher the level number, the more bandwidth the
stream will use and the higher the maximum video dimensions are supported. avc profiles the following are the avc profiles and their profile numbers for use in the codecs parameter, as well as the value to specify for the constraints component, cc. specifying an avc profiles using the profile id and constraints components of the codecs parameter profile number (hex) constraints byt...
...ained baseline profile (cbp) cbp is primarily a solution for scenarios in which resources are constrained, or resource use needs to be controlled to minimize the odds of the media performing poorly. 42 40 baseline profile (bp) similar to cbp but with more data loss protections and recovery capabilities. this is not as widely used as it was before cbp was introduced. all cbp
streams are considered to also be bp
streams. 42 00 extended profile (xp) designed for
streaming video over the network, with high compression capability and further improvements to data robustness and
stream switching. 58 00 main profile (mp) the profile used for standard-definition digital television being broadcast in mpeg-4 format. not used for high-definition t...
...And 4 more matches
Progressive web app structure - Progressive web apps (PWAs)
anged. pwas can be built using any approach you like, but some will work better than the others. the most popular approach is the "app shell" concept, which mixes ssr and csr in exactly the way described above, and in addition follows the "offline first" methodology which we will explain in detail in upcoming articles and use in our example application. there is also a new approach involving the
streams api, which we'll mention briefly. app shell the app shell concept is concerned with loading a minimal user interface as soon as possible and then caching it so it is available offline for subsequent visits before then loading all the contents of the app. that way, the next time someone visits the app from the device, the ui loads from the cache immediately and any new content is requested from...
...tly usable without it. responsive: responsive web design also applies to progressive web apps, as both are mainly for mobile devices. there are so many varied devices with browsers — it's important to prepare your website so it works on different screen sizes, viewports or pixel densities, using technologies like viewport meta tag, css media queries, flexbox, and css grid. ...
...th are mainly for mobile devices. there are so many varied devices with browsers — it's important to prepare your website so it works on different screen sizes, viewports or pixel densities, using technologies like viewport meta tag, css media queries, flexbox, and css grid. different concept:
streams an entirely different approach to server- or client-side rendering can be achieved with the
streams api. with a little help from service workers,
streams can greatly improve the way we parse content. the app shell model requires all the resources to be available before the website can start rendering. it's different with html, as the browser is actually
streaming the data already and you can see when the elements are loaded and rendered on the website. to have the javascript "operational", ho...
...And 4 more matches
Structural overview of progressive web apps - Progressive web apps (PWAs)
changed. pwas can be built using any approach you like, but some will work better than the others. the most popular approach is the app shell concept, which mixes ssr and csr in exactly the way described above, and in addition follows the "offline first" methodology which we will explain in detail in upcoming articles and use in our example application. there is also a new approach involving the
streams api, which we'll mention briefly. the app shell concept the app shell concept is concerned with loading a minimal user interface and content as soon as possible, caching it so it's available offline for subsequent visits before then loading the remainder of the app's contents. that way, the next time someone visits the app from the device, the ui loads from the cache immediately and any new co...
... usable without it. responsive: responsive web design also applies to progressive web apps, as both are mainly for mobile devices. there are so many varied devices with browsers — it's important to prepare your website so it works on different screen sizes, viewports or pixel densities, using technologies like the viewport meta tag, css media queries, flexbox, and css grid. ...
...are mainly for mobile devices. there are so many varied devices with browsers — it's important to prepare your website so it works on different screen sizes, viewports or pixel densities, using technologies like the viewport meta tag, css media queries, flexbox, and css grid. another approach:
streams an entirely different approach to server- or client-side rendering can be achieved with the
streams api. with a little help from service workers,
streams can greatly improve the way we parse content. the app shell model requires all the resources to be available before the website can start rendering. it's different with html, as the browser is actually
streaming the data already and you can see when the elements are loaded and rendered on the website. to have the javascript actually work, ho...
...And 4 more matches
Understanding WebAssembly text format - WebAssembly
, then convert it into a binary file called add.wasm using wabt (see converting webassembly text format to wasm for details). next, we’ll load our binary into a typed array called addcode (as described in fetching webassembly bytecode), compile and instantiate it, and execute our add function in javascript (we can now find add() in the exports property of the instance): webassembly.instantiate
streaming(fetch('add.wasm')) .then(obj => { console.log(obj.instance.exports.add(1, 2)); // "3" }); note: you can find this example in github as add.html (see it live also). also see webassembly.instantiate
streaming() for more details about the instantiate function. exploring fundamentals now we’ve covered the real basics, let’s move on to look at some more advanced features. calling ...
...way of declaring that we want to export this function, and defining the name we want to export it as. ...
... import, the caller of webassembly.instantiate() must pass in an import object that has the corresponding properties. for the above, we need an object (let's call it importobject) such that importobject.console.log is a javascript function. this would look like the following: var importobject = { console: { log: function(arg) { console.log(arg); } } }; webassembly.instantiate
streaming(fetch('logger.wasm'), importobject) .then(obj => { obj.instance.exports.logit(); }); note: you can find this example on github as logger.html (see it live also). declaring globals in webassembly webassembly has the ability to create global variable instances, accessible from both javascript and importable/exportable across one or more webassembly.module instances. this is very use...
...And 4 more matches
Index - Archive of obsolete content
s article discusses manipulating xul interfaces, using dom and other apis. it explains the concept of dom documents, demonstrates a few simple examples of using dom calls to perform basic manipulations on a document, and then demonstrates working with anonymous xbl content using mozilla-specific methods. ...
...ng mozilla-specific methods. ...
...ng and deleting files | uploading and downloading files | working with directories ] 426 getting file information file and
stream guide: [ nsiscriptableio | accessing files | getting file information | reading from files | writing to files | moving, copying and deleting files | uploading and downloading files | working with directories ] 427 io file and
stream guide: [ nsiscriptableio | accessing files | getting file information | reading from files | writing to files | moving, copying and deleting files | uploading and downloading files | working with directories ] 428 moving, copying and deleting files file and
stream guide: [ nsiscriptableio | accessing files | getting file information | reading from files | writing to files | ...
...And 3 more matches
HTTP Cache
gain, the cache entry remains empty (a.k.a. "new"). the writer stored all necessary meta data in the cache entry and called metadataready on it: other consumers now get the entry and may examine and potentially modify the meta data and read the data (if any) of the cache entry. when the writer has data (i.e. the response payload) to write to the cache entry, it must open the output
stream on it before it calls metadataready. when the writer still keeps the cache entry and has open and keeps open the output
stream on it, other consumers may open input
streams on the entry. the data will be available as the writer writes data to the cache entry's output
stream immediately, even before the output
stream is closed. this is called concurrent read/write. concurrent read and writ...
...ing unread content. this could be improved by keeping the network load running and being stored to the cache entry even after the writing channel has been canceled. when the writer is interrupted, the first concurrent reader in line does a range request for the rest of the data - and becomes that way a new writer. the rest of the readers are still concurrently reading the content since output
stream for the cache entry is again open and kept by the current writer. lifetime of an existing entry with only a partial content such a cache entry is first examined in the nsicacheentryopencallback.oncacheentrycheck callback, where it has to be checked for completeness. in this case, the content-length (or different indicator) header doesn't equal to the data size reported by the cache entry. t...
... a role of the writer. other parallel consumers, if any, are blocked until the writer calls setvalid on the cache entry. the consumer is then responsible to validate the partial content cache entry with the network server and attempt to load the rest of the data. when the server responds positively (in case of an http server with a 206 response code) the writer (in this order) opens the output
stream on the cache entry and calls setvalid to unblock other pending openers. concurrent read/write is engaged. lifetime of an existing entry that doesn't pass server revalidation such a cache entry is first examined in the nsicacheentryopencallback.oncacheentrycheck callback, where the consumer finds out it must be revalidated with the server before use. the consumer then indicates the cache en...
...And 3 more matches
Necko Architecture
te their own protocol libraries that can be dynamically loaded and used by applications utilizing necko. necko provides the following libraries: necko - core networking functionality. mimetype - mime <-> file extension mapping nkabout - about: protocol nkdata - data: protocol nkfile - file: protocol nkftp - ftp: protocol nkkeyword - keyword: protocol nkresrc - resource: protocol cnvts -
stream converters stremcnv -
stream converter service these libraries will change with time and illustrate the modularity of necko. architecture after a few iterations of our original design, the current necko architecture looks something like this: urls necko's primary responsibility is moving data from one location, to another location. these locations are represented in the form we have all ...
... for. however, a protocol handler implementation also might "cache" the underlying transports so channels it creates can reuse them later. the channel does the true work of protocol interpretation and data movement (if any). although the protocol handler creates channels, protocol interpretation doesn't begin until the user initiates the transaction using the nsichannel api. ...
...ugh the protocol handler creates channels, protocol interpretation doesn't begin until the user initiates the transaction using the nsichannel api. receiving data & nsi
streamlistener you can read or write, from or to a channel using either the synchronous api, or the asynchronous api. if you want to move data asynchronously you need to be able to receive callbacks using an implementation of nsi
streamlistener. an nsi
streamlistener 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 nsi
streamlistener implementation to decide what to do with these various notifications. the ondataavailable() notification provides a chance for the nsi
streamlistener to actually retrieve data that the channel has acquired. ...
...And 3 more matches
Components.isSuccessCode
leted. if the task is sufficiently complex that it can fail, the notification will include a status code indicating the success or failure of the operation (see, for example, nsirequestobserver.onstoprequest()). to determine the success or failure of the complex task, you would call components.issuccesscode() upon the status code included in the notification. examples checking whether copying a
stream's data succeeded the following example demonstrates copying data from a buffered nsiinput
stream to an nsioutput
stream, checking for whether the copy succeeded using components.issuccesscode(). note: nsiasync
streamcopier.init() has changed in gecko 1.9.2, omit last 2 boolean parameters if you're using gecko 1.9.1 and earlier. const cc = components.classes; const ci = components.interfaces; cons...
...ether the copy succeeded using components.issuccesscode(). note: nsiasync
streamcopier.init() has changed in gecko 1.9.2, omit last 2 boolean parameters if you're using gecko 1.9.1 and earlier. ...
... copy succeeded using components.issuccesscode(). note: nsiasync
streamcopier.init() has changed in gecko 1.9.2, omit last 2 boolean parameters if you're using gecko 1.9.1 and earlier. ...
...And 3 more matches
nsISHEntry
nsdocshelleditordataptr forgeteditordata(); violates the xpcom interface guidelines nsicontentviewer getanycontentviewer(out nsishentry ownerentry); void getscrollposition(out long...
... nsdocshelleditordataptr forgeteditordata(); violates the xpcom interface guidelines nsicontentviewer getanycontentviewer(out nsishentry ownerentry); void getscrollposition(out long x, out long...
...tries attached to the same docshell only if the two entries are entries for the same page in the sense that one could go from the state represented by one to the state represented by the other simply by scrolling (so the entries are separated by an anchor traversal or a subframe navigation in some other frame). obsolete since gecko 6.0 parent nsishentry parent of this entry. postdata nsiinput
stream post data for the document. referreruri nsiuri referrer uri. refreshurilist nsisupportsarray saved refresh uri list for the content viewer. savelayoutstateflag boolean indicate whether layouthistorystate should be saved. statedata nsistructuredclonecontainer get/set data associated with this history state via a pushstate() call, serialized using structured clone. (prior to gecko 6.0 retu...
...And 3 more matches
HTMLMediaElement.srcObject - Web APIs
the srcobject property of the htmlmediaelement interface sets or returns the object which serves as the source of the media associated with the htmlmediaelement. the object can be a media
stream, a mediasource, a blob, or a file (which inherits from blob). note: as of march 2020, only safari supports setting objects other than media
stream. until other browsers catch up, for mediasource, blob and file, consider falling back to creating a url with url.createobjecturl() and assign it to htmlmediaelement.src. see below for an example. syntax var sourceobject = htmlmediaelement.srcobject; htmlmediaelement.srcobject = sourceobject; value a media
stream, mediasource, blob, or file object (though see the compatibility table for what is actually supported). usage notes older versions of the med...
...bject = htmlmediaelement.srcobject; htmlmediaelement.srcobject = sourceobject; value a media
stream, mediasource, blob, or file object (though see the compatibility table for what is actually supported). usage notes older versions of the media source specification required using createobjecturl() to create an object url then setting src to that url. now you can just set srcobject to the media
stream directly. examples basic example in this example, a media
stream from a camera is assigned to a newly-created <video> element. const media
stream = await navigator.mediadevices.getusermedia({video: true}); const video = document.createelement('video'); video.srcobject = media
stream; in this example, a new mediasource is assigned to a newly-created <video> element. const mediasource = new medi...
...in this example, a new mediasource is assigned to a newly-created <video> element. const mediasource = new mediasource(); const video = document.createelement('video'); video.srcobject = mediasource; supporting fallback to the src property the examples below support older browser versions that require you to create an object url and assign it to src if srcobject isn't supported. ...
...And 3 more matches
ImageCapture.getPhotoCapabilities() - Web APIs
ax const capabilitiespromise = imagecaptureobj.getphotocapabilities() return value a promise that resolves with a photocapabilities object. example the following example, extracted from chrome's image capture / photo resolution sample, uses the results from getphotocapabilities() to modify the size of an input range. ...
...eobj.getphotocapabilities() return value a promise that resolves with a photocapabilities object. example the following example, extracted from chrome's image capture / photo resolution sample, uses the results from getphotocapabilities() to modify the size of an input range. this example also shows how the imagecapture object is created using a media
streamtrack retrieved from a device's media
stream. ...
...e's image capture / photo resolution sample, uses the results from getphotocapabilities() to modify the size of an input range. this example also shows how the imagecapture object is created using a media
streamtrack retrieved from a device's media
stream. ...
...And 3 more matches
ImageCapture.getPhotoSettings() - Web APIs
ting if it only supports discrete widths. redeyereduction: a boolean indicating whether the red-eye reduction should be used if it is available. example the following example, extracted from chrome's image capture / photo resolution sample, uses the results from getphotosettings() to modify the size of an input range. ...
...redeyereduction: a boolean indicating whether the red-eye reduction should be used if it is available. example the following example, extracted from chrome's image capture / photo resolution sample, uses the results from getphotosettings() to modify the size of an input range. this example also shows how the imagecapture object is created using a media
streamtrack retrieved from a device's media
stream. ...
...chrome's image capture / photo resolution sample, uses the results from getphotosettings() to modify the size of an input range. this example also shows how the imagecapture object is created using a media
streamtrack retrieved from a device's media
stream. ...
...And 3 more matches
MediaRecorder.onerror - Web APIs
the mediarecorder interface's onerror event handler is called by the media
stream recording api when an error occurs. you can provide an event handler to deal with errors that occur while creating or using a media recorder. the error object is of type mediarecordererrorevent, and its error property contains a domexception object that describes the error that occurred. syntax mediarecorder.onerror = errorhandlerfunction; value a function to be called whenever an error occurs during the recorder's lifetime. in addition to other general errors that might occur, the following errors are specifically possible when using the media
stream recording api; to determine which occurred, check the value of mediarecordererrorevent.error.name. invalidstateerror an attempt was made to stop or pause or a...
...pi; to determine which occurred, check the value of mediarecordererrorevent.error.name. invalidstateerror an attempt was made to stop or pause or an inactive recorder, start or resume an active recorder, or otherwise manipulate the mediarecorder while in the wrong state. this exception can also occur when a request is made on a source that has been deleted or removed. securityerror the media
stream is configured to disallow recording. this may be the case, for example, with sources obtained using getusermedia() when the user denies permission to use an input device. this also happens when a media
streamtrack within the
stream is marked as isolated due to the peeridentity constraint on the source
stream. notsupportederror an attempt was made to instantiate a mediarecorder using a mime type...
...her directly because of a call to a mediarecorder method, or indirectly due to a problem arising during the recording process. example this example creates a new mediarecorder instance and starts recording using the user agent's default media format. it returns either the mediarecorder or the name of the error that occurred if any exceptions are thrown during the setup process. ...
...And 3 more matches
Navigator.getUserMedia() - Web APIs
the deprecated navigator.getusermedia() method prompts the user for permission to use up to one video input device (such as a camera or shared screen) and up to one audio input device (such as a microphone) as the source for a media
stream. if permission is granted, a media
stream whose video and/or audio tracks come from those devices is delivered to the specified success callback. if permission is denied, no compatible input devices exist, or any other error condition occurs, the error callback is executed with a media
streamerror object describing what went wrong. if the user instead doesn't make a choice at all, neither callback is executed. this is a legacy method. please use the newer navigator.mediadevices.getusermedia() instead. while technically not deprecated, this old callback ver...
...er callback is executed. this is a legacy method. please use the newer navigator.mediadevices.getusermedia() instead. while technically not deprecated, this old callback version is marked as such, since the specification strongly encourages using the newer promise returning version. syntax navigator.getusermedia(constraints, successcallback, errorcallback); parameters constraints a media
streamconstraints object specifying the types of media to request, along with any requirements for each type. for details, see the constraints section under the modern mediadevices.getusermedia() method, as well as the article capabilities, constraints, and settings. successcallback a function which is invoked when the request for media access is approved. the function is called with one parameter: th...
...ints object specifying the types of media to request, along with any requirements for each type. for details, see the constraints section under the modern mediadevices.getusermedia() method, as well as the article capabilities, constraints, and settings. successcallback a function which is invoked when the request for media access is approved. the function is called with one parameter: the media
stream object that contains the media
stream. your callback can then assign the
stream to the desired object (such as an <audio> or <video> element), as shown in the following example: function(
stream) { var video = document.queryselector('video'); video.srcobject =
stream; video.onloadedmetadata = function(e) { // do something with the video here. }; } errorcallback when the call...
...And 3 more matches
RTCPeerConnection.setRemoteDescription() - Web APIs
the sessiondescription parameter is technically of type rtcsessiondescriptioninit, but because rtcsessiondescription serializes to be indistinguishable from rtcsessiondescriptioninit, you can also pass in an rtcsessiondescription. this lets you simplify code such as the following: mypeerconnection.setremotedescription(new rtcsessiondescription(description)) .then(function () { return createmy
stream(); }) to simply be: mypeerconnection.setremotedescription(description) .then(function () { return createmy
stream(); }) using async/await syntax, you can further simplify this to: await mypeerconnection.setremotedescription(description); createmy
stream(); since it's unnecessary, the rtcsessiondescription() constructor is deprecated. return value a promise which is fulfilled once the valu...
...ode is derived from the example and tutorial in the article signaling and video calling; take a look at that for more details and a more in-depth explanation of what's going on. ...
...ling and video calling; take a look at that for more details and a more in-depth explanation of what's going on. ...
...And 3 more matches
Using server-sent events - Web APIs
this is one-way connection, so you can't send events from a client to a server. receiving events from the server the server-sent event api is contained in the eventsource interface; to open a connection to the server to begin receiving events from it, create a new eventsource object with the url of a script that generates the events. ...
...ultiple tabs, as the limit is per browser and is set to a very low number (6). the issue has been marked as "won't fix" in chrome and firefox. this limit is per browser + domain, which means that you can open 6 sse connections across all of the tabs to www.example1.com and another 6 sse connections to www.example2.com (per stackoverflow). when using http/2, the maximum number of simultaneous http
streams is negotiated between the server and the client (defaults to 100). sending events from the server the server-side script that sends events needs to respond using the mime type text/event-
stream. each notification is sent as a block of text terminated by a pair of newlines. for details on the format of the event
stream, see event
stream format. the php code for the example we're using here fo...
... echo "event: ping\n"; $curdate = date(date_iso8601); echo 'data: {"time": "' . $curdate . '"}'; echo "\n\n"; // send a simple message at random intervals. $counter--; if (!$counter) { echo 'data: this is a message at time ' . ...
...And 3 more matches
Writing a WebSocket server in C# - Web APIs
void main() { tcplistener server = new tcplistener(ipaddress.parse("127.0.0.1"), 80); server.start(); console.writeline("server has started on 127.0.0.1:80.{0}waiting for a connection...", environment.newline); tcpclient client = server.accepttcpclient(); console.writeline("a client connected."); } } tcpclient methods: system.net.sockets.network
stream get
stream() gets the
stream which is the communication channel. both sides of the channel have reading and writing capability. properties: int available this property indicates how many bytes of data have been sent. the value is zero until network
stream.dataavailable is true. network
stream methods: write(byte[] buffer, int offset, int size) writes bytes from buffer, offset and si...
...s true. network
stream methods: write(byte[] buffer, int offset, int size) writes bytes from buffer, offset and size determine length of message. read(byte[] buffer, int offset, int size) reads bytes to buffer. offset and size determine the length of the message. let us extend our example. tcpclient client = server.accepttcpclient(); console.writeline("a client connected."); network
stream stream = client.get
stream(); //enter to an infinite cycle to be able to handle every change in
stream while (true) { while (!
stream.dataavailable); byte[] bytes = new byte[client.available];
stream.read(bytes, 0, bytes.length); } handshaking when a client connects to a server, it sends a get request to upgrade the connection to a websocket from a simple http request. this is know...
...as handshaking. this sample code can detect a get from the client. note that this will block until the first 3 bytes of a message are available. alternative solutions should be investigated for production environments. using system.text; using system.text.regularexpressions; while(client.available < 3) { // wait for enough bytes to be available } byte[] bytes = new byte[client.available];
stream.read(bytes, 0, bytes.length); //translate bytes of request to string string data = encoding.utf8.getstring(bytes); if (regex.ismatch(data, "^get")) { } else { } the response is easy to build, but might be a little bit difficult to understand. the full explanation of the server handshake can be found in rfc 6455, section 4.2.2. for our purposes, we'll just build a simple response. you must: ...
...And 3 more matches
MIME types (IANA media types) - HTTP
e discrete types currently registered with the iana are: applicationlist at iana any kind of binary data that doesn't fall explicitly into one of the other types; either data that will be executed or interpreted in some way or binary data that requires a specific application or category of application to use. generic binary data (or binary data whose true type is unknown) is application/octet-
stream. other common examples include application/pdf, application/pkcs8, and application/zip. audio list at iana audio or music data. examples include audio/mpeg, audio/vorbis. example reserved for use as a placeholder in examples showing how to use mime types. these should never be used outside of sample code listings and documentation. example can also be used as a subtype; for instance, in an ex...
...any human-readable content, source code, or textual data such as comma-separated value (csv) formatted data. examples include text/plain, text/csv, and text/html. video list at iana video data or files, such as mp4 movies (video/mp4). for text documents without a specific subtype, text/plain should be used. similarly, for binary documents without a specific or known subtype, application/octet-
stream should be used. multipart types multipart types indicate a category of document broken into pieces, often with different mime types; they can also be used — especially in email scenarios — to represent multiple, separate files which are all part of the same transaction. they represent a composite document. with the exception of multipart/form-data, used in the post method of html forms, an...
...ich may individually have different mime types. examples include multipart/form-data (for data produced using the formdata api) and multipart/byteranges (defined in rfc 7233: 5.4.1 and used with http's 206 "partial content" response returned when the fetched data is only part of the content, such as is delivered using the range header). important mime types for web developers application/octet-
stream this is the default for binary files. as it means unknown binary file, browsers usually don't execute it, or even ask if it should be executed. they treat it as if the content-disposition header was set to attachment, and propose a "save as" dialog. text/plain this is the default for textual files. even if it really means "unknown textual file," browsers assume they can display it. note that...
...And 3 more matches
Media container formats (file types) - Web media technologies
in two parts (three if a file has both audio and video in it, of course): the audio and/or video codecs used and the media container format (or file type) used. in this guide, we'll look at the container formats used most commonly on the web, covering basics about their specifications as well as their benefits, limitations, and ideal use cases. webrtc does not use a container at all. instead, it
streams the encoded audio and video tracks directly from one peer to another using media
streamtrack objects to represent each track. see codecs used by webrtc for information about codecs commonly used for making webrtc calls, as well as browser compatibility information around codec support in webrtc. common container formats while there are a vast number of media container formats, the ones listed b...
...rmat, find it in this list and click through to the details, which include information about what the container is typically useful for, what codecs it supports, and which browsers support it, among other specifics. ...
...3g mobile phones, but can still be used on more modern phones and networks. however, the improved bandwidth availability and increased data caps on most networks has reduced the need for the 3gp format. however, this format is still used for slower networks and for lower-performance phones. this media container format is derived from the iso base media file format and mpeg-4, but is specifically
streamlined for lower bandwidth scenarios. base 3gp media mime types audio video audio/3gpp video/3gpp audio/3gpp2 video/3gpp2 audio/3gp2 video/3gp2 these mime types are the fundamental types for the 3gp media container; other types may be used depending on the specific codec or codecs in use; in addition, you can add the codecs parameter to t...
...And 3 more matches
Post data to window - Archive of obsolete content
ng post data to the server and displaying the server response. need more elaborate examples, examples of displaying the response in a new tab, in background tabs, and a link to using xmlhttprequest for post requests. preprocessing post data the apostdata argument of the (global) loaduri(), opendialog(), and (tab)browser.loaduriwithflags() methods expects the post data in the form of an nsiinput
stream (because they eventually call nsiwebnavigation.loaduri()) while post data can be created using nsimimeinput
stream. most of the time, post data starts as a data string in the form of "name1=data1&name2=data2&...", so you must convert it before passing the data to one of the methods. here is an example: var datastring = "name1=data1&name2=data2"; // post method requests must wrap the encoded text...
... eventually call nsiwebnavigation.loaduri()) while post data can be created using nsimimeinput
stream. most of the time, post data starts as a data string in the form of "name1=data1&name2=data2&...", so you must convert it before passing the data to one of the methods. here is an example: var datastring = "name1=data1&name2=data2"; // post method requests must wrap the encoded text in a mime //
stream const cc = components.classes; const ci = components.interfaces; var string
stream = cc["@mozilla.org/io/string-input-
stream;1"]. ...
...=data2&...", so you must convert it before passing the data to one of the methods. here is an example: var datastring = "name1=data1&name2=data2"; // post method requests must wrap the encoded text in a mime //
stream const cc = components.classes; const ci = components.interfaces; var string
stream = cc["@mozilla.org/io/string-input-
stream;1"]. ...
...And 2 more matches
The life of an HTML HTTP request - Archive of obsolete content
warning: the content of this article may be out of date. it was last updated in 1999. (1) the loading of the url is started in nswebshell::doloadurl (called from some loadurl or loaduri variant in the webshell). the webshell then tells its documentloader to load (command "view") the specified url. [note: passes nswebshell.mobserver as nsi
streamobserver and the webshell as nsicontentviewercontainer to the docloader.] (2) the document loader calls ns_openuri with the url to begin transfering the requested file. necko (the network library) checks the url scheme (the first part of the url, http: in this case) and locates the correct nsiprotocolhandler (in this case nshttphandler) and asks it for a nsichannel (nshttpchannel). the channel represents the connection to the server, and ...
... (2) the document loader calls ns_openuri with the url to begin transfering the requested file. necko (the network library) checks the url scheme (the first part of the url, http: in this case) and locates the correct nsiprotocolhandler (in this case nshttphandler) and asks it for a nsichannel (nshttpchannel). the channel represents the connection to the server, and is the source of the html data
stream. (3) when data is starting to come from the webserver the nsichannel calls the onstartrequest in the documenloader. now the channel knows the content type of the incoming data, so the documentloader can find an nsidocumentloaderfactory for the "text/html" content type (in this case an nslayoutdlf). this factory is then told to create a nsicontentviewer. the factory creates a contentviewer. in mo...
...content type (in this case an nslayoutdlf). this factory is then told to create a nsicontentviewer. the factory creates a contentviewer. in most cases (including this) it also creates a nsidocument (nshtmldocument) and binds it to the contentviewer. the contentviewer is then embed():ed into the contentviewercontainer (the webshell). (4) the document then creates a nsiparser for parsing the input
stream. ...
...And 2 more matches
Using XPInstall to Install Plugins - Archive of obsolete content
illa-based browsers is analogous to smartupdate in netscape communicator 4.x browsers. porting smartupdate deployments to xpinstall is trivial after gaining some familiarity with the new xpinstall api. the recommended installation process xpinstall provides a cohesive api to accomplish rapid installation and setup of plugin software for end-users. the benefit of using xpinstall is to provide a
streamlined installation mechanism. this section discusses what an ideal xpinstall package will do, as well as points out some of the javascript api calls that you will make to accomplish these install tasks. an ideal xpi package will: install to the current browser that is initiating the xpinstall installation via html or triggering an xpinstall installation via a trigger script. we will use the term...
...e windows system registry to disclose this secondary location. this section traces some of the xpinstall apis that can do this. a complete template of an xpi package is also presented in this section. not all the work needs to be done in javascript -- if you have a native installer (exe) that recognizes netscape gecko browsers, and you merely wish to wrap the exe installer in an xpi package for a
streamlined delivery to the client, you can easily do so. this section refers extensively to the xpinstall api documentation. initializing installation with plugin identifier all xpinstall installations are initiated with the initinstall method of the install object. since the install object is available to the install script, it need not be mentioned in the install script (e.g. there is no need to i...
...elinstall(err); } note that above, the plid contains an "=" and in case the xpi package is running on browsers that treat "=" as an illegal token, the workaround is to handle the error and invoke initinstall again. using xpinstall to run an exe (native code) installer if you wish to run a native installer (exe) to install plugin software, but wish to make the delivery of this native installer
streamlined and within the browser's process, then you ought to consider wrapping it in an xpi package. from javascript, you can call xpinstall's execute method of the install object to execute the binary. you can also call the execute method of the file object if you wish to actually install the file you are executing, rather than have it deleted. you can pass command line parameters to the executable.
...And 2 more matches
Necko Interfaces Overview
ad the resource once) download initiated via nsichannel::asyncopen method can be canceled via nsirequest::cancel method at anytime after invocation of asyncopen method nsiprotocolhandler a service that manages a protocol, identified by it's uri scheme (eg. ...
...t manages a protocol, identified by it's uri scheme (eg. ...
... ...
...And 2 more matches
Web Replay
nt process in the following ways: calls to certain functions are intercepted by hooking them (rewriting the machine code at their entry points to call a different function with the same signature), including the function used to dispatch mach messages. when a call or message is intercepted, the wrapped call/message is first performed normally and then it and its outputs are recorded in a data
stream for the thread performing the call. during execution of the wrapped call/message, recording of any inner calls is suppressed, so that they are performed normally without affecting the recording. the functions which are intercepted are generally at the system call and the system library level. in general, any function which is not compiled as part of gecko is fair game. acquisition order of lo...
... the call. during execution of the wrapped call/message, recording of any inner calls is suppressed, so that they are performed normally without affecting the recording. the functions which are intercepted are generally at the system call and the system library level. in general, any function which is not compiled as part of gecko is fair game. acquisition order of locks is recorded in a data
stream for each lock. some locks which are associated with non-deterministic components are not recorded, such as the js gc and helper threads locks. accesses on atomic variables/fields are recorded in a global data
stream, as if they were all protected by a global lock. some atomics are related to non-deterministic components and are excluded from this
stream. threads use file descriptors to wait o...
...down behaviors that should go unrecorded. replaying a replaying content process behaves in the same way as a recording process, except for the following: the calls and mach messages which were intercepted during recording are also intercepted here. ...
...And 2 more matches
nsIDOMMozTouchEvent
this is a random number that is guaranteed to remain the same for each finger during all moztouchmove events between the corresponding moztouchdown and moztouchup events. methods initmoztouchevent() initializes the touch e...
...this is a random number that is guaranteed to remain the same for each finger during all moztouchmove events between the corresponding moztouchdown and moztouchup events. methods initmoztouchevent() initializes the touch event. void initsimplegestureevent( in domstring typearg, i...
... see also mouse gesture events touch events event ...
...And 2 more matches
nsIDOMSerializer
ace can be used to serialize a dom document or any dom subtree. inherits from: nsisupports last changed in gecko 1.7 implemented by: @mozilla.org/xmlextras/xmlserializer;1. ...
...ment or any dom subtree. inherits from: nsisupports last changed in gecko 1.7 implemented by: @mozilla.org/xmlextras/xmlserializer;1. to create an instance, use: var domserializer = components.classes["@mozilla.org/xmlextras/xmlserializer;1"] .createinstance(components.interfaces.nsidomserializer); method overview void serializeto
stream(in nsidomnode root, in nsioutput
stream stream, in autf8string charset); astring serializetostring(in nsidomnode root); methods serializeto
stream() the subtree rooted by the specified element is serialized to a byte
stream using the character set specified. void serializeto
stream( in nsidomnode root, in nsioutput
stream stream, in autf8string charset ); parameters root the root of the subtree to be serialized. this could be...
...if this string is empty and root is a document, the document's character set will be used. serializetostring() the subtree rooted by the specified element is serialized to a string. ...
...And 2 more matches
nsIPipe
xpcom/io/nsipipe.idlscriptable this interface represents an in-process buffer that can be read using nsiinput
stream and written using nsioutput
stream. inherits from: nsisupports last changed in gecko 1.6 method overview void init(in boolean nonblockinginput, in boolean nonblockingoutput, in unsigned long segmentsize, in unsigned long segmentcount, in nsimemory segmentallocator); attributes attribute type description input
stream nsiasyncinput
stream the pipe's input end, which also implements nsisearchableinput
stream. read only. output
stream nsiasyncoutput
stream the pipe's output end. read only. methods init() initialize this pipe. void init( in boolean nonblockinginpu...
... segmentsize specifies the segment size in bytes (pass 0 to use default value) segmentcount specifies the max number of segments (pass 0 to use default value). passing pr_uint32_max here causes the pipe to have "infinite" space. ...
...t end. read only. methods init() initialize this pipe. void init( in boolean nonblockinginput, in boolean nonblockingoutput, in unsigned long segmentsize, in unsigned long segmentcount, in nsimemory segmentallocator ); parameters nonblockinginput true specifies non-blocking input
stream behavior. nonblockingoutput true specifies non-blocking output
stream behavior. segmentsize specifies the segment size in bytes (pass 0 to use default value) segmentcount specifies the max number of segments (pass 0 to use default value). passing pr_uint32_max here causes the pipe to have "infinite" space. this mode can be useful in some cases, but should always be used with caution. the default value for this parameter is a finite value...
...And 2 more matches
nsIScriptableUnicodeConverter
throws ns_error_uconv_noconv if the requested charset is not supported. methods convertfromunicode() converts the data from unicode to one charset. returns the converted string. after converting, finish should be called and its return...
...throws ns_error_uconv_noconv if the requested charset is not supported. methods convertfromunicode() converts the data from unicode to one charset. returns the converted string. after converting, finish should be called and its return value appended to th...
...an array of bytes to a unicode string. astring convertfrombytearray( [const,array,size_is(acount)] in octet adata, in unsigned long acount ); converttobytearray() convert a unicode string to an array of bytes. finish does not need to be called. ...
...And 2 more matches
nsIUploadChannel
netwerk/base/public/nsiuploadchannel.idlscriptable a channel may optionally implement this interface if it supports the notion of uploading a data
stream. the upload
stream may only be set prior to the invocation of asyncopen on the channel. inherits from: nsisupports last changed in gecko 1.7 method overview void setupload
stream(in nsiinput
stream a
stream, in acstring acontenttype, in long acontentlength); attributes attribute type description upload
stream nsiinput
stream get the
stream (to be) uploaded by this channel. read only. methods setupload
stream() sets a
stream to be uploaded by this channel. ...
...d in gecko 1.7 method overview void setupload
stream(in nsiinput
stream a
stream, in acstring acontenttype, in long acontentlength); attributes attribute type description upload
stream nsiinput
stream get the
stream (to be) uploaded by this channel. read only. methods setupload
stream() sets a
stream to be uploaded by this channel. most implementations of this interface require that the
stream: implement threadsafe addref and release implement nsiinput
stream.readsegments() implement nsiseekable
stream.seek(). ...
...ription upload
stream nsiinput
stream get the
stream (to be) uploaded by this channel. read only. methods setupload
stream() sets a
stream to be uploaded by this channel. most implementations of this interface require that the
stream: implement threadsafe addref and release implement nsiinput
stream.readsegments() implement nsiseekable
stream.seek(). history here is that we need to support both
streams that already have headers (for example, content-type and content-length) information prepended to the
stream (by plugins) as well as clients (composer, uploading application) that want to upload data
streams without any knowledge of protocol specifications. for this reason, we have a special meaning for the acontenttype parameter. ...
...And 2 more matches
nsIZipWriter
method overview void addentrychannel(in autf8string azipentry, in prtime amodtime, in print32 acompression, in nsichannel achannel, in boolean aqueue); void addentrydirectory(in autf8string azipentry, in prtime amodtime, in boolean aqueue); void addentryfile(in autf8string azipentry, in print32 acompression, in nsifile afile, in boolean aqueue); void addentry
stream(in autf8string azipentry, in prtime amodtime, in print32 acompression, in nsiinput
stream a
stream, in boolean aqueue); void close(); nsizipentry getentry(in autf8string azipentry); boolean hasentry(in autf8string azipentry); void open(in nsifile afile, in print32 aioflags); void processqueue(in nsirequestobserver aobserver, in nsisupports acontext); ...
...xecution. if false, the operation is performed immediately. will be performed when processqueue() is called. exceptions thrown ns_error_not_initialized no zip file is open. ns_error_file_already_exists the specified path already exists in the zip file. ns_error_in_progress the zip writer is already performing another operation. ns_error_file_not_found if file does not exist. addentry
stream() adds data from an input
stream to the zip file. void addentry
stream( in autf8string azipentry, in prtime amodtime, in print32 acompression, in nsiinput
stream a
stream, in boolean aqueue ); parameters azipentry the path of the file entry to add to the zip file. this is the path it will be located at within the zip file. note: you must use forward slashes in the path. amodtime ...
... aqueue if true, the operation is queued for later execution. if false, the operation is performed immediately. will be performed when processqueue() is called. exceptions thrown ns_error_not_initialized no zip file is open. ns_error_file_already_exists the specified path already exists in the zip file. ...
...And 2 more matches
Browser Side Plug-in API - Plugins
alled by the plug-in. for an overview of how these two sides of the plug-in api interact, see the how plug-ins work and overview of plug-in structure sections in the introduction. warning: you must only call these from the main thread; calling them from other threads is not supported and may have unpredictable results. ...
...overview of how these two sides of the plug-in api interact, see the how plug-ins work and overview of plug-in structure sections in the introduction. warning: you must only call these from the main thread; calling them from other threads is not supported and may have unpredictable results. netscape plug-in method summary « previousnext » npn_destroy
stream closes and deletes a
stream. npn_forceredraw forces a paint message for a windowless plug-in. npn_getauthenticationinfo this function is called by plug-ins to get http authentication information from the browser. npn_geturl asks the browser to create a
stream for the specified url. npn_geturlnotify requests creation of a new
stream with the contents of the specified url; gets notification of the result. npn_getval...
... specified drawing area prior to repainting or refreshing a windowless plug-in. npn_invalidateregion invalidates specified drawing region prior to repainting or refreshing a windowless plug-in. npn_memalloc allocates memory from the browser's memory space. npn_memflush requests that the browser free a specified amount of memory. npn_memfree deallocates a block of allocated memory. npn_new
stream requests the creation of a new data
stream produced by the plug-in and consumed by the browser. npn_pluginthreadasynccall thread-safe way to request that the browser calls a plug-in function on the browser or plug-in thread (the thread on which the plug-in was initiated). npn_poppopupsenabledstate pops the popups-enabled state. npn_posturl posts data to a url. npn_posturlnotify posts d...
...And 2 more matches
AudioContext - Web APIs
methods also inherits methods from its parent interface, baseaudiocontext. audiocontext.close() closes the audio context, releasing any system audio resources that it uses. audiocontext.createmediaelementsource() creates a mediaelementaudiosourcenode associated with an htmlmediaelement. this can be used to play and manipulate audio from <video> or <audio> elements. audiocontext.createmedia
streamsource() creates a media
streamaudiosourcenode associated with a media
stream representing an audio
stream which may come from the local computer microphone or other sources. audiocontext.createmedia
streamdestination() creates a media
streamaudiodestinationnode associated with a media
stream representing an audio
stream which may be stored in a local file or sent to another computer. audiocontext.
... audiocontext.getoutputtimestamp() returns a new audiotimestamp object containing two audio timestamp values relating to the current audio context. ...
... audiocontext.getoutputtimestamp() returns a new audiotimestamp object containing two audio timestamp values relating to the current audio context. audiocontext.resume() resumes the progression of time in an audio context that has previously been suspended/paused. ...
...And 2 more matches
HTMLMediaElement - Web APIs
remoteplayback a boolean that sets or returns the remote playback state, indicating whether the media element is allowed to have a remote playback ui. htmlmediaelement.duration read only a read-only double-precision floating-point value indicating the total duration of the media in seconds. if no media data is available, the returned value is nan. if the media is of indefinite length (such as
streamed live media, a webrtc call's media, or similar), the value is +infinity. htmlmediaelement.ended read only returns a boolean that indicates whether the media element has finished playing. htmlmediaelement.error read only returns a mediaerror object for the most recent error, or null if there has not been an error. htmlmediaelement.loop a boolean that reflects the loop html attribute, whic...
...h indicates the name of the group of elements it belongs to. a group of media elements shares a common mediacontroller. htmlmediaelement.mediakeys read only returns a mediakeys object or null. mediakeys is a set of keys that an associated htmlmediaelement can use for decryption of media data during playback. htmlmediaelement.mozaudiocaptured read only returns a boolean. related to audio
stream capture. htmlmediaelement.mozfragmentend is a double that provides access to the fragment end time if the media element has a fragment uri for currentsrc, otherwise it is equal to the media duration. htmlmediaelement.mozframebufferlength is a unsigned long that indicates the number of samples that will be returned in the framebuffer of each mozaudioavailable event. this number is a to...
...udio device delivering output, or an empty string if it is using the user agent default. this id should be one of the mediadeviceinfo.deviceid values returned from mediadevices.enumeratedevices(), id-multimedia, or id-communications. htmlmediaelement.src is a domstring that reflects the src html attribute, which contains the url of a media resource to use. htmlmediaelement.srcobject is a media
stream representing the media to play or that has played in the current htmlmediaelement, or null if not assigned. htmlmediaelement.texttracks read only returns the list of texttrack objects contained in the element. htmlmediaelement.videotracks read only returns the list of videotrack objects contained in the element. htmlmediaelement.volume is a double indicating the audio volume, from 0.0 (si...
...And 2 more matches
MediaSettingsRange - Web APIs
a photocapabilities object can be retrieved by calling imagecapture.photocapabilities(). properties mediasettingsrange.max returns the maximum value of this settings. mediasettingsrange.min returns the minimum value of this setting. mediasettingsrange.step returns the minimum difference between consecutive values of this setting. example the following example, extracted from chrome's image capture / photo resolution sample, uses the results from getphotocapabilities().imagewidth to modify the size of an input range. ...
...m difference between consecutive values of this setting. example the following example, extracted from chrome's image capture / photo resolution sample, uses the results from getphotocapabilities().imagewidth to modify the size of an input range. ...
...mple the following example, extracted from chrome's image capture / photo resolution sample, uses the results from getphotocapabilities().imagewidth to modify the size of an input range. ...
...And 2 more matches
MediaTrackSettings - Web APIs
these values will adhere as closely as possible to any constraints previously described using a mediatrackconstraints object and set using applyconstraints(), and will adhere to the default constraints for any properties whose constraints haven't been changed, or whose customized constraints couldn't be matched. to learn more about how constraints and settings work, see capabilities, constraints, and settings. ...
... motion the mouse cursor is always included in the video if it's moving, and for a short time after it stops moving. never the mouse cursor is never included in the shared video. displ...
...ion of a screen, like a window or tab) are generally treated like video tracks, with the exception that they also support the following added settings: cursor a domstring which indicates whether or not the mouse cursor is being included in the generated
stream and under what conditions. possible values are: always the mouse is always visible in the video content of the {domxref("media
stream"), unless the mouse has moved outside the area of the content. ...
...And 2 more matches
Transcoding assets for Media Source Extensions - Web APIs
when working with media source extensions, it is likely that you need to condition your assets before you can
stream them. this article takes you through the requirements and shows you a toolchain you can use to encode your assets appropriately. getting started the first and most important step is to ensure that your files are comprised of a container and codec that users' browsers support. depending on the codec, you might need to fragment the file to comply with the iso bmff spec. (optional) if you decide to use dynamic adaptive
streaming over http (dash) for adaptive bitrate
streaming, you need to transcode your assets into multiple resolutions. most dash clients expect a corresponding media presentation description (mpd) manifest file, which is typically generated while generat...
...ntainer is already aac and the video codec is h.264, we can instruct ffmpeg not to perform transcoding. instead, it will just copy the audio and video tracks over without performing any transcoding, which is relatively faster than having to transcode. $ ffmpeg -i trailer_1080p.mov -c:v copy -c:a copy bunny.mp4 $ ls bunny.mp4 trailer_1080p.mov checking fragmentation in order to properly
stream mp4, we need the asset to be an iso bmf format mp4. without proper fragmentation, any given mp4 file is not guaranteed to work with mse. this means that metadata within the container is spread out and not lumped together. to check whether an mp4 file is a proper mp4
stream, you can again use the mp4info utility to list the atoms of an mp4. note: the fragmented version is slightly larger than ...
... you already have an mp4, but it's not properly fragmented, you can again use ffmpeg: $ ffmpeg -i non_fragmented.mp4 -movflags frag_keyframe+empty_moov fragmented.mp4 in both cases, chrome may require an extra movie flag to be set: -movflags frag_keyframe+empty_moov+default_base_moof having a properly fragmented mp4 file is all you need to get started. if you wish to employ adaptive bitrate
streaming, you'll have to create encodings at multiple resolutions. while mse is flexible enough to allow you to make your implementation, it's highly recommended to use an existing dash client as dash is a well-specified application protocol. creating content for dash given that you have ffmpeg and bento4's utilities accessible through your $path, you can run bento4's mp4-dash-encode.py python scrip...
...And 2 more matches
Media Source API - Web APIs
the media source api, formally known as media source extensions (mse), provides functionality enabling plugin-free web-based
streaming media. using mse, media
streams can be created via javascript, and played using <audio> and <video> elements. media source extensions concepts and usage playing video and audio has been available in web applications without plugins for a few years now, but the basic features offered have really only been useful for playing single whole tracks. we can't, for example, combine/split arraybuffers.
streaming media has up until recently been the domain of flash, with technologies like flash media server serving video
streams using the rtmp protocol. the mse standard with media source extensions (mse), this is changing. mse allows us to replace the usual single t...
...the mse standard with media source extensions (mse), this is changing. mse allows us to replace the usual single track src value fed to media elements with a reference to a mediasource object, which is a container for information like the ready state of the media for being played, and references to multiple sourcebuffer objects that represent the different chunks of media that make up the entire
stream. mse gives us finer grained control over how much and how often content is fetched, and some control over memory usage details, such as when buffers are evicted. it lays the groundwork for adaptive bitrate
streaming clients (such as those using dash or hls) to be built on its extensible api. creating assets that work with mse in modern browsers is a laborious process, taking significant time, co...
... codec, aac audio codec, and mp4 container format is a common baseline. mse also provides an api for runtime detection of container and codec support. if you do not require explicit control of video quality over time, the rate at which content is fetched, or the rate at which memory is evicted, then the <video> and <source> tags may well be a simple and adequate solution. dash dynamic adaptive
streaming over http (dash) is a protocol for specifying how adaptive content should be fetched. it is effectively a layer built on top of mse for building adaptive bitrate
streaming clients. while there are other protocols available (such as http live
streaming (hls)), dash has the most platform support. dash moves lots of logic out of the network protocol and into the client side application logic, us...
...And 2 more matches
RTCStats - Web APIs
properties id a domstring which uniquely identifies the object which was inspected to produce this object based on rtcstats. ...
... properties id a domstring which uniquely identifies the object which was inspected to produce this object based on rtcstats. ...
...e enum type rtcstatstype. the statistics type hierarchy the various dictionaries that are used to define the contents of the objects that contain each of the various types of statistics for webrtc are structured in such a way that they build upon the core rtcstats dictionary, each layer adding more relevant information. ...
...And 2 more matches
RTCTrackEventInit.track - Web APIs
this is the track that's being added to the rtcpeerconnection. ...
...this is the track that's being added to the rtcpeerconnection. ...
...this is the track that's being added to the rtcpeerconnection. ...
...And 2 more matches
Screen Capture API - Web APIs
the screen capture api introduces additions to the existing media capture and
streams api to let the user select a screen or portion of a screen (such as a window) to capture as a media
stream. this
stream can then be recorded or shared with others over the network. screen capture api concepts and usage the screen capture api is relatively simple to use. its sole method is mediadevices.getdisplaymedia(), whose job is to ask the user to select a screen or portion of a screen to capture in the form of a media
stream. ...
...over the network. screen capture api concepts and usage the screen capture api is relatively simple to use. its sole method is mediadevices.getdisplaymedia(), whose job is to ask the user to select a screen or portion of a screen to capture in the form of a media
stream. to start capturing video from the screen, you call getdisplaymedia() on the instance of media navigator.mediadevices: capture
stream = await navigator.mediadevices.getdisplaymedia(displaymediaoptions); the promise returned by getdisplaymedia() resolves to a media
stream which
streams the captured media. see the article using the screen capture api for a more in-depth look at how to use the api to capture screen contents as a
stream. additions to existing interfaces the screen capture api doesn't have any interfaces of its o...
... additions to existing dictionaries the screen capture api adds properties to the following dictionaries defined by other specifications. ...
...And 2 more matches
<audio>: The Embed Audio element - HTML: Hypertext Markup Language
the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
... the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...dio. if the audio's metadata isn't available yet—thereby preventing you from knowing the media's start time or duration—currenttime instead indicates, and can be used to change, the time at which playback will begin. otherwise, setting currenttime sets the current playback position to the given time and seeks the media to that position if the media is currently loaded. if the audio is being
streamed, it's possible that the user agent may not be able to obtain some parts of the resource if that data has expired from the media buffer. other audio may have a media timeline that doesn't start at 0 seconds, so setting currenttime to a time before that would fail. for example, if the audio's media timeline starts at 12 hours, setting currenttime to 3600 would be an attempt to set the current pla...
...And 2 more matches
io/file - Archive of obsolete content
given directory. parameters path : string the path of the directory. returns array : an array of file names. each is a basename, not a full path. mkpath(path) makes a new directory named by the given path. any subdirectories that do not exist are also created. mkpath can be called multiple times on the same path. parameters path : string the path to create. open(path, mode) returns a
stream providing access to the contents of a file. parameters path : string the path of the file to open. mode : string an optional string, each character of which describes a characteristic of the returned
stream. if the string contains "r", the file is opened in read-only mode. "w" opens the file in write-only mode. "b" opens the file in binary mode. if "b" is not present, the file is opened...
...nd the file is opened in read-only text mode. apart from these options, this api always passes the following options: create_file, truncate (see //github.com/realityripple/uxp/blob/master/nsprpub/pr/include/prio.h#550). this means that: if the file does not exist it is created if the file exists, its length is truncated to zero it is not possible to open the file in append mode. returns
stream : if the file is opened in text read-only mode, a textreader is returned, and if text write-only mode, a textwriter is returned. see text-
streams for information on these text
stream objects. if the file is opened in binary read-only mode, a bytereader is returned, and if binary write-only mode, a bytewriter is returned. see byte-
streams for more information on these byte
stream objects. opened f...
...if the string contains "b", the contents will be returned in binary mode. ...
...if the string contains "b", the contents will be returned in binary mode. if "b" is not present or mode is not given, the file contents will be returned in text mode. returns string : a string containing the file's entire contents. remove(path) removes a file from the file system. to remove directories, use rmdir. parameters path : string the path of the file to remove. ...
Migrating from Internal Linkage to Frozen Linkage - Archive of obsolete content
classes some utility classes could previously be created with ns_new* utility functions. these classes must now be created using xpcom: // nsisupportsarray is bad! don't use it in new code. use nsiarray instead. ...
...e utility classes could previously be created with ns_new* utility functions. these classes must now be created using xpcom: // nsisupportsarray is bad! don't use it in new code. use nsiarray instead. ...
...ously be created with ns_new* utility functions. these classes must now be created using xpcom: // nsisupportsarray is bad! don't use it in new code. use nsiarray instead. ...
...new* utility functions. these classes must now be created using xpcom: // nsisupportsarray is bad! don't use it in new code. use nsiarray instead. (see xpcom:arrays.) nscomptr<nsisupportsarray> array; - rv = ns_newisupportsarray(getter_addrefs(array)); + array = do_createinstance(ns_supportsarray_contractid); - nscomptr<nsiinput
stream> raw
stream;- rv = ns_newbyteinput
stream(getter_addrefs(raw
stream),- (const char*)data, length); + nscomptr<nsistringinput
stream> raw
stream =+ do_createinstance(ns_stringinput
stream_contractid, &rv);+ ns_ensure_success(rv, rv);++ rv = raw
stream->setdata((const char*)data, length); ns_ensure_success(rv, rv); nsistringinput
stream is not frozen (and thus, not available in the gecko sdk as currently published). in order to use this ...
Index of archived content - Archive of obsolete content
content/content content/loader content/mod content/symbiont content/worker core/heritage core/namespace core/promise dev/panel event/core event/target frame/hidden-frame frame/utils fs/path io/byte-
streams io/file io/text-
streams lang/functional lang/type loader/cuddlefish loader/sandbox net/url net/xhr places/bookmarks places/favicon places/history platform/xpcom preferences/event-target preferences/serv...
... multi-process plugin architecture npapi plugin developer guide npapi plugin reference browser-side plug-in api npapi plug-in side api npanycallbackstruct npbyterange npclass npembedprint npevent npfullprint npidentifier npn new
stream npnvariable npn_createobject npn_destroy
stream npn_enumerate npn_evaluate npn_forceredraw npn_getauthenticationinfo npn_getintidentifier npn_getproperty npn_getstringidentifier npn_getstringidentifiers npn_geturl npn_geturlnotify n...
... npn_requestread npn_retainobject npn_setexception npn_setproperty npn_setvalue npn_setvalueforurl npn_status npn_utf8fromidentifier npn_useragent npn_version npn_write npobject npp nppvariable npp_destroy npp_destroy
stream npp_getvalue npp_handleevent npp_new npp_new
stream npp_print npp_setvalue npp_setwindow npp_
streamasfile npp_urlnotify npp_write npp_writeready npprint npprintcallbackstruct nprect npregion npsaveddata ...
...eevent npp_new npp_new
stream npp_print npp_setvalue npp_setwindow npp_
streamasfile npp_urlnotify npp_write npp_writeready npprint npprintcallbackstruct nprect npregion npsaveddata npsetwindowcallbackstruct np
stream npstring nputf8 npvariant npvarianttype npwindow np_getmimedescription np_getvalue np_initialize np_port np_shutdown samples and test cases shipping a plugin as a toolkit bundle supporting private browsing in plugins ...
NPN_GetURL - Archive of obsolete content
syntax #include <npapi.h> nperror npn_geturl(npp instance, const char* url, const char* target); parameters the function has the following parameters: instance pointer to the current plug-in instance. url pointer to the url of the request. can be of any type, such as http, ftp, news, or mailto. target name of the target window or frame, or one of the following special target names. values: _blank or _new: load the link in a new blank unnamed window. ...
...t: load the link into the immediate <frameset> parent of the plug-in instance's document. if the plug-in instance's document has no parent, the default is _self. _top: load the link into the plug-in instance window. the default is _self, if the plug-in instance's document is already at the top. use for breaking out of a deep frame nesting. if the target is null, the browser creates a new
stream and delivers the data to the current instance regardless of the mime type of the url. in general, if a url works in the location box of the browser, it works here, except for the _self target. returns if successful, the function returns nperr_no_error. if unsuccessful, the plug-in is not loaded and the function returns an error code. for possible values, see error codes. description npn_getur...
...ype of the url. in general, if a url works in the location box of the browser, it works here, except for the _self target. returns if successful, the function returns nperr_no_error. if unsuccessful, the plug-in is not loaded and the function returns an error code. for possible values, see error codes. description npn_geturl() is used to load a url into the current window or another target or
stream. plug-ins can use this capability to provide hyperlinks to other documents or to retrieve data from anywhere on the network. this is especially useful for enabling an existing application to operate on the web. for http urls, the browser resolves this method as the http server method get, which requests url objects. use npn_geturlnotify() instead of npn_geturl() in these cases: to request a str...
...e sent to it. for example, a null target does not make sense for some url types (such as mailto). the following recommendations about target choice apply to other methods that handle urls as well. if the target parameter refers to the window or frame containing the current plug-in instance, the instance is destroyed and the plug-in may be unloaded. if target is null, the application creates a new
stream and delivers the data to the plug-in instance, through calls to npp_new
stream(), npp_writeready() and npp_write(), and npp_destroy
stream(). this means that if you want the plug-in to handle a new
stream, no matter what the mime type is, use null. if the application cannot locate the url and retrieve the data, it does not create a
stream for the instance. when the plug-in instance is part of a reg...
502 - MDN Web Docs Glossary: Definitions of Web-related terms
furnishes no response to the gateway/proxy), but simply does not understand the same data-exchange protocol as the gateway/proxy. ...
...furnishes no response to the gateway/proxy), but simply does not understand the same data-exchange protocol as the gateway/proxy. ...
...furnishes no response to the gateway/proxy), but simply does not understand the same data-exchange protocol as the gateway/proxy. ...
...furnishes no response to the gateway/proxy), but simply does not understand the same data-exchange protocol as the gateway/proxy. ...
Index
time nss has received three different asn.1 parser implementations, each having their own specific properties, advantages and disadvantages, which is why all of them are still being used (nobody has yet dared to replace the older with the newer ones because of risks for side effects). when using the asn.1 parser(s), a template definition is passed to the parser, which will analyze the asn.1 data
stream accordingly. the templates are usually closely aligned to definitions found in rfc documents. a data block described as der is usually in asn.1 format. you must know which data you are expecting, and use the correct template for parsing, based on the context of your software's interaction. data described as pem is a base64 encoded presentation of der, usually wrapped between human readable beg...
...downloading a crl (certificate revocation list). however, nss doesn't have an implementation to work with network proxies. if you must support proxies in your application, you are able to register your own implementation of an http request callback interface, and nss can use your application code that supports proxies. when using hashing, encryption, and decryption functions, it is possible to
stream data (as opposed to operating on a large buffer). create a context handle while providing all the parameters required for the operation, then call an “update” function multiple times to pass subsets of the input to nss. the data will be processed and either returned directly or sent to a callback function registered in the context. when done, you call a finalization function that will flush o...
...it works by inserting a special set of entry points between nss and the module. 192 nss tech note3 no summary! 193 nss tech note4 no summary! 194 nss tech note5 ...
...cepted and passed on to the browser by the debugging tool on intercept. on its way to the browser, the data is printed to the command shell from which you issued the command. data sent from the client to the server is surrounded by the following symbols: --> [ data ] data sent from the server to the client is surrounded by the following symbols: "left arrow"-- [ data ] the raw data
stream is sent to standard output and is not interpreted in any way. this can result in peculiar effects, such as sounds, flashes, and even crashes of the command shell window. to output a basic, printable interpretation of the data, use the -h option, or, if you are looking at an ssl connection, the -s option. you will notice that the page you retrieved looks incomplete in the browser. t...
nsIExternalHelperAppService
g/uriloader/external-helper-app-service;1. to access this service, use: var externalhelperappservice = components.classes["@mozilla.org/uriloader/external-helper-app-service;1"] .getservice(components.interfaces.nsiexternalhelperappservice); method overview boolean applydecodingforextension(in autf8string aextension, in acstring aencodingtype); nsi
streamlistener docontent(in acstring amimecontenttype, in nsirequest arequest, in nsiinterfacerequestor awindowcontext, in boolean aforcesave); methods applydecodingforextension() determines whether or not data whose filename has the specified extension should be decoded from the specified encoding type before being saved or delivered to helper applications. boolean applydecodingforextension( in...
...string aextension, in acstring aencodingtype ); parameters aextension the filename extension to check. aencodingtype the encoding type to check. return value true if data from urls with the specified extension and encoding should be decoded prior to saving the file or delivering it to a helper application; otherwise false. ...
... aextension the filename extension to check. aencodingtype the encoding type to check. return value true if data from urls with the specified extension and encoding should be decoded prior to saving the file or delivering it to a helper application; otherwise false. docontent() binds an external helper application to a
stream listener. the caller should pump data into the returned
stream listener. when the onstoprequest is issued, the
stream listener implementation will launch the helper app with this data. nsi
streamlistener docontent( in acstring amimecontenttype, in nsirequest arequest, in nsiinterfacerequestor awindowcontext, in boolean aforcesave ); parameters amimecontenttype the content type of the incoming data. arequest the request corresponding ...
... of the incoming data. arequest the request corresponding to the incoming data. awindowcontext use nsiservicemanager.getinterface() to retrieve properties like the dom window or parent window; the service might need this in order to bring up dialogs. aforcesave true to always save this content to disk, regardless of nsimimeinfo and other such influences. return value a nsi
streamlistener which the caller should pump the data into. ...
nsIRequest
netwerk/base/nsirequest.idlscriptable this interface is used by the request initiator to control the request. inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) for example nsichannel typically passes itself as the nsirequest argument to the nsi
streamlistener on each onstartrequest, ondataavaliable, and onstoprequest invocation. method overview void cancel(in nsresult astatus); boolean ispending(); void resume(); void suspend(); attributes attribute type description loadflags nsloadflags the load flags of this request. bits 0-15 are reserved. when added to a load group, this request's load flags are merged with the load flags of the load group. ...
...<< 14 when set, this flag indicates that no user-specific data should be added to the request when opened. this means that things like authorization tokens or cookie headers should not be added. note: this will prevent proxy authentications from working, so use this flag with caution. methods cancel() cancels the current request. this will close any open input or output
streams and terminate any async requests. users should normally pass ns_binding_aborted, although other errors may also be passed. the error passed in will become the value of the status attribute. implementations must not send any notifications (for example via nsirequestobserver) synchronously from this function. similarly, removal from the load group (if any) must also happen asynchronously. reques...
... any async requests. users should normally pass ns_binding_aborted, although other errors may also be passed. the error passed in will become the value of the status attribute. implementations must not send any notifications (for example via nsirequestobserver) synchronously from this function. similarly, removal from the load group (if any) must also happen asynchronously. requests that use nsi
streamlistener must not call ondataavailable anymore after cancel has been called. note: most nsirequest implementations expect astatus to be a failure code; however, some implementations may allow astatus to be a success code such as ns_ok. in general, astatus should be a failure code. void cancel( in nsresult astatus ); parameters astatus the reason for canceling this request. ispending() ...
...ns successfully). requests can become pending multiple times during their lifetime. note: suspended requests are still considered pending. boolean ispending(); parameters none. return value true if the request has yet to reach completion. resume() resumes the current request. this may have the effect of re-opening any underlying transport and will resume the delivery of data to any open
streams. void resume(); parameters none. suspend() suspends the current request. this may have the effect of closing any underlying transport (in order to free up resources), although any open
streams remain logically opened and will continue delivering data when the transport is resumed. calling cancel() on a suspended request must not send any notifications (such as onstoprequest) until the req...
nsIWebNavigation
rowser;1 * @mozilla.org/docshell;1 gecko 1.9.2 note in gecko 1.9.2 (firefox 3.6), the @mozilla.org/webshell;1 component no longer exists; you need to use @mozilla.org/docshell;1 instead. method overview void goback void goforward void gotoindex( in long index ) void loaduri(in wstring uri , in unsigned long loadflags , in nsiuri referrer , in nsiinput
stream postdata, in nsiinput
stream headers) void reload(in unsigned long reloadflags) void stop(in unsigned long stopflags) constants load flags constant value description load_flags_mask 65535 this flag defines the range of bits that may be specified. load_flags_none 0 this is the default value for the load flags parameter. ...
...x ); parameters index the index of the session history item to go to. loaduri() loads a given uri. this will give priority to loading the requested uri in the object implementing this interface. if it can't be loaded here however, the uri dispatcher will go through its normal process of content loading. void loaduri( wstring uri, unsigned long loadflags, nsiuri referrer, nsiinput
stream postdata, nsiinput
stream headers ); parameters uri the uri string to load. for http and ftp urls and possibly others, characters above u+007f will be converted to utf-8 and then url- escaped per the rules of rfc 2396. loadflags flags modifying load behaviour. this parameter is a bitwise combination of the load flags defined above. (undefined bits are reserved for future use.) generally ...
...2396. loadflags flags modifying load behaviour. this parameter is a bitwise combination of the load flags defined above. (undefined bits are reserved for future use.) generally you will pass load_flags_none for this parameter. referrer the referring uri. if this argument is null, then the referring uri will be inferred internally. ...
...ined above. (undefined bits are reserved for future use.) generally you will pass load_flags_none for this parameter. referrer the referring uri. if this argument is null, then the referring uri will be inferred internally. postdata if the uri corresponds to a http request, then this
stream is appended directly to the http request headers. it may be prefixed with additional http headers. this
stream must contain a \r\n sequence separating any http headers from the http request body. this parameter may be null. headers if the uri corresponds to a http request, then any http headers contained in this
stream are set on the http request. the http header
stream is formatted as: ( header \r\n )* this parameter may be null. reload() tells the object to reload the current page. there may be cas...
XPCOM Interface Reference by grouping
le io filesystem nsidirectoryenumerator nsidirectoryiterator nsidirectoryservice nsidirectoryserviceprovider nsidirectoryserviceprovider2 nsidirindex nsidirindexlistener nsidirindexparser nsifile nsilocalfile
stream nsiasyncinput
stream nsiasyncoutput
stream nsiasync
streamcopier nsibinaryinput
stream nsibinaryoutput
stream nsicontentsniffer nsiconverterinput
stream nsifileinput
stream nsifileoutput
stream nsiinput
stream nsiinput
streamcallback nsioutput
stream ...
... nsiasyncinput
stream nsiasyncoutput
stream nsiasync
streamcopier nsibinaryinput
stream nsibinaryoutput
stream nsicontentsniffer nsiconverterinput
stream nsifileinput
stream nsifileoutput
stream nsiinput
stream nsiinput
streamcallback nsioutput
stream nsioutput
streamcallback nsiscriptableinput
stream nsi
streamlistener url nsiioservice nsistandardurl user nsiprompt nsipromptservice zipfile nsizipentry nsizipreader nsizipreadercache nsizipwriter ...
... nsistandardurl user nsiprompt nsipromptservice zipfile nsizipentry nsizipreader nsizipreadercache nsizipwriter file nsifilepicker nsifileprotocolhandler nsifilespec nsifile
streams nsifileutilities nsifileview memory nsimemory network channel nsichannel nsichanneleventsink nsirequest nsirequestobserver nsiresumablechannel nsidnsservice nsiftpchannel n...
... nsicookiestorage nsisessionstore crypto nsicryptohash filter nsiparentalcontrolsservice nsipermission nsipermissionmanager nsisecuritycheckedcomponent ssl nsisslerrorlistener
stream stream nsipipe nsitraceablechannel nsitransport nsitransporteventsink nsitransportsecurityinfo timer nsitimer nsitimercallback ui windows nsitaskbarpreview nsitaskbarpreviewbutton ...
Constants - Plugins
perr_invalid_plugin_dir_error 7 plug-in directory missing or invalid. nperr_incompatible_version_error 8 versions of plug-in and communicator do not match. nperr_invalid_param 9 parameter missing or invalid. nperr_invalid_url 10 url missing or invalid. nperr_file_not_found 11 file missing or invalid. nperr_no_data 12
stream contains no data. nperr_
stream_not_seekable 13 seekable
stream expected. result codes constant value description npres_done 0 (most common): completed normally; all data was sent to the instance. npres_network_err 1
stream failed due to problems with network, disk i/o, lack of memory, or other problems. npres_user_break ...
... plug-in version constants constant value description np_version_major 0 major version number; changes with major code release number. ...
...ns. plug-in version constants constant value description np_version_major 0 major version number; changes with major code release number. np_version_minor 22 minor version number; changes with point release number. version feature constants npvers constant: version feature information value description npvers_has_
streamoutput 8
streaming data. npvers_has_notification 9 notification of completion. npvers_has_liveconnect 9 liveconnect. npvers_win16_has_liveconnect 9 liveconnect (win16). npvers_68k_has_liveconnect 11 liveconnect (68k). npvers_has_windowless 11 windowless plug-in. npvers_has_xpconnect_scripting 13 plug-in...
... plug-in is scriptable using xpconnect. npvers_has_npruntime_scripting 14 plug-in is scriptable using npruntime. npvers_has_form_values 15 nppvformvalue nppvariables are supported. npvers_has_popups_enabled_state 16 the npn_pushpopupsenabledstate() and npn_poppopupsenabledstate() functions are supported. npvers_has_response_headers 17 np
streams have response headers for http
streams. npvers_has_npobject_enum 18 the npclass in question has an enumerate field, which lets you enumerate the properties of an npobject of that class. « previous ...
BaseAudioContext.createChannelMerger() - Web APIs
returns a channelmergernode. example the following example shows how you could separate a stereo track (say, a piece of music), and process the left and right channel differently. ...
... returns a channelmergernode. example the following example shows how you could separate a stereo track (say, a piece of music), and process the left and right channel differently. ...
... returns a channelmergernode. example the following example shows how you could separate a stereo track (say, a piece of music), and process the left and right channel differently. ...
...2); // reduce the volume of the left channel only var gainnode = ac.creategain(); gainnode.gain.setvalueattime(0.5, ac.currenttime); splitter.connect(gainnode, 0); // connect the splitter back to the second input of the merger: we // effectively swap the channels, here, reversing the stereo image. gainnode.connect(merger, 0, 1); splitter.connect(merger, 1, 0); var dest = ac.createmedia
streamdestination(); // because we have used a channelmergernode, we now have a stereo // media
stream we can use to pipe the web audio graph to webrtc, // mediarecorder, etc. merger.connect(dest); }); specifications specification status comment web audio apithe definition of 'createchannelmerger()' in that specification. working draft ...
Body.body - Web APIs
the body read-only property of the body mixin is a simple getter used to expose a readable
stream of the body contents. syntax var
stream = response.body; value a readable
stream. example in our simple
stream pump example we fetch an image, expose the response's
stream using response.body, create a reader using readable
stream.getreader(), then enqueue that
stream's chunks into a second, custom readable
stream — effectively creating an identical copy of the image. ...
...eam pump example we fetch an image, expose the response's
stream using response.body, create a reader using readable
stream.getreader(), then enqueue that
stream's chunks into a second, custom readable
stream — effectively creating an identical copy of the image. ...
...ble
stream.getreader(), then enqueue that
stream's chunks into a second, custom readable
stream — effectively creating an identical copy of the image. ...
...); // fetch the original image fetch('./tortoise.png') // retrieve its body as readable
stream .then(response => response.body) .then(body => { const reader = body.getreader(); return new readable
stream({ start(controller) { return pump(); function pump() { return reader.read().then(({ done, value }) => { // when no more data needs to be consumed, close the
stream if (done) { controller.close(); return; } // enqueue the next data chunk into our target
stream controller.enqueue(value); return pump(); }); } } }) }) .then(
stream => new response(
stream)) .then(response => response.blob()) .then(blob => url.createobjecturl(blob)) .then(url => console.log(image.src = u...
MediaDevices.ondevicechange - Web APIs
on you provide which accepts as input a event object describing the devicechange event that occurred. there is no information about the change included in the event object; to get the updated list of devices, you'll have to use enumeratedevices(). example in this example, we create a function called updatedevicelist(), which is called once when mediadevices.getusermedia() successfully obtains a
stream, and then is called any time the device list changes. it displays in the browser window two lists: one of audio devices and one of video devices, with both the device's label (name) and whether it's an input or an output device. because the example provides a handler for the devicechange event, the list is refreshed any time a media device is attached to or removed from the device running the sam...
... logelement = document.getelementbyid("log"); function log(msg) { logelement.innerhtml += msg + "<br>"; } document.getelementbyid("startbutton").addeventlistener("click", function() { navigator.mediadevices.getusermedia({ video: { width: 160, height: 120, framerate: 30 }, audio: { samplerate: 44100, samplesize: 16, volume: 0.25 } }).then(
stream => { videoelement.srcobject =
stream; updatedevicelist(); }) .catch(err => log(err.name + ": " + err.message)); }, false); we set up global variables that contain references to the <ul> elements that are used to list the audio and video devices: let audiolist = document.getelementbyid("audiolist"); let videolist = document.getelementbyid("videolist"); getting and drawing t...
... assembled, containing the device's name in bold and the direction in parentheses, it's appended to the appropriate list by calling appendchild() on either audiolist or videolist, as appropriate based on the device type. handling device list changes we call updatedevicelist() in two places. the first is in the getusermedia() promise's fulfillment handler, to initially fill out the list when the
stream is opened. the second is in the event handler for devicechange: navigator.mediadevices.ondevicechange = function(event) { updatedevicelist(); } with this code in place, each time the user plugs in a camera, microphone, or other media device, or turns one on or off, we call updatedevicelist() to redraw the list of connected devices. result specifications specification status ...
... candidate recommendation initial specification. ...
MediaRecorder() - Web APIs
the mediarecorder() constructor creates a new mediarecorder object that will record a specified media
stream. the object can optionally be configured to record using a specific media container (file type), and, further, can specify the exact codec and codec configuration(s) to use by specifying the codecs parameter. syntax var mediarecorder = new mediarecorder(
stream[, options]); parameters
stream the media
stream that will be recorded. this source media can come from a
stream created using navigator.mediadevices.getusermedia() or from an <audio>, <video> or <canvas> element. options optional a dictionary object that can contain the following properties: mimetype: a mime type specifying the format for the resulting media; you may simply specify the container format (the browse...
... specified. if bits per second values are not specified for video and/or audio, the default adopted for video is 2.5mbps, while the audio default is adaptive, depending upon the sample rate and the number of channels. exceptions notsupportederror the specified mime type is not supported by the user agent. ...
...
stream, whose audio bit rate is set to 128 kbit/sec and whose video bit rate is set to 2.5 mbit/sec. the recorded media data will be stored in an mp4 wrapper (so if you gather the chunks of media data and save them to disk, they will be in an mp4 file). ... if (navigator.mediadevices.getusermedia) { var constraints = { audio: true, video: true }; var chunks = []; var onsuccess = function(
stream) { var options = { audiobitspersecond : 128000, videobitspersecond : 2500000, mimetype : 'video/mp4' } var mediarecorder = new mediarecorder(
stream,options); m = mediarecorder; ... ...
...var constraints = { audio: true, video: true }; var chunks = []; var onsuccess = function(
stream) { var options = { audiobitspersecond : 128000, videobitspersecond : 2500000, mimetype : 'video/mp4' } var mediarecorder = new mediarecorder(
stream,options); m = mediarecorder; ... ...
MediaRecorder: error event - Web APIs
wed or was attempted using an unsupported codec. bubbles no cancelable no interface mediarecordererrorevent event handler property onerror for details of the all the possible errors see the documentation for the event handler property: onerror. ...
... interface mediarecordererrorevent event handler property onerror for details of the all the possible errors see the documentation for the event handler property: onerror. ...
... of the all the possible errors see the documentation for the event handler property: onerror. ...
...ction record() { const
stream = await navigator.mediadevices.getusermedia({audio: true}); const recorder = new mediarecorder(
stream); recorder.addeventlistener('error', (event) => { console.error(`error recording
stream: ${event.error.name}`) }); recorder.start(); } record(); the same, but using the onerror event handler property: async function record() { const
stream = await navigator.mediadevices.getusermedia({audio: true}); const recorder = new mediarecorder(
stream); recorder.onerror = (event) => { console.error(`error recording
stream: ${event.error.name}`) }; recorder.start(); } record(); specifications specification status media
stream recording working draft ...
MediaTrackConstraints.cursor - Web APIs
urned by a call to mediadevices.getsupportedconstraints(). however, typically this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with. ...
...ered into the video track in the media
stream returned by the call to getdisplaymedia(). see how constraints are defined in capabilities, constraints, and settings for an explanation of how to define constraints. usage notes you can check the setting selected by the user agent after the display media has been created by getdisplaymedia() by calling getsettings() on the display media's video media
streamtrack, then checking the value of the returned mediatracksettings object's cursor object. ...
...raints, and settings for an explanation of how to define constraints. usage notes you can check the setting selected by the user agent after the display media has been created by getdisplaymedia() by calling getsettings() on the display media's video media
streamtrack, then checking the value of the returned mediatracksettings object's cursor object. ...
...s. usage notes you can check the setting selected by the user agent after the display media has been created by getdisplaymedia() by calling getsettings() on the display media's video media
streamtrack, then checking the value of the returned mediatracksettings object's cursor object. for example, if your app needs to alter the
stream by inserting a representation of the cursor position if the
stream doesn't include the rendered cursor, you can determine the need to do so by using code like this: let insertfakecursorflag = false; if (display
stream.getvideotracks()[0].getsettings().cursor === "never") { insertfakecursorflag = true; } following this code, insertfakecursorflag is true if there's no cursor rendered into the
stream already. later code can detect this flag's value and if it's...
MediaTrackConstraints - Web APIs
d-scale. none means that the user agent uses the resolution provided by the camera, its driver or the os. crop-and-scale means that the user agent can use cropping and downscaling on the camera output in order to satisfy other constraints that affect the resolution. properties of shared screen tracks these constraints apply to mediatrackconstraints objects specified as part of the displaymedia
streamconstraints object's video property when using getdisplaymedia() to obtain a
stream for screen sharing. cursor a constraindomstring which specifies whether or not to include the mouse cursor in the generated track, and if so, whether or not to hide it while not moving. the value may be a single one of the following strings, or an array of them to allow the browser flexibility in deciding wha...
...or a constraindomstring which specifies whether or not to include the mouse cursor in the generated track, and if so, whether or not to hide it while not moving. the value may be a single one of the following strings, or an array of them to allow the browser flexibility in deciding what to do about the cursor. always the mouse is always visible in the video content of the {domxref("media
stream"), unless the mouse has moved outside the area of the content. motion the mouse cursor is always included in the video if it's moving, and for a short time after it stops moving. never the mouse cursor is never included in the shared video. displaysurface a constraindomstring which specifies the types of display surface that may be selected by the user. this may be a single one of...
...s included in the video if it's moving, and for a short time after it stops moving. never the mouse cursor is never included in the shared video. displaysurface a constraindomstring which specifies the types of display surface that may be selected by the user. this may be a single one of the following strings, or a list of them to allow multiple source surfaces: application the
stream contains all of the windows of the application chosen by the user rendered into the one video track. browser the
stream contains the contents of a single browser tab selected by the user. monitor the
stream's video track contains the entire contents of one or more of the user's screens. window the
stream contains a single window selected by the user for sharing. logicalsurface a...
... surfaces which do not directly correspond to display areas. these may include backing buffers for windows to allow capture of window contents that are hidden by other windows in front of them, or buffers containing larger documents that need to be scrolled through to see the entire contents in their windows. specifications specification status comment media capture and
streams candidate recommendation initial definition. media
stream image capture working draft adds image constraints. ...
msPlayToPreferredSourceUri - Web APIs
s non-standard and is not on a standards track. do not use it on production sites facing the web: it will not work for every user. there may also be large incompatibilities between implementations and the behavior may change in the future. msplaytopreferredsourceuri is a read/write property which gets or sets the path to the preferred media source. ...
...th to the preferred media source. this enables the playto target device to
stream the media content, which can be drm protected, from a different location, such as a cloud media server. this proprietary property is specific to internet explorer and microsoft edge. syntax ptr = object.msplaytopreferredsourceuri; value msplaytopreferredsourceuri enables a playto reference (a uri or url) for
streaming content on the playto target device from a different location, such as a cloud media server. this enables web pages and microsoft store apps to play digital rights management (drm) protected content. the app specifies a preferred uniform resource identifier (uri). ...
... a forward slash ("/") is appended to the uri string when it is sent over the network to a playto device. this is done to conform to uri standards. ...
...ng content on the playto target device from a different location, such as a cloud media server. this enables web pages and microsoft store apps to play digital rights management (drm) protected content. the app specifies a preferred uniform resource identifier (uri). this uri can point to a cloud based media server allowing
streaming directly from the cloud, which can be drm protected, instead of
streaming content from the windows machine which must be unprotected content. a forward slash ("/") is appended to the uri string when it is sent over the network to a playto device. this is done to conform to uri standards. example <video src="http://www.contoso.com/videos/video.mp4" msplaytopreferredsourceuri="http://www.contoso.com/catalogid=1234" /> var video = document.createelement...
RTCTrackEvent - Web APIs
the target is the rtcpeerconnection object to which the track is being added. this event is sent by the webrtc layer to the web site or application, so you will not typically need to instantiate an rtctrackevent yourself. constructor rtctrackevent() creates and returns a new rtctrackevent object, initialized with properties taken from the specified rtctrackeventinit dictionary. ...
...tctrackeventinit dictionary. you will probably not need to create new track events yourself, since they're typically created by the webrtc infrastructure and sent to the connection's ontrack event handler. properties since rtctrackevent is based on event, its properties are also available. receiver read only the rtcrtpreceiver used by the track that's been added to the rtcpeerconnection.
streams read only optional an array of media
stream objects, each representing one of the media
streams to which the added track belongs. by default, the array is empty, indicating a
streamless track. track read only the media
streamtrack which has been added to the connection. transceiver read only the rtcrtptransceiver being used by the new track. track event types there is only one type of t...
...ck event types there is only one type of track event. track the track event is sent to the rtcpeerconnection when a new track has been added to the connection. by the time the track event is delivered to the rtcpeerconnection's ontrack handler, the new media has completed its negotiation for a specific rtcrtpreceiver (which is specified by the event's receiver property). in addition, the media
streamtrack specified by the receiver's track is the same one specified by the event's track, and the track has been added to any associated remote media
stream objects. you can add a track event listener to be notified when the new track is available so that you can, for example, attach its media to a <video> element, using either rtcpeerconnection.addeventlistener() or the ontrack event handler proper...
...lpful to keep in mind that you receive the track event when a new inbound track has been added to your connection, and you call addtrack() to add a track to the far end of the connection, thereby triggering a track event on the remote peer. example this simple example creates an event listener for the track event which sets the srcobject of the <video> element with the id videobox to the first
stream in the list passed in the event's
streams array. peerconnection.addeventlistener("track", e => { let videoelement = document.getelementbyid("videobox"); videoelement.srcobject = e.
streams[0]; }, false); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackevent' in that specification. candi...
RTCTrackEventInit.receiver - Web APIs
note: the transceiver includes its own receiver property, which will always be the same rtcrtpreceiver as this one. ...
... note: the transceiver includes its own receiver property, which will always be the same rtcrtpreceiver as this one. ...
... note: the transceiver includes its own receiver property, which will always be the same rtcrtpreceiver as this one. ...
... note: the transceiver includes its own receiver property, which will always be the same rtcrtpreceiver as this one. ...
SourceBuffer - Web APIs
the sourcebuffer. sourcebuffer.trackdefaults specifies the default values to use if kind, label, and/or language information is not available in the initialization segment of the media to be appended to the sourcebuffer. sourcebuffer.updating read only a boolean indicating whether the sourcebuffer is currently being updated — i.e. whether an sourcebuffer.appendbuffer(), sourcebuffer.append
stream(), or sourcebuffer.remove() operation is currently in progress. sourcebuffer.videotracks read only a list of the video tracks currently contained inside the sourcebuffer. event handlers sourcebuffer.onabort fired whenever sourcebuffer.appendbuffer() or sourcebuffer.append
stream() is ended by a call to sourcebuffer.abort(). sourcebuffer.updating changes from true to false. sourcebuffer.o...
...sourcebuffer.updating changes from true to false. sourcebuffer.onupdate fired whenever sourcebuffer.appendbuffer() method or the sourcebuffer.remove() completes. ...
...aborts the current segment and resets the segment parser. sourcebuffer.appendbuffer() appends media segment data from an arraybuffer or arraybufferview object to the sourcebuffer. sourcebuffer.appendbufferasync() starts the process of asynchronously appending the specified buffer to the sourcebuffer. returns a promise which is fulfilled once the buffer has been appended. sourcebuffer.append
stream() appends media segment data from a readable
stream object to the sourcebuffer. sourcebuffer.changetype() changes the mime type that future calls to appendbuffer() will expect the new data to conform to. sourcebuffer.remove() removes media segments within a specific time range from the sourcebuffer. sourcebuffer.removeasync() starts the process of asynchronously removing media segments in...
...ce.addeventlistener('sourceopen', sourceopen); } else { console.error('unsupported mime type or codec: ', mimecodec); } function sourceopen (_) { //console.log(this.readystate); // open var mediasource = this; var sourcebuffer = mediasource.addsourcebuffer(mimecodec); fetchab(asseturl, function (buf) { sourcebuffer.addeventlistener('updateend', function (_) { mediasource.endof
stream(); video.play(); //console.log(mediasource.readystate); // ended }); sourcebuffer.appendbuffer(buf); }); } function fetchab (url, cb) { console.log(url); var xhr = new xmlhttprequest; xhr.open('get', url); xhr.responsetype = 'arraybuffer'; xhr.onload = function () { cb(xhr.response); }; xhr.send(); } specifications specification status com...
WebGLRenderingContext.bufferData() - Web APIs
r optimization purposes. possible values: gl.static_draw: the contents are intended to be specified once by the application, and used many times as the source for webgl drawing and image specification commands. gl.dynamic_draw: the contents are intended to be respecified repeatedly by the application, and used many times as the source for webgl drawing and image specification commands. gl.
stream_draw: the contents are intended to be specified once by the application, and used at most a few times as the source for webgl drawing and image specification commands. when using a webgl 2 context, the following values are available additionally: gl.static_read: the contents are intended to be specified once by reading data from webgl, and queried many times by the application. gl.dyna...
...ge specification commands. when using a webgl 2 context, the following values are available additionally: gl.static_read: the contents are intended to be specified once by reading data from webgl, and queried many times by the application. gl.dynamic_read: the contents are intended to be respecified repeatedly by reading data from webgl, and queried many times by the application. gl.
stream_read: the contents are intended to be specified once by reading data from webgl, and queried at most a few times by the application gl.static_copy: the contents are intended to be specified once by reading data from webgl, and used many times as the source for webgl drawing and image specification commands. gl.dynamic_copy: the contents are intended to be respecified repeatedly by reading d...
...times by the application gl.static_copy: the contents are intended to be specified once by reading data from webgl, and used many times as the source for webgl drawing and image specification commands. gl.dynamic_copy: the contents are intended to be respecified repeatedly by reading data from webgl, and used many times as the source for webgl drawing and image specification commands. gl.
stream_copy: the contents are intended to be specified once by reading data from webgl, and used at most a few times as the source for webgl drawing and image specification commands. srcoffset a gluint specifying the element index offset where to start reading the buffer. length optional a gluint defaulting to 0. return value none. exceptions a gl.out_of_memory error is thrown if th...
...i. opengl es 3.0the definition of 'glbufferdata' in that specification. standard man page of the (similar) opengl es 3 api. adds new target buffers: gl.copy_read_buffer, gl.copy_write_buffer, gl.transform_feedback_buffer, gl.uniform_buffer, gl.pixel_pack_buffer, gl.pixel_unpack_buffer adds new usage hints: gl.static_read, gl.dynamic_read, gl.
stream_read, gl.static_copy, gl.dynamic_copy, gl.
stream_copy. ...
Basic concepts behind Web Audio API - Web APIs
puts, forming a chain that starts with one or more sources, goes through one or more nodes, then ends up at a destination. although, you don't have to provide a destination if you, say, just want to visualize some audio data. a simple, typical workflow for web audio would look something like this: create the audio context. inside the context, create sources — such as <audio>, oscillator, or
stream. create effects nodes, such as reverb, biquad filter, panner, or compressor. choose the final destination for the audio, such as the user's computer speakers. establish connections from the audio sources through zero or more effects, eventually ending at the chosen destination. channel notation the number of audio channels available on a signal is frequently presented in a numeric format, s...
...ure is supported, including mono, stereo, quad, 5.1, and so on. audio sources can be obtained in a number of ways: sound can be generated directly in javascript by an audio node (such as an oscillator). created from raw pcm data (the audio context has methods to decode supported audio formats). taken from html media elements (such as <video> or <audio>). taken directly from a webrtc media
stream (such as a webcam or microphone). audio data: what's in a sample when an audio signal is processed, sampling means the conversion of a continuous signal to a discrete signal; or put another way, a continuous sound wave, such as a band playing live, is converted to a sequence of samples (a discrete-time signal) that allow a computer to handle the audio in distinct blocks. a lot more informatio...
... wikipedia page sampling (signal processing). audio buffers: frames, samples and channels an audiobuffer takes as its parameters a number of channels (1 for mono, 2 for stereo, etc), a length, meaning the number of sample frames inside the buffer, and a sample rate, which is the number of sample frames played per second. a sample is a single float32 value that represents the value of the audio
stream at each specific point in time, in a specific channel (left or right, if in the case of stereo). a frame, or sample frame, is the set of all values for all channels that will play at a specific point in time: all the samples of all the channels that play at the same time (two for a stereo sound, six for 5.1, etc.) the sample rate is the number of those samples (or frames, since all samples of a ...
... this: llllllllllllllllrrrrrrrrrrrrrrrr (for a buffer of 16 frames) this is very common in audio processing: it makes it easy to process each channel independently. the alternative is to use an interleaved buffer format: lrlrlrlrlrlrlrlrlrlrlrlrlrlrlrlr (for a buffer of 16 frames) this format is very common for storing and playing back audio without much processing, for example a decoded mp3
stream. the web audio api exposes only planar buffers, because it's made for processing. it works with planar, but converts the audio to interleaved when it is sent to the sound card for playback. conversely, when an mp3 is decoded, it starts off in interleaved format, but is converted to planar for processing. audio channels different audio buffers contain different numbers of channels: from the m...
Digital audio concepts - Web media technologies
first factor affecting the fidelity of the captured audio is the audio bandwidth; that is, the range of audio frequencies the a/d converter is capable of capturing and converting into digital form. the audio bandwidth is also affected by the codec, if it chooses to discard any frequency bands while encoding the sound. sound enters the computer through a microphone or other input in the form of a
stream of electrons whose voltage varies to represent the amplitude of the sound wave. this analog signal is then converted into digital form by a circuit that captures the incoming wave's amplitude at regular intervals, converting that data into a number in a form that is understood by the audio recording system. each of these captured moments is a sample. by chaining all the samples together, you can ...
...al audio, the closer to the original you can get. the number of samples taken per second is called the sample rate. consider the wave above, and how much different the blue, digital wave would look if you took samples twice as often. or ten times as often. the more samples you take, the smoother the wave becomes. audio data format and structure at the most basic level, audio is represented by a
stream of samples, each specifying the amplitude of the audio waveform as measured for a given slice of the overall waveform of the audio signal. there are several formats used for the individual samples within an audio file. most audio files use 16-bit signed integers for each sample, but others use 32-bit floating-point values or 24-bit or 32-bit integers. some older audio file formats—which you won...
...if the network is also doing other things, the problem strikes even on higher bandwidth networks. with so much competition for network capacity, especially on slower networks, this amount of data may be too much to viably transmit during any kind of real-time applications. to solve this problem, the audio must be made smaller using compression. note: network bandwidth is obviously not...
... lossy compression algorithms generally use psychoacoustics to determine ...
Web media technologies
udio> element is used to play audio in a web context. these can be used invisibly as a destination for more complex media, or with visible controls for user-controlled playback of audio files. accessible from javascript as htmlaudioelement objects. <video> the <video> element is an endpoint for video content in a web context. it can be used to simply present video files, or as a destination for
streamed video content. <video> can also be used as a way to link media apis with other html and dom technologies, including <canvas> (for frame grabbing and manipulation), for example. accessible from javascript as htmlvideoelement objects. <track> the html <track> element can be placed within an <audio> or <video> element to provide a reference to a webvtt format subtitle or caption track to be used...
...urces can be used to provide the media in different formats, sizes, or resolutions. accessible from javascript as htmlsourceelement objects. apis media capabilities api the media capabilities api lets you determine the encoding and decoding capabilities of the device your app or site is running on. this lets you make real-time decisions about what formats to use and when. media capture and
streams api a reference for the api which makes it possible to
stream, record, and manipulate media both locally and across a network. this includes using local cameras and microphones to capture video, audio, and still images. media
stream recording api the media
stream recording api lets you capture media
streams to process or filter the data or record it to disk. web audio api the web audio api le...
...phones to capture video, audio, and still images. media
stream recording api the media
stream recording api lets you capture media
streams to process or filter the data or record it to disk. web audio api the web audio api lets you generate, filter, and manipulate sound data both in real-time and on pre-recorded material, then send that audio to a destination such as an <audio> element, a media
stream, or to disk. webrtc webrtc (web real-time communication) makes it possible to
stream live audio and video, as well as transfer arbitrary data, between two peers over the internet, without requiring an intermediary. guides overview of media technology on the web a general look at the open web technologies and apis that provide support for audio and video playback, manipulation, and recor...
...s. guide to media types and formats on the web a guide to the file types and codecs available for images, audio, and video media on the web. this includes recommendations for what formats to use for what kinds of content, best practices including how to provide fallbacks and how to prioritize media types, and also includes general browser support information for each media container and codec.
streaming audio and video a guide which covers how to
stream audio and video, as well as techniques and technologies you can take advantage of to ensure the best possible quality and/or performance of your
streams. autoplay guide for media and web audio apis unexpected automatic playback of media or audio can be an unwelcome surprise to users. while autoplay serves a purpose, it should be used carefu...
Loading and running WebAssembly code - WebAssembly
ssembly.compile/webassembly.instantiate methods require you to create an arraybuffer containing your webassembly module binary after fetching the raw bytes, and then compile/instantiate it. this is analogous to new function(string), except that we are substituting a string of characters (javascript source code) with an array buffer of bytes (webassembly source code). the newer webassembly.compile
streaming/webassembly.instantiate
streaming methods are a lot more efficient — they perform their actions directly on the raw
stream of bytes coming from the network, cutting out the need for the arraybuffer step. so how do we get those bytes into an array buffer and compiled? the following sections explain. using fetch fetch is a convenient, modern api for fetching network resources. the quickest,...
...m their actions directly on the raw
stream of bytes coming from the network, cutting out the need for the arraybuffer step. so how do we get those bytes into an array buffer and compiled? the following sections explain. using fetch fetch is a convenient, modern api for fetching network resources. the quickest, most efficient way to fetch a wasm module is using the newer webassembly.instantiate
streaming() method, which can take a fetch() call as its first argument, and will handle fetching, compiling, and instantiating the module in one step, accessing the raw byte code as it
streams from the server: webassembly.instantiate
streaming(fetch('simple.wasm'), importobject) .then(results => { // do something with the results! }); if we used the older webassembly.instantiate() method, which does...
... take a fetch() call as its first argument, and will handle fetching, compiling, and instantiating the module in one step, accessing the raw byte code as it
streams from the server: webassembly.instantiate
streaming(fetch('simple.wasm'), importobject) .then(results => { // do something with the results! }); if we used the older webassembly.instantiate() method, which doesn't work on the direct
stream, we'd need an extra step of converting the fetched byte code to an arraybuffer, like so: fetch('module.wasm').then(response => response.arraybuffer() ).then(bytes => webassembly.instantiate(bytes, importobject) ).then(results => { // do something with the results! }); aside on instantiate() overloads the webassembly.instantiate() function has two overload forms — the one shown above ...
...n argument, and returns a promise directly containing the instance object as the result. see second overload example. running your webassembly code once you've got your webassembly instance available in your javascript, you can then start using features of it that have been exported via the webassembly.instance.exports property. ...
Downloading Files - Archive of obsolete content
file from a url. // accepts a url and returns the file. // returns empty if the file is not found (with an 404 error for instance). // tried with .jpg, .ico, .gif (even .html). ...
... .ico, .gif (even .html). ...
...rl) { var ioserv = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); var channel = ioserv.newchannel(url, 0, null); var
stream = channel.open(); if (channel instanceof components.interfaces.nsihttpchannel && channel.responsestatus != 200) { return ""; } var b
stream = components.classes["@mozilla.org/binaryinput
stream;1"] .createinstance(components.interfaces.nsibinaryinput
stream); b
stream.setinput
stream(
stream); var size = 0; var file_data = ""; while(size = b
stream.available()) { file_data += b
stream.readbytes(size); } return file_data; } see also nsidownloadprogresslistener saving an arbitrary url to a local file customizing the download progress bar appearance ...
Connecting to Remote Content - Archive of obsolete content
="name:" /> <xul:label> <xsl:value-of select="." /> </xul:label> </xul:hbox> </xsl:for-each> <xul:hbox> <xul:label value="total:" /> <xul:label> <xsl:value-of select="total" /> </xul:label> </xul:hbox> </xul:vbox> </xsl:template> </xsl:stylesheet> next you need to read the xslt stylesheet as a file
stream and parse it into a document object. after that, the xslt stylesheet can be imported into an xslt processor as shown below. now, the processor is ready to perform the transformation. let domparser = components.classes["@mozilla.org/xmlextras/domparser;1"] .createinstance(components.interfaces.nsidomparser); let file
stream = components.classes["@mozilla.org/network/file-input-stre...
... be imported into an xslt processor as shown below. now, the processor is ready to perform the transformation. ...
... .createinstance(components.interfaces.nsidomparser); let file
stream = components.classes["@mozilla.org/network/file-input-
stream;1"] .createinstance(components.interfaces.nsifileinput
stream); let xsltprocessor = components.classes["@mozilla.org/document-transformer;1?type=xslt"] .createinstance(components.interfaces.nsixsltprocessor); let xsldocument; file
stream.init(somexslfile, -1, 0x01, 0444); // read only // parse from the xslt stylesheet file
stream xsldocument = domparser.parsefrom
stream( file
stream, null, file
stream.available(), "text/xml"); // import the xslt stylesheet to the xslt processor xsltprocessor.importstylesheet(xsldocument); finally, you can either use nsixsltprocessor.transformtodocument() or nsixsltprocessor.transformtofragme...
The Implementation of the Application Object Model - Archive of obsolete content
ragraphs, namely (1) redundancy of methods in the interfaces as well as a likely code redundancy in the implementation of some of those methods, and (2) the desire to be insulated from the layout dll should those interfaces change, imply that a layer needs to exist between the pluggable content and the content tree interfaces. this layer would serve several useful functions. first of all it could
streamline the redundancy in the interface methods and present a new interface for pluggable content that was much smaller and easier to plug into than the 4-5 interfaces required if directly implementing the content tree interfaces. furthermore, should the content tree interfaces change, only this layer would need to be updated. the pluggable content, safe behind this layer, wouldn't have to change at ...
... that implementation must necessarily reside in a different dll, without introducing a code dependency between all pluggable content and the common base class. this inability to provide a cleanly inherited system argues for a different approach, namely that all content node implementations be the same kind of object, and that those objects communicate with their pluggable content through this new
streamlined interface we talked about earlier. we'll call this new interface a pluggable data source. just in case you still aren't convinced that all content nodes should be the same kind of element, consider another problem: how to implement aggregation. suppose that a bookmarks folder contains a mailbox folder, a composer page template, and a bookmark. in order to achieve aggregation of data, a conte...
...e as follows: the change is really occurring in some rdf store. handling of the change is the responsibility of the data source. (example: deletion of an imap message causing the icon to change to a red x in the tree view.) some change has been made in the composite data source that is the equivalent of a local annotation to the xul file. in this case, rdf will do one of two things. if the xul
stream came from a remote site, then rdf has no choice but to make a local annotation on the graph. if the xul
stream came from a local file, then rdf can either locally annotate the graph (just as before), or it can serialize the xul and write over the original file (thus allowing local changes to a local file to be reflected right in the xul). referencing local data: the localdata attribute a tag t...
NPP_WriteReady - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary determines maximum number of bytes that the plug-in can consume. syntax #include <npapi.h> int32 npp_writeready(npp instance, np
stream*
stream); parameters the function has the following parameters: instance pointer to the current plug-in instance.
stream pointer to the current
stream. returns returns the maximum number of bytes that an instance is prepared to accept from the
stream. description the browser calls npp_writeready before each call to npp_write to determine whether a plug-in can receive data and how many bytes it can receive. this function allows the browser to send only as much data to the instance as it can handle at one time, making resource use more efficient for both the browser and plug-in. the ...
..., making resource use more efficient for both the browser and plug-in. the npp_write function may pass a larger buffer, but the plug-in is required to consume only the amount of data returned by npp_writeready. the browser can write a smaller amount of data if desired or necessary; for example, if only 8k of data is available in a network buffer. if the plug-in is allocating memory for the entire
stream at once (an as_file
stream), it can return a very large number. because it is not processing
streaming data, the browser can pass as much data to the instance as necessary in a single npp_write. if the browser receives a value of zero, the data flow temporarily stops. the browser checks to see if the plug-in can receive data again by resending the data at regular intervals. see also npp_write, n...
...at once (an as_file
stream), it can return a very large number. because it is not processing
streaming data, the browser can pass as much data to the instance as necessary in a single npp_write. if the browser receives a value of zero, the data flow temporarily stops. the browser checks to see if the plug-in can receive data again by resending the data at regular intervals. ...
NPAPI plug-in side API - Archive of obsolete content
available from the plug-in object; these allow plug-ins to interact with the browser. the names of all of these methods begin with npp_ to indicate that they are implemented by the plug-in and called by the browser. ...
...r. the names of all of these methods begin with npp_ to indicate that they are implemented by the plug-in and called by the browser. ...
...that they are implemented by the plug-in and called by the browser. for an overview of how these two sides of the plug-in api interact, see the how plug-ins work and overview of plug-in structure sections in the introduction. ...
SAX - Archive of obsolete content
l being parsed. the following handlers are available: interface purpose nsisaxcontenthandler receive notification of the logical content of a document (e.g. elements, attributes, whitespace, and processing instructions). nsisaxdtdhandler receive notification of basic dtd-related events. nsisaxerrorhandler receive notification of errors in the input
stream. nsisaxlexicalhandler sax2 extension handler for lexical events (e.g. comment and cdata nodes, dtd declarations, and entities). an example implementation of the most commonly used content handler: function print(s) { dump(s + "\n"); } xmlreader.contenthandler = { // nsisaxcontenthandler startdocument: function() { print("startdocument"); }, enddocument: functio...
...below is an example of parsing from a string: xmlreader.parsefromstring("<f:a xmlns:f='g' d='1'><bbq/></f:a>", "text/xml"); this call results in the following output (assuming the content handler from the example above is used): startdocument startelement: namespace='g', localname='a', qname='f:a', attributes={d='1'} startelement: namesp...
...fix) { // don't care }, // nsisupports queryinterface: function(iid) { if(!iid.equals(components.interfaces.nsisupports) && !iid.equals(components.interfaces.nsisaxcontenthandler)) throw components.results.ns_error_no_interface; return this; } }; start parsing the xml reader component can parse xml from a string, an nsiinput
stream, or asynchronously via the nsi
streamlistener interface. below is an example of parsing from a string: xmlreader.parsefromstring("<f:a xmlns:f='g' d='1'><bbq/></f:a>", "text/xml"); this call results in the following output (assuming the content handler from the example above is used): startdocument startelement: namespace='g', localname='a', qname='f:a', attributes={d='1'} startelement: namespace='', localname='bbq', qname='bbq',...
Creating hyperlinks - Learn web development
ted. with a relative url, the browser just looks up the file that's being requested on the same server. if you use absolute urls where relative urls would do, you're constantly making your browser do extra work, meaning that it will perform less efficiently. linking to non-html resources — leave clear signposts when linking to a resource that will be downloaded (like a pdf or word document),
streamed (like video or audio), or has another potentially unexpected effect (opens a popup window, or loads a flash movie), you should add clear wording to reduce any confusion. for example: if you're on a low bandwidth connection, click a link, and then a multiple megabyte download starts unexpectedly. if you don't have the flash player installed, click a link, and then suddenly get taken to a pa...
... and then a multiple megabyte download starts unexpectedly. if you don't have the flash player installed, click a link, and then suddenly get taken to a page that requires flash. ...
... unexpectedly. if you don't have the flash player installed, click a link, and then suddenly get taken to a page that requires flash. let's look at some examples, to see what kind of text can be used here: <p><a href="http://www.example.com/large-report.pdf"> download the sales report (pdf, 10mb) </a></p> <p><a href="http://www.example.com/video-
stream/" target="_blank"> watch the video (
stream opens in separate tab, hd quality) </a></p> <p><a href="http://www.example.com/car-game"> play the car game (requires flash) </a></p> use the download attribute when linking to a download when you are linking to a resource that's to be downloaded rather than opened in the browser, you can use the download attribute to provide a default save filename. here's an example with a download link to...
Multimedia: video - Learn web development
ile type support. why optimize your multimedia? for the average website, 25% of bandwidth comes from video. optimizing video has the potential for very large bandwidth savings that translate into better website performance. optimizing video delivery it's best to compress all video, optimize <source> order, set autoplay, remove audio from muted video, optimize video preload, and consider
streaming the video. the sections below describe each of these optimization techniques. compress all videos most video compression work compares adjacent frames within a video, with the intent of removing detail that is identical in both frames. compress the video and export to multiple video formats, including webm, mpeg-4/h.264, and ogg/theora. your video editing software probably has a feature to ...
...ow probability of playback. offering more modest bandwidth savings, setting preload="metadata" may download up to 3% of the video on page load. this is a useful option for some small or moderately sized files. changing the setting to auto tells the browser to automatically download the entire video. do this only when playback is very likely. otherwise, it wastes a lot of bandwidth. consider
streaming video
streaming allows the proper video size and bandwidth (based on network speed) to be delivered to the end user. similar to responsive images, the correct size video is delivered to the browser, ensuring fast video startup, low buffering, and optimized playback. conclusion optimizing video has the potential to significantly improve website performance. video files are relatively large ...
...red to the browser, ensuring fast video startup, low buffering, and optimized playback. conclusion optimizing video has the potential to significantly improve website performance. video files are relatively large compared to other website files, and always worthy of attention. this article explains how to optimize website video through reducing file size, with (html) download settings, and with
streaming. previous overview: performance next in this module the "why" of web performance what is web performance? how do users perceive performance? measuring performance multimedia: images multimedia: video javascript performance best practices. html performance features css performance features fonts and performance mobile performance focusing on performance ...
Simple SeaMonkey build
t installing build tools if your system is not listed below, see the build prerequisites page. ...
...tools if your system is not listed below, see the build prerequisites page. ...
...er-plugins-base0.10-dev libpulse-dev ubuntu linux # for ubuntu 12.04 lts (precise pangolin), replace the following line with: sudo apt-get build-dep thunderbird sudo apt-get build-dep seamonkey sudo apt-get install zip unzip mercurial g++ make autoconf2.13 yasm libgtk2.0-dev libglib2.0-dev libdbus-1-dev libdbus-glib-1-dev libasound2-dev libcurl4-openssl-dev libnotify-dev libg
streamer0.10-dev libg
streamer-plugins-base0.10-dev libiw-dev libxt-dev mesa-common-dev libpulse-dev fedora linux centos rhel: sudo yum groupinstall 'development tools' 'development libraries' 'gnome software development' sudo yum install mercurial autoconf213 glibc-static libstdc++-static yasm wireless-tools-devel mesa-libgl-devel alsa-lib-devel libxt-devel g
streamer-devel gst...
Implementing Download Resuming
wnloads that happen, get the entityid from the channel, and store it for later use. the entity id is what ensures that the file remains unchanged. this can also be used to check whether the download is resumable: if it is not (e.g. the server is not using http 1.1), then accessing this attribute will throw an ns_error_not_resumable exception. if the download gets interrupted, necko will call the
stream listener's onstoprequest method with a failure status. (todo: document what webbrowserpersist/exthandler do). the front-end code can then notify the user of this, and offer to resume the download. resuming a download in order to resume a download, you should create a channel as usual (using nsiioservice). then, you can check if it implements nsiresumablechannel. if it does not, the protocol do...
...ise, call resumeat with the desired start position, and the previously stored entity id. (it is possible to pass an empty string as the id; however, this means that you have no assurance that the file remained unchanged) now, you can open the channel as usual (using nsichannel.asyncopen() in the common case) and write to the file in the ondataavailable notifications. you may want to use nsisimple
streamlistener to simplify this task; to get progress notifications, you can implement nsiprogresseventsink and set an interface requester as the notificationcallbacks of the channel that gives out such an event sink (this needs to be done before calling asyncopen). note: in versions of firefox prior to 3.0 alpha 7, nsiwebbrowserpersist cannot append to existing files (as opposed to overwriting them), ...
...t gives out such an event sink (this needs to be done before calling asyncopen). note: in versions of firefox prior to 3.0 alpha 7, nsiwebbrowserpersist cannot append to existing files (as opposed to overwriting them), and is therefore not usable for this task (see bug 129921). detecting when a file changed if the file changed (that is, the entity id does not match), then necko will notify the
stream listener with an ns_error_entity_changed error code. the front-end may want to offer the user to get the new file from scratch in such a case. resuming not supported in some cases, it's not possible to detect whether the server supports resuming until the user actually tries to resume. in such a case, the
stream listener will get an ns_error_not_resumable status. here, too, the front-end may wa...
Introduction to Layout in Mozilla
the presentation owns the frame hierarchy frames own the style contexts, views, widgets presentation has media type, dimensions, etc. ...
...illa.org/content-viewer-factory/view;1?type=text/html all mime types mapped to the same class, nscontentdlf nsdocshell receives inbound content via nsdsuricontentlistener invokes nsidlf::createinstance, passes mime type to dlf nscontentdlf creates a nshtmldocument object, invokes startdocumentload. ...
... creates a parser, returned as nsi
streamlistener 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 nsi
streamlistener::ondataavailable 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...
OS.File for the main thread
nosuchfile) { // the file does not exist } else { // some other error throw reason; } } ); example: copy a file by chunks the following snippet writes a (presumably large) buffer by chunks. note that this snippet is useful as a demonstration of complex asynchronous programming with os.file – in most cases, function os.file.writeatomic is a better choice. let write
stream = function write
stream(data, outfile, chunksize) { let view = new uint8array(data); let loop = function loop(pos) { // define a recursive asynchronous loop. if (pos <= view.bytelength) { // note: should this be pos >= view.bytelength ? return promise.resolve(true); // loop end. } let promise = fi...
...loop(0); // enter the loop. promise = promise.then(function onsuccess() { // once loop is complete, finalize. ...
... // enter the loop. promise = promise.then(function onsuccess() { // once loop is complete, finalize. ...
PR_GetSpecialFD
otherwise, pr_getspecialfd returns null and sets the error to pr_invalid_argument_error. ...
...otherwise, pr_getspecialfd returns null and sets the error to pr_invalid_argument_error. ...
...otherwise, pr_getspecialfd returns null and sets the error to pr_invalid_argument_error. ...
nss tech note1
how to use the nss asn.1 and quickder decoders nss technical note: 1 nss 3.6 contains several decoders for asn.1 and der.two of them are extensively used and are part of the public nss api : the "classic" asn.1 decoder, written by lisa repka . this was written to be a generic decoder, that includes both der (distinguished encoding rules) and ber (basic encoding rules).† it handles both
streaming and non-
streaming input. the "quickder" decoder, written by julien pierre for nss 3.6 . this decoder was written when performance issues were discovered with the classic decoder. it can only decode der .† it does not handle
streaming input, and requires that all input be present before beginning to decode. despite their differences, the two decoders have a lot in common. quickder was wr...
...resent before beginning to decode. despite their differences, the two decoders have a lot in common. quickder was written to be as compatible as possible with the classic decoder, in order to ease migration to it in areas of critical performance bottlenecks. for this reason, i will first describe all the common functionality of the two decoders, before outlining their differences. ...
... you intend to use the decoded structure. ideally, you should allocate the input data out of the same arena that you are passing to the decoder. this will allow you to free both the input data and the decoded data at once when freeing the arena. sec_asn1decodeitem can decode both ber and der data, while sec_quickderdecodeitem can only decode der data. sec_quickderdecodeitem does not support
streaming data. this feature will most likely never be added, as this decoder gets most of its extra speed from not making a copy of the input data, which would be required when
streaming. sec_quickderdecodeitem supports sec_asn1_optional together with sec_asn1_skip sec_asn1_debug_break is not supported by sec_asn1decodeitem </tt> ...
Multithreading in Necko
ng requests well before the main thread would get around to doing so. socket transport thread (1) socket connections are processed on a single background thread. this thread is controlled by the nssockettransportservice. it sits in a loop, polling a list of sockets. when a socket can be read, the socket's listener is notified either synchronously (on the same thread) or asynchronously via a nsi
streamlistenerproxy impl. file transport threads (1-4) file i/o is processed via a thread pool that has between 1 and 4 threads. these threads are controlled by the nsfiletransportservice. each file transport object is given time on one of the file transport threads. during which it reads (writes) until its buffers are full (empty). once at the limit of its buffers, it yields the thread to another pe...
... via a thread pool that has between 1 and 4 threads. these threads are controlled by the nsfiletransportservice. each file transport object is given time on one of the file transport threads. during which it reads (writes) until its buffers are full (empty). once at the limit of its buffers, it yields the thread to another pending file transport object. ...
...s buffers, it yields the thread to another pending file transport object. as with the socket transport thread, the nsi
streamlistener passed to a file transport's asyncread method can operate partially on the file transport's thread before proxying data to the main thread. the file transport is confusingly named since it is not restricted to loading files. it simply promises to read from a nsiinput
stream (or write to a nsioutput
stream) on a background thread. the implementation of the
stream should be blocking; however, there is limited support for non-blocking
streams. cached page loads, file url loads, and jar url loads all utilize the file transport service. the jar protocol handler, for rexample, passes a special nsiinput
stream impl that does gzip decoding on the fly. dns thread (0-1) on m...
Animated PNG graphics
etected until partway through the animation. it is strongly recommended that when any error is encountered decoders should discard all subsequent frames, stop the animation, and revert to displaying the default image. a decoder which detects an error before the animation has started should display the default image. an error message may be displayed to the user if appropriate. structure an apng
stream is a normal png
stream as defined in the png specification, with three additional chunk types describing the animation and providing additional frame data. to be recognized as an apng, an 'actl' chunk must appear in the
stream before any 'idat' chunks. the 'actl' structure is described below. conceptually, at the beginning of each play the output buffer must be completely initialized to a fully...
...rame 2 second 'fdat' for first frame ... ... decoders must treat out-of-order apng chunks as an error. apng-aware png editors should restore them to correct order using the sequence numbers. 'actl': the animation control chunk the 'actl' chunk is an ancillary chunk as defined in the png specification. it must appear before the first 'idat' chunk within a valid png
stream. the 'actl' chunk contains: byte offset field name field type description 0 num_frames unsigned int the number of frames in the apng. 4 num_plays unsigned int the number of times to loop this apng. 0 indicates infinite looping. num_frames indicates the total number of frames in the animation. this must equal the number of 'fctl' chunk...
... included in the animation, and uses a blend_op of apng_blend_op_source, clearing is not necessary because the entire output buffer will be overwritten. 'fdat': the frame data chunk the 'fdat' chunk has the same purpose as an 'idat' chunk. it has the same structure as an 'idat' chunk, except preceded by a sequence number. at least one 'fdat' chunk is required for each frame. the compressed data
stream is then the concatenation of the contents of the data fields of all the 'fdat' chunks within a frame. when decompressed, the data
stream is the complete pixel data of a png image, including the filter byte at the beginning of each scanline, similar to the uncompressed data of all the 'idat' chunks. it utilizes the same bit depth, color type, compression method, filter method, interlace method, and...
nsICacheService
longer supported and planned to be removed soon: use nsicachestorageservice instead. at the time of writing there is no documentation for nsicachestorageservice but comments are available in the source. note: starting in gecko 2.0, cache i/o is handled asynchronously. ...
... a cache session represents a client's access into the cache. the cache session is not "owned" by the cache service. hence, it is possible to create duplicate cache sessions. entries created by a cache session are invisible to other cache sessions, unless the cache sessions are equivalent. nsicachesession createsession( in string clientid, in nscachestoragepolicy storagepolicy, in boolean
streambased ); parameters clientid specifies the name of the client using the cache. storagepolicy limits the storage policy for all entries accessed via the returned session. as a result, devices excluded by the storage policy will not be searched when opening entries from the returned session.
streambased indicates whether or not the data being cached can be represented as a
stream. the stor...
... return value returns a new cache session. ...
nsIDOMHTMLAudioElement
g mozwriteaudio(in jsval data); methods mozcurrentsampleoffset() non-standard this feature is non-standard and is not on a standards track. do not use it on production sites facing the web: it will not work for every user. there may also be large incompatibilities between implementations and the behavior may change in the future. returns the current offset of the audio
stream, specified as the number of samples that have played since the beginning of the
stream. unsigned long long mozcurrentsampleoffset(); parameters none. return value an unsigned 64-bit value indicating how many audio samples have been played since the
stream began playing. mozsetup() non-standard this feature is non-standard and is not on a standards track. do not use it on productio...
...ndicating how many audio samples have been played since the
stream began playing. mozsetup() non-standard this feature is non-standard and is not on a standards track. do not use it on production sites facing the web: it will not work for every user. there may also be large incompatibilities between implementations and the behavior may change in the future. sets up the audio
stream for writing. void mozsetup( in pruint32 channels, in pruint32 rate ); parameters channels the number of audio channels the audio
stream should use. specify 1 for mono or 2 for stereo. rate the sampling rate to use on the
stream, in samples per second. for example, specify 44100 for 44.1khz. mozwriteaudio() writes samples to the audio
stream. unsigned long mozwriteaudio( in jsval data );...
...in pruint32 rate ); parameters channels the number of audio channels the audio
stream should use. specify 1 for mono or 2 for stereo. rate the sampling rate to use on the
stream, in samples per second. for example, specify 44100 for 44.1khz. mozwriteaudio() writes samples to the audio
stream. unsigned long mozwriteaudio( in jsval data ); parameters data the samples to write into the audio
stream, specified either as a javascript array or as a numeric typed array. return value the actual number of bytes written to the
stream. exceptions thrown ns_error_dom_invalid_state_err the
stream has not been initialized for writing by a call to mozsetup(). ns_error_dom_type_mismatch_err the data isn't a valid data type (an array or typed array of numeric values). ns_error_dom_index_size_err the nu...
nsIDirIndexParser
read only. encoding string the encoding to use. listener nsidirindexlistener the interface to use as a callback for new entries. ...
...read only. encoding string the encoding to use. listener nsidirindexlistener the interface to use as a callback for new entries. ...
...read only. encoding string the encoding to use. listener nsidirindexlistener the interface to use as a callback for new entries. ...
nsIEditor
// output the body tag, body children and the html end tag (</html>). // tag name are in lower case with <br>. ...
... tag, body children and the html end tag (</html>). // tag name are in lower case with <br>. ...
...dy children and the html end tag (</html>). // tag name are in lower case with <br>. ...
nsIHttpUpgradeListener
an http protocol upgrade is finished. 1.0 66 introduced gecko 6.0 inherits from: nsisupports last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) this is used, for example, by websockets in order to upgrade an http channel to use the websocket protocol. method overview void ontransportavailable(in nsisockettransport atransport, in nsiasyncinput
stream asocketin, in nsiasyncoutput
stream asocketout); methods ontransportavailable() called when an http protocol upgrade attempt is completed, passing in the information needed by the protocol handler to take over the channel that is no longer being used by http. note: to begin a protocol upgrade, call nsihttpchannelinternal.httpupgrade(). void ontransportavailable( in nsisockettransport atr...
...ut
stream asocketout); methods ontransportavailable() called when an http protocol upgrade attempt is completed, passing in the information needed by the protocol handler to take over the channel that is no longer being used by http. note: to begin a protocol upgrade, call nsihttpchannelinternal.httpupgrade(). void ontransportavailable( in nsisockettransport atransport, in nsiasyncinput
stream asocketin, in nsiasyncoutput
stream asocketout ); parameters atransport the nsisockettransport describing the socket connection between the browser and the server; this socket can now be used for the new protocol instead of http. asocketin the nsiasyncinput
stream object representing the input
stream for data coming from the server over the socket connection. asocketout ...
...siasyncoutput
stream asocketout ); parameters atransport the nsisockettransport describing the socket connection between the browser and the server; this socket can now be used for the new protocol instead of http. asocketin the nsiasyncinput
stream object representing the input
stream for data coming from the server over the socket connection. asocketout the nsiasyncoutput
stream object representing the out
stream for sending data to the server over the socket. ...
nsIMsgFilterList
::version arbitraryheaders readonly attribute acstring nsimsgfilterlist::arbitraryheaders shoulddownloadallheaders readonly attribute boolean nsimsgfilterlist::shoulddownloadallheaders filtercount readonly attribute unsigned long nsimsgfilterlist::filtercount loggingenabled attribute boolean nsimsgfilterlist::loggingenabled defaultfile attribute nsilocalfile nsimsgfilterlist::defaultfile log
stream attribute nsioutput
stream nsimsgfilterlist::log
stream logurl readonly attribute acstring nsimsgfilterlist::logurl methods getfilterat() nsimsgfilter nsimsgfilterlist::getfilterat (in unsigned long filterindex ) getfilternamed() nsimsgfilter nsimsgfilterlist::getfilternamed (in astring filtername) setfilterat() nsimsgfilter nsimsgfilterlist::setfilterat ( in unsigned long filte...
...ilterat() void nsimsgfilterlist::insertfilterat ( in unsigned long filterindex, in nsimsgfilter filter ) movefilter() void nsimsgfilterlist::movefilter ( in nsimsgfilter filter, in nsmsgfiltermotionvalue motion ) createfilter() nsimsgfilter nsimsgfilterlist::createfilter ( in astring name ) savetofile() void nsimsgfilterlist::savetofile ( in nsioutput
stream stream ) parsecondition() void nsimsgfilterlist::parsecondition ( in nsimsgfilter afilter, in string condition ) savetodefaultfile() void nsimsgfilterlist::savetodefaultfile ( ) applyfilterstohdr() void nsimsgfilterlist::applyfilterstohdr ( in nsmsgfiltertypetype filtertype, in nsimsgdbhdr msghdr, in nsimsgfolder folder, in nsimsgdataba...
...n nsimsgdatabase db, in string headers, in unsigned long headersize, in nsimsgfilterhitnotify listener, in nsimsgwindow msgwindow, in nsilocalfile amessagefile ) writeinattr() void nsimsgfilterlist::writeintattr ( in nsmsgfilterfileattribvalue attrib, in long value, in nsioutput
stream stream ) writestrattr() void nsimsgfilterlist::writestrattr ( in nsmsgfilterfileattribvalue attrib, in string value, in nsioutput
stream stream ) writewstrattr() void nsimsgfilterlist::writewstrattr ( in nsmsgfilterfileattribvalue attrib, in string value, in nsioutput
stream stream )...
nsISocketTransport
netwerk/base/public/nsisockettransport.idlscriptable this interface specializes nsitransport for communication over network sockets. it provides methods to open blocking or non-blocking, buffered or unbuffered
streams between two end-point in a ip based network. inherits from: nsitransport last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) note: connection setup is triggered by opening an input or output
stream, it does not start on its own. completion of the connection setup is indicated by a status_connected_to notification to the event sink (if set). to create an instance, call nsisockettransportservice.createtransport() method overview prnetaddr getpeeraddr(); native code only! prnetaddr getselfaddr(); native code only! ...
...ing socket connection. read only. securitycallbacks nsiinterfacerequestor security notification callbacks passed to the secure socket provider via nsisslsocketcontrol at socket creation time. this object supports nsibadcertlistener2 and nsisslerrorlistener for ssl connections, and possibly other interfaces. note: this attribute cannot be changed once a
stream has been opened. securityinfo nsisupports security info object returned from the secure socket provider. this object supports nsisslsocketcontrol, nsitransportsecurityinfo, and possibly other interfaces. this attribute is only available once the socket is connected. read only. constants timeout type this constants are used by gettransport() an...
...x804b000a status_receiving_from 0x804b0006 connection flags values for the connectionflags attribute constant value description bypass_cache 0 when making a new connection bypass_cache will force the necko dns cache entry to be refreshed with a new call to nspr if it is set before opening the new
stream. anonymous_connect 1 when this flag is set, the socket will not apply any credentials when establishing a connection. for example, an ssl connection would not send any client-certificates if this flag is set. disable_ipv6 2 when this flag is set, the socket will ignore any ipv6 addresses the host may offer and will only attempt to connect ...
XUL Overlays
ments should be defined in overlay files. the installation of a media plug-in, for example, may add new icons and menu items to the interface: in the navigatoroverlay.xul file or in a separate navigatorsspoverlay.xul file (where navigator.xul defines the basic ui for the navigator package), these new plug-in elements would be defined as a collection of elements or subtrees: <menuitem name="super
stream player"/> <menupopup name="ss favorites"> <menuitem name="wave" src="mavericks.ssp"/> <menuitem name="soccer" src="brazil_soccer.ssp"/> </menupopup> <titledbutton id="ssp" crop="right" flex="1" value="&ssbutton.label;" onclick="firessp()"/> overlays and id attributes bases and overlays are merged when they share the same id attribute. thus, given the following base: ... <menu id...
... <menuitem name="open"/> <menuitem name="save"/> <menuitem name="close"/> </menupopup> </menu> ... and given the following overlay: <?xml version="1.0"?> <overlay id="singleitemex" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <menupopup id="menu_filepopup"> <menu id="file_menu"> <menuitem name="super
stream player"/> </menu> </menupopup> </overlay> the result will be: ... <menu id="file-menu"> <menupopup id="menu_filepopup"> <menuitem name="new"/> <menuitem name="open"/> <menuitem name="save"/> <menuitem name="close"/> <menuitem name="super
stream player"/> </menupopup> </menu> ... if you are developing a mozilla extension, note that the id namespace is shared by all the extensions. s...
...r document. loading overlays dynamically the chrome registry makes it possible to load xul overlays dynamically -- or only when necessary. the chrome registry, which is a special rdf datasource into which user-specific information is persisted, or stored, contains information about the components or additional packages that have been installed with the browser. when a component such as the "super
stream player" from the examples above is registered there, overlays associated with that component are loaded automatically. when the component is not present, only the base files are loaded. loading overlays at runtime firefox 1.5 and other gecko 1.8-based applications also support loading overlays on-the-fly via the document.loadoverlay() function. todo: elaborate overlays and skins warning: always...
Using COM from js-ctypes
allbackinterface; void* setnotifywin32event; void* waitfornotifyevent; void* getnotifyeventhandle; /* end inherit from ispnotifysource */ /* start inherit from ispeventsource */ void* setinterest; void* getevents; void* getinfo; /* end inherit from ispeventsource */ /* start ispvoice */ void* setoutput; void* getoutputobjecttoken; void* getoutput
stream; void* pause; void* resume; void* setvoice; void* getvoice; hresult (__stdcall *speak)(struct myispvoice*, lpcwstr pwcs, dword dwflags, ulong* pul
streamnumber); void* speak
stream; void* getstatus; void* skip; void* setpriority; void* getpriority; void* setalertboundary; void* getalertboundary; void* setrate; vo...
...fyeventhandle': ctypes.voidptr_t }, // end inherit from ispnotifysource // start inherit from ispeventsource { 'setinterest': ctypes.voidptr_t }, { 'getevents': ctypes.voidptr_t }, { 'getinfo': ctypes.voidptr_t }, // end inherit from ispeventsource // start ispvoice { 'setoutput': ctypes.voidptr_t }, { 'getoutputobjecttoken': ctypes.voidptr_t }, { 'getoutput
stream': ctypes.voidptr_t }, { 'pause': ctypes.voidptr_t }, { 'resume': ctypes.voidptr_t }, { 'setvoice': ctypes.voidptr_t }, { 'getvoice': ctypes.voidptr_t }, { 'speak': ctypes.functiontype(callback_abi, hresult, // return [ ispvoice.ptr, lpcwstr, // *pwcs dword, // dwflags ulong // ...
...types.voidptr_t }, { 'pause': ctypes.voidptr_t }, { 'resume': ctypes.voidptr_t }, { 'setvoice': ctypes.voidptr_t }, { 'getvoice': ctypes.voidptr_t }, { 'speak': ctypes.functiontype(callback_abi, hresult, // return [ ispvoice.ptr, lpcwstr, // *pwcs dword, // dwflags ulong // *pul
streamnumber ]).ptr }, { 'speak
stream': ctypes.voidptr_t }, { 'getstatus': ctypes.voidptr_t }, { 'skip': ctypes.voidptr_t }, { 'setpriority': ctypes.voidptr_t }, { 'getpriority': ctypes.voidptr_t }, { 'setalertboundary': ctypes.voidptr_t }, { 'getalertboundary': ctypes.voidptr_t }, { 'setrate': ctypes.voidptr_t }, { 'getrate': ctypes.voidptr_t }, { 'se...
Plug-in Side Plug-in API - Plugins
he plug-in object. the names of all of these methods begin with npp_ to indicate that they are implemented by the plug-in and called by the browser. for an overview of how these two sides of the plug-in api interact, see the how plug-ins work and overview of plug-in structure sections in the introduction. plugin method summary npp_destroy deletes a specific instance of a plug-in. npp_destroy
stream tells the plug-in that a
stream is about to be closed or destroyed. np_getentrypoints undocumented. np_getmimedescription registers the mime types supported by the plug-in (unix, mac os). npp_getvalue allows the browser to query the plug-in for information. np_getvalue allows the browser to query the plug-in for information. npp_handleevent delivers a platform-specific window event to ...
...isters the mime types supported by the plug-in (unix, mac os). npp_getvalue allows the browser to query the plug-in for information. np_getvalue allows the browser to query the plug-in for information. npp_handleevent delivers a platform-specific window event to the instance. np_initialize provides global initialization for a plug-in. npp_new creates a new instance of a plug-in. ...
...ix, mac os). npp_getvalue allows the browser to query the plug-in for information. np_getvalue allows the browser to query the plug-in for information. npp_handleevent delivers a platform-specific window event to the instance. np_initialize provides global initialization for a plug-in. npp_new creates a new instance of a plug-in. npp_new
stream notifies a plug-in instance of a new data
stream. npp_print requests a platform-specific print operation for an embedded or full-screen plug-in. npp_setvalue sets information about the plug-in. npp_setwindow tells the plug-in when a window is created, moved, sized, or destroyed. np_shutdown provides global deinitialization for a plug-in. npp_
streamasfile provides a local file name for the data from a
stream. npp_urlnotify notifies t...
BaseAudioContext.createChannelSplitter() - Web APIs
returns a channelsplitternode. ...
... returns a channelsplitternode. ...
...2); // reduce the volume of the left channel only var gainnode = ac.creategain(); gainnode.gain.setvalueattime(0.5, ac.currenttime); splitter.connect(gainnode, 0); // connect the splitter back to the second input of the merger: we // effectively swap the channels, here, reversing the stereo image. gainnode.connect(merger, 0, 1); splitter.connect(merger, 1, 0); var dest = ac.createmedia
streamdestination(); // because we have used a channelmergernode, we now have a stereo // media
stream we can use to pipe the web audio graph to webrtc, // mediarecorder, etc. merger.connect(dest); }); specifications specification status comment web audio apithe definition of 'createchannelsplitter()' in that specification. working draft ...
BaseAudioContext.createGain() - Web APIs
mute.onclick = voicemute; function voicemute() { if(mute.id == "") { ...
... mute.onclick = voicemute; function voicemute() { if(mute.id == "") { // 0 means mute. if you still hear somet...
... mute.onclick = voicemute; function voicemute() { if(mute.id == "") { // 0 means mute. if you still hear something, make su...
GainNode.gain - Web APIs
mute.onclick = voicemute; function voicemute() { if(mute.id == "") { ...
... mute.onclick = voicemute; function voicemute() { if(mute.id == "") { // 0 means mute. if you still hear somet...
... mute.onclick = voicemute; function voicemute() { if(mute.id == "") { // 0 means mute. if you still hear something, make su...
GainNode - Web APIs
mute.onclick = voicemute; function voicemute() { if(mute.id == "") { ...
... mute.onclick = voicemute; function voicemute() { if(mute.id == "") { // 0 means mute. if you still hear somet...
... mute.onclick = voicemute; function voicemute() { if(mute.id == "") { // 0 means mute. if you still hear something, make su...
msAudioCategory - Web APIs
on background capable? alert looping or longer running alert sounds: alarms ring tones ringing notification sounds that need to attenuate existing audio no backgroundcapablemedia for audio that needs to continue playing in the background. ...
...ble? alert looping or longer running alert sounds: alarms ring tones ringing notification sounds that need to attenuate existing audio no backgroundcapablemedia for audio that needs to continue playing in the background. ...
...er running alert sounds: alarms ring tones ringing notification sounds that need to attenuate existing audio no backgroundcapablemedia for audio that needs to continue playing in the background. examples include the following local media playback scenarios: local playlist
streaming radio
streaming playlist music videos
streaming audio/radio, youtube, netflix, etc. yes communications for
streaming communication audio such as the following: voip real time chat or other type of phone calls should not be used in non-real-time or non-communication scenarios, such as audio and/or video playback, as playback startup latency is affected. *note that if msaudiocategory is set to c...
MediaDeviceInfo - Web APIs
for example a monitor with both a built-in camera and a microphone. mediadeviceinfo.kindread only returns an enumerated value that is either "videoinput", "audioinput" or "audiooutput". mediadeviceinfo.labelread only returns a domstring that is a label describing this device (for example "external usb webcam"). for security reasons, the label field is always blank unless an active media
stream exists or the user has granted persistent permission for media device access. the set of device labels could otherwise be used as part of a fingerprinting mechanism to identify a user. methods none. example here's an example that uses enumeratedevices() to get a list of devices. if (!navigator.mediadevices || !navigator.mediadevices.enumeratedevices) { console.log("enumeratedevices() not ...
...og(device.kind + ": " + device.label + " id = " + device.deviceid); }); }) .catch(function(err) { console.log(err.name + ": " + err.message); }); this might produce: videoinput: id = cso9c0ypaf274oucpua53cne0yhlir2yxci+sqfbzz8= audioinput: id = rkxxbyjnabbadgqnnzqlvldmxls0yketycibg+xxnvm= audioinput: id = r2/xw1xupiyzunfv1lgrkoma5wtovckwfz368xcndm0= or if one or more media
streams are active, or if persistent permissions have been granted: videoinput: facetime hd camera (built-in) id=cso9c0ypaf274oucpua53cne0yhlir2yxci+sqfbzz8= audioinput: default (built-in microphone) id=rkxxbyjnabbadgqnnzqlvldmxls0yketycibg+xxnvm= audioinput: built-in microphone id=r2/xw1xupiyzunfv1lgrkoma5wtovckwfz368xcndm0= specifications specification status comment media ...
... candidate recommendation initial definition ...
MediaRecorder.ondataavailable - Web APIs
when mediarecorder.stop() is called, all media data which has been captured since recording began or the last time a dataavailable event occurred is delivered in a blob; after this, capturing ends. ...
... when mediarecorder.stop() is called, all media data which has been captured since recording began or the last time a dataavailable event occurred is delivered in a blob; after this, capturing ends. ...
... working draft initial definition ...
MediaSource - Web APIs
ained within mediasource.sourcebuffers — the list of objects providing the selected video track, enabled audio tracks, and shown/hidden text tracks. mediasource.readystate read only returns an enum representing the state of the current mediasource, whether it is not currently attached to a media element (closed), attached and ready to receive sourcebuffer objects (open), or attached but the
stream has been ended via mediasource.endof
stream() (ended.) mediasource.duration gets and sets the duration of the current media being presented. event handlers mediasource.onsourceclose the event handler for the sourceclose event. mediasource.onsourceended the event handler for the sourceended event. mediasource.onsourceopen the event handler for the sourceopen event. methods inherits m...
...rce.onsourceopen the event handler for the sourceopen event. methods inherits methods from its parent interface, eventtarget. mediasource.addsourcebuffer() creates a new sourcebuffer of the given mime type and adds it to the mediasource.sourcebuffers list. mediasource.clearliveseekablerange() clears a seekable range previously set with a call to setliveseekablerange(). mediasource.endof
stream() signals the end of the
stream. mediasource.removesourcebuffer() removes the given sourcebuffer from the mediasource.sourcebuffers list. mediasource.setliveseekablerange() sets the range that the user can seek to in the media element. static methods mediasource.istypesupported() returns a boolean value indicating if the given mime type is supported by the current user agent — this i...
...ce.addeventlistener('sourceopen', sourceopen); } else { console.error('unsupported mime type or codec: ', mimecodec); } function sourceopen (_) { //console.log(this.readystate); // open var mediasource = this; var sourcebuffer = mediasource.addsourcebuffer(mimecodec); fetchab(asseturl, function (buf) { sourcebuffer.addeventlistener('updateend', function (_) { mediasource.endof
stream(); video.play(); //console.log(mediasource.readystate); // ended }); sourcebuffer.appendbuffer(buf); }); }; function fetchab (url, cb) { console.log(url); var xhr = new xmlhttprequest; xhr.open('get', url); xhr.responsetype = 'arraybuffer'; xhr.onload = function () { cb(xhr.response); }; xhr.send(); }; specifications specification status c...
MediaTrackSettings.aspectRatio - Web APIs
if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.aspectratio as returned by a call to mediadevices.getsupportedconstraints(). ...
... if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.aspectratio as returned by a call to mediadevices.getsupportedconstraints(). ...
... taking the track's width, dividing by its height, and rounding the result to ten decimal places. for example, the standard 16:9 high-definition aspect ratio can be computed as 1920/1080, or 1.7777777778. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and
streamsthe definition of 'aspectratio' in that specification. candidate recommendation initial specification. ...
MediaTrackSettings.channelCount - Web APIs
if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.channelcount as returned by a call to mediadevices.getsupportedconstraints(). ...
... if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.channelcount as returned by a call to mediadevices.getsupportedconstraints(). ...
... candidate recommendation initial specification. ...
MediaTrackSettings.deviceId - Web APIs
this lets you determine what value was selected to comply with your specified constraints for this property's value as described in the mediatrackconstraints.deviceid property you provided when calling either getusermedia(). if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.deviceid as returned by a call to mediadevices.getsupportedconstraints(). ...
...est the same source be used for multiple sessions, for example. the actual value of the string, however, is determined by the source of the track, and there is no guarantee what form it will take, although the specification does recommend it be a guid. since there is a one-to-one pairing of id with each source, all tracks with the same source will share the same id for any given origin, so media
streamtrack.getcapabilities() will always return exactly one value for deviceid. that makes the device id not useful for any changes to constraints when calling media
streamtrack.applyconstraints(). an exception to the rule that device ids are the same across browsing sessions: private browsing mode will use a different id, and will change it each browsing session. example see example: constraint ex...
... candidate recommendation initial specification. ...
MediaTrackSettings.displaySurface - Web APIs
the mediatracksettings dictionary's displaysurface property indicates the type of display surface being captured. syntax displaysurface = mediatracksettings.displaysurface; value the value of displaysurface is a string that comes from the displaycapturesurfacetype enumerated type, and is one of the following: application the
stream's video track contains all of the windows belonging to the application chosen by the user. ...
...e of displaysurface is a string that comes from the displaycapturesurfacetype enumerated type, and is one of the following: application the
stream's video track contains all of the windows belonging to the application chosen by the user. the windows are aggragated into a single video track, with any empty space filled with a backdrop; that backdrop is selected by the user agent. browser the
stream's video track presents the entire contents of a single browser tab which the user selected during the getdisplaymedia() call. monitor the video track in the
stream presents the complete contents of one or more of the user's screens. ...
...the window may be from any application, not necessarily just from within the user agent. not all user agents support all of these surface types. ...
MediaTrackSettings.height - Web APIs
if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.height as returned by a call to mediadevices.getsupportedconstraints(). ...
... if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.height as returned by a call to mediadevices.getsupportedconstraints(). ...
...ply ignore any constraints they're unfamiliar with. syntax var height = mediatracksettings.height; value an integer value indicating the height, in pixels, of the video track as currently configured. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and
streamsthe definition of 'height' in that specification. candidate recommendation initial specification. ...
MediaTrackSettings.latency - Web APIs
this is, of course, an approximation, since latency can vary for many reasons including cpu, transmission, and storage overhead. ...
... this is, of course, an approximation, since latency can vary for many reasons including cpu, transmission, and storage overhead. ...
...his property. syntax var latency = mediatracksettings.latency; value a double-precision floating-point number indicating the estimated latency, in seconds, of the audio track as currently configured. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and
streamsthe definition of 'latency' in that specification. candidate recommendation initial specification. ...
MediaTrackSettings.sampleRate - Web APIs
if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.samplerate as returned by a call to mediadevices.getsupportedconstraints(). ...
... if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.samplerate as returned by a call to mediadevices.getsupportedconstraints(). ...
... candidate recommendation initial specification. ...
MediaTrackSettings.sampleSize - Web APIs
if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.samplesize as returned by a call to mediadevices.getsupportedconstraints(). ...
... if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.samplesize as returned by a call to mediadevices.getsupportedconstraints(). ...
...nel on the track requires samplesize bits. that means that a given sample actually uses (samplesize/8)*channelcount bytes of data. for example, 16-bit stereo audio requires (16/8)*2 or 4 bytes per sample. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and
streamsthe definition of 'samplesize' in that specification. candidate recommendation initial specification. ...
MediaTrackSettings.width - Web APIs
if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.width as returned by a call to mediadevices.getsupportedconstraints(). ...
... if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.width as returned by a call to mediadevices.getsupportedconstraints(). ...
...simply ignore any constraints they're unfamiliar with. syntax var width = mediatracksettings.width; value an integer value indicating the width, in pixels, of the video track as currently configured. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and
streamsthe definition of 'width' in that specification. candidate recommendation initial specification. ...
Media Capabilities API - Web APIs
the media capabilities api allows developers to determine decoding and encoding abilities of the device, exposing information such as whether media is supported and whether playback should be smooth and power efficient, with real time feedback about playback to better enable adaptive
streaming, and access to display property information. examples detect audio file support and expected performance this example defines a audio configuration then checks to see if the user agent supports decoding that media configuration, and whether it will perform well in terms of smoothness and power efficiency. if ('mediacapabilities' in navigator) { const audiofileconfiguration = { type : 'file', audio : { contenttype: "audio/mp3", channels: 2, bitrate: 132700, s...
...ge abilities, and real-time feedback about the playback. to test support, smoothness and power efficiency of a video or audio file, you define the media configuration you want to test, and then pass the audio or video configuration as the parameter of the mediacapabilities interface's encodinginfo() and decodinginfo() methods. ...
... mediacapabilitiesinfo the interface of the promise returned by the mediacapabilities's encodinginfo() and decodinginfo() methods; returning whether the media configuration tested is supported, smooth, and powerefficient. ...
RTCPeerConnection.ontrack - Web APIs
the rtcpeerconnection property ontrack is an eventhandler which specifies a function to be called when the track event occurs, indicating that a track has been added to the rtcpeerconnection. the function receives as input the event object, of type rtctrackevent; this event is sent when a new incoming media
streamtrack has been created and associated with an rtcrtpreceiver object which has been added to the set of receivers on connection. ...
...t is sent when a new incoming media
streamtrack has been created and associated with an rtcrtpreceiver object which has been added to the set of receivers on connection. syntax rtcpeerconnection.ontrack = eventhandler; value set ontrack to be a function you provide that accepts as input a rtctrackevent object describing the new track and how it's being used. this information includes the media
streamtrack object representing the new track, the rtcrtpreceiver and rtcrtptransceiver, and a list of media
stream objects which indicates which
stream or
streams the track is part of.. example this example, taken from the code for the article signaling and video calling, connects the incoming track to the <video> element which will be used to display the incoming video. pc.ontrack = function(event) ...
...rtcrtptransceiver, and a list of media
stream objects which indicates which
stream or
streams the track is part of.. example this example, taken from the code for the article signaling and video calling, connects the incoming track to the <video> element which will be used to display the incoming video. pc.ontrack = function(event) { document.getelementbyid("received_video").srcobject = event.
streams[0]; document.getelementbyid("hangup-button").disabled = false; }; the first line of our ontrack event handler takes the first
stream in the incoming track and sets the srcobject attribute to that. this connects that
stream of video to the element so that it begins to be presented to the user. the second line of code simply enables a "hang up" button, which the user can use to disconnect from...
RTCPeerConnection.removeTrack() - Web APIs
meters mediatrack a rtcrtpsender specifying the sender to remove from the connection. return value undefined. exceptions invalidstateerror the connection is not open. example this example adds a video track to a connection and sets up a listener on a close button which removes the track when the user clicks the button. ...
...er to remove from the connection. return value undefined. exceptions invalidstateerror the connection is not open. example this example adds a video track to a connection and sets up a listener on a close button which removes the track when the user clicks the button. ...
...d. exceptions invalidstateerror the connection is not open. example this example adds a video track to a connection and sets up a listener on a close button which removes the track when the user clicks the button. var pc, sender; navigator.getusermedia({video: true}, function(
stream) { pc = new rtcpeerconnection(); var track =
stream.getvideotracks()[0]; sender = pc.addtrack(track,
stream); }); document.getelementbyid("closebutton").addeventlistener("click", function(event) { pc.removetrack(sender); pc.close(); }, false); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.removetrack()' in that specification. candidate recommendation initial specification. ...
RTCPeerConnection: track event - Web APIs
see track event types in rtctrackevent for details. examples this example shows code that creates a new rtcpeerconnection, then adds a new track event handler. ...
...w rtcpeerconnection, then adds a new track event handler. pc = new rtcpeerconnection({ iceservers: [ { urls: "turn:fake.turnserver.url", username: "someusername", credential: "somepassword" } ] }); pc.addeventlistener("track", e => { videoelement.srcobject = e.
streams[0]; hangupbutton.disabled = false; }, false); the event handler assigns the new track's first
stream to an existing <video> element, identified using the variable videoelement. ...
...istener("track", e => { videoelement.srcobject = e.
streams[0]; hangupbutton.disabled = false; }, false); the event handler assigns the new track's first
stream to an existing <video> element, identified using the variable videoelement. you can also assign the event handler function to the ontrack property, rather than use addeventlistener(). pc.ontrack = e => { videoelement.srcobject = e.
streams[0]; hangupbutton.disabled = false; return false; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'track' in that specification. candidate recommendation initial specification. ...
RTCRtpSender.replaceTrack() - Web APIs
the rtcrtpsender method replacetrack() replaces the track currently being used as the sender's source with a new media
streamtrack. the new track must be of the same media kind (audio, video, etc) and switching the track should not require negotiation. among the use cases for replacetrack() is the common need to switch between the rear- and front-facing cameras on a phone. with replacetrack(), you can simply have a track object for each camera and switch between the two as needed. see the example switching cameras below. syntax trackreplacedpromise = sender.replacetrack(newtrack); parameters newtrack optional a media
streamtrack specifying the track with which to replace the rtcrtpsender's current source track. the new track's kind must be the same as the current track's, or the replace t...
...rdware encoders — may not be able to provide the negotiated codec. software sources may not implement the negotiated codec. ...
...able to provide the negotiated codec. software sources may not implement the negotiated codec. ...
RTCRtpSender.track - Web APIs
if no track is associated with the sender, this value is null, in which case the sender transmits nothing. ...
...if no track is associated with the sender, this value is null, in which case the sender transmits nothing. ...
...if no track is associated with the sender, this value is null, in which case the sender transmits nothing. ...
RTCRtpSender - Web APIs
with it, you can configure the encoding used for the corresponding track, get information about the device's media capabilities, and so forth. you can also obtain access to an rtcdtmfsender which can be used to send dtmf codes (to simulate the user pressing buttons on a telephone's dial pad) to the remote peer. properties rtcrtpsender.dtmf read only an rtcdtmfsender which can be used to send dtmf tones using telephone-event payloads on the rtp session represented by the rtcrtpsender object. ...
... user pressing buttons on a telephone's dial pad) to the remote peer. properties rtcrtpsender.dtmf read only an rtcdtmfsender which can be used to send dtmf tones using telephone-event payloads on the rtp session represented by the rtcrtpsender object. if null, the track and/or the connection doesn't support dtmf. only audio tracks can support dtmf. rtcrtpsender.track read only the media
streamtrack which is being handled by the rtcrtpsender. if track is null, the rtcrtpsender doesn't transmit anything. rtcrtpsender.transport read only the rtcdtlstransport over which the sender is exchanging the rtp and rtcp packets used to manage transmission of media and control data. this value is null until the transport is established. when bundling is in use, more than transceiver may be sharin...
...cp transports have been combined into a single transport. use the transport property instead. methods rtcrtpsender.getparameters() returns a rtcrtpparameters object describing the current configuration for the encoding and transmission of media on the track. rtcrtpsender.getstats() returns a promise which is fulfilled with a rtcstatsreport which provides statistics data for all outbound
streams being sent using this rtcrtpsender. rtcrtpsender.setparameters() applies changes to parameters which configure how the track is encoded and transmitted to the remote peer. rtcrtpsender.set
streams() sets the media
stream(s) associated with the track being transmitted by this sender. rtcrtpsender.replacetrack() attempts to replace the track currently being sent by the rtcrtpsender with anothe...
Response - Web APIs
iler header. response.type read only the type of the response (e.g., basic, cors). response.url read only the url of the response. response.usefinalurl a boolean indicating whether this is the final url of the response. body interface properties response implements body, so it also has the following properties available to it: body.body read only a simple getter exposing a readable
stream of the body contents. body.bodyused read only stores a boolean that declares whether the body has been used in a response yet. methods response.clone() creates a clone of a response object. response.error() returns a new response object associated with a network error. response.redirect() creates a new response with a different url. body interface methods response implements body,...
...dy has been used in a response yet. methods response.clone() creates a clone of a response object. response.error() returns a new response object associated with a network error. response.redirect() creates a new response with a different url. body interface methods response implements body, so it also has the following methods available to it: body.arraybuffer() takes a response
stream and reads it to completion. it returns a promise that resolves with an arraybuffer. body.blob() takes a response
stream and reads it to completion. it returns a promise that resolves with a blob. body.formdata() takes a response
stream and reads it to completion. it returns a promise that resolves with a formdata object. body.json() takes a response
stream and reads it to completion. it ret...
...it returns a promise that resolves with a usvstring (text). examples in our basic fetch example (run example live) we use a simple fetch() call to grab an image and display it in an <img> element. the fetch() call returns a promise, which resolves to the response object associated with the resource fetch operation. ...
URL.createObjectURL() - Web APIs
s created, even if you've already created one for the same object. each of these must be released by calling url.revokeobjecturl() when you no longer need them. browsers will release object urls automatically when the document is unloaded; however, for optimal performance and memory usage, if there are safe times when you can explicitly unload them, you should do so. ...
... these must be released by calling url.revokeobjecturl() when you no longer need them. browsers will release object urls automatically when the document is unloaded; however, for optimal performance and memory usage, if there are safe times when you can explicitly unload them, you should do so. using object urls for media
streams in older versions of the media source specification, attaching a
stream to a <video> element required creating an object url for the media
stream. this is no longer necessary, and browsers are removing support for doing this. important: if you still have code that relies on createobjecturl() to attach
streams to media elements, you need to update your code to simply set srcobject to the media
stream directly. specifications specification status comm...
...a
stream directly. specifications specification status comment file apithe definition of 'createobjecturl()' in that specification. working draft initial definition. media source extensionsthe definition of 'url' in that specification. recommendation mediasource extension. older versions of this specification used createobjecturl() for media
stream objects; this is no longer supported. ...
Common MIME types - HTTP
an unknown file type should use this type. ...
...mime type .aac aac audio audio/aac .abw abiword document application/x-abiword .arc archive document (multiple files embedded) application/x-freearc .avi avi: audio video interleave video/x-msvideo .azw amazon kindle ebook format application/vnd.amazon.ebook .bin any kind of binary data application/octet-
stream .bmp windows os/2 bitmap graphics image/bmp .bz bzip archive application/x-bzip .bz2 bzip2 archive application/x-bzip2 .csh c-shell script application/x-csh .css cascading style sheets (css) text/css .csv comma-separated values (csv) text/csv .doc microsoft word application/msword .do...
...) application/rtf .sh bourne shell script application/x-sh .svg scalable vector graphics (svg) image/svg+xml .swf small web format (swf) or adobe flash document application/x-shockwave-flash .tar tape archive (tar) application/x-tar .tif .tiff tagged image file format (tiff) image/tiff .ts mpeg transport
stream video/mp2t .ttf truetype font font/ttf .txt text, (generally ascii or iso 8859-n) text/plain .vsd microsoft visio application/vnd.visio .wav waveform audio format audio/wav .weba webm audio audio/webm .webm webm video video/webm .webp webp image image/webp .woff web open font fo...
WebAssembly.instantiate() - JavaScript
ts first webassembly.instance. the secondary overload takes an already-compiled webassembly.module and returns a promise that resolves to an instance of that module. this overload is useful if the module has already been compiled. important: this method is not the most efficient way of fetching and instantiating wasm modules. if at all possible, you should use the newer webassembly.instantiate
streaming() method instead, which fetches, compiles, and instantiates a module all in one step, directly from the raw bytecode, so doesn't require conversion to an arraybuffer. syntax primary overload — taking wasm binary code promise<resultobject> webassembly.instantiate(buffersource, importobject); parameters buffersource a typed array or arraybuffer containing the binary code of the .wasm...
...mise that resolves to an webassembly.instance object. exceptions if either of the parameters are not of the correct type or structure, a typeerror is thrown. if the operation fails, the promise rejects with a webassembly.compileerror, webassembly.linkerror, or webassembly.runtimeerror, depending on the cause of the failure. examples note: you'll probably want to use webassembly.instantiate
streaming() in most cases, as it is more efficient than instantiate(). first overload example after fetching some webassembly bytecode using fetch, we compile and instantiate the module using the webassembly.instantiate() function, importing a javascript function into the webassembly module in the process. we then call an exported webassembly function that is exported by the instance. var importobjec...
...r() ).then(bytes => webassembly.instantiate(bytes, importobject) ).then(result => result.instance.exports.exported_func() ); note: you can also find this example at index.html on github (view it live also). second overload example the following example (see our index-compile.html demo on github, and view it live also) compiles the loaded simple.wasm byte code using the webassembly.compile
streaming() method and then sends it to a worker using postmessage(). var worker = new worker("wasm_worker.js"); webassembly.compile
streaming(fetch('simple.wasm')) .then(mod => worker.postmessage(mod) ); in the worker (see wasm_worker.js) we define an import object for the module to use, then set up an event handler to receive the module from the main thread. when the module is received, we create ...
for await...of - JavaScript
g for await...of. async function* asyncgenerator() { let i = 0; while (i < 3) { yield i++; } } (async function() { for await (let num of asyncgenerator()) { console.log(num); } })(); // 0 // 1 // 2 for a more concrete example of iterating over an async generator using for await...of, consider iterating over data from an api. ...
...d i++; } } (async function() { for await (let num of asyncgenerator()) { console.log(num); } })(); // 0 // 1 // 2 for a more concrete example of iterating over an async generator using for await...of, consider iterating over data from an api. this example first creates an async iterable for a
stream of data, then uses it to find the size of the response from the api. async function*
streamasynciterable(
stream) { const reader =
stream.getreader(); try { while (true) { const { done, value } = await reader.read(); if (done) { return; } yield value; } } finally { reader.releaselock(); } } // fetches data from url and calculates response size using the async generator. async function getresponsesize(url) { const response = await fetc...
...eld value; } } finally { reader.releaselock(); } } // fetches data from url and calculates response size using the async generator. async function getresponsesize(url) { const response = await fetch(url); // will hold the size of the response, in bytes. let responsesize = 0; // the for-await-of loop. async iterates over each portion of the response. for await (const chunk of
streamasynciterable(response.body)) { // incrementing the total response length. responsesize += chunk.length; } console.log(`response size: ${responsesize} bytes`); // expected output: "response size: 1071472" return responsesize; } getresponsesize('https://jsonplaceholder.typicode.com/photos'); iterating over sync iterables and generators for await...of loop also consumes sync itera...
WebAssembly
stateless webassembly code that has already been compiled by the browser and can be efficiently shared with workers, and instantiated multiple times. webassembly.instance() a webassembly.instance object is a stateful, executable instance of a module. instance objects contain all the exported webassembly functions that allow calling into webassembly code from javascript. webassembly.instantiate
streaming() the webassembly.instantiate
streaming() function is the primary api for compiling and instantiating webassembly code, returning both a module and its first instance. webassembly.memory() a webassembly.memory object is a resizable arraybuffer that holds the raw bytes of memory accessed by an instance. webassembly.table() a webassembly.table object is a resizable typed array of opaque valu...
... 52notes notes disabled in the firefox 52 extended support release (esr).opera android full support 43safari ios full support 11samsung internet android full support 7.0nodejs full support 8.0.0compile
streamingchrome full support 61edge full support 16firefox full support 58ie no support noopera full support 47safari no support nowebvi...
... 52notes notes disabled in the firefox 52 extended support release (esr).opera android full support 43safari ios full support 11samsung internet android full support 7.0nodejs full support 8.0.0instantiate
streamingchrome full support 61edge full support 16firefox full support 58ie no support noopera full support 47safari no support nowebvi...
ActiveX Control for Hosting Netscape Plug-ins in IE - Archive of obsolete content
ed the control into a cab file and wish for it to be installed automatically. the following <embed> attributes have <param> tag equivalents: <param name="type" ...> is equivalent to typespecifies the mime type of the plug-in. the control uses this value to determine which plug-in it should create to handle the content. <param name="src" ...> is equivalent to srcspecifies an url for the initial
stream of data to feed the plug-in. if you havent't specified a "type" param, the control will attempt to use the mime type of this
stream to create the correct plug-in. <param name="pluginspage" ...> is equivalent to pluginspagespecifies a url where the plug-in may be installed from. the default plug-in will redirect you to this page when you do not have the correct plug-in installed. you may also su...
...s a url where the plug-in may be installed from. the default plug-in will redirect you to this page when you do not have the correct plug-in installed. you may also supply any custom plug-in parameters as additional <param> elements. still to do only hosts windowed plug-ins. an official pluginhostctrl.cab file. doesn't work for the adobe acrobat plug-in yet. plug-ins cannot create writeable
streams or seek in readable
streams. liveconnect scripting is not supported. if you need scripting functionality, consider shipping a modified pluginhostctrl.dll that exposes methods you wish to call on your plugin. ...
Accessing Files - Archive of obsolete content
there are alternative xpcom apis you can use, your help in updating this pages to use the supported api is very much welcome! other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes. ...
...here!"); else alert("file not found!"); here, the same file is retrieved and a further check is performed to see whether the file is present or not. the exists method returns true if the file is present and false if it is not. if the file does not exist, you may wish to create it. the file object has a nsifile.create() method which may be used to create an empty file, or you can open a writing
stream and write to the file. nsiscriptableio.getfile() may only be used to retrieve files that are directly within one of the starting directories. to retrieve other files, you will need to use nsiscriptableio.getfile() to access a directory and iterate through subdirectories until you come to the file that you want. for more information about this, see working with directories. starting directories th...
Getting File Information - Archive of obsolete content
there are alternative xpcom apis you can use, your help in updating this pages to use the supported api is very much welcome! other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes. ...
...issions as it can make the value easier to read. in this case, the first digit is the permissions for the owner of the file, the second digit is the permissions for the group of the file and the third digit is the permissions for everyone else. the value is a sum of three values, 4 for readable, 2 for writable and 1 for executable. the default permissions for files when created through an output
stream is 0644, which means that the file is readable and writable by the owner of the file and read only for others. some of the permissions may not be supported on some platforms. ...
Uploading and Downloading Files - Archive of obsolete content
file and
stream guide: [ nsiscriptableio | accessing files | getting file information | reading from files | writing to files | moving, copying and deleting files | uploading and downloading files | working with directories ] important note: the pages from the file and
stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes). there are alternative xpcom apis you can use, your help in updating this pages to use the supported api is very much welcome! other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes. the io object and
stream objects can be used to up...
... allow sending additional data and web servers usually need special configuration to support put operations. function uploadput(posturl, filepath) { var req = new xmlhttprequest(); req.open("put", posturl); req.setrequestheader("content-type", "text/plain"); req.onload = function(event) { alert(event.target.responsetext); } req.send(new file(filepath)); } in this example, a new input
stream is created for a file, and is passed to the xmlhttprequest's send method. fetch upload please refer to uploading a file section inside the fetch article. downloading files under construction... meanwhile you can read this. ...
NPAPI plugin developer guide - Archive of obsolete content
g the object element for plug-in display nesting rules for html elements using the appropriate attributes using the embed element for plug-in display using custom embed attributes plug-in references plug-in development overview writing plug-ins registering plug-ins ms windows unix mac os x drawing a plug-in instance handling memory sending and receiving
streams working with urls getting version and ui information displaying messages on the status line making plug-ins scriptable building plug-ins building, platforms, and compilers building carbonized plug-ins for mac os x type libraries installing plug-ins native installers xpi plug-ins installations plug-in installation and the windows registry initialization and...
... getting information windowed plug-ins mac os windows unix event handling for windowed plug-ins windowless plug-ins specifying that a plug-in is windowless invalidating the drawing area forcing a paint message making a plug-in opaque making a plug-in transparent creating pop-up menus and dialog boxes event handling for windowless plug-ins
streams receiving a
stream telling the plug-in when a
stream is created telling the plug-in when a
stream is deleted finding out how much data the plug-in can accept writing the
stream to the plug-in sending the
stream in random-access mode sending the
stream in file mode sending a
stream creating a
stream pushing data into the
stream deleting the
stream example of sending a
stream urls ...
Browser-side plug-in API - Archive of obsolete content
th npn_ to indicate that they are implemented by the browser and called by the plug-in. for an overview of how these two sides of the plug-in api interact, see the how plug-ins work and overview of plug-in structure sections in the introduction. warning: you must only call these from the main thread; calling them from other threads is not supported and may have unpredictable results. ...
...structure sections in the introduction. warning: you must only call these from the main thread; calling them from other threads is not supported and may have unpredictable results. ...
NPByteRange - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary represents a particular range of bytes from a
stream. syntax typedef struct _npbyterange { int32 offset; /* negative offset = from the end */ uint32 length; struct _npbyterange* next; } npbyterange; fields the data structure has the following fields: offset offset in bytes to the start of the requested range. this value may be either positive or negative: positive value: offset from the beginning of the
stream. negative value: offset from the end of the
stream. length number of bytes to fetch from the specified offset. ...
... the start of the requested range. this value may be either positive or negative: positive value: offset from the beginning of the
stream. negative value: offset from the end of the
stream. length number of bytes to fetch from the specified offset. next points to the next npbyterange request in the list of requests, or null if this is the last request. description the plug-in seeks within a
stream by building a linked list of one or more npbyterange objects, which represents a set of discontiguous byte ranges. the only plug-in api call that uses the npbyterange type is npn_requestread(), which lets the plug-in read specified parts of a file without downloading it. the plug-in is responsible for deleting npbyterange objects when finished with them. the browser makes a copy if it needs to ke...
NPN_GetURLNotify - Archive of obsolete content
syntax #include <npapi.h> nperror npn_geturlnotify(npp instance, const char* url, const char* target, void* notifydata); parameters the function has the following parameters: instance pointer to the current plug-in instance. url pointer to the url of the request. can be of any type, such as http, ftp, news, or mailto. target name of the target window or frame, or one of several special target names. ...
...t with a null target failed, or that a request with a non-null target completed. for requests that complete unsuccessfully, the browser calls npp_urlnotify() as soon as possible. for requests that complete successfully: if the target is non-null, the browser calls npp_urlnotify() after it has finished loading the url. if the target is null, the browser calls npp_urlnotify() after closing the
stream by calling npn_destroy
stream(). if this function is called with a target parameter value of _self or a parent to _self, this function should return nperr_invalid_param. this is the only way to notify the plug-in once it is deleted. warning: in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1), npn_geturlnotify() does not notify the plug-in if notifydata is null. see bug 638367 for detai...
NPN_PostURL - Archive of obsolete content
instance, const char *url, const char *target, uint32 len, const char *buf, npbool file); parameters the function has the following parameters: instance pointer to the current plug-in instance. url url of the request, specified by the plug-in. target display target, specified by the plug-in. if null, pass the new
stream back to the current plug-in instance regardless of mime type. for values, see npn_geturl. len length of the buffer buf. buf path to local temporary file or data buffer that contains the data to post. temporary file is deleted after use. data in buffer cannot be posted for a protocol that requires a header. file a boolean value that specifies whether to po...
...es, see error codes. description npn_posturl works similarly to npn_geturl, but in reverse. npn_geturl reads data from the url and either displays it in the target window or delivers it to the plug-in. npn_posturl writes data from a file or buffer to the url and either displays the server's response in the target window or delivers it to the plug-in. if the target parameter is null, the new
stream is passed to the plug-in regardless of mime type. when you use npn_posturl to send data to the server, you can handle the response in several different ways by specifying different target parameters. if target is null, the server response is sent back to the plug-in. you can get the data and save it in a file or use it in a program. if you specify _current, _self, or _top, the response data...
Archived JavaScript Reference - Archive of obsolete content
ray comprehensionsthe array comprehension syntax was a javascript expression which allowed you to quickly assemble a new array based on an existing one. however, it has been removed from the standard and the firefox implementation. do not use it!array.observe()the array.observe() method was used for asynchronously observing changes to arrays, similar to object.observe() for objects. it provided a
stream of changes in order of occurrence. it's equivalent to object.observe() invoked with the accept type list ["add", "update", "delete", "splice"]. however, this api has been deprecated and removed from browsers. you can use the more general proxy object instead.array.unobserve()the array.unobserve() method was used to remove observers set by array.observe(), but has been deprecated and removed from ...
...sed to evaluate the passed value and convert it to an integer, but its implementation has been removed.object.getnotifier()the object.getnotifer() method was used to create an object that allows to synthetically trigger a change, but has been deprecated and removed in browsers.object.observe()the object.observe() method was used for asynchronously observing the changes to an object. it provided a
stream of changes in the order in which they occur. however, this api has been deprecated and removed from browsers. you can use the more general proxy object instead.object.prototype.__count__the __count__ property used to store the count of enumerable properties on the object, but it has been removed.object.prototype.__nosuchmethod__the __nosuchmethod__ property used to reference a function to be exec...
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
no’s support of this important standard eliminates the pain of using dom or sax based parsers in java. listing 3 below details a script used to process an rss feed from the mozilla website. ...
...mportant standard eliminates the pain of using dom or sax based parsers in java. listing 3 below details a script used to process an rss feed from the mozilla website. ...
Using the Right Markup to Invoke Plugins - Archive of obsolete content
use the above markup to invoke the flash plugin for both ie and netscape 7. however, there are a few caveats that developers ought to bear in mind when using the object element with mozilla-based browsers such as netscape 7 and in ie: caveats if you use one single object element for both browsers (as in the above example), it is not possible to provide a cross-browserobtainment mechanism for
streamlined download. you cannot use a codebase attribute to link to a signed cab file for the activex component, since this won't work in mozilla-based browsers such as netscape 7. furthermore, ie's use of the codebase attribute as an obtainment mechanism itself is not strictly correct according to the html 4.01 specification, which says that the codebase attribute should be used to qualify urns refere...
...is advisable. note that the obtainment mechanism for the embed element -- that is, the way in which a plugin is obtained if it is missing -- comes via the pluginspage attribute. this attribute points to a page to get the plugin if it is not detected by the browser. the pluginurl attribute is another attribute that can be used, and it can be used to point directly to an xpinstall file for a more
streamlined download. for the embed element in particular, these attributes in netscape 7 and mozilla are governed by the plugin finder service preference. under edit | preferences | navigator | helper applications is a preference to use netscape's plugin finder service. if the user has checkedalways use the netscape plugin finder service to get plugins then whether these attributes are specified or not...
Game monetization - Game development
etization strategies there are other ways you can earn money when building html5 games, and it doesn't even have to be game-related. selling resources if you're a graphic designer, you can sell the assets from the games you've created, or something brand new exclusively for that purpose at online shops like envato market. it's not much, but if you're a known designer it can be an extra passive
stream of income. writing articles and tutorials it is possible to write articles about your games and even get paid for them. game promotion and monetization at the same time is a win-win, and if you don't abuse it with too much advertising the readers will enjoy reading them and as well as learning a thing or two. if you focus on sharing the knowledge first and use your games just as the examples it...
...ge first and use your games just as the examples it should be ok. check out tuts+ game development or similar websites for writing opportunities. merchandise you can sell t-shirts, stickers or other gadgets — some devs make more money from the merchandise than from the games themselves, but it only works on very popular and recognizable games like angry birds. still, it could be another small
stream of passive income. the more diversified your earnings are, the better your business stability. donations when all else fails you can try putting a donate button on your game's page and asking for support from the community. sometimes it works, but only if the player knows you and feels that it will help you in your situation. that's why carefully managing your community is so important. it work...
DTLS (Datagram Transport Layer Security) - MDN Web Docs Glossary: Definitions of Web-related terms
as a datagram protocol, dtls doesn't guarantee the order of message delivery, or even that messages will be delivered at all. however, dtls gains the benefits of datagram protocols, too; in particular, the lower overhead and reduced latency. these features are especially useful for one of the most common areas in which dtls comes into play: webrtc. ...
...cifications rfc 6347: datagram transport layer security version 1.2 datagram transport layer security protocol version 1.3 draft specification related specifications rfc 5763: framework for establishing a secure real-time transport protocol (srtp) security context using dtls rfc 5764: dtls extension to establish keys for the secure real-time transport protocol (srtp) rfc 6083: dtls for
stream control transmission protocol (sctp) rfc 8261: datagram transport layer security (dtls) encapsulation of sctp packets rfc 7350: datagram transport layer security (dtls) as transport for session traversal utilities for nat (stun) rfc 7925: tls / dtls profiles for the internet of things ...
SCTP - MDN Web Docs Glossary: Definitions of Web-related terms
sctp (
stream control transmission protocol) is an ietf standard for a transport protocol which enables the reliable, in-order transmission of messages while offering congestion control, multi-homing, and other features to improve reliability and stability of the connection. it's used for sending traditional telephone calls over the internet, but is also used for webrtc data. ...
...ransmission protocol) is an ietf standard for a transport protocol which enables the reliable, in-order transmission of messages while offering congestion control, multi-homing, and other features to improve reliability and stability of the connection. it's used for sending traditional telephone calls over the internet, but is also used for webrtc data. learn more general knowledge rfc 4960:
stream control transmission protocol
stream control transmission protocol on wikipedia ...
Properly configuring server MIME types - Learn web development
as new content types are invented or added to web servers, web administrators may fail to add the new mime types to their web server's configuration. this is a major source of problems for users of gecko-based browsers, which respect the mime types as reported by web servers and web applications. ...
...hat are mime types? mime types describe the media type of content either in email or served by web servers or web applications and are intended to help guide a web browser in how the content is to be processed and displayed. examples of mime types are: text/html for normal web pages text/plain for plain text text/css for cascading style sheets text/javascript for scripts application/octet-
stream meaning "download this file" application/x-java-applet for java applets application/pdf for pdf documents technical background registered values for mime types are available in iana | mime media types. the http specification defines a superset of mime which is used to describe the media types used on the web. why are correct mime types important? if the web server or application reports a...
Introduction to the server side - Learn web development
me code (e.g. html and javascript). perhaps the most significant benefit of server-side code is that it allows you to tailor website content for individual users. dynamic sites can highlight content that is more relevant based on user preferences and habits. it can also make sites easier to use by storing personal preferences and information — for example reusing stored credit card details to
streamline subsequent payments. it can even allow interaction with users of the site, sending notifications and updates via email or through other channels. all of these capabilities enable much deeper engagement with users. in the modern world of web development, learning about server-side development is highly recommended. what is server-side website programming? web browsers communicate with web ...
...a website may collect a lot of data about users: what they search for, what they buy, what they recommend, how long they stay on each page. server-side programming can be used to refine responses based on analysis of this data. for example, amazon and google both advertise products based on previous searches (and purchases). note: if you're a facebook user, go to your main feed and look at the
stream of posts. note how some of the posts are out of numerical order - in particular, posts with more "likes" are often higher on the list than more recent posts. also look at what kind of ads you are being shown — you might see ads for things you looked at on other sites. facebook's algorithm for highlighting content and advertising can be a bit of a mystery, but it is clear that it does depend on...
Framework main features - Learn web development
domain-specific languages all of the frameworks discussed in this module are powered by javascript, and all allow you to use domain-specific languages (dsls) in order to build your applications. in particular, react has popularized the use of jsx for writing its components, while ember utilizes handlebars. unlike html, these languages know how to read data variables, and this data can be used to
streamline the process of writing your ui. angular apps often make heavy use of typescript. typescript is not concerned with the writing of user interfaces, but it is a domain-specific language, and has significant differences to vanilla javascript. dsls can't be read by the browser directly; they must be transformed into javascript or html first. transformation is an extra step in the development pro...
...ipt. dsls can't be read by the browser directly; they must be transformed into javascript or html first. transformation is an extra step in the development process, but framework tooling generally includes the required tools to handle this step, or can be adjusted to include this step. while it is possible to build framework apps without using these domain-specific languages, embracing them will
streamline your development process and make it easier to find help from the communities around those frameworks. jsx jsx, which stands for javascript and xml, is an extension of javascript that brings html-like syntax to a javascript environment. it was invented by the react team for use in react applications, but can be used to develop other applications — like vue apps, for instance. the followi...
Handling common JavaScript problems - Learn web development
ine, making it take up far less file size. it is ugly, but you don't need to read it when it is finished! this is best done using a minification tool like uglify (there's also an online version — see jscompress.com) when using apis, make sure you turn off the api features when they are not being used; some api calls can be really expensive on processing power. for example, when showing a video
stream, make sure it is turned off when you can't see it. when tracking a device's location using repeated geolocation calls, make sure you turn it off when the user stops using it. animations can be really costly for performance. a lot of javascript libraries provide animation capabilities programmed by javascript, but it is much more cost effective to do the animations via native browser features lik...
...hrown, and some things will be disallowed that would otherwise be acceptable. it is arguably a good idea to use strict mode, as it makes for better, more efficient code, however it has limited/patchy support across browsers (see strict mode in browsers). typed arrays allow javascript code to access and manipulate raw binary data, which is necessary as browser apis for example start to manipulate
streams of raw video and audio data. these are available in ie10 and above, and all modern browsers. there are also many new apis appearing in recent browsers, which don't work in older browsers, for example: indexeddb api, web storage api, and others for storing website data on the client-side. web workers api for running javascript in a separate thread, helping to improve performance. webgl api...
Command line crash course - Learn web development
before you go any further, open your terminal program! navigation...
... and outputs that count to the terminal instead: ls | wc -l since ls prints each file or directory on its own line, that effectively gives us a directory and file count. so what is going on here? a general philosophy of (unix) command line tools is that they print text to the terminal (also referred to "printing to standard output" or stdout). a good deal of commands can also read content from
streamed input (known as "standard input" or stdin). the pipe operator can connect these inputs and outputs together, allowing us to build up increasingly more complex operations to suit our needs — the output from one command can become the input to the next command. in this case, ls would normally print its output to stdout, but instead ls’s output is being piped into wc, which takes that output ...
Software accessibility: Where are we today?
text-to-speech (tts) makes the computer talk to the user: those who can't read print at all usually use talking programs (text-to-speech). talking programs are also useful for print disabilities other than visual impairments, such as dyslexia. additionally, text-to-speech is used by those who cannot speak, in place of their own voice. finally, this technology could be useful to main
stream users, on portable information appliances, or to access information when the eyes are busy elsewhere. magnification enlarges the screen's contents: for those with low vision, it may suffice to use a larger font, a built-in high contrast theme, or even just an an extra large screen. otherwise, screen magnification programs may be used, which allow zooming in to portions of the screen...
...e the switch when the desired option is highlighted. special keyboards exist to make data entry easier. however, any special features are generally handled in the keyboard itself, so that no special programming is required. speech recognition technology lets people talk to the computer. this technology has come a long way, but still needs to be more integrated into main
stream software. consistent keyboard support and hotkeys many people can't use a mouse. extremely consistent keystroke support is a very important consideration. blind testers have knack for finding ways to improve keystroke support in almost any given piece of software. testing with people that have disabilities generally benefits everyone. use the accessible toolkit checklist to make sur...
How Mozilla's build system works
ndbox. this code is used to restrict the environment moz.build files are executed under. reader.py contains the code that defines the moz.build sandbox (the mozbuildsandbox class) and the code for traversing a tree of moz.build files (the buildreader class) by following dirs and tiers variables. a buildreader is instantiated with a configuration, is told to read the source tree, and then emits a
stream of mozbuildsandbox instances corresponding to the executed moz.build files. the mozbuildsandbox
stream produced by the buildreader is typically fed into the treemetadataemitter class from emitter.py. the role of treemetadataemitter is to convert the low-level mozbuildsandbox dictionaries into higher-level function-specific data structures. these data structures are the classes defined in data.py...
...emetadataemitter class from emitter.py. the role of treemetadataemitter is to convert the low-level mozbuildsandbox dictionaries into higher-level function-specific data structures. these data structures are the classes defined in data.py. each class defines a specific aspect of the build system, such as directories to traverse, c++ files to compile, and so on. the treemetadataemitter output is a
stream of instances of these classes. the build system
stream describing class instances emitted from treemetadataemitter is then fed into a build backend. a build backend is simply an instance of a child class of a buildbackend from base.py (in the mozbuild.backend package now, not mozbuild.frontend). the child class implements methods for processing individual class instances as well as common hook p...
Simple Instantbird build
a sibling folder to your source directory. use an absolute path to be sure! building instantbird what you need to do to build instantbird rather than firefox is: echo 'ac_add_options --enable-application=im' >> .mozconfig to start the build, cd into the comm-central subdirectory (created automatically by the hg clone command), and run: ./mozilla/mach build mach is our command-line tool to
streamline common developer tasks. see the mach article for more. building can take a significant amount of time, depending on your system, os, and chosen build options. linux builds on a fast box may take under 15 minutes, but windows builds on a slow box may take several hours. building purplexpcom and libpurple first download the purplexpcom code: hg clone http://hg.mozilla.org/users/florian_quez...
...to update and build again simply re-run the mach command above. this will only recompile files that changed. incremental builds when you are working on your own patches, an incremental build is often enough, and is very fast indeed. this will only rebuild a particular folder. so, for instantbird, you would run mach build im which has been configured to automatically rebuild /chat as well. up
stream changes to fetch the latest up
stream changes, in your comm-central directory, run the same command as before: python client.py checkout problems building? have you: tried a clobber? this means deleting the object directory so that your next build is completely fresh. to do this you can use mach clobber checked the instantbird buildbot for known failures at the time you pulled the co...
How Mozilla determines MIME Types
content sniffing (never extension sniffing) to find out the real type of the image. if the server did not send a content-type header, mozilla uses the unknown decoder to find a mime type. file uris for file: uris, mozilla will ask the externalhelperappservice for a mime type. ftp like http uris without a mime type, ftp uris go through the unknown decoder. unknown decoder located at netwerk/
streamconv/converters/nsunknowndecoder.cpp, the interesting part starts at line 287, the ssnifferentries array together with the determinecontenttype function. it does the following: checks the start of the file for "magic numbers"; this can currently detect pdf and postscript. if the file starts with <?xml, asks the externalhelperappservice for a mime type for the uri. this is done because the gene...
...ntent. this should allow reliable detection of all image types mozilla supports. checks whether the data is html by looking for some common html tags. the uri is handed to the externalhelperappservice for mime type guessing if all else fails, the buffer (i.e. the first few bytes of the file) is searched for embedded nulls; if none are found, text/plain will be used, otherwise application/octet-
stream. externalhelperappservice (located at uriloader/exthandler/nsexternalhelperappservice.cpp) the file->mime type mapping works like this: on beos, the operating system is asked for the type of the file (not quite yet, bug 217723) on macos, the type and creator code will be used to lookup the type of the file from the os a hardcoded list of extensions is checked (containing currently 13 ent...
An overview of NSS Internals
time nss has received three different asn.1 parser implementations, each having their own specific properties, advantages and disadvantages, which is why all of them are still being used (nobody has yet dared to replace the older with the newer ones because of risks for side effects). when using the asn.1 parser(s), a template definition is passed to the parser, which will analyze the asn.1 data
stream accordingly. the templates are usually closely aligned to definitions found in rfc documents. a data block described as der is usually in asn.1 format. you must know which data you are expecting, and use the correct template for parsing, based on the context of your software's interaction. data described as pem is a base64 encoded presentation of der, usually wrapped between human readable beg...
...downloading a crl (certificate revocation list). however, nss doesn't have an implementation to work with network proxies. if you must support proxies in your application, you are able to register your own implementation of an http request callback interface, and nss can use your application code that supports proxies. when using hashing, encryption, and decryption functions, it is possible to
stream data (as opposed to operating on a large buffer). create a context handle while providing all the parameters required for the operation, then call an “update” function multiple times to pass subsets of the input to nss. the data will be processed and either returned directly or sent to a callback function registered in the context. when done, you call a finalization function that will flush o...
JSS FAQ
setcipherpolicy does not need to be called by a jss app unless that app wants to limit itself to export-allowed cipher suites. my ssl connection...
... data in java with jss? what i am trying to do is write a java applet that will access the netscape certificate store, retrieve a x509 certificate and then sign some data. the best way to do this is with the pkcs #7 signeddata type. check out the javadoc. how do i convert org.mozilla.jss.crypto.x509certificate to org.mozilla.jss.pkix.cert.certificate? import java.io.bytearrayinput
stream; [...] certificate cert = (certificate) asn1util.decode( certificate.gettemplate(),x509cert.getencoded() ); how do i convert org.mozilla.jss.pkix.cert to org.mozilla.jss.crypto.x509certificate? cryptomanager.importcertpackage() is it possible to use jss to acces cipher functionality from pkcs11 modules? yes. before jss 3.2 you would use cryptomanager to obtain the ...
Python binding for NSS
lia_128_cbc_sha ssl.tls_rsa_with_camellia_256_cbc_sha ssl.tls_rsa_with_des_cbc_sha ssl.tls_rsa_with_idea_cbc_sha ssl.tls_rsa_with_null_md5 ssl.tls_rsa_with_null_sha ssl.tls_rsa_with_null_sha256 ssl.tls_rsa_with_rc4_128_md5 ssl.tls_rsa_with_rc4_128_sha ssl.tls_rsa_with_seed_cbc_sha ssl.ssl_variant_datagram ssl.ssl_variant_
stream ssl.ssl_library_version_2 ssl.ssl_library_version_3_0 ssl.ssl_library_version_tls_1_0 ssl.ssl_library_version_tls_1_1 ssl.ssl_library_version_tls_1_2 ssl.ssl_library_version_tls_1_3 ssl.ssl2 ssl.ssl3 ssl.tls1.0 ssl.tls1.1 ssl.tls1.2 ssl.tls1.3 the following methods were missing thread locks, this...
...ed, but earlier code failed to to that. it's is not likely that an previous code was failing to pass initialization data or the der_is_signed flag so this change should be backwards compatible. fix bug #922247, pkcs12decoder.database_import() method. importing into a nss database would sometimes fail or segfault. error codes and descriptions were updated from up
stream nspr & nss. the password callback did not allow for breaking out of a password prompting loop, now if none is returned from the password callback the password prompting is terminated. nss.nss_shutdown_context now called from initcontext destructor, this assures the context is shutdown even if the programmer forgot to. it's still best to explicitly shut it down,...
NSS functions
ater ssl_invalidatesession mxr 3.2 and later ssl_localcertificate mxr 3.4 and later ssl_optionget mxr 3.2 and later ssl_optiongetdefault mxr 3.2 and later ssl_optionset mxr 3.2 and later ssl_optionsetdefault mxr 3.2 and later ssl_peercertificate mxr 3.2 and later ssl_preencryptedfileto
stream mxr 3.2 and later ssl_preencrypted
streamtofile mxr 3.2 and later ssl_rehandshake mxr 3.2 and later ssl_rehandshakewithtimeout mxr 3.11.4 and later ssl_resethandshake mxr 3.2 and later ssl_restarthandshakeaftercertreq mxr 3.2 and later ssl_restarthandshakeafterservercert mxr 3.2 and later ssl_r...
... mxr 3.2 and later sec_asn1encode mxr 3.2 and later sec_asn1encodeinteger mxr 3.2 and later sec_asn1encodeitem mxr 3.2 and later sec_asn1encoderabort mxr 3.9 and later sec_asn1encoderclearnotifyproc mxr 3.2 and later sec_asn1encoderclear
streaming mxr 3.2 and later sec_asn1encodercleartakefrombuf mxr 3.2 and later sec_asn1encoderfinish mxr 3.2 and later sec_asn1encodersetnotifyproc mxr 3.2 and later sec_asn1encoderset
streaming mxr 3.2 and later sec_asn1encodersettakefrombuf mxr 3.2 and l...
NSS Tools ssltap
ts for an incoming connection from the client side. once this connection arrives, the tool makes another connection to the specified host name and port on the server side. it passes any data sent by the client to the server and vice versa. the tool also displays the data to the shell window from which it was called. it can do this for plain http connections or any tcp protocol, as well as for ssl
streams, as described here. the tool cannot and does not decrypt any encrypted message data. you use the tool to look at the plain text and binary data that are part of the handshake procedure, before the secure connection is established. syntax to run the ssl debugging tool, type this command in a command shell: ssltap [-vhfsxl] [-p port] hostname:port options the command does not requ...
...ut the page is intercepted and passed on to the browser by the debugging tool on intercept. on its way to the browser, the data is printed to the command shell from which you issued the command. data sent from the client to the server is surrounded by the following symbols: --> [ data ] data sent from the server to the client is surrounded by the following symbols: <-- [ data ] the raw data
stream is sent to standard output and is not interpreted in any way. this can result in peculiar effects, such as sounds, flashes, and even crashes of the command shell window. to output a basic, printable interpretation of the data, use the -h option, or, if you are looking at an ssl connection, the -s option. you will notice that the page you retrieved looks incomplete in the browser. this is because...
Rhino shell
therwise it is converted to string denoting the last argument and options objects assumed to be empty. the following properties of the option object are processed: args - provides an array of additional command arguments env - explicit environment object. all its enumeratable properties define the corresponding environment variable names. input - the process input. if it is not java.io.input
stream, it is converted to string and sent to the process as its input. if not specified, no input is provided to the process. output - the process output instead of java.lang.system.out. if it is not instance of java.io.output
stream, the process output is read, converted to a string, appended to the output property value converted to string and put as the new value of the output property. err - the p...
... is provided to the process. output - the process output instead of java.lang.system.out. if it is not instance of java.io.output
stream, the process output is read, converted to a string, appended to the output property value converted to string and put as the new value of the output property. err - the process error output instead of java.lang.system.err. if it is not instance of java.io.output
stream, the process error output is read, converted to a string, appended to the err property value converted to string and put as the new value of the err property. seal(object) seal the specified object so any attempt to add, delete or modify its properties would throw an exception. serialize(object, filename) serialize the given object to the specified file. spawn(functionorscript) run the giv...
imgILoader
imgirequest loadimage( in nsiuri auri, in nsiuri ainitialdocumenturl, in nsiuri areferreruri, in nsiprincipal aloadingprincipal, in nsiloadg...
...adimagewithchannel() start the load and decode of an image. libpr0n does not keep a strong ref to the observer; this prevents reference cycles. this means that callers of loadimagewithchannel should make sure to cancel() the resulting request before the observer goes away. imgirequest loadimagewithchannel( in nsichannel achannel, in imgidecoderobserver aobserver, in nsisupports cx, out nsi
streamlistener alistener ); parameters achannel the channel to load the image from. this must already be opened before this method is called, and there must have been no ondataavailable calls for it yet. aobserver the observer (may be null) cx some random data. alistener a listener that you must send the channel's notifications and data to. can be null, in which case imagelib has found a cached image ...
mozITXTToHTMLConv
the mozitxttohtmlconv interface is used to convert text into html format. its primary use is in converting user-entered text into properly-formatted html. netwerk/
streamconv/public/mozitxttohtmlconv.idlscriptable please add a summary to this article. ...
... the mozitxttohtmlconv interface is used to convert text into html format. its primary use is in converting user-entered text into properly-formatted html. netwerk/
streamconv/public/mozitxttohtmlconv.idlscriptable please add a summary to this article. ...
nsICache
icachesession and nsicacheentrydescriptor for more details. requires the cache entry to reside in persistent storage, and in a separate file. store_offline 4 the storage policy of a cache entry determines the device(s) to which it belongs. see nsicachesession and nsicacheentrydescriptor for more details. requires the cache entry to reside in persistent, reliable storage for offline use. ...
...equires the cache entry to reside in persistent storage, and in a separate file. store_offline 4 the storage policy of a cache entry determines the device(s) to which it belongs. see nsicachesession and nsicacheentrydescriptor for more details. requires the cache entry to reside in persistent, reliable storage for offline use. not_
stream_based 0 all entries for a cache session are stored as
streams of data or as objects. this constant specify that cache session is not a
stream based entry when calling nsicacheservice.createsession() method.
stream_based 1 all entries for a cache session are stored as
streams of data or as objects. this constant specify that cache session is a
stream based entry when calling nsicacheservice.createsession() method. non_blocking 0 the synchronous opencach...
nsICacheEntryInfo
read only. datasize unsigned long get the cache entry data size. read only. deviceid string get the id for the device that stores this cache entry. read only. expirationtime pruint32 get the expiration time of the cache entry (in seconds since the epoch). read only. ...
.... read only. fetchcount long get the number of times the cache entry has been opened. read only. key acstring get the key identifying the cache entry. read only. lastfetched pruint32 get the last time the cache entry was opened (in seconds since the epoch). read only. lastmodified pruint32 get the last time the cache entry was modified (in seconds since the epoch). read only. methods is
streambased() this method finds out whether or not the cache entry is
stream based. boolean is
streambased(); parameters none. return value returns true if the cache entry is
stream based, otherwise returns false. see also nsicache nsicachevisitor ...
nsICachingChannel
support for "pinning" cached data in the cache (for printing and save-as). support for uniquely identifying cached data in cases when the url is insufficient. for example a http form submission. ...
... error of ns_error_document_not_cached will be sent to the listener's onstoprequest in this case. this flag is set automatically when the application is offline. load_only_if_modified 1 << 31 this load flag controls what happens when a document would be loaded from the cache to satisfy a call to asyncopen. if this attribute is set to true, then the document will not be loaded from the cache. a
stream listener can check isfromcache() to determine if the asyncopen will actually result in data being
streamed. if this flag has been set, and the request can be satisfied via the cache, then the ondataavailable events will be skipped. the listener will only see onstartrequest followed by onstoprequest. methods isfromcache() obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / ...
nsICryptoHMAC
orithms. 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview acstring finish(in prbool aascii); void init(in unsigned long aalgorithm, in nsikeyobject akeyobject); void reset(); void update([const, array, size_is(alen)] in octet adata, in unsigned long alen); void updatefrom
stream(in nsiinput
stream a
stream, in unsigned long alen); constants hashing algorithms. these values are to be used by the init() method to indicate which hashing function to use. these values map onto the values defined in mozilla/security/nss/lib/softoken/pkcs11t.h and are switched to ckm_*_hmac constant. constant value description md2 1 message digest algorithm 2 ...
...ettings (the key and hash algorithm) but on different set of data. void reset(); parameters none. update() void update( [const, array, size_is(alen)] in octet adata, in unsigned long alen ); parameters adata a buffer to calculate the hash over. alen the length of the buffer adata. exceptions thrown ns_error_not_initialized if init() has not been called. updatefrom
stream() calculates and updates a new hash based on a given data
stream. void updatefrom
stream( in nsiinput
stream a
stream, in unsigned long alen ); parameters a
stream an input
stream to read from. alen how much to read from the given a
stream. passing pr_uint32_max indicates that all data available will be used to update the hash. exceptions thrown ns_error_not_initialized ...
nsIDownloader
netwerk/base/public/nsidownloader.idlscriptable a special implementation of a nsi
streamlistener that will make the contents of the
stream available as a file. this may utilize the disk cache as an optimization to avoid an extra copy of the data on disk. the resulting file is valid from the time the downloader completes until the last reference to the downloader is released. inherits from: nsi
streamlistener last changed in gecko 1.7 method overview void init(in nsidownloadobserver observer, in nsifile downloadlocation); methods init() initialize this downloader. void init( in nsidownloadobserver observer, in nsifile downloadlocation ); parameters observer the nsidownloadobserver to be notified when the download completes. downloadlocation the l...
...last changed in gecko 1.7 method overview void init(in nsidownloadobserver observer, in nsifile downloadlocation); methods init() initialize this downloader. void init( in nsidownloadobserver observer, in nsifile downloadlocation ); parameters observer the nsidownloadobserver to be notified when the download completes. downloadlocation the location where the
stream contents should be written. if null, the downloader will select a location and the resulting file will be deleted (or otherwise made invalid) when the downloader object is destroyed. if an explicit download location is specified then the resulting file will not be deleted, and it will be the callers responsibility to keep track of the file, and so on. ...
nsIMsgDatabase
nsmsgkey readonly: highwaterarticlenum nsmsgkey readonly: nextpseudomsgkey nsmsgkey for undo-redo of move pop->imap. nextfakeofflinemsgkey nsmsgkey readonly: for saving "fake" offline msg hdrs. defaultviewflags nsmsgviewflagstypevalue readonly: defaultsorttype nsmsgviewsorttypevalue readonly: defaultsortorder nsmsgviewsortordervalue readonly: msghdrcachesize unsigned long folder
stream nsioutput
stream summaryvalid boolean methods open() opens a database folder. void open(in nsilocalfile afoldername, in boolean acreate, in boolean aleaveinvaliddb); parameters afoldername the name of the folder to create. acreate whether or not the file should be created. aleaveinvaliddb set to true if you do not want the database to bedeleted if it is invalid. ...
...() to delete the messages. otherwise, we'll just delete them from the db. void applyretentionsettings(in nsimsgretentionsettings amsgretentionsettings, in boolean adeleteviafolder); hasnew() boolean hasnew(); clearnewlist() void clearnewlist(in boolean notify); addtonewlist() void addtonewlist(in nsmsgkey key); startbatch() batching - can be used to cache file
stream for local mail, and perhaps to use the mdb batching mechanism as well. void startbatch(); endbatch() void endbatch(); getofflineopforkey() offline operations - we could move these into an offline operation interface but it would have to be in nsmaildatabase, since local folders can be move destinations. nsimsgofflineimapoperation getofflineopforkey(in nsmsgkey messagekey, ...
nsIPluginHost
ve code only! void instantiateembeddedplugin(in string amimetype, in nsiuri aurl, in nsiplugininstanceowner aowner); native code only! void instantiateembededplugin(in string amimetype, in nsiuri aurl, in nsiplugininstanceowner aowner); obsolete since gecko 1.8 void instantiatefullpageplugin(in string amimetype, in nsiuri auri, in nsiplugininstanceowner aowner, out nsi
streamlistener a
streamlistener); native code only! nsi
streamlistener instantiatepluginforchannel(in nsichannel achannel, in nsiplugininstanceowner aowner); native code only! void ispluginenabledforextension(in string aextension, in constcharstarref amimetype); native code only! void ispluginenabledfortype(in string amimetype); native code only! void loadplugins(); na...
...te since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) void instantiateembededplugin( in string amimetype, in nsiuri aurl, in nsiplugininstanceowner aowner ); parameters amimetype aurl aowner native code only!instantiatefullpageplugin void instantiatefullpageplugin( in string amimetype, in nsiuri auri, in nsiplugininstanceowner aowner, out nsi
streamlistener a
streamlistener ); parameters amimetype auri aowner a
streamlistener native code only!instantiatepluginforchannel instantiate an embedded plugin for an existing channel. the caller is responsible for opening the channel. it may or may not be already opened when this function is called. nsi
streamlistener instantiatepluginforchannel( in nsichannel achannel, in n...
nsIRequestObserver
inherits from: nsisupports last changed in gecko 1.0 method overview void onstartrequest(in nsirequest arequest, in nsisupports acontext); void onstoprequest(in nsirequest arequest, in nsisupports acontext, in nsresult astatuscode); methods onstartrequest() called to signify the beginning of an asynchronous request. note: an exception thrown from onstartrequest has the side-effect of causing the request to be canceled. ...
...y a call to onstartrequest(). ...
nsIResumableChannel
netwerk/base/public/nsiresumablechannel.idlscriptable this interface is meant to be implemented by the channels that support resuming broken downloads (for example necko's html and ftp channels). inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void asyncopenat(in nsi
streamlistener listener, in nsisupports ctxt, in unsigned long startpos, in nsiresumableentityid entityid); obsolete since gecko 1.8 void resumeat(in unsigned long long startpos, in acstring entityid); attributes attribute type description entityid acstring the entity id for this uri. available after onstartrequest. read only. exceptions thrown ns_error_not_resumable if this load is not resumable. methods asyncopenat() ...
...te type description entityid acstring the entity id for this uri. available after onstartrequest. read only. exceptions thrown ns_error_not_resumable if this load is not resumable. methods asyncopenat() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) open this channel, and read starting at the specified offset. the request given to the nsi
streamlistener will be qiable to nsiresumableinfo. void asyncopenat( in nsi
streamlistener listener, in nsisupports ctxt, in unsigned long startpos, in nsiresumableentityid entityid ); parameters listener as for asyncopen. ctxt as for asyncopen. startpos the starting offset, in bytes, to use to download. entityid information about the file, to match before obtaining the file. pass an empty stri...
nsITXTToHTMLConv
method overview void preformathtml(in boolean value); void settitle(in wstring text); prior versions of the interface named the methods using the initialcaps style instead of the intercaps style. methods preformathtml() specifies whether or not to wrap the resulting html in an <pre> block. ...
... method overview void preformathtml(in boolean value); void settitle(in wstring text); prior versions of the interface named the methods using the initialcaps style instead of the intercaps style. methods preformathtml() specifies whether or not to wrap the resulting html in an <pre> block. ...
nsIWebBrowserPersist
ave(); void savechannel(in nsichannel achannel, in nsisupports afile); void savedocument(in nsidomdocument adocument, in nsisupports afile, in nsisupports adatapath, in string aoutputcontenttype, in unsigned long aencodingflags, in unsigned long awrapcolumn); void saveuri(in nsiuri auri, in nsisupports acachekey, in nsiuri areferrer, in long areferrerpolicy, in nsiinput
stream apostdata, in string aextraheaders, in nsisupports afile, in nsiloadcontext aprivacycontext); void saveprivacyawareuri(in nsiuri auri, in nsisupports acachekey, in nsiuri areferrer, in long areferrerpolicy, in nsiinput
stream apostdata, in string aextraheaders, in nsisupports afile, in boolean aisprivate); attributes attribute type description currentstate ...
... downloads.createdownload() instead. as of firefox 36, a new parameter areferrerpolicy was added as the fourth argument, changing the number of parameters from 7 to 8 and shifting the order of the parameters in a backwards incompatible way. save the specified uri to file. void saveuri( in nsiuri auri, in nsisupports acachekey, in nsiuri areferrer, in long areferrerpolicy, in nsiinput
stream apostdata, in string aextraheaders, in nsisupports afile, in nsiloadcontext aprivacycontext ); parameters auri uri to save to file. some implementations of this interface may also support nsnull to imply the currently loaded uri. acachekey an object representing the uri in the cache or nsnull. this can be a necko cache key, an nsiwebpagedescriptor, or the currentdescriptor of an nsi...
Mail client architecture overview
sages. the base module consists of the following basic building blocks account management - the account manager is the root object of the server/folder/message hierarchy. it manages individual accounts on mail servers and the identity of users as used to send mail. folders - mail folders contain messages and folders. all folders have folder indexes. messages - messages are always stored and
streamed in rfc822 format. whenever multiple messages are stored in one file, the berkeley mailbox format is used. datasources - datasources are the glue code that reflect mail data such as folders and messages into rdf. rdf will use the datasource to create user interfaces based on this data. datasources are also used to run commands that operate on this mail data. events - as data changes throughout...
...ions such as downloading new mail, copying and moving messages, and displaying messages from a remote server, the url system interacts with necko and reflects it's state to the mail window. there are also a number of protocol independant subsystems that have a symbiotic relationship with base: libmime - for dealing with rfc822 messages and their mime parts. this library has the cabability to
stream messages to an html renderer such as gecko, manage individual parts of messages, and so forth. msgdb - a message database for a given folder is a summary of some of the key attributes in a folder such as the author and subject. finally, there are larger modules outside of the mail client that are mail-oriented. most of these modules have little dependancy on the mail reader itself: compose ...
Mail composition back end
const prunichar *amsg, - a status message pruint32 atotaltried, - the total messages that were attempted pruint32 asuccessful) = 0; - the number of successful messages quoting quoting a mail message is made possible via the nsimsgquote interface. ...
...utput
stream for the quoted data. the message will be output in html form and it is up to the caller to handle plain text conversion. createandsendmessage the quotemessage method is the primary interface for message quoting. ns_imethod quotemessage( const prunichar *msguri, - the uri of the message to be quoted nsioutput
stream *out
stream) = 0; - the consumer output
stream for the quoted data sample programs the mozilla/mailnews/compose/tests/ directory contains sample test programs for all of the above described interfaces. use at your own risk and beware of bitrot! compose - this program shows the use of the createandsendmessage interface (createandsendmessage) compose2 - this program shows...
libmime content type handlers
e out of date. it was imported from mozilla.org and last updated in 2001. by richard h. pizzarro <rhp@netscape.com> contents overview api's plugin location/installation sample content type handler plugin overview the libmime module implements a general-purpose mime parser and one of the primary methods provided by the parser is the ability to emit an html representation of an input
stream. the primary use of libmime is to parse and render rfc822 messages for use by the messenger component of seamonkey. a necessary capability of this module is to dynamically add the ability to decode and render various content types. this functionality will be accomplished via content type handler plugins for libmime. libmime has a homegrown object system written in c, and since the content type ...
...nstallation of these modules will be similar to the that of any xpcom component (i.e. the components directory for the bin directory). sample content type handler plugin to see an example of a content type handler plugin, the source for the handler of the content type "text/calendar" can be viewed at the following link: calendar plugin note: this plugin simply creates a blue table in the output
stream to identify the fact that it is operational, but the basic constructs of what is needed to build a functional content type handler can be seen. the uuid for this component is: // {20dabda1-f8b5-11d2-8ee0-00a024a7d144} #define ns_vcard_content_type_handler_cid \ { 0x20dabda1, 0xf8b5, 0x11d2, \ { 0x8e, 0xe0, 0x0, 0xa0, 0x24, 0xa7, 0xd1, 0x44 } } ...
Structures - Plugins
npembedprint substructure of npprint that contains platform-specific information used during embedded mode printing. ...
...nt during embedded mode printing. nprect represents a rectangular area of a page. npregion represents a platform-defined region of a page. npsaveddata block of instance information saved after the plug-in is deleted; can be returned to the plug-in. npsetwindowcallbackstruct contains information about the plug-in's unix window environment. np
stream represents a
stream of data either produced by the browser and consumed by the plug-in, or produced by the plug-in and consumed by the browser. npwindow contains information about the target into which the plug-in instance can draw. « previousnext » ...
AudioBufferSourceNode.AudioBufferSourceNode() - Web APIs
ates a new audiobuffersourcenode object instance. syntax var audiobuffersourcenode = new audiobuffersourcenode(context, options) parameters inherits parameters from the audionodeoptions dictionary. context a reference to an audiocontext. options optional options are as follows: buffer: an instance of audiobuffer to be played. detune: a value in cents to modulate the speed of audio
stream rendering. its nominal range is (-∞ to +∞). the default is 0. loop: a boolean indicating whether the audio should play in a loop. the default is false. if the loop is dynamically modified during playback, the new value will take effect on the next processing block of audio. loopend: an optional value, in seconds, where looping should end if the loop attribute is true. the default is 0. it...
...if loopstart is greater than the duration of the buffer, looping will begin at the end of the buffer. this attribute is converted to an exact sample frame offset within the buffer, by multiplying by the buffer's sample rate and rounding to the nearest integer value. thus, its behavior is independent of the value of the playbackrate parameter. playbackrate: the speed at which to render the audio
stream. its default value is 1. this parameter is k-rate. this is a compound parameter with detune. its nominal range is (-∞ to +∞). return value a new audiobuffersourcenode object instance. specifications specification status comment web audio apithe definition of 'audiobuffersourcenode()' in that specification. working draft initial definition. browser...
BaseAudioContext - Web APIs
context.decodeaudiodata when it successfully decodes an audio track. baseaudiocontext.createconstantsource() creates a constantsourcenode object, which is an audio source that continuously outputs a monaural (one-channel) sound signal whose samples all have the same value. baseaudiocontext.createchannelmerger() creates a channelmergernode, which is used to combine channels from multiple audio
streams into a single audio
stream. baseaudiocontext.createchannelsplitter() creates a channelsplitternode, which is used to access the individual channels of an audio
stream and process them separately. baseaudiocontext.createconvolver() creates a convolvernode, which can be used to apply convolution effects to your audio graph, for example a reverberation effect. baseaudiocontext.createdelay() c...
.... baseaudiocontext.createiirfilter() creates an iirfilternode, which represents a second order filter configurable as several different common filter types. baseaudiocontext.createoscillator() creates an oscillatornode, a source representing a periodic waveform. it basically generates a tone. baseaudiocontext.createpanner() creates a pannernode, which is used to spatialise an incoming audio
stream in 3d space. baseaudiocontext.createperiodicwave() creates a periodicwave, used to define a periodic waveform that can be used to determine the output of an oscillatornode. baseaudiocontext.createscriptprocessor() creates a scriptprocessornode, which can be used for direct audio processing via javascript. baseaudiocontext.createstereopanner() creates a stereopannernode, which can be used ...
Blob - Web APIs
blobs can represent data that isn't necessarily in a javascript-native format. the file interface is based on blob, inheriting blob functionality and expanding it to support files on the user's system. using blobs to construct a blob from other non-blob objects and data, use the blob() constructor. to create a blob that contains a subset of another blob's data, use the slice() method. ...
...pe of the data contained in the blob. if the type is unknown, this string is empty. instance methods blob.prototype.arraybuffer() returns a promise that resolves with an arraybuffer containing the entire contents of the blob as binary data. blob.prototype.slice() returns a new blob object containing the data in the specified range of bytes of the blob on which it's called. blob.prototype.
stream() returns a readable
stream that can be used to read the contents of the blob. blob.prototype.text() returns a promise that resolves with a usvstring containing the entire contents of the blob interpreted as utf-8 text. examples creating a blob the blob() constructor can create blobs from other objects. for example, to construct a blob from a json string: const obj = {hello: 'world'}; cons...
Body - Web APIs
the body mixin of the fetch api represents the body of the response/request, allowing you to declare what its content type is and how it should be handled. body is implemented by both request and response. this provides these objects with an associated body (a
stream), a used flag (initially unset), and a mime type (initially the empty byte sequence). properties body.body read only a simple getter used to expose a readable
stream of the body contents. body.bodyused read only a boolean that indicates whether the body has been read. methods body.arraybuffer() takes a response
stream and reads it to completion. it returns a promise that resolves with an arraybuffer. body.blob() takes a response
stream and reads it to completion. it returns a promise that resolves with a blob. bod...
...eam of the body contents. body.bodyused read only a boolean that indicates whether the body has been read. methods body.arraybuffer() takes a response
stream and reads it to completion. it returns a promise that resolves with an arraybuffer. body.blob() takes a response
stream and reads it to completion. it returns a promise that resolves with a blob. body.formdata() takes a response
stream and reads it to completion. it returns a promise that resolves with a formdata object. body.json() takes a response
stream and reads it to completion. it returns a promise that resolves with the result of parsing the body text as json. body.text() takes a response
stream and reads it to completion. it returns a promise that resolves with a usvstring (text). the response is always decoded usin...
Document.write() - Web APIs
syntax document.write(markup); parameters markup a string containing the text to be written to the document. ...
... syntax document.write(markup); parameters markup a string containing the text to be written to the document. ...
EventSource - Web APIs
the connection remains open until closed by calling eventsource.close(). once the connection is opened, incoming messages from the server are delivered to your code in the form of events. if there is an event field in the incoming message, the triggered event is the same as the event field value. if no event field is present, then a generic message event is fired. ...
...various tabs as the limit is per browser and set to a very low number (6). the issue has been marked as "won't fix" in chrome and firefox. this limit is per browser + domain, so that means that you can open 6 sse connections across all of the tabs to www.example1.com and another 6 sse connections to www.example2.com. (from stackoverflow). when using http/2, the maximum number of simultaneous http
streams is negotiated between the server and the client (defaults to 100). constructor eventsource() creates a new eventsource to handle receiving server-sent events from a specified url, optionally in credentials mode. properties this interface also inherits properties from its parent, eventtarget. eventsource.readystate read only a number representing the state of the connection. possibl...
HTMLCanvasElement - Web APIs
ements the mozcanvasprintstate interface. the callback can get the context to draw to from the printstate object and must then call done() on it when finished. the purpose of mozprintcallback is to obtain a higher resolution rendering of the canvas at the resolution of the printer being used. see this blog post. methods inherits methods from its parent, htmlelement. htmlcanvaselement.capture
stream() returns a canvascapturemedia
stream that is a real-time video capture of the surface of the canvas. htmlcanvaselement.getcontext() returns a drawing context on the canvas, or null if the context id is not supported. a drawing context lets you draw on the canvas. calling getcontext with "2d" returns a canvasrenderingcontext2d object, whereas calling it with "webgl" (or "experimental-webgl") ...
... ...
HTMLMediaElement.autoplay - Web APIs
note: sites which automatically play audio (or videos with an audio track) can be an unpleasant experience for users, so it should be avoided when possible. ...
... note: sites which automatically play audio (or videos with an audio track) can be an unpleasant experience for users, so it should be avoided when possible. ...
Recommended Drag Types - Web APIs
sk. as with links, the data for the text/plain type should also contain the url. however, a data: url is not usually useful in a text context, so you may wish to exclude the text/plain data in this situation. in chrome or other privileged code, you may also use the image/jpeg, image/png or image/gif types, depending on the type of image. the data should be an object which implements the nsiinput
stream interface. when this
stream is read, it should provide the data bits for the image, as if the image was a file of that type. you should also include the application/x-moz-file type if the image is located on disk. in fact, this a common way in which image files are dragged. it is important to set the data in the right order, from most-specific to least-specific. the standard image type, such as...
...is a common way in which image files are dragged. it is important to set the data in the right order, from most-specific to least-specific. the standard image type, such as image/jpeg, should come first, followed by the application/x-moz-file type. next, you should set the text/uri-list data, and finally the text/plain data. for example: var dt = event.datatransfer; dt.mozsetdataat("image/png",
stream, 0); dt.mozsetdataat("application/x-moz-file", file, 0); dt.setdata("text/uri-list", imageurl); dt.setdata("text/plain", imageurl); note the mozgetdataat() method is used for non-textual data. as some contexts may only include some of these types, it is important to check which type is made available when receiving dropped images. dragging nodes nodes and elements in a document may be dragged...
ImageCapture() constructor - Web APIs
the imagecapture() constructor creates a new imagecapture object. syntax const imagecapture = new imagecapture(videotrack) parameters videotrack a media
streamtrack from which the still images will be taken. this can be any source, such as an incoming
stream of a video conference, a playing movie, or the
stream from a webcam. return value a new imagecapture object which can be used to capture still frames from the specified video track. example the following example shows how to use a call to mediadevices.getusermedia() to retrieve the media
streamtrack needed by the imagecapture() constructor. ...
...nference, a playing movie, or the
stream from a webcam. return value a new imagecapture object which can be used to capture still frames from the specified video track. example the following example shows how to use a call to mediadevices.getusermedia() to retrieve the media
streamtrack needed by the imagecapture() constructor. navigator.mediadevices.getusermedia({video: true}) .then(media
stream => { document.queryselector('video').srcobject = media
stream const track = media
stream.getvideotracks()[0]; imagecapture = new imagecapture(track); }) .catch(error => console.log(error)); specifications specification status comment media
stream image capturethe definition of 'imagecapture' in that specification. working draft initial definition. ...
ImageCapture.grabFrame() - Web APIs
syntax const bitmappromise = imagecapture.grabframe() return value a promise that resolves to an imagebitmap object. example this example is extracted from this simple image capture demo. it shows how to use the promise returned by grabframe() to copy the returned frame to a <canvas> element. for simplicy it does not show how to instantiate the imagecapture object. ...
... working draft initial definition. ...
ImageCapture.takePhoto() - Web APIs
syntax const blobpromise = imagecaptureobj.takephoto([photosettings]) parameters photosettings optional an object that sets options for the photo to be taken. the available options are: filllightmode: the flash setting of the capture device, one of "auto", "off", or "flash". imageheight: the desired image height as an integer. the user agent selects the closest height value to this setting if it only supports discrete heights. ...
... working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafari...
MediaDevices.enumerateDevices() - Web APIs
og(device.kind + ": " + device.label + " id = " + device.deviceid); }); }) .catch(function(err) { console.log(err.name + ": " + err.message); }); this might produce: videoinput: id = cso9c0ypaf274oucpua53cne0yhlir2yxci+sqfbzz8= audioinput: id = rkxxbyjnabbadgqnnzqlvldmxls0yketycibg+xxnvm= audioinput: id = r2/xw1xupiyzunfv1lgrkoma5wtovckwfz368xcndm0= or if one or more media
streams are active or persistent permissions are granted: videoinput: facetime hd camera (built-in) id=cso9c0ypaf274oucpua53cne0yhlir2yxci+sqfbzz8= audioinput: default (built-in microphone) id=rkxxbyjnabbadgqnnzqlvldmxls0yketycibg+xxnvm= audioinput: built-in microphone id=r2/xw1xupiyzunfv1lgrkoma5wtovckwfz368xcndm0= specifications specification status comment media capture an...
... candidate recommendation initial definition. ...
MediaRecorder.mimeType - Web APIs
ia type strings, see the article media types on the iana site. see also media types to learn more about media types and how they're used in web content and by web browers. example ... if (navigator.mediadevices) { console.log('getusermedia supported.'); var constraints = { audio: true, video: true }; var chunks = []; navigator.mediadevices.getusermedia(constraints) .then(function(
stream) { var options = { audiobitspersecond: 128000, videobitspersecond: 2500000, mimetype: 'video/mp4' } var mediarecorder = new mediarecorder(
stream,options); m = mediarecorder; m.mimetype; // would return 'video/mp4' ... }) .catch(function(error) { console.log(error.message); }); changing line 14 to the following causes...
...c-lc (low complexity) for audio, which is good for mobile and other possible resource-constrained situations. mimetype: 'video/mp4; codecs="avc1.424028, mp4a.40.2"' assuming this configuration is acceptable to the user agent, the value returned later by m.mimetype would then be video/mp4; codecs="avc1.424028, mp4a.40.2". specifications specification status comment media
stream recordingthe definition of 'mediarecorder.mimetype' in that specification. working draft initial definition ...
MediaRecorder.onstop - Web APIs
in each case, the stop event is preceded by a dataavailable event, making the blob captured up to that point available for you to use in your application. ...
... working draft initial definition ...
MediaRecorder.pause() - Web APIs
when a mediarecorder object’s pause()method is called, the browser queues a task that runs the below steps: if mediarecorder.state is "inactive", raise a dom invalidstate error and terminate these steps. if not, continue to the next step. set mediarecorder.state to "paused". stop gathering data into the current blob, but keep it available so that recording can be resumed later on. raise a pause event. syntax mediarecorder.pause() return value undefined. exceptions invalidstateerror the mediarecorder is currently "inactive"; you can't pause recording if it's not active. ...
...e undefined. exceptions invalidstateerror the mediarecorder is currently "inactive"; you can't pause recording if it's not active. if you call pause() while already paused, it silently does nothing. example ... pause.onclick = function() { mediarecorder.pause(); console.log("recording paused"); } ... specifications specification status comment media
stream recordingthe definition of 'mediarecorder.pause()' in that specification. working draft initial definition ...
MediaRecorderErrorEvent() - Web APIs
in general, you won't create these yourself; they are delivered to your implementation of mediarecorder.onerror when errors occur while recording media. syntax var errorevent = new mediarecordererrorevent(errorinfo) parameters errorinfo an object describing the error object to be created. it must contain the error property at a minimum. error a domexception that describes the error that occurred. ...
...r fields may or may not be present. some user agents add to the error object other properties that provide information such as stack dumps, the name of the javascript file and the line number where the error occurred, and other debugging aids, but you should not rely on this information in a production environment. specifications specification status comment media
stream recordingthe definition of 'mediarecordererrorevent()' in that specification. working draft initial definition. ...
MediaSource.readyState - Web APIs
the readystate read-only property of the mediasource interface returns an enum representing the state of the current mediasource. the three possible values are: closed: the source is not currently attached to a media element. open: the source is attached to a media element and ready to receive sourcebuffer objects. ended: the source is attached to a media element but the
stream has been ended via a call to mediasource.endof
stream(). syntax var myreadystate = mediasource.readystate; value a domstring. example the following snippet is from a simple example written by nick desaulniers (view the full demo live, or download the source for further investigation.) if ('mediasource' in window && mediasource.istypesupported(mimecodec)) { var mediasource = new mediasource; //co...
... recommendation initial definition. ...
active - Web APIs
the active read-only property of the media
stream interface returns a boolean value which is true if the
stream is currently active; otherwise, it returns false. a
stream is considered active if at least one of its media
streamtracks is not in the media
streamtrack.ended state. once every track has ended, the
stream's active property becomes false. syntax var isactive = media
stream.active; value a boolean value which is true if the
stream is currently active; otherwise, the value is false. example in this example, a new
stream whose source is the user's local camera and microphone is requested using getusermedia(). when that
stream becomes available (that is, when the returned promise is fulfilled, a button on the page is updated based on whether or not the
stream is currently active. var p...
... this example, a new
stream whose source is the user's local camera and microphone is requested using getusermedia(). when that
stream becomes available (that is, when the returned promise is fulfilled, a button on the page is updated based on whether or not the
stream is currently active. var promise = navigator.mediadevices.getusermedia({ audio: true, video: true }); promise.then(function(
stream) { var startbtn = document.queryselector('#startbtn'); startbtn.disabled =
stream.active; };) specifications specification status comment media capture and
streamsthe definition of 'active' in that specification. candidate recommendation initial definition. ...
MediaTrackConstraints.deviceId - Web APIs
sessions on the same origin. however, the value of the deviceid is determined by the source of the track's content, and there's no particular format mandated by the specification (although some kind of guid is recommended). that means that a given track will only return one value for the deviceid when you call getcapabilities(). because of this, there's no use for the device id when calling media
streamtrack.applyconstraints(), since there is only one possible value; however, you can record a deviceid and use it to ensure that you get the same source for multiple calls to getusermedia(). an exception to the rule that device ids are the same across browsing sessions: private browsing mode will use a different id, and will change it each browsing session. example see example: constraint exerc...
...ultiple calls to getusermedia(). an exception to the rule that device ids are the same across browsing sessions: private browsing mode will use a different id, and will change it each browsing session. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and
streamsthe definition of 'deviceid' in that specification. candidate recommendation initial specification. ...
MediaTrackConstraints.displaySurface - Web APIs
his value does not affect the list of display sources in the browser's user interface. see how constraints are defined in capabilities, constraints, and settings for an explanation of how to define constraints. ...
...settings() on the display media's video media
streamtrack, then checking the value of the returned mediatracksettings object's displaysurface object. for example, if your app needs to know that the surface being shared is a monitor or application—meaning that there's possibly a non-content backdrop—it can use code similar to this: let mayhavebackdropflag = false; let displaysurface = display
stream.getvideotracks()[0].getsettings().displaysurface; if (displaysurface === "monitor" || displaysurface ==="application") { mayhavebackdropflag = true; } following this code, mayhavebackdrop is true if the display surface contained in the
stream is of type monitor or application; either of these may have non-content backdrop areas. later code can use this flag to determine whether or not to pe...
MediaTrackConstraints.groupId - Web APIs
ermined by the source of the track's content, and there's no particular format mandated by the specification (although some kind of guid is recommended). that means that a given track will only return one value for the groupid when you call getcapabilities(), and keep in mind that this value will change for each browsing session. ...
...en calling media
streamtrack.applyconstraints(), since there is only one possible value, and you can't use it to ensure the same group is used across multiple browsing sessions when calling getusermedia(). example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and
streamsthe definition of 'groupid' in that specification. candidate recommendation initial specification. ...
MediaTrackConstraints.logicalSurface - Web APIs
ue if logical surfaces should be permitted among the selections available to the user. see how constraints are defined in capabilities, constraints, and settings for an explanation of how to define constraints. ...
...you can check the setting selected by the user agent after the display media has been created by getdisplaymedia() by calling getsettings() on the display media's video media
streamtrack, then checking the value of the returned mediatracksettings object's logicalsurface object. for example, if your app needs to know if the selected display surface is a logical one: let islogicalsurface = display
stream.getvideotracks()[0].getsettings().logicalsurface; following this code, islogicalsurface is true if the display surface contained in the
stream is a logical surface; that is, one which may not be entirely onscreen, or may even be entirely offscreen. specifications specification status comment screen capturethe definition of 'mediatrackconstraints.logicalsurface' in...
MediaTrackSettings.autoGainControl - Web APIs
ettings dictionary's autogaincontrol property is a boolean value whose value indicates whether or not automatic gain control (agc) is enabled on an audio track. this lets you determine what value was selected to comply with your specified constraints for this property's value as described in the mediatrackconstraints.autogaincontrol property you provided when calling either getusermedia() or media
streamtrack.applyconstraints(). automatic gain control is a feature in which a sound source automatically manages changes in the volume of its source media to maintain a steady overall volume level. this feature is typically used on microphones, although it can be provided by other input sources as well. if needed, you can determine whether or not this constraint is supported by checking the value of ...
...y're unfamiliar with. syntax var autogaincontrol = mediatracksettings.autogaincontrol; value a boolean value which is true if the track has automatic gain control enabled or false if agc is disabled. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and
streamsthe definition of 'autogaincontrol' in that specification. candidate recommendation initial specification. ...
MediaTrackSettings.echoCancellation - Web APIs
diatracksettings dictionary's echocancellation property is a boolean value whose value indicates whether or not echo cancellation is enabled on an audio track. this lets you determine what value was selected to comply with your specified constraints for this property's value as described in the mediatrackconstraints.echocancellation property you provided when calling either getusermedia() or media
streamtrack.applyconstraints(). echo cancellation is a feature which attempts to prevent echo effects on a two-way audio connection by attempting to reduce or eliminate crosstalk between the user's output device and their input device. for example, it might apply a filter that negates the sound being produced on the speakers from being included in the input track generated from the microphone. if need...
... candidate recommendation initial specification. ...
MediaTrackSettings.facingMode - Web APIs
the mediatracksettings dictionary's facingmode property is a domstring indicating the direction in which the camera producing the video track represented by the media
streamtrack is currently facing. this lets you determine what value was selected to comply with your specified constraints for this property's value as described in the mediatrackconstraints.facingmode property you provided when calling either getusermedia() or media
streamtrack.applyconstraints(). if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.facingmode as returned by a call to mediadevices.getsupportedconstraints(). however, typically this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with. because rtp doesn't...
...a camera aimed toward the user but over their left shoulder. "right" the video source is facing toward the user but to their right, such as a camera aimed toward the user but over their right shoulder. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and
streamsthe definition of 'facingmode' in that specification. candidate recommendation initial specification. ...
MediaTrackSettings.frameRate - Web APIs
the mediatracksettings dictionary's framerate property is a double-precision floating-point number indicating the frame rate, in frames per second, of the media
streamtrack as currently configured. this lets you determine what value was selected to comply with your specified constraints for this property's value as described in the mediatrackconstraints.framerate property you provided when calling either getusermedia() or media
streamtrack.applyconstraints(). if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.framerate as returned by a call to mediadevices.getsupportedconstraints(). however, typically this is unnecessary since browsers will simply ignore any constraints they're unfamiliar with. syntax var framerate =...
...amiliar with. syntax var framerate = mediatracksettings.framerate; value a double-precision floating-point number indicating the current configuration of the track's frame rate, in frames per second. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and
streamsthe definition of 'framerate' in that specification. candidate recommendation initial specification. ...
MediaTrackSettings.groupId - Web APIs
this lets you determine what value was selected to comply with your specified constraints for this property's value as described in the mediatrackconstraints.groupid property you provided when calling either getusermedia(). if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.groupid as returned by a call to mediadevices.getsupportedconstraints(). ...
...se devices from the same group (or that they don't use devices from the same group). there is no situation in which the groupid is useful when calling applyconstraints(), since the value can't be changed. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and
streamsthe definition of 'groupid' in that specification. candidate recommendation initial specification. ...
MediaTrackSettings.noiseSuppression - Web APIs
tings dictionary's noisesuppression property is a boolean value whose value indicates whether or not noise suppression technology is enabled on an audio track. this lets you determine what value was selected to comply with your specified constraints for this property's value as described in the mediatrackconstraints.noisesuppression property you provided when calling either getusermedia() or media
streamtrack.applyconstraints(). noise suppression automatically filters the audio to remove background noise, hum caused by equipment, and the like from the sound before delivering it to your code. this feature is typically used on microphones, although it is technically possible it could be provided by other input sources as well. if needed, you can determine whether or not this constraint is support...
...e unfamiliar with. syntax var noisesuppression = mediatracksettings.noisesuppression; value a boolean value which is true if the input track has noise suppression enabled or false if agc is disabled. example see example: constraint exerciser in capabilities, constraints, and settings for an example. specifications specification status comment media capture and
streamsthe definition of 'noisesuppression' in that specification. candidate recommendation initial specification. ...
OverconstrainedError - Web APIs
constructor overconstrainederror.overconstrainederror() creates a new overconstrainederror object. properties overconstrainederror.constraint read only returns the constraint that was supplied in the constructor, meaning the constraint that was not satisfied. overconstrainederror.message read only returns the text supplied in the constructor. ...
...traint read only returns the constraint that was supplied in the constructor, meaning the constraint that was not satisfied. overconstrainederror.message read only returns the text supplied in the constructor. overconstrainederror.name read only will always return overconstrainederror. methods none. specifications specification status comment media capture and
streamsthe definition of 'overconstrainederror' in that specification. candidate recommendation initial definition. ...
RTCConfiguration.bundlePolicy - Web APIs
the rtcconfiguration dictionary's bundlepolicy property is a string value indicating which sdp bundling policy, if any, to use for the underlying rtp
streams used by an rtcpeerconnection. the configuration object is used as an input to the rtcpeerconnection() constructor. syntax let rtcconfiguration = { bundlepolicy: policy }; rtcconfiguration.bundlepolicy = policy; value a domstring identifying the sdp bundling policy to use for the rtp
streams used by the rtcpeerconnection. this string, which must be a member of the rtcbundlepolicy enumeration, has the following possible values: balanced the ice agent begins by creating one rtcdtlstransport to handle each type of content added: one for audio, one for video, and one for the rtc data channel, if applicable. if the remote peer isn't...
... with the sdp bundle standard. if the remote peer is bundle compatible, the policy is moot and all media tracks and the data channel are bundled onto a single rtcdtlstransport at the completion of the negotiation process. any other transports that were used during negotiation are then closed. in technical terms, an sdp bundle lets all of the media tracks (identified in the sdp from the m= lines)
stream between two peers across a single 5-tuple, that is, from a single ip and port on one peer to a single ip and port on another peer, all using the same rtcdtlstransport. the goal of bundling is to optimize performance by reducing the overhead of having multiple transports in play. the fewer rtp transports or bundles of rtp
streams you have, the better the network performance will be. all current...
RTCPeerConnection.addTransceiver() - Web APIs
the rtcpeerconnection method addtransceiver() creates a new rtcrtptransceiver and adds it to the set of transceivers associated with the rtcpeerconnection. each transceiver represents a bidirectional
stream, with both an rtcrtpsender and an rtcrtpreceiver associated with it. syntax rtptransceiver = rtcpeerconnection.addtransceiver(trackorkind, init); parameters trackorkind a media
streamtrack to associate with the transceiver, or a domstring which is used as the kind of the receiver's track, and by extension of the rtcrtpreceiver itself. init optional an object that conforms to the rtcrtptransceiverinit dictionary which provides any options that you may wish to specify when creating the new transceiver. possible values are: direction optional the new transceiver's preferred direction...
...ay wish to specify when creating the new transceiver. possible values are: direction optional the new transceiver's preferred directionality. this value is used to initialize the new rtcrtptransceiver object's rtcrtptransceiver.direction property. sendencodings optional a list of encodings to allow when sending rtp media from the rtcrtpsender. each entry is of type rtcrtpencodingparameters.
streams optional a list of media
stream objects to add to the transceiver'srtcrtpreceiver; when the remote peer's rtcpeerconnection's track event occurs, these are the
streams that will be specified by that event. exceptions typeerror a string was specified as trackorkind which is not valid. the string must be either "audio" or "video". specifications specification status comm...
RTCPeerConnection.getStats() - Web APIs
if this is null (the default value), statistics will be gathered for the entire rtcpeerconnection. return value a promise which resolves with an rtcstatsreport object providing connection statistics. the contents of the report depend on the selector as well as other details of the connection. ...
...hat data was never documented. this form of getstats() has been or will soon be removed from most browsers; you should not use it, and should update existing code to use the new promise-based version. check the browser compatibility table to verify the state of this method. promise = rtcpeerconnection.getstats(selector, successcallback, failurecallback) parameters selector optional a media
streamtrack for which to gather statistics. if this is null (the default value), statistics will be gathered for the entire rtcpeerconnection. successcallback a callback function to call when the stats have been retrieved. the function receives as input a single parameter: an rtcstatsreport with the collected statistics. no output is expected from the function. failurecallback a function to call whe...
RTCRtpEncodingParameters - Web APIs
true, the described encoding is currently actively being used. that is, for rtp senders, the encoding is currently being used to send data, while for receivers, the encoding is being used to decode received data. the default value is true. codecpayloadtype when describing a codec for an rtcrtpsender, codecpayloadtype is a single 8-bit byte (or octet) specifying the codec to use for sending the
stream; the value matches one from the owning rtcrtpparameters object's codecs parameter. this value can only be set when creating the transceiver; after that, this value is read only. dtx only used for an rtcrtpsender whose kind is audio, this property indicates whether or not to use discontinuous transmission (a feature by which a phone is turned off or the microphone muted automatically in the abse...
...sion floating-point value specifying the maximum number of frames per second to allow for this encoding. ptime an unsigned long integer value indicating the preferred duration of a media packet in milliseconds. this is typically only relevant for audio encodings. the user agent will try to match this as well as it can, but there is no guarantee. rid a domstring which, if set, specifies an rtp
stream id (rid) to be sent using the rid header extension. this parameter cannot be modified using setparameters(). its value can only be set when the transceiver is first created. scaleresolutiondownby only used for senders whose track's kind is video, this is a double-precision floating-point value specifying a factor by which to scale down the video during encoding. the default value, 1.0, means th...
RTCRtpReceiver - Web APIs
rtcrtpreceiver.transport read only returns the rtcdtlstransport instance over which the media for the receiver's track is received. obsolete properties rtcptransport this property has been removed; the rtp and rtcp transports have been combined into a single transport. use the transport property instead. ...
...s for each unique csrc (contributing source) identifier received by the current rtcrtpreceiver in the last ten seconds. rtcrtpreceiver.getparameters() returns an rtcrtpparameters object which contains information about how the rtc data is to be decoded. rtcrtpreceiver.getstats() returns a promise whose fulfillment handler receives a rtcstatsreport which contains statistics about the incoming
streams and their dependencies. rtcrtpreceiver.getsynchronizationsources() returns an array including one rtcrtpsynchronizationsource instance for each unique ssrc (synchronization source) identifier received by the current rtcrtpreceiver in the last ten seconds. static methods rtcrtpreceiver.getcapabilities() returns the most optimistic view of the capabilities of the system for receiving medi...
RTCRtpSendParameters.encodings - Web APIs
true, the described encoding is currently actively being used. that is, for rtp senders, the encoding is currently being used to send data, while for receivers, the encoding is being used to decode received data. the default value is true. codecpayloadtype when describing a codec for an rtcrtpsender, codecpayloadtype is a single 8-bit byte (or octet) specifying the codec to use for sending the
stream; the value matches one from the owning rtcrtpparameters object's codecs parameter. this value can only be set when creating the transceiver; after that, this value is read only. dtx only used for an rtcrtpsender whose kind is audio, this property indicates whether or not to use discontinuous transmission (a feature by which a phone is turned off or the microphone muted automatically in the abse...
...sion floating-point value specifying the maximum number of frames per second to allow for this encoding. ptime an unsigned long integer value indicating the preferred duration of a media packet in milliseconds. this is typically only relevant for audio encodings. the user agent will try to match this as well as it can, but there is no guarantee. rid a domstring which, if set, specifies an rtp
stream id (rid) to be sent using the rid header extension. this parameter cannot be modified using setparameters(). its value can only be set when the transceiver is first created. scaleresolutiondownby only used for senders whose track's kind is video, this is a double-precision floating-point value specifying a factor by which to scale down the video during encoding. the default value, 1.0, means th...
RTCRtpTransceiver.mid - Web APIs
its value is taken from the media id of the sdp m-line. this value is null if negotiation has not completed. ...
...its value is taken from the media id of the sdp m-line. this value is null if negotiation has not completed. ...
Request - Web APIs
llow, error, or manual. request.referrer read only contains the referrer of the request (e.g., client). request.referrerpolicy read only contains the referrer policy of the request (e.g., no-referrer). request.url read only contains the url of the request. request implements body, so it also inherits the following properties: body read only a simple getter used to expose a readable
stream of the body contents. bodyused read only stores a boolean that declares whether the body has been used in a response yet. methods request.clone() creates a copy of the current request object. request implements body, so it also has the following methods available to it: body.arraybuffer() returns a promise that resolves with an arraybuffer representation of the request body. body.
... you could then fetch this api request by passing the request object in as a parameter to a windoworworkerglobalscope.fetch() call, for example and get the response: fetch(request) .then(response => { if (response.status === 200) { return response.json(); } else { throw new error('something...
StereoPannerNode - Web APIs
the pan property takes a unitless value between -1 (full left pan) and 1 (full right pan). this interface was introduced as a much simpler way to apply a simple panning effect than having to use a full pannernode. ...
... the pan property takes a unitless value between -1 (full left pan) and 1 (full right pan). this interface was introduced as a much simpler way to apply a simple panning effect than having to use a full pannernode. ...
TextDecoder - Web APIs
examples representing text with typed arrays this example shows how to decode a chinese/japanese character , as represented by five different typed arrays: uint8array, int8array, uint16array, int16array, and int32array. ...
...pecify the windows-1251 character encoding, which is appropriate for cyrillic script. let win1251decoder = new textdecoder('windows-1251'); let bytes = new uint8array([207, 240, 232, 226, 229, 242, 44, 32, 236, 232, 240, 33]); console.log(win1251decoder.decode(bytes)); // Привет, мир! constructor textdecoder() returns a newly constructed textdecoder that will generate a code point
stream with the decoding method specified in parameters. properties the textdecoder interface doesn't inherit any properties. textdecoder.prototype.encodingread only is a domstring containing the name of the decoder, that is a string describing the method the textdecoder will use. textdecoder.prototype.fatalread only is a boolean indicating whether the error mode is fatal. textdecoder.protot...
TextEncoder - Web APIs
properties the textencoder interface doesn't inherit any property. textencoder.prototype.encodingread only always returns "utf-8". methods the textencoder interface doesn't inherit any method. textencoder.prototype.encode() takes a usvstring as input, and returns a uint8array containing utf-8 encoded text. ...
... properties the textencoder interface doesn't inherit any property. textencoder.prototype.encodingread only always returns "utf-8". methods the textencoder interface doesn't inherit any method. textencoder.prototype.encode() takes a usvstring as input, and returns a uint8array containing utf-8 encoded text. ...
TrackDefault.TrackDefault() - Web APIs
can be audio, video, or text. language a domstring specifying a default language for the sourcebuffer to use when an initialization segment does not contain language information for a new track. ...
...ment does not contain language information for a new track. label a domstring specifying a default label for the sourcebuffer to use when an initialization segment does not contain label information for a new track. kinds an array (sequence) of domstrings specifying default kinds for the sourcebuffer to use when an initialization segment does not contain kind information for a new track. byte
streamtrackid optional a domstring specifying the id of the specific track that the sourcebuffer should apply to. if not specified, this value will be an empty string and the sourcebuffer can contain any tracks of the specified type. errors when this constructor is invoked, the following errors can occur: error explanation invalidaccesserror the supplied language is not ...
WebGLRenderingContext.getBufferParameter() - Web APIs
l transfer operations. gl.pixel_unpack_buffer: buffer used for pixel transfer operations. pname a glenum specifying information to query. possible values: gl.buffer_size: returns a glint indicating the size of the buffer in bytes. gl.buffer_usage: returns a glenum indicating the usage pattern of the buffer. this is either: gl.static_draw, gl.dynamic_draw, gl.
stream_draw. when using a webgl 2 context, the following values are available additionally: gl.static_read, gl.dynamic_read, gl.
stream_read, gl.static_copy, gl.dynamic_copy, gl.
stream_copy. return value depends on the requested information (as specified with pname). either a glint or a glenum. examples gl.getbufferparameter(gl.arra...
... 3.0the definition of 'glgetbufferparameter' in that specification. standard man page of the (similar) opengl es 3 api. adds new target buffers: gl.copy_read_buffer, gl.copy_write_buffer, gl.transform_feedback_buffer, gl.uniform_buffer, gl.pixel_pack_buffer, gl.pixel_unpack_buffer adds new usage hints: gl.static_read, gl.dynamic_read, gl.
stream_read, gl.static_copy, gl.dynamic_copy, gl.
stream_copy. ...
WebGL constants - Web APIs
ers constants passed to webglrenderingcontext.bufferdata(), webglrenderingcontext.buffersubdata(), webglrenderingcontext.bindbuffer(), or webglrenderingcontext.getbufferparameter(). constant name value description static_draw 0x88e4 passed to bufferdata as a hint about whether the contents of the buffer are likely to be used often and not change often.
stream_draw 0x88e0 passed to bufferdata as a hint about whether the contents of the buffer are likely to not be used often. dynamic_draw 0x88e8 passed to bufferdata as a hint about whether the contents of the buffer are likely to be used often and change often. array_buffer 0x8892 passed to bindbuffer or bufferdata to specify the type of buffer being used. el...
...tion_satisfied 0x911c wait_failed 0x911d sync_flush_commands_bit 0x00000001 miscellaneous constants constant name value description color 0x1800 depth 0x1801 stencil 0x1802 min 0x8007 max 0x8008 depth_component24 0x81a6
stream_read 0x88e1
stream_copy 0x88e2 static_read 0x88e5 static_copy 0x88e6 dynamic_read 0x88e9 dynamic_copy 0x88ea depth_component32f 0x8cac depth32f_stencil8 0x8cad invalid_index 0xffffffff timeout_ignored -1 max_client_wait_timeout_w...
WebRTC connectivity - Web APIs
t or other configuration needs to change. regardless of whether it's a new call, or reconfiguring an existing one, these are the basic steps which must occur to exchange the offer and answer, leaving out the ice layer for the moment: the caller captures local media via navigator.mediadevices.getusermedia() the caller creates rtcpeerconnection and called rtcpeerconnection.addtrack() (since add
stream is deprecating) the caller calls rtcpeerconnection.createoffer() to create an offer. the caller calls rtcpeerconnection.setlocaldescription() to set that offer as the local description (that is, the description of the local end of the connection). after setlocaldescription(), the caller asks stun servers to generate the ice candidates the caller uses the signaling server to transmit the offer...
...er/answer and sdp), peers must exchange information about the network connection. this is known as an ice candidate and details the available methods the peer is able to communicate (directly or through a turn server). typically, each peer will propose its best candidates first, making their way down the line toward their worse candidates. ideally, candidates are udp (since it's faster, and media
streams are able to recover from interruptions relatively easily), but the ice standard does allow tcp candidates as well. generally, ice candidates using tcp are only going to be used when udp is not available or is restricted in ways that make it not suitable for media
streaming. not all browsers support ice over tcp, however. ice allows candidates to represent connections over either tcp or udp, ...
Using WebRTC data channels - Web APIs
running—the webrtc implementation implements features to support messages that are larger than the maximum packet size on the network's transport layer. this can complicate things, since you don't necessarily know what the size limits are for various user agents, and how they respond when a larger message is sent or received. even when user agents share the same underlying library for handling
stream control transmission protocol (sctp) data, there can still be variations due to how the library is used. for example, both firefox and google chrome use the usrsctp library to implement sctp, but there are still situations in which data transfer on an rtcdatachannel can fail due to differences in how they call the library and react to errors it returns. when two users running firefox are communi...
...or support in place, rtcdatachannel payloads can be much larger (officially up to 256kib, but firefox's implementation caps them at a whopping 1gib). even at 256kib, that's large enough to cause noticeable delays in handling urgent traffic. if you go even larger, the delays can become untenable unless you are certain of your operational conditions. in order to resolve this issue, a new system of
stream schedulers (usually referred to as the "sctp ndata specification") has been designed to make it possible to interleave messages sent on different
streams, including
streams used to implement webrtc data channels. this proposal is still in ietf draft form, but once implemented, it will make it possible to send messages with essentially no size limitations, since the sctp layer will automatically i...
Web Audio API best practices - Web APIs
h files, you are looking at either the grabbing the file from an htmlmediaelement (i.e. an <audio> or <video> element), or you're looking to fetch the file and decode it into a buffer. both are legitimate ways of working, however, it's more common to use the former when you are working with full-length tracks, and the latter when working with shorter, more sample-like tracks. media elements have
streaming support out of the box. the audio will start playing when the browser determines it can load the rest of the file before playing finishes. you can see an example of how to use this with the web audio api in the using the web audio api tutorial. you will, however, have more control if you use a buffer node. you have to request the file and wait for it to load (this section of our advanced arti...
...al. you will, however, have more control if you use a buffer node. you have to request the file and wait for it to load (this section of our advanced article shows a good way to do it), but then you have access to the data directly, which means more precision, and more precise manipulation. if you're looking to work with audio from the user's camera or microphone you can access it via the media
stream api and the media
streamaudiosourcenode interface. this is good for webrtc and situations where you might want to record or possibly analyse audio. the last way is to generate your own sound, which can be done with either an oscillatornode or by creating a buffer and populating it with your own data. check out the tutorial here for creating your own instrument for information on creating sounds w...
Visualizations with Web Audio API - Web APIs
the analyser node will then capture audio data using a fast fourier transform (fft) in a certain frequency dom...
... the analyser node will then capture audio data using a fast fourier transform (fft) in a certain frequency domain, dependin...
XMLHttpRequestResponseType - Web APIs
ob object containing the binary data. document the response is an html document or xml xmldocument, as appropriate based on the mime type of the received data. see html in xmlhttprequest to learn more about using xhr to fetch html content. json the response is a javascript object created by parsing the contents of received data as json. text the response is a text in a domstring object. ms-
stream the response is part of a
streaming download; this response type is only allowed for download requests, and is only supported by internet explorer. deprecated values moz-chunked-arraybuffer a firefox-only value which instructs xmlhttprequest to deliver arraybuffer objects containing chunks of the incoming data. accessing response during a progress event returns the data received so f...
...-only value which instructs xmlhttprequest to deliver arraybuffer objects containing chunks of the incoming data. accessing response during a progress event returns the data received so far. outside the progress event handler, the value of response is always null. you shouldn't use this non-standard (and, as of firefox 68, entirely removed) api; instead, consider using the fetch api with readable
streams, which offers a standard alternative to accessing the response in a
streaming fashion. specifications specification status comment xmlhttprequest unknown live standard, latest version ...
XMLSerializer - Web APIs
examples serializing xml into a string the first, basic, example just serializes an entire document into a string containing xml. ...
... examples serializing xml into a string the first, basic, example just serializes an entire document into a string containing xml. ...
ARIA: feed role - Accessibility
<section role="feed" aria-busy="false"> ... ...
... between the web page and assistive technologies that governs scroll interactions so that assistive technology users can read articles, jump forward and backward by article, and reliably trigger new articles to load while in reading mode. examples include an rss feed, news feeds, social media feeds like facebook, instagram or twitter, or even a list of related products on an ecommerce page. these
streams can be limited or infinite, loading more content as the user scrolls. implementing the feed pattern allows a screen reader to reliably read and trigger the loading of feed content while in reading mode. a feed is a container element whose children are <article>s or have role article. each article within a feed should be focusable, with tabindex of 0 or -1. an article should be scrolled into vie...
@font-face - CSS: Cascading Style Sheets
</body> </html> in this example, the user's local copy of "helvetica neue bold" is used; if the user does not have that font installed (two different names are tried), then the...
...t this example simply specifies a downloadable font to use, applying it to the entire body of the document: view the live example <html> <head> <title>web font sample</title> <style type="text/css" media="screen, print"> @font-face { font-family: "bit
stream vera serif bold"; src: url("https://mdn.mozillademos.org/files/2468/verasebd.ttf"); } body { font-family: "bit
stream vera serif bold", serif } </style> </head> <body> this is bit
stream vera serif bold. </body> </html> in this example, the user's local copy of "helvetica neue bold" is used; if the user does not have that font installed (two different names are tried), then the downloadable font named "mgopenmodernabold.ttf" is used instead: @font-face { font-family: myhelvetica; src: local("helvetica ...
Audio and video manipulation - Developer guides
this article provides a reference to explain what you need to do. video manipulation the ability to read the pixel values from each frame of a video can be very useful. ...
...se this web audio node type an audio track from an html <audio> or <video> element mediaelementaudiosourcenode a plain raw audio data buffer in memory audiobuffersourcenode an oscillator generating a sine wave or other computed waveform oscillatornode an audio track from webrtc (such as the microphone input you can get using getusermedia(). media
streamaudiosourcenode audio filters the web audio api has a lot of different filter/effects that can be applied to audio using the biquadfilternode, for example. html <video id="my-video" controls src="myvideo.mp4" type="video/mp4"> </video> javascript var context = new audiocontext(), audiosource = context.createmediaelementsource(document.getelementbyid("my-video")), filter ...
Overview of events and handlers - Developer guides
types of such incidents modern web browsers can handle. events and event handling provide a core technique in javascript for reacting to incidents occurring when a browser accesses a web page, including events from preparing a web page for display, from interacting with the content of the web page, relating to the device on which the browser is running, and from many other causes such as media
stream playback or animation timing. events and event handling become central to web programming with the addition of the language to browsers, accompanying a switch in the rendering architecture of browsers from fetch and load page rendering to event driven, reflow based, page rendering. initially, browsers wait, until they receive all of the resources associated with a page, to parse, process, draw, ...
... although this list is currently incomplete. some notable events are: note: this list of events will need work to make relevant; that work is awaiting some global reorganization work on the documents. this will also need finding a good explanation of the events involved during page loading, such as discussed partially in this web page or in this stack overflow question. ...
Touch events (Mozilla experimental) - Developer guides
reen, monitoring the raw touch events generated by the system. although touch events were based on — and work similarly to — mouse events, each event included an identifier that allowed you to track multiple fingers moving on the screen at the same time. event fields touch events were based upon mouseevent, and thereby shared all mouse event fields. they included one additional field. ...
... the same time. event fields touch events were based upon mouseevent, and thereby shared all mouse event fields. they included one additional field.
streamid a unique integer identifying the finger generating the event. when the moztouchdown event is built, a unique value is assigned to that finger. corresponding moztouchmove and moztouchup events for that finger will have the same
streamid value. this lets you track each finger's movements on the touch screen independently. the
stream id is unique until the moztouchup event occurs; after that, the value may be recycled for another series of events. types of touch events moztouchdown sent when the user begins a screen touch action. moztouchmove sent when the user moves his finger on the touch screen. ...
Event developer guide - Developer guides
the original 'click' event, mouse events, mouse gesture events, and both touch events and the earlier mozilla experimental touch events, now deprecated. the modification of the web page in structure or content might trigger some events, as explained in the mutation events page, but the use of these events has been deprecated in favour of the lighter mutation observer approach. the media
streams embedded in the html documents might trigger some events, as explained in the media events page. the network requests made by a web page might trigger some events. there are many other sources of events defined by web browsers for which pages are not yet available in this guide. note: this event developer guide needs substantial work. the structure needs to be reorganized and the pages rewri...
...you should instead use the standard touch events api, supported since gecko/firefox 6 with multi-touch support added in gecko/firefox 12.using device orientation with 3d transformsth...
HTML5 Parser - Developer guides
now use svg and mathml inline in html5 pages, without xml namespace syntax. parsing is now done in a separate thread from firefox’s main ui thread, improving overall browser responsiveness. calls to innerhtml are a lot faster. dozens of long-standing parser related bugs are now fixed. the html5 specification provides a more detailed description than previous html standards of how to turn a
stream of bytes into a dom tree. this will result in more consistent behavior across browser implementations. in other words, in supporting html5, gecko, webkit, and internet explorer (ie) will behave more consistently with each other. changed parser behaviors some changes to the way that the gecko 2 parser behaves, as compared to earlier versions of gecko, may affect web developers, depending on how ...
...any tags like this. if you tested your site only with gecko 1.x or webkit (for example, firefox-only intranets or webkit-oriented mobile sites), then you might have tags that match this pattern, and they will behave differently with gecko 2. calling document.write() during parsing prior to html5, gecko and webkit allowed calls to document.write() during parsing to insert content into the source
stream. this behavior was inherently racy, as the content was inserted into a timing-dependent point in the source
stream. if the call happened after the parser was done, the inserted content replaced the document. in ie, such calls are either ignored or imply a call to document.open(), replacing the document. in html5, document.write() can only be called from a script that is created by a <script> tag ...
Developer guides
e language of nearly all web content. most of what you see on screen in your browser is described, fundamentally, using html. css learning area cascading style sheets (css) is a stylesheet language used to define the presentation of a document written in html. ...
...this article provides a reference to explain what you need to do. ...
<video>: The Video Embed element - HTML: Hypertext Markup Language
g currenttime returns a double-precision floating-point value indicating the current playback position of the media specified in seconds. if the media has not started playing yet, the time offset at which it will begin is returned. setting currenttime sets the current playback position to the given time and seeks the media to that position if the media is currently loaded. if the media is being
streamed, it's possible that the user agent may not be able to obtain some parts of the resource if that data has expired from the media buffer. other media may have a media timeline that doesn't start at 0 seconds, so setting currenttime to a time before that would fail. the getstartdate() method can be used to determine the beginning point of the media timeline's reference frame. disablepictureinpi...
...ast, chromecast, dlna, airplay, etc). in safari, you can use x-webkit-airplay="deny" as a fallback. duration read only a double-precision floating-point value which indicates the duration (total length) of the media in seconds, on the media's timeline. if no media is present on the element, or the media is not valid, the returned value is nan. if the media has no known end (such as for live
streams of unknown duration, web radio, media incoming from webrtc, and so forth), this value is +infinity. height the height of the video's display area, in css pixels (absolute values only; no percentages.) intrinsicsize this attribute tells the browser to ignore the actual intrinsic size of the image and pretend it’s the size specified in the attribute. specifically, the image would raster at...
HTML documentation index - HTML: Hypertext Markup Language
vel elements beginner, development, guide, html, html5, web html (hypertext markup language) elements historically were categorized as either "block-level" elements or "inline-level" elements. by default, a block-level element occupies the entire space of its parent element (container), thereby creating a "block." this article helps to explain what this means. 5 dash adaptive
streaming for html 5 video guide, html, html5 dynamic adaptive
streaming over http (dash) is an adaptive
streaming protocol. 6 date and time formats used in html date, element, format, html, iso 8601, input, reference, string, time, week, datetime, datetime-local, del, ins, month, month-year, week-year certain html elements use date and/or time values. the formats of the s...
...l, html embedded content, html5, html:embedded content, html:flow content, html:phrasing content, media, multimedia, reference, web, sound the html <audio> element is used to embed sound content in documents. it may contain one or more audio sources, represented using the src attribute or the <source> element: the browser will choose the most suitable one. it can also be the destination for
streamed media, using a media
stream. 64 <b>: the bring attention to element attention, element, html, html text-level semantics, html:flow content, html:palpable content, html:phrasing content, reference, web the html bring attention to element (<b>) is used to draw the reader's attention to the element's contents, which are not otherwise granted special importance. 65 <b...
Microformats - HTML: Hypertext Markup Language
nt from vocabularies, which are developed separately. "h-*" for root class names, e.g. "h-card", "h-entry", "h-feed", and many more. these top-level root classes usually indicate a type and corresponding expected vocabulary of properties. for example: h-card describes a person or organization h-entry describes episodic or date stamped online content like a blog post h-feed describes a
stream or feed of posts you can find many more vocabularies on the microformats2 wiki. "p-*" for plain (text) properties, e.g. "p-name", "p-summary" generic plain text parsing, element text in general. on certain html elements, use special attributes first, e.g. img/alt, abbr/title. "u-*" for url properties, e.g. "u-url", "u-photo", "u-logo" special parsing: element attributes a/href...
...developer</a> on <time class="dt-pu...
An overview of HTTP - HTTP
the foundation of any data exchange on the web and it is a client-server protocol, which means requests are initiated by the recipient, usually the web browser. a complete document is reconstructed from the different sub-documents fetched, for instance text, layout description, images, videos, scripts, and more. clients and servers communicate by exchanging individual messages (as opposed to a
stream of data). the messages sent by the client, usually a web browser, are called requests and the messages sent by the server as an answer are called responses. designed in the early 1990s, http is an extensible protocol which has evolved over time. it is an application layer protocol that is sent over tcp, or over a tls-encrypted tcp connection, though any reliable transport protocol could theoreti...
...etch api provides the same features with a more powerful and flexible feature set. another api, server-sent events, is a one-way service that allows a server to send events to the client, using http as a transport mechanism. using the eventsource interface, the client opens a connection and establishes event handlers. the client browser automatically converts the messages that arrive on the http
stream into appropriate event objects, delivering them to the event handlers that have been registered for the events' type if known, or to the onmessage event handler if no type-specific event handler was established. conclusion http is an extensible protocol that is easy to use. the client-server structure, combined with the ability to simply add headers, allows http to advance along with the extend...
Symbol.asyncIterator - JavaScript
specifications spec...
...c" // "iteration!" } })(); when creating an api, remember that async iterables are designed to represent something iterable — like a
stream of data or a list —, not to completely replace callbacks and events in most situations. built-in async iterables there are currently no built-in javascript objects that have the [symbol.asynciterator] key set by default. however, whatwg
streams are set to be the first built-in object to be async iterable, with [symbol.asynciterator] recently landing in the spec. specifications specification ecmascript (ecma-262)the definition of 'symbol.asynciterator' in that specification. ...
WebAssembly.Instance() constructor - JavaScript
the webassembly.instance() constructor creates a new instance object which is a stateful, executable instance of a webassembly.module. syntax important: since instantiation for large modules can be expensive, developers should only use the instance() constructor when synchronous instantiation is absolutely required; the asynchronous webassembly.instantiate
streaming() method should be used at all other times. new webassembly.instance(module, importobject); parameters module the webassembly.module object to be instantiated. importobject optional an object containing the values to be imported into the newly-created instance, such as functions or webassembly.memory objects. there must be one matching property for each declared import of module or else a webassembly.linkerror is thrown. ...
...: { imported_func: function(arg) { console.log(arg); } } }; fetch('simple.wasm').then(response => response.arraybuffer() ).then(bytes => { let mod = new webassembly.module(bytes); let instance = new webassembly.instance(mod, importobject); instance.exports.exported_func(); }) however, the preferred way to get an instance is through the asynchronous webassembly.instantiate
streaming() function, for example like this: const importobject = { imports: { imported_func: function(arg) { console.log(arg); } } }; webassembly.instantiate
streaming(fetch('simple.wasm'), importobject) .then(obj => obj.instance.exports.exported_func()); specifications specification webassembly javascript interfacethe definition of 'instance' in that specific...
WebAssembly.Instance.prototype.exports - JavaScript
ports readonly property of the webassembly.instance object prototype returns an object containing as its members all the functions exported from the webassembly module instance, to allow them to be accessed and used by javascript. ...
...tecode using fetch, we compile and instantiate the module using the webassembly.instantiate
streaming() function, importing a javascript function into the webassembly module in the process. we then call an exported webassembly function that is exported by the instance. var importobject = { imports: { imported_func: function(arg) { console.log(arg); } } }; webassembly.instantiate
streaming(fetch('simple.wasm'), importobject) .then(obj => obj.instance.exports.exported_func()); note: you can also find this example as instantiate-
streaming.html on github (view it live also). specifications specification webassembly javascript interfacethe definition of 'webassembly.instance: exports' in that specification. browser compatibility the compatibility ...
WebAssembly.Instance - JavaScript
specifications specification web...
... specifications specification webassembly javascript interfacethe definition of 'instance' in that specification. browser compatibility the compatibility table on this page is generated fro...
WebAssembly.Memory() constructor - JavaScript
of 100 pages (6.4mib). its buffer property will return an arraybuffer. var memory = new webassembly.memory({initial:10, maximum:100}); the second way to get a webassembly.memory object is to have it exported by a webassembly module. ...
...e it exported by a webassembly module. the following example (see memory.html on github, and view it live also) fetches and instantiates the loaded memory.wasm byte code using the webassembly.instantiate
streaming() method, while importing the memory created in the line above. it then stores some values in that memory, then exports a function and uses it to sum some values. webassembly.instantiate
streaming(fetch('memory.wasm'), { js: { mem: memory } }) .then(obj => { var i32 = new uint32array(memory.buffer); for (var i = 0; i < 10; i++) { i32[i] = i; } var sum = obj.instance.exports.accumulate(0, 10); console.log(sum); }); creating a shared memory by default, webassembly memories are unshared. you can create a shared memory by passing shared: true in the constructor's initializat...
WebAssembly.Memory.prototype.buffer - JavaScript
the buffer prototype property of the webassembly.memory object returns the buffer contained in the memory. examples using buffer the following example (see memory.html on github, and view it live also) fetches and instantiates the loaded memory.wasm byte code using the webassembly.instantiate
streaming() method, while importing the memory created in the line above. it then stores some values in that memory, then exports a function and uses it to sum some values. ...
...n the memory. examples using buffer the following example (see memory.html on github, and view it live also) fetches and instantiates the loaded memory.wasm byte code using the webassembly.instantiate
streaming() method, while importing the memory created in the line above. it then stores some values in that memory, then exports a function and uses it to sum some values. webassembly.instantiate
streaming(fetch('memory.wasm'), { js: { mem: memory } }) .then(obj => { var i32 = new uint32array(memory.buffer); for (var i = 0; i < 10; i++) { i32[i] = i; } var sum = obj.instance.exports.accumulate(0, 10); console.log(sum); }); specifications specification webassembly javascript interfacethe definition of 'buffer' in that specification. browser compatibili...
WebAssembly.Memory - JavaScript
of 100 pages (6.4mib). its buffer property will return an arraybuffer. var memory = new webassembly.memory({initial:10, maximum:100}); the second way to get a webassembly.memory object is to have it exported by a webassembly module. ...
... it exported by a webassembly module. the following example (see memory.html on github, and view it live also) fetches and instantiates the loaded memory.wasm byte code using the webassembly.instantiate
streaming() method, while importing the memory created in the line above. it then stores some values in that memory, then exports a function and uses it to sum some values. webassembly.instantiate
streaming(fetch('memory.wasm'), { js: { mem: memory } }) .then(obj => { var i32 = new uint32array(memory.buffer); for (var i = 0; i < 10; i++) { i32[i] = i; } var sum = obj.instance.exports.accumulate(0, 10); console.log(sum); }); creating a shared memory by default, webassembly memories are unshared. you can create a shared memory by passing shared: true in the constructor's initializat...
WebAssembly.Table.prototype.get() - JavaScript
nction reference — this is an exported webassembly function, a javascript wrapper for an underlying wasm function. exceptions if index is greater than or equal to table.prototype.length, a rangeerror is thrown. ...
...function. exceptions if index is greater than or equal to table.prototype.length, a rangeerror is thrown. examples using get the following example (see table.html on github, and view it live also) compiles and instantiates the loaded table.wasm byte code using the webassembly.instantiate
streaming() method. it then retrieves the references stored in the exported table. webassembly.instantiate
streaming(fetch('table.wasm')) .then(function(obj) { var tbl = obj.instance.exports.tbl; console.log(tbl.get(0)()); // 13 console.log(tbl.get(1)()); // 42 }); note how you've got to include a second function invocation operator at the end of the accessor to actually retrieve the value stored inside the reference (e.g. get(0)() rather than get(0)) — it is a function rather than a simple value.
Authoring MathML - MathML
vailable on all platforms. you must run the programs on your computer and have some kind of workflow to get the web pages at the end ; that may be a bit tedious. binary programs are not appropriate to integrate them in a mozilla extension or xul application. texzilla can be used from the command line and will essentially have the same support as itex2mml described below. however, the
stream filter behavior is not implemented yet. if you only want to parse simple latex mathematical expressions, you might want to try tools like itex2mml or blahtex. the latter is often available on linux distributions. let's consider the former, which was originally written by paul gartside at the beginning of the mozilla mathml project and has been maintained by jacques distler since then. it's a sma...
...lter behavior is not implemented yet. if you only want to parse simple latex mathematical expressions, you might want to try tools like itex2mml or blahtex. the latter is often available on linux distributions. let's consider the former, which was originally written by paul gartside at the beginning of the mozilla mathml project and has been maintained by jacques distler since then. it's a small
stream filter written in c/c++ and generated with flex and bison ; in particular it is very fast. install flex/bison as well as the classical compiler and make tools. on unix, you can then download itex2mml, build and install it: wget http://golem.ph.utexas.edu/~distler/blog/files/itextomml.tar.gz; \ tar -xzf itextomml.tar.gz; \ cd itex2mml/itex-src; make sudo make install now suppose that you have a...
Image file type and format guide - Web media technologies
via predictive coding based on the vp8 video codec, and lossless compression that uses substitutions for repeating data. lossy webp images average 25–35% smaller than jpeg images of visually similar compression levels. lossless webp images are typically 26% smaller than the same images in png format. webp also supports animation: in a lossy webp file, the image data is represented by a vp8 bit
stream, which may contain multiple frames. lossless webp holds the anim chunk, which describes the animation, and the anmf chunk, which represents a frame of an animation sequence. looping is supported. webp now has broad support in the latest versions of major web browsers, although it does not have deep historical support. provide a fallback in either jpeg or png format, such as with the <picture> el...
...n the latest versions of major web browsers, although it does not have deep historical support. provide a fallback in either jpeg or png format, such as with the <picture> element. ...
Caching compiled WebAssembly modules - WebAssembly
=> { if we do, we instantiate it with the given import object: console.log(`found ${url} in wasm cache`); return webassembly.instantiate(module, importobject); }, if not, we compile it from scratch and then store the compiled module in the database with a key of url, for next time we want to use it: errmsg => { console.log(errmsg); return webassembly.instantiate
streaming(fetch(url)).then(results => { storeindatabase(db, results.module); return results.instance; }); }) }, note: it is for this kind of usage that webassembly.instantiate() returns both a module and an instance: the module represents the compiled code and can be stored/retrieved in idb or shared between workers via postmessage(); the instance is stateful and contains t...
...e instance is stateful and contains the callable javascript functions, therefore it cannot be stored/shared. if opening the database failed (for example due to permissions or quota), we fall back to simply fetching and compiling the module and don't try to store the results (since there is no database to store them into). ...
Exported WebAssembly functions - WebAssembly
...
... we then get the function exported from the module, retrieve the functions it references via tbl.get() and log the result of invoking each one to the console. next, we use set() to make the othertable table contain references to the same functions as the tbl table. to prove this, we then retrieve these references back from othertable and print their results to console too, which giv...
Low-Level APIs - Archive of obsolete content
apis to broadcast and subscribe to events. event/target create objects that broadcast events. frame/hidden-frame creates firefox frames (i.e. xul <iframe> elements) that are not displayed to the user. frame/utils provides helper functions for working with platform internals like frames and browsers. fs/path provides access to the local filesystem with the nodejs path module api. io/byte-
streams provides
streams for reading and writing bytes. io/file provides access to the local filesystem. io/text-
streams provides
streams for reading and writing text. lang/functional functional helper methods. lang/type functions for working with type detection. loader/cuddlefish the sdk's module loader. loader/sandbox create javascript sandboxes and execute scripts in them. net/url enab...
Developing for Firefox Mobile - Archive of obsolete content
nt/content supported content/loader supported content/mod supported content/worker supported core/heritage supported core/namespace supported core/promise supported event/core supported event/target supported frame/hidden-frame supported frame/utils supported io/byte-
streams supported io/file supported io/text-
streams supported lang/functional supported lang/type supported loader/cuddlefish supported loader/sandbox supported net/url supported net/xhr supported places/bookmarks not supported places/favicon not supported places/history ...
Local Storage - Archive of obsolete content
file.txt"); // do stuff with the file. files are handled with the nsifile interface. an nsifile doesn't necessarily represent an existing file, as in the previous examples. you first specify the file using nsifile and then use nsifile.create() to actually write it out to disk. you can also check if an nsifile exists using nsifile.exists(). to read and write information in files, you need to use
stream objects. you can read more about reading and writing files here. in general you won't need to do this directly, but it's always useful to know. finally, there's the issue of deleting local files when the extension is going to be uninstalled. whether this is necessary or not is a matter of preference. some extension developers prefer to leave the data there, so that if the user chooses to install...
Promises - Archive of obsolete content
ll, (e) => { self.reporterror("publication failed", e); }); file io file io in add-ons should be done via the os.file api, which provides a simple, but powerful, interface for reading, writing, and manipulating both text and binary files. it is also available for use off-main-thread in workers as a synchronous api. this interface replaces the previous, complicated xpcom nsifile and
streams apis, and their related javascript helper modules. these older interfaces should be avoided, even in their asynchronous forms, due to their performance penalties and needless complexity. representative example usage components.utils.import("resource://gre/modules/osfile.jsm"); task.spawn(function* () { // retrieve file metadata to check modification time. let info = yield os.file.stat...
Getting the page URL in NPAPI plugin - Archive of obsolete content
ntifier. identifier = npn_getstringidentifier( "href" ); // get the location property from the location object. bool b2 = npn_getproperty( m_pnpinstance, locationobj, identifier, &variantvalue ); this code is just a rough example. remember to release any references after using them. tradeoffs: uses npapi only works in most browsers does not work in mozillas older than firefox 1.0 via npp_new
stream from braden mcdaniel: if you want the uri of the resource for which the plug-in is invoked, the most npapi-friendly way to do that is to get it from the np
stream that is passed to npp_new
stream. tradeoffs: npapi only probably works in all browsers, all versions is sort of backwards (?) advantages / disadvantages ? via dom from benjamin smedberg: the npapi gives you the ability to get access...
List of Mozilla-Based Applications - Archive of obsolete content
music xulrunner application spicebird collaboration suite spiderape embedding tool uses mozilla spidermonkey splashtop web browser browser part of instant-on operating system sqlite-manager database manager standalone version of add-on stealthsurfer secure internet tools on usb key uses firefox and thunderbird
streambase complex event processing platform seems to use xulrunner stylizer css editor css editor css editor with built-in firebug-like diagnostics and gecko 1.8 preview sun java enterprise system server products uses nss sundial browser with advanced domain name technology based on firefox surfeasy private and secure web browsing ...
MMgc - Archive of obsolete content
e assembly code in the avm+. #2 can be found by examining all non-const methods of gc objects (and making all fields private, something the avm+ code base does already). #3 is a little harder because there are a good # of gc roots. this is an unfortunate artifact of the existing code base, the avm+ is relatively clean and its reachability graph consists of basically 2 gc roots (the avmcore and url
streams) but the avm- has a bunch (currently includes securitycallbackdata, moviecliploader, camerainstance, fappacket, microphoneinstance, csoundchannel, urlrequest, responceobject, url
stream and url
streamsecurity). in order to make things easier we could avoid wb's for #3 by marking the root set twice. the first increment pushes the root set on to the queue and when the queue is empty we process the r...
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
.so /usr/lib/thunderbird-1.0.2/defaults/autoconfig /usr/lib/thunderbird-1.0.2/defaults/autoconfig/platform.js /usr/lib/thunderbird-1.0.2/defaults/autoconfig/prefcalls.js bugs reports related for the record, for old 1.0.x releases... unwanted white space reappeared unfortunately the 'blank space bug' has reappeared in thunderbird 1.0.2. see bug 229271. although it was corrected in mozilla main
stream: mozilla/extensions/pref/autoconfig/src/nsldapsyncquery.cpp 1.7.2.1 by late 2004, it is still present in thunderbird 1.0.2 at least :-(, so i applied the workaround i proposed in that bug report (start_pos += 1;). thunderbird 2.x beta 2 recently (2007/03/21) i've tested with thunderbird 2 beta 2 (2007/01/16) to check if autoconfig + ldap is still supported . apprently it's ok . autonfig api is ...
Notes on HTML Reflow - Archive of obsolete content
must be wrapped. some reflows are immediate in response to user or script actions; for example, resizing the window or changing the document's default font. these are dispatched directly from the presentation shell (e.g., nsipresshell::stylechangereflow), and affect the entire frame tree. other reflows are incremental and are dealt with asynchronously; for example, when content
streams in from the network. incremental reflows are queued by the presentation shell for batched dispatch. reflow state the reflow state object, nshtmlreflowstate, is used to pass constraining information "down" from parent frames to child frames. for example, a <div> with a constrained width (e.g., set via the css width property) would note this in the reflow state object before flowing its c...
Visualizing an audio spectrum - Archive of obsolete content
culates and displays fast fourier transform (fft) spectrum data for the playing audio. the function handling the loadedmetadata event stores the metadata of the audio element in global variables; the function for the mozaudioavailable event does an fft of the samples and displays them in a canvas. note: you can use the audionode called analysernode to perform real-time fft analysis on an audio
stream, rather than the code shown below. <!doctype html> <html> <head> <title>javascript spectrum example</title> </head> <body> <audio id="audio-element" src="song.ogg" controls="true" style="width: 512px;"> </audio> <div><canvas id="fft" width="512" height="200"></canvas></div> <script> var canvas = document.getelementbyid('fft'), ...
External CVS snapshots in mozilla-central - Archive of obsolete content
mozilla-central contains copies of external software modules that it depends on. the following list of directories (incomplete) contain them. those directories shall be considered read-only, changes shall be delivered to the up
stream software projects. eventually we'd like to have acls, but as of today there is no protection for accidental commits to those directories. such changes will get overwritten without warning on importing the next updated version. nspr nsprpub nss dbm security/dbm security/coreconf security/nss special procedures must be used to update these to newer snapshots of the up
stream software projects. the procedure for nspr and nss is documented here. ...
Building Firefox with Rust code - Archive of obsolete content
here's only one copy of a given crate in a build; this was a deliberate decision to try and avoid code bloat in libxul. if this turns out to be a serious problem in practice, we can look into ways of relaxing that check. if you need to locally patch a third-party crate, you'll need to add a [replace] section to the referencing cargo.toml to declare that the vendored source shouldn't match the up
stream release. this works even if you use the existing vendored source location, but be aware that other vendor updates could clobber your patch in that case. testing rust code there's a simple linkage unit test in the tree. you can use it to check that rust is enabled and working with your build setup. ./mach gtest rust.* look for the rust.callfromcpp test to pass, along with any others. ...
Helper Apps (and a bit of Save As) - Archive of obsolete content
data. the nsexternalapphandler does whatever it decided to do. nsimimeinfo lookup look in built-in list which the user cannot override (types we handle internally). look in user preferences. ask the os: registry on windows. internet config on the mac. mailcap/mime.types on linux. look in second built-in list, which the user can override. nsexternalapphandler details implements nsi
streamlistener. gets notifications from necko as the data comes in. four primary tasks: sets up temporary file and instantiate the nsihelperapplauncherdialog in onstartrequest. puts the data in the file as ondataavailable notifications come in. knows how to launch a helper application on the data based on the nsimimeinfo. knows how to save the data to disk at a given location if the user decides t...
Modularization techniques - Archive of obsolete content
g whether or not a dll can be unloaded: whether any of its factories are currently in use, and whether anyone has locked the server. if nscanunload() is not implemented, the dll will not be unloaded. the following example turns nssample.cpp into a file that can be compiled into a dll. the differences are marked with strong emphasis. there really aren't that many. ...
Mozilla Application Framework in Detail - Archive of obsolete content
orting gecko technologies provide a complete set of resources for efficient development, including full support of web standards, a cross-platform/cross-device user interface language, an extensible architecture and embedding technologies. with its unprecedented power, speed and standards support, the gecko browser engine represents a major advance for developers. with gecko, developers seeking a
streamlined way to create and distribute web-based services across multiple platforms and devices can write once to w3c standards and their content and web applications will be accessible from across computing platforms and devices. gecko is based on contributions from mozilla.org, the organization chartered with managing netscape's open source initiative among thousands of internet developers and parti...
Nanojit - Archive of obsolete content
overview nanojit is a small, cross-platform c++ library that emits machine code. both the tamarin jit and the spidermonkey jit (a.k.a. tracemonkey) use nanojit as their back end. you can get nanojit by cloning the tamarin-redux mercurial repository at http://hg.mozilla.org/tamarin-redux. it's in the nanojit directory. the input for nanojit is a
stream of nanojit lir instructions. the term lir is compiler jargon for a language used internally in a compiler that is usually cross-platform but very close to machine language. it is an acronym for "low-level intermediate representation". a compiler's lir is typically one of several partly-compiled representations of a program that a compiler produces on the way from raw source code to machine code. an application using nanojit creates a na...
BundleLibrary - Archive of obsolete content
internet radio that only plays music you like. reddit: reddit.webapp remember the milk: rtm.webapp (note: should work with google gears with some help) rsizr image editor rsizr.webapp seeqpod: seeqpod.webapp playable music search engine. slimtimer client slimtimer.webapp a very useful time-tracking tool with a "slim" client spagobi spagobi.webapp a web collaborative business intelligence platform
streamy
streamy.webapp (
streamy is a pretty powerful, next-gen online rss feed reader. ) studivz: studivz.webapp wassr: wassr.webapp weightwatchers.com plan manager : weightwatchers.webapp widgetop.com - dashboard widget web desktop: widgetop.webapp yahoo! mail: ymail.webapp (note that this fakes a firefox user agent string while running, which may affect other running web applications.) ...
File object - Archive of obsolete content
ectories and pipelines. file.hasrandomaccess true if random access is supported for this file. binary (utf-8) files and pipelines (including file.intput) do not support random access. file.hasautoflush force a flush on each line break? (readonly) file.position the file position. writing to the property moves the file pointer. file.isnative true if the file is backed by a native stdio file
stream. (i.e. file.input, file.output, file.error or a pipeline) methods file.open() opens the file, specifying file mode and type. file.close() closes the file. file.remove() removes the file, provided it is not open. file.copyto() creates a verbatim copy of the file at a new location. file.renameto() removes the file. file.flush() flushes the operating system's write buffers for the fi...
Learn XPI Installer Scripting by Example - Archive of obsolete content
d outside the main block if the earlier verification process is not successful. note also the comments that indicate the success of various steps in the process--including the performinstall and cancelinstall steps--are written to the install log using the logcomment, described in the following section. installation logging logging is an important feature of the xpinstall api that can help you
streamline and debug your installations. in the example in the executing the installation section and in many places in the installation script, the logcomment api is used to write data to a log file that can then be reviewed when things don't go as planned. the install log is created in the product directory by default (where the browser executable is). if the installation doesn't have proper permissi...
Working With Directories - Archive of obsolete content
there are alternative xpcom apis you can use, your help in updating this pages to use the supported api is very much welcome! other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes. ...
IO - Archive of obsolete content
file and
stream guide: [ nsiscriptableio | accessing files | getting file information | reading from files | writing to files | moving, copying and deleting files | uploading and downloading files | working with directories ] important note: the pages from the file and
stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes). there are alternative xpcom apis you can use, your help in updating this pages to use the supported api is very much welcome! other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes. files and
streams this section describes how to access and...
Moving, Copying and Deleting Files - Archive of obsolete content
there are alternative xpcom apis you can use, your help in updating this pages to use the supported api is very much welcome! other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes. ...
TOC - Archive of obsolete content
there are alternative xpcom apis you can use, your help in updating this pages to use the supported api is very much welcome! other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs, reading textual data, writing textual data, list of file-related error codes. ...
The Joy of XUL - Archive of obsolete content
ghly different ways. in one respect, overlays are synonymous with "include" files in other languages because an application may specify that an overlay be included in its definition. but overlays can also be specified externally, enabling the designer to superimpose them upon an application without changing the original source. in practical terms, this enables developers to maintain one code
stream for a given application, then apply custom branding or include special features for customers with a completely independent code base. this leads to an overall solution that is easier and less costly to maintain in the long run. there is an additional benefit to overlays for software developers who intend to add features to mozilla that they wish to keep proprietary. the netscape public lice...
XUL Coding Style Guidelines - Archive of obsolete content
commendation. see details here. making xul localizable -- mandatory in the past, ui (display) related resource descriptions are stored in *.rc (for windows client) or *.ad (for unix client) so that they can be localized for a specific language or culture. in the new world, mozilla 5.0, this is not true any more. most of the windows and dialogs in mozilla will be described using xul. to make xul
stream/file localizable, several guidelines are to be adopted to make the translation work easier and less error-prone. the issues are discussed in details here: what is localizable? widget resources content data style info layout geometry how to make them localizable? localization notes localization notes are the xul writers' notes to the localizers/translators. they are placed above the actual ent...
Mozilla release FAQ - Archive of obsolete content
team, the freedows team, or any of the many other open source operating system groups out there. how about a netscape release of linux? this isn't quite so far fetched, but it has the problem of possibly doing a great deal of harm to the relations between netscape and several unix vendors who bundle netscape's servers. it is unlikely that netscape would do anything that would endanger its revenue
stream. as another point, there are already plenty of linux distributions out there, most of them doing a pretty good job of making a usable system. reinvention of the wheel is a poor use of volunteers. why don't we make a way to compress all the components of a webpage into one big file, and send that across? this breaks a lot of things that work currently. it is very difficult to determine what compon...
NPP_URLNotify - Archive of obsolete content
reason, void* notifydata); parameters the function has the following parameters: instance pointer to the current plug-in instance. url url of the npn_geturlnotify() or npn_posturlnotify() request that has completed. reason reason code for completion of request. values: npres_done (most common): completed normally. npres_user_break: user canceled
stream directly by clicking the stop button or indirectly by some action such as deleting the instance or initiating higher-priority network operations. npres_network_err:
stream failed due to problems with network, disk i/o, lack of memory, or other problems. notifydata plug-in-private value for associating a previous npn_geturlnotify() or npn_posturlnotify() request with a subsequent npp_ur...
Array.observe() - Archive of obsolete content
it's equivalent to object.observe() invoked with the accept type list ["add", "update", "delete", "splice"]. however, this api has been deprecated and removed from browsers. you can use the more general proxy object instead. syntax array.observe(arr, callback) parameters arr the array to be observed. callback the function called each time changes are made, with the following argument: changes an array of objects each representing a change. ...
Object.observe() - Archive of obsolete content
however, this api has been deprecated and removed from browsers. you can use the more general proxy object instead. syntax object.observe(obj, callback[, acceptlist]) parameters obj the object to be observed. callback the function called each time changes are made, with the following argument: changes an array of objects each representing a change. the properties of these change objects are: name: the name of the property which was changed. ...
MSX Emulator (jsMSX) - Archive of obsolete content
to tightly integrate existing msx programs in web page logic. how to help lots of work to optimize the performance and add msx 2.0, 2.0+ and turbor features are still necessary. version 1.0 will release an optimized javascript engine for msx 1.0. version 2.0, 3.0 and 4.0 will be compatible with msx 2.0, 2.0+ and turbor respectively. an uncompress javascript function able to read zip and lhz file
streams is also necessary to load compressed rom files. if you think you'd like to participate, are just curious, or want to say hello, please have a look at the project and please drop a line to the project forum. external links view the online demo (requires firefox 2+) jsmsx project see also drawing graphics with canvas canvas tutorial jsc64 the 100% javascript / canvas commodore 64 emulator ...
Choosing Standards Compliance Over Proprietary Practices - Archive of obsolete content
ich allows them to more easily plan and predict. with processes, organizations can make release schedules, implement marketing plans, analyze resource allocations, and make adjustments when needed. adherence to standards and processes can actually provide a level of flexibility because development does become predictable. in addition to predictability, standard processes improve understanding and
streamline costs. common development process as an organization matures, managers and engineers develop a fundamental understanding of the importance of requiring adherence to these processes. when projects are proposed, they are evaluated to ensure compatibility with the overall business strategy. product marketing must then analyze the marketability of the application/product, and then conduct in-de...
Displaying a graphic with audio samples - Archive of obsolete content
the following example shows how to take samples from an audio
stream and display them behind an image (in this case, the mozilla logo), giving the impression that the image is built from the samples. <!doctype html> <html> <head> <title>javascript spectrum example</title> </head> <body> <audio id="audio-element" src="revolve.ogg" controls="true" style="width: 512px;"> </audio> <div><canvas id="fft" width="512" height="200"></canvas></div> <img id="mozlogo" style="display:none" src="mozilla2.png"></img> <script> var canvas = document.getelementbyid('fft'), ctx = canvas.getcontext('2d'), channels, rate, framebufferlength, fft; function loadedmetadata() { channel...
Examples - Game development
simulation simulation of a bustling crowd of people all trying to reach their opposite positions. svg masking experiment an xray machine, creating using an svg mask. realistic water simulation flowing water, like the waves on the ocean. dungeon demo haxor-based dungeon scene with walkable character. massive assault tech demo rendered archipelago with futuristic military vehicles. flight
stream 3d globe with simulated flight paths. webgl filters demo showing webgl filters being used to add effects to html elements. svg isometic tiles generating isometric tiles with svg matricies. threejs app player a player into which you can load and run three.js examples. ...
Index - Game development
t from the firefox marketplace or check the source code of the demo along with all the other resources on the gamepad api content kit. 30 implementing game control mechanisms controls, desktop, gamepad, games, javascript, laptop, mobile, keyboard, mouse, touch one of html5's main advantages as a game development platform is the ability to run on various platforms and devices.
streamlining cross device differences creates multiple challenges, not least when providing appropriate controls for different contexts. in this series of articles we will show you how you can approach building a game that can be played using touchscreen smartphones, mouse and keyboard, and also less common mechanisms such as gamepads. 31 desktop gamepad controls controls, desktop, gamepa...
Game promotion - Game development
discussion in comments if people have any questions. if portals you contact are not interested in your content because you don't have any experience yet, try writing tutorials and publish them on your own blog first. it's the easiest way to train your writing skills on your own. youtubers it's a rising trend — don't underestimate the power of youtubers playing your game, talking about it and
streaming their experience to give you lots of promotion. you should also be realistic however — don't think this alone will skyrocket your downloads or visits, and be prepared to deal with bad reviews as well as good ones. there are two options to get coverage from the youtubers: first is you contact them directly and send a link to your game via email or private message. the second is earned in tim...
Implementing game control mechanisms - Game development
in this series of articles we will show you how you can approach building a game that can be played using touchscreen smartphones, mouse and keyboard, and also less common mechanisms such as gamepads. case study we'll be using the captain rogers: battle at andromeda demo as an example. ...
WebRTC data channels - Game development
however, will take advantage of some libraries that can help trivialize the work, and will demonstrate ways to use abstraction to work around implementation differences between browsers. hopefully, of course, those differences will fade away in time. using the p2p library one library you can use is the p2p library. this library provides a simple api for creating peer connections and setting up
streams and data channels. there's also a broker server component and a hosted broker you can use instead of having to set one up for yourself. note: we will continue to add content here soon; there are some organizational issues to sort out. original document information author(s): alan kligman source article: webrtc data channels for great multiplayer other contributors: robert nyman copyri...
Cipher - MDN Web Docs Glossary: Definitions of Web-related terms
on ciphers), but none of them were cryptographically secure except for the one-time pad. modern ciphers are designed to withstand attacks discovered by a cryptanalyst. there is no guarantee that all attack methods have been discovered, but each algorithm is judged against known classes of attacks. ciphers operate two ways, either as block ciphers on successive blocks, or buffers, of data, or as
stream ciphers on a continuous data flow (often of sound or video). they also are classified according to how their keys are handled: symmetric key algorithms use the same key to encode and decode a message. the key also must be sent securely if the message is to stay confidential. asymmetric key algorithms use a different key for encryption and decryption. ...
Continuous Media - MDN Web Docs Glossary: Definitions of Web-related terms
continuous media is data where there is a timing relationship between source and destination. the most common examples of continuous media are audio and motion video. continuous media can be real-time (interactive), where there is a "tight" timing relationship between source and sink, or
streaming (playback), where the relationship is less strict. css can be used in a variety of contexts, including print media and some css, in particular, that used for layout behaves differently depending on the context it is in. continuous media, therefore, identifies a context where the content is not broken up, it flows continuously. web content displayed on a screen is continuous media, as is spoken content. ...
ITU - MDN Web Docs Glossary: Definitions of Web-related terms
ication, including telegraph, radio, telephony and the internet. from defining rules for ensuring transmissions get to where they need to go to and creating the "sos" alert signal used in morse code, the itu has long played a key role in how we use technology to exchange information and ideas. in the internet age, the itu's role of establishing standards for video and audio data formats used for
streaming, teleconferencing, and other purposes. for example, the itu and the moving picture experts group (mpeg) worked together to develop and publish, as well as to maintain, the various mpeg specifications, such as mpeg-2 (itu h.262), avc (itu h.264), and hevc (itu h.265). learn more general knowledge itu web site learn about it itu history portal ...
TCP - MDN Web Docs Glossary: Definitions of Web-related terms
tcp guarantees the delivery of data and packets in the same order as they were sent. vint cerf and bob kahn, who were darpa scientists at the time, designed tcp in the 1970s. tcp role is to ensure the packets are reliably delivered, error free. ...
UDP (User Datagram Protocol) - MDN Web Docs Glossary: Definitions of Web-related terms
ssing different functions at the source and destination of the datagram. it has no handshaking dialogues, and thus exposes the user's program to any unreliability of the underlying network; there is no guarantee of delivery, ordering, or duplicate protection. if error-correction facilities are needed at the network interface level, an application may use the transmission control protocol (tcp) or
stream control transmission protocol (sctp) which are designed for this purpose. udp is suitable for purposes where error checking and correction are either not necessary or are performed in the application; udp avoids the overhead of such processing in the protocol stack. time-sensitive applications often use udp because dropping packets is preferable to waiting for packets delayed due to retransmissi...
Speculative parsing - MDN Web Docs Glossary: Definitions of Web-related terms
ser ran on the main thread and was blocked after a </script> tag until the script has been retrieved from the network and executed. some html parser, such as firefox since firefox 4, support speculative parsing off of the main thread. it parses ahead while scripts are being downloaded and executed. the html parser starts speculative loads for scripts, style sheets and images it finds ahead in the
stream and runs the html tree construction algorithm speculatively. the upside is that when a speculation succeeds, there's no need to reparse the part of the incoming file that was already scanned for scripts, style sheets and images. the downside is that there's more work lost when the speculation fails. this document helps you avoid the kind of things that make speculation fail and slow down the loa...
MDN Web Docs Glossary: Definitions of Web-related terms
ive request header resource timing response header responsive web design rest rgb ril robots.txt round trip time (rtt) routers rss rtcp (rtp control protocol) rtf rtl (right to left) rtp (real-time transport protocol) and srtp (secure rtp) rtsp: real-time
streaming protocol ruby s safe same-origin policy scm scope screen reader script-supporting element scroll container scrollport sctp sdp search engine second-level domain secure sockets layer (ssl) selector (css) self-executing anonymous function...
Web fonts - Learn web development
there are two important things to bear in mind about web fonts: browsers support different font formats, so you'll need multiple font formats for decent cross-browser support. for example, most modern browsers support woff/woff2 (web open font format versions 1 and 2), the most efficient ...
What do common web layouts contain? - Learn web development
there. summary there's a reason we talk about web design. you start out with a blank page, and you can take it so many directions. and if you don't have much experience, starting out with a blank page might be a bit scary. we have over 25 years' experience and we'll give you some common rules of thumb to help you design your site. even now with the new focus on mobile web, almost all main
stream webpages are built from these parts: header visible at the top of every page on the site. contains information relevant to all pages (like site name or logo) and an easy-to-use navigation system. main content the biggest region, containing content unique to the current page. stuff on the side 1) information complementing the main content; 2) information shared among a subset of pages; 3) ...
JavaScript basics - Learn web development
f is relatively compact, yet very flexible. developers have written a variety of tools on top of the core javascript language, unlocking a vast amount of functionality with minimum effort. these include: browser application programming interfaces (apis) built into web browsers, providing functionality such as dynamically creating html and setting css styles; collecting and manipulating a video
stream from a user's webcam, or generating 3d graphics and audio samples. third-party apis that allow developers to incorporate functionality in sites from other content providers, such as twitter or facebook. third-party frameworks and libraries that you can apply to html to accelerate the work of building sites and applications. it's outside the scope of this article—as a light introduction to j...
Index - Learn web development
sts. the modules provide a general introduction to server-side programming, along with specific beginner-level guides on how to use the django (python) and express (node.js/javascript) web frameworks to create basic applications. 218 properly configuring server mime types http by default, many web servers are configured to report a mime type of text/plain or application/octet-
stream for unknown content types. as new content types are invented or added to web servers, web administrators may fail to add the new mime types to their web server's configuration. this is a major source of problems for users of gecko-based browsers, which respect the mime types as reported by web servers and web applications. 219 server-side website programming first steps beginner, c...
Introducing asynchronous JavaScript - Learn web development
ing operation, is terrible for use in real world applications. asynchronous javascript for reasons illustrated earlier (e.g. related to blocking), many web api features now use asynchronous code to run, especially those that access or fetch some kind of resource from an external device, such as fetching a file from the network, accessing a database and returning data from it, accessing a video
stream from a web cam, or broadcasting the display to a vr headset. why is this difficult to get to work using synchronous code? let's look at a quick example. when you fetch an image from a server, you can't return the result immediately. that means that the following (pseudocode) wouldn't work: let response = fetch('myimage.png'); let blob = response.blob(); // display your image blob in the ui some...
Drawing graphics - Learn web development
cene as viewed by our camera, then finally call requestanimationframe() to schedule drawing our next frame. let's have another quick look at what the finished product should look like: you can find the finished code on github. note: in our github repo you can also find another interesting 3d cube example — three.js video cube (see it live also). this uses getusermedia() to take a video
stream from a computer web cam and project it onto the side of the cube as a texture! summary at this point, you should have a useful idea of the basics of graphics programming using canvas and webgl and what you can do with these apis, as well as a good idea of where to go for further information. have fun! ...
Manipulating documents - Learn web development
on the client-side (for example using a local database or other storage mechanism), attach an event handler to the current window, and more. the navigator represents the state and identity of the browser (i.e. the user-agent) as it exists on the web. in javascript, this is represented by the navigator object. you can use this object to retrieve things like the user's preferred language, a media
stream from the user's webcam, etc. the document (represented by the dom in browsers) is the actual page loaded into the window, and is represented in javascript by the document object. you can use this object to return and manipulate information on the html and css that comprises the document, for example get a reference to an element in the dom, change its text content, apply new styles to it, create...
Client-side web APIs - Learn web development
article, we'll explain the concept, and look at technologies that make it possible, such as xmlhttprequest and the fetch api. third party apis the apis we've covered so far are built into the browser, but not all apis are. many large websites and services such as google maps, twitter, facebook, paypal, etc. provide apis allowing developers to make use of their data (e.g. displaying your twitter
stream on your blog) or services (e.g. displaying custom google maps on your site, or using facebook login to log in your users). this article looks at the difference between browser apis and 3rd party apis and shows some typical uses of the latter. drawing graphics the browser contains some very powerful graphics programming tools, from the scalable vector graphics (svg) language, to apis for drawing...
Aprender y obtener ayuda - Learn web development
the feature's name. if you are looking for some more specific information, you can add other keywords as modifiers, for example "<video> element autoplay attribute", or "date.settime parameters". if you want to search for something that has less obvious buzzwords, you need to think about what is most likely to return what you want. run code after several promises are fulfilled play a video
stream from a webcam in the browser create a linear gradient in the background of your element error messages if you are having a problem with some code and a specific error message is coming up, it is often a good idea to just copy the error message into your search engine and use it as the search term. if other people have had the same problem, there'll likely be some articles or blog posts about ...
Introduction to client-side frameworks - Learn web development
ript wrote tools to solve the problems they faced, and packaged them into reusable packages called libraries, so they could share their solutions with others. this shared ecosystem of libraries helped shape the growth of the web. now, javascript is an essential part of the web, used on 95% of all websites, and the web is an essential part of modern life. users write papers, manage their budgets,
stream music, watch movies, and communicate with others over great distances instantaneously, with text, audio or video chat. the web allows us to do things that used to be possible only in native applications installed on our computers. these modern, complex, interactive websites are often referred to as web applications. the advent of modern javascript frameworks has made it much easier to build high...
Getting started with Vue - Learn web development
t you knowing.) <script src="/static/external/29/29296ccacaa9ed35ed168fc51e36f54fd6f8db9c7786bbf38cc59a27229ba5c2.svg"></script> however, this approach has some limitations. to build more complex apps, you’ll want to use the vue npm package. this will let you use advanced features of vue and take advantage of bundlers like webpack. to make building apps with vue easier, there is a cli to
streamline the development process. to use the npm package & the cli you will need: node.js 8.11+ installed. npm or yarn. note: if you don't have the above installed, find out more about installing npm and node.js here. to install the cli, run the following command in your terminal: npm install --global @vue/cli or if you'd prefer to use yarn: yarn global add @vue/cli once installed, to ini...
CSUN Firefox Materials
firefox 1.5, beyond the status quo "...firefox is a great little browser. it's a quick download, occupies very little disk space, and has a clean, no-nonsense interface." - pc magazine firefox 1.5 is a fast, free, standards compliant web browser which is rapidly gaining recognition for its fresh,
streamlined approach to browsing the web. in addition to winning major awards such as pc world product of the year, firefox has attracted a huge following among savvy users who simply care enough about their web browsing experience to download a new piece of software. websites such as online magazines with sophisticated audiences are now reporting upwards of 25% firefox usage. why do the most discerning users switch to firefox? because firefox rethinks the web, and does away with many of the...
Accessibility and Mozilla
view as part of the orca live region support project. however, many of the concepts were also used during the development of firevox, an at using iaccessible2.accessible toolkit checklistplease contact the mozilla accessibility community with questions or feedback.csun firefox materialsfirefox 1.5 is a fast, free, standards compliant web browser which is rapidly gaining recognition for its fresh,
streamlined approach to browsing the web. in addition to winning major awards such as pc world product of the year, firefox has attracted a huge following among savvy users who simply care enough about their web browsing experience to download a new piece of software. websites such as online magazines with sophisticated audiences are now reporting upwards of 25% firefox usage.embedding api for accessibi...
Old Thunderbird build
be a sibling folder to your source directory. use an absolute path to be sure! building thunderbird before you start, make sure that the version you checked out is not busted. for hg tip, you should see green bs on https://treeherder.mozilla.org/#/jobs?repo=comm-central to start the build, cd into the comm-central subdirectory, and run: ./mozilla/mach build mach is our command-line tool to
streamline common developer tasks. see the mach article for more. building can take a significant amount of time, depending on your system, os, and chosen build options. linux builds on a fast box may take under 15 minutes, but windows builds on a slow box may take several hours. tips for making builds faster. the executable will be at the location listed under running below. building thunderbird and...
Simple Thunderbird build
d that line you can do this in the source/ directory: echo 'ac_add_options --enable-calendar' >> mozconfig building before you start, make sure that the version you checked out is not busted. for hg tip, you should see green bs on https://treeherder.mozilla.org/#/jobs?repo=comm-central to start the build, cd into the source directory, and run: ./mach build mach is our command-line tool to
streamline common developer tasks. see the mach article for more. building can take a significant amount of time, depending on your system, os, and chosen build options. linux builds on a fast box may take under 15 minutes, but windows builds on a slow box may take several hours. tips for making builds faster. the executable will be at the location listed under running below. running to run your bui...
Commenting IDL for better documentation
between the list marker and the item. nested lists should be indented from the previous level by two spaces. other tips some other helpful writing style tips that will help you make your comments cleaner and easier to read and understand: you don't need to include what a method returns in the description. just include the @returns line. this helps avoid repetition and keeps your comment more
streamlined. everything in the doxygen comment before a method, attribute, constant, or whatnot will be used as part of its description when the automatic documentation generator tool scans your idl, so if you don't want it in the docs, you probably shouldn't put it there. use a different format of comment instead, such as simply /* ... */ or even // comment. example this is an example of what the samp...
Experimental features in Firefox
media session api the entire firefox implementation of the media session api is currently experimental. this api is used to customize the handling of media-related notifications, to manage events and data useful for presenting a user interface for managing media playback, and to obtain media file metadata. see bug 1112032 for more details. release channel version added ena...
Index
release of firefox 48. it became a requirement for building gecko in february 2017 with firefox 54. 8 experimental features in firefox experimental, firefox, preferences, features this page lists features that are in nightly versions of firefox along with information on how to activate them, if necessary. 10 firefox ui considerations for web developers activity
stream, firefox, icons, mozilla, new tab, newtab, ui, web, web development, favicon there are a number of places within the firefox user interface where web sites are listed for the user to choose a destination to visit or a site to manage in some way. one example is the new tab page, which includes a "top sites" section showing sites you visit that firefox thinks you're likely to want to visit ag...
Limitations of frame scripts
al file system by processes that host remote content. since frame and process scripts often execute in remote content processes these scripts are subject to the same file access rules placed on remote content. therefore frame scripts should not attempt to access the local file system directly, as these calls will fail. examples of apis add-on authors should avoid in frame scripts: nsifileinput
stream nsifileoutput
stream constructing a file from a string or nsifile (but file objects can be sent via message manager) htmlinputelement.mozsetfilenamearray (alternative: mozsetfilearray) xul and browser ui anything that tries to touch the browser ui or anything to do with xul is likely to not work in the content process. for example: nsipromptservice nsifilepicker nsixul* <need more exam...
Limitations of frame scripts
e chrome process will not work in a frame script. this article lists the most important of these apis. file i/o you should not write to or read from the disk from a frame script, in particular, the profile directory. even if this is possible, you should not do it and may expect that it could stop working at any time. file i/o should all be done in the chrome process. for example: nsifileinput
stream nsifileoutput
stream constructing a file from a string or nsifile (but file objects can be sent via message manager) htmlinputelement.mozsetfilenamearray (alternative: mozsetfilearray) file: uris, see bug 1187099 <...> xul and browser ui anything that tries to touch the browser ui or anything to do with xul is likely not to work in the content process. for example: nsipromptservice nsi...
Embedding Mozilla
you can even construct whole new applications using chrome. documentation gecko embedding basics an introduction to embedding the gecko rendering engine. embedding tips some frequently asked questions about embedding. mozilla embedding apis overview introduction to the mozilla embedding apis. ...
Log.jsm
logstructured(); name parent removeappender(); updateappenders(); and the methods mentioned below: logger methods loggerrepository(); length: 0 keys of prototype: getlogger(); rootlogger storage
streamappender(); length: 1 keys of prototype: doappend(); getinput
stream(); newoutput
stream(); output
stream reset(); structuredformatter(); length: 0 keys of prototype: format(); method overview ...
XPCOMUtils.jsm
ll is returned. function generateqi( interfaces ); parameters interfaces an array of interfaces implemented by the component. return value a queryinterface() function implementation. remarks when you implement an interface that inherits from another one, you should generally list all the base interfaces explicitly, except for nsisupports. for example, if your component implements nsi
streamconverter: mycomponent.prototype = { queryinterface: xpcomutils.generateqi([ components.interfaces.nsirequestobserver, components.interfaces.nsi
streamlistener, components.interfaces.nsi
streamconverter, ]), // ...methods... } importrelative() imports a javascript code module given the calling javascript code module's global object (you should specify this) and a path relative...
JavaScript code modules
n native jvms. iso8601dateutils.jsm provides routines to convert between javascript date objects and iso 8601 date strings. log.jsm (formerly log4moz) provides a log4j style api for logging, log messages to various endpoints, such as the browser console or a file on disk. netutil.jsm provides helpful networking utility functions, including the ability to easily copy data from an input
stream to an output
stream asynchronously. openlocationlasturl.jsm provides access to the last url opened using the "open location" option in the file menu. osfile.jsm allows routines to access files. to which can be read, write, rename, create directories,etc. perfmeasurement.jsm provides access to low-level hardware and os performance measurement tools. pluralform.jsm supplies an easy way to g...
Creating localizable web applications
low localizers to localize english content, such as: text messages, number formats, date formats, word order and sentence structure. note that some strings might be hidden in libraries' code (e.g. error messages), or in javascript libraries and scripts. if you are using pure html instead of gettext to localize your webapp, consider using an additional gettext-like format such as .lang to
streamline localizers' work with repeating content. this is useful for strings occurring in the webapp multiple times, like "return to top", "comments", "click to see larger image" etc. might be also helpful for headers and footers, if you're not using templates to display them. in most of the cases though, you should use gettext whenever technically possible (i.e. the server's php has been built with ...
Mozilla Web Developer FAQ
t required to support externally defined character entities (other than the five pre-defined ones), the use of externally defined character entities (other than the five pre-defined ones) is inherently unsafe in xml documents intended for the web. the best practice is to use straight utf-8 instead of entities. (numeric character references are safe, too.) document.write() is not supported. the
stream that is going into the parser can’t be tampered with in mid-parse. things that look like xml comments are treated as xml comments—even inside script or style elements. elements need to be in the xhtml namespace in order to be treated as xhtml elements. meta tags are not examined for character encoding information. tbody, head, body, and html are not inferred if the tags are not ex...
MailNews automated testing
event-loop-spinning style of operation used by mozmill. message synthesis: create messages by specifying what properties the messages should have. message injection: inject synthesized messages via local or imap (using a fake server). message manipulation: mark messages as read, tag them, untag them, move them to other folders, trash them, etc. enhanced logging: supports generating rich json
streams to disk or over the network for consumption by logsploder or other tools. performance testing mail leak and bloat tests these tests start up thunderbird or seamonkey and record any leaks found, as well as the total memory requirement. although currently based on simple tests, these are useful for determining if new leaks have been introduced. for more information, see leak and bloat tests. ...
Nonblocking IO In NSPR
_fd_nset</tt>, <tt>pr_fd_nclr</tt>, <tt>pr_fd_nisset</tt> do not work. pr_available() when <tt>pr_available()</tt> returns 0, it may mean one of two things: there is no data available for reading on that socket. i.e., <tt>pr_recv()</tt> would block (a blocking socket) or fail with <tt>pr_would_block_error</tt> (a nonblocking socket). the tcp connection on that socket has been closed (end of
stream). these two cases can be distinguished by <tt>pr_poll()</tt>. if <tt>pr_poll()</tt> reports that the socket is readable (i.e., <tt>pr_poll_read</tt> is set in <tt>out_flags</tt>), and <tt>pr_available()</tt> returns 0, this means that the socket connection is closed. current status implemented across all supported platforms. original document information author: wan-teh chang last updat...
I/O Functions
e event is either set or unset. pr_newpollableevent pr_destroypollableevent pr_setpollableevent pr_waitforpollableevent one can call pr_poll with the pr_poll_read flag on a pollable event. whe the pollable event is set, pr_poll returns the the pr_poll_read flag set in the out_flags. manipulating layers file descriptors may be layered. for example, ssl is a layer on top of a reliable byte
stream layer such as tcp. each type of layer has a unique identity, which is allocated by the runtime. the layer implementor should associate the identity with all layers of that type. it is then possible to scan the chain of layers and find a layer that one recognizes and therefore predict that it will implement a desired protocol. a layer can be pushed onto or popped from an existing stack of layers...
PR_Interrupt
imitations and known bugs: there can be a delay for a thread to be interrupted from a blocking i/o function. in all nspr implementations, the maximum delay is at most five seconds. in the pthreads-based implementation on unix, the maximum delay is 0.1 seconds. file i/o is considered instantaneous, so file i/o functions cannot be interrupted. unfortunately the standard input, output, and error
streams are treated as files by nspr, so a pr_read call on pr_stdin cannot be interrupted even though it may block indefinitely. in the nt implementation, pr_connect cannot be interrupted. in the nt implementation, a file descriptor is not usable and must be closed after an i/o function on the file descriptor is interrupted. see the memo using io timeout and interrupt on nt for details. ...
PR NewProcessAttr
prprocessattr *pr_newprocessattr(void); parameters the function has no parameters. returns a pointer to the new process attributes structure. description this function creates a new prprocessattr structure that specifies the attributes of a new process, then returns a pointer to the structure. the new prprocessattr structure is initialized with these default attributes: the standard i/o
streams (standard input, standard output, and standard error) are not redirected. no file descriptors are inherited by the new process. ...
PR_NewTCPSocket
new ipv4 tcp socket. syntax #include <prio.h> prfiledesc* pr_newtcpsocket(void); returns the function returns one of the following values: upon successful completion, a pointer to the prfiledesc object created for the newly opened ipv4 tcp socket. if the creation of a new tcp socket failed, null. description tcp (transmission control protocol) is a connection-oriented, reliable byte-
stream protocol of the tcp/ip protocol suite. pr_newtcpsocket creates a new ipv4 tcp socket. a tcp connection is established by a passive socket (the server) accepting a connection setup request from an active socket (the client). typically, the server binds its socket to a well-known port with pr_bind, calls pr_listen to start listening for connection setup requests, and calls pr_accept to accept a con...
PR_OpenDir
tion has the following parameter: name the pathname of the directory to be opened. returns if the directory is successfully opened, a prdir object is dynamically allocated and the function returns a pointer to it. if the directory cannot be opened, the function returns null. description pr_opendir opens the directory specified by the pathname name and returns a pointer to a directory
stream (a prdir object) that can be passed to subsequent pr_readdir calls to get the directory entries (files and subdirectories) in the directory. the prdir pointer should eventually be closed by a call to pr_closedir. ...
PR_OpenTCPSocket
ipv4), pr_af_inet6 (ipv6), or pr_af_local (unix domain, supported on posix systems only). returns the function returns one of the following values: upon successful completion, a pointer to the prfiledesc object created for the newly opened tcp socket. if the creation of a new tcp socket failed, null. description tcp (transmission control protocol) is a connection-oriented, reliable byte-
stream protocol of the tcp/ip protocol suite. pr_opentcpsocket creates a new tcp socket of the address family af. a tcp connection is established by a passive socket (the server) accepting a connection setup request from an active socket (the client). typically, the server binds its socket to a well-known port with pr_bind, calls pr_listen to start listening for connection setup requests, and calls pr_a...
PR_Read
data. amount the size of buf (in bytes). returns one of the following values: a positive number indicates the number of bytes actually read in. the value 0 means end of file is reached or the network connection is closed. the value -1 indicates a failure. to get the reason for the failure, call pr_geterror. description the thread invoking pr_read blocks until it encounters an end-of-
stream indication, some positive number of bytes (but no more than amount bytes) are read in, or an error occurs. ...
Process Management and Interprocess Communication
t deal with processes. a process is an instance of a program. nspr provides routines to create a new process and to wait for the termination of another process. nspr does not provide an equivalent of the unix fork(). the newly-created process executes its program from the beginning. a new process can inherit specified file descriptors from its parent, and the parent can redirect the standard i/o
streams of the child process to specified file descriptors. note that the functions described in this chapter are not available for macos or win16 operating systems. process management types and constants the types defined for process management are: prprocess prprocessattr process management functions the process manipulation function fall into these categories: setting the attributes of ...
JSS
the jss project has been relocated! as of april 6, 2018, jss has been migrated from mercurial on mozilla to git on github. jss source should now be checked out from the github: git clone git@github.com:dogtagpki/jss.git -- or -- git clone https://github.com/dogtagpki/jss.git all future up
stream enquiries to jss should now use the pagure issue tracker system: https://pagure.io/jss/issues documentation regarding the jss project should now be viewed at: http://www.dogtagpki.org/wiki/jss note: as much of the jss documentation is sorely out-of-date, updated information will be a work in progress, and many portions of any legacy documentation will be re-written over the course of time. stay tuned! legacy jss information can still be found at: source: https://hg.mozi...
JSS 4.4.0 Release Notes
rk security services (nss) 3.29.1 and netscape portable runtime (nspr) 4.13.1 or newer. jss 4.4.0 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/jss/releases/jss_4_4_0_rtm/src/ new in jss 4.40 new functionality new functions new macros notable changes in jss 4.40 picks up work done down
stream for fedora and rhel and used by various linux distributions with includes:. support for ipv6. support for tls v1.1 and tls v1.2 via nss though jss. bugs fixed in jss 4.4.0 this bugzilla query returns all the bugs fixed in nss 4.4.0: https://bugzilla.mozilla.org/buglist.cgi?product=jss&target_milestone=4.4&target_milestone=4.4&bug_status=resolved&resolution=fixed documentation build instru...
NSS 3.12.4 release notes
bug 485658: vfychain -p reports revoked cert bug 485745: modify fipstest.c to support cavs 7.1 drbg testing bug 486304: cert7.db/cert8.db corruption when importing a large certificate (>64k) bug 486405: allocator mismatches in pk12util.c bug 486537: disable execstack in freebl x86_64 builds on linux bug 486698: facilitate the building of major components independently and in a chain manner by down
stream distributions bug 486999: calling ssl_setsockpeerid a second time leaks the previous value bug 487007: make lib/jar conform to nss coding style bug 487162: ckfw/capi build failure on windows bug 487239: nssutil.rc doesn't compile on wince bug 487254: sftkmod.c uses posix file io functions on wince bug 487255: sdb.c uses posix file io functions on wince bug 487487: cert_nametoascii reports !invali...
NSS 3.19.2.1 release notes
g/pub/mozilla.org/security/nss/releases/nss_3_19_2_1_rtm/src/ https://ftp.mozilla.org/pub/nspr/releases/v4.10.10/src/ security advisories the following security-relevant bugs have been resolved in nss 3.19.2.1. users are encouraged to upgrade immediately. bug 1192028 (cve-2015-7181) and bug 1202868 (cve-2015-7182): several issues existed within the asn.1 decoder used by nss for handling
streaming ber data. while the majority of nss uses a separate, unaffected der decoder, several public routines also accept ber data, and thus are affected. an attacker that successfully exploited these issues can overflow the heap and may be able to obtain remote code execution. the following security-relevant bugs have been resolved in nspr 4.10.10, which affect nss. because nss includes portions of...
NSS 3.19.4 release notes
a.org/pub/mozilla.org/security/nss/releases/nss_3_19_4_rtm/src/ https://ftp.mozilla.org/pub/nspr/releases/v4.10.10/src/ security advisories the following security-relevant bugs have been resolved in nss 3.19.4. users are encouraged to upgrade immediately. bug 1192028 (cve-2015-7181) and bug 1202868 (cve-2015-7182): several issues existed within the asn.1 decoder used by nss for handling
streaming ber data. while the majority of nss uses a separate, unaffected der decoder, several public routines also accept ber data, and thus are affected. an attacker that successfully exploited these issues can overflow the heap and may be able to obtain remote code execution. the following security-relevant bugs have been resolved in nspr 4.10.10, which affect nss. because nss includes portions of...
NSS 3.20.1 release notes
a.org/pub/mozilla.org/security/nss/releases/nss_3_20_1_rtm/src/ https://ftp.mozilla.org/pub/nspr/releases/v4.10.10/src/ security advisories the following security-relevant bugs have been resolved in nss 3.20.1. users are encouraged to upgrade immediately. bug 1192028 (cve-2015-7181) and bug 1202868 (cve-2015-7182): several issues existed within the asn.1 decoder used by nss for handling
streaming ber data. while the majority of nss uses a separate, unaffected der decoder, several public routines also accept ber data, and thus are affected. an attacker that successfully exploited these issues can overflow the heap and may be able to obtain remote code execution. the following security-relevant bugs have been resolved in nspr 4.10.10, which affect nss. because nss includes portions of...
NSS API Guidelines
data structures that are read only, like seckeypublickeys or pk11symkeys, need not be protected. many of the data structures in the security code contain some sort of session state or session context. these data structures may be accessed without data protection as long as: this semantic is documented in the functions which use these data structures. these data structures are used for single
streams, and not reused. examples of these data in structures may include things like the pkcs #7 contentinfo structure. example code should be included in the documentation, to show how to safely use these data objects. a major type of global and allocated data that should be examined is various data on lists. queued, linked, and hash table stored objects should be examined with special care. make s...
NSS Sample Code Sample1
rge numbers of symmetric keys wrapping symmetric keys using an rsa key from another server unwrapping keys using your own rsa key pair the main part of the program shows a typical sequence of events for two servers that are trying to extablish a shared key pair. we will add message protection (encryption and macing) examples to this program in the future. sample code #include <io
stream.h> #include "pk11pub.h" #include "keyhi.h" #include "nss.h" // key management for keys share among multiple hosts // // this example shows how to use nss functions to create and // distribute keys that need to be shared among multiple servers // or hosts. // // the management scheme assumes that one host is primary. it // generates the secret keys that will be used by all participating // hosts...
PKCS #11 Module Specs
e, or by escaping the embedded blanks with '\'. the value is considered quoted if the first character after the '=' is ', ", {, [, or <. if the value is quoted, then the value is terminated with and ending quote of the form ', ", ), ], }, or > matching the respective starting quote. ending quotes can be escaped. embedded '\' charaters are considered escape characters for the next character in the
stream. note that case must be preserved in the values. these modules specs can be passed by the application directly to nss via the secmod_loadusermodule() call. to initialize a pkcs #11 module 'on-the-fly'. recognized names all applications/libraries must be able recognize the following name values: library this specifies the path to the pkcs #11 library. name this specifies the name of the...
NSS tools : ssltab
e page is intercepted and passed on to the browser by the debugging tool on intercept. on its way to the browser, the data is printed to the command shell from which you issued the command. data sent from the client to the server is surrounded by the following symbols: --> [ data ] data sent from the server to the client is surrounded by the following symbols: "left arrow"-- [ data ] the raw data
stream is sent to standard output and is not interpreted in any way. this can result in peculiar effects, such as sounds, flashes, and even crashes of the command shell window. to output a basic, printable interpretation of the data, use the -h option, or, if you are looking at an ssl connection, the -s option. you will notice that the page you retrieved looks incomplete in the browser. this is because,...
NSS tools : ssltap
e page is intercepted and passed on to the browser by the debugging tool on intercept. on its way to the browser, the data is printed to the command shell from which you issued the command. data sent from the client to the server is surrounded by the following symbols: --> [ data ] data sent from the server to the client is surrounded by the following symbols: "left arrow"-- [ data ] the raw data
stream is sent to standard output and is not interpreted in any way. this can result in peculiar effects, such as sounds, flashes, and even crashes of the command shell window. to output a basic, printable interpretation of the data, use the -h option, or, if you are looking at an ssl connection, the -s option. you will notice that the page you retrieved looks incomplete in the browser. this is because,...
SSL functions
ater ssl_invalidatesession mxr 3.2 and later ssl_localcertificate mxr 3.4 and later ssl_optionget mxr 3.2 and later ssl_optiongetdefault mxr 3.2 and later ssl_optionset mxr 3.2 and later ssl_optionsetdefault mxr 3.2 and later ssl_peercertificate mxr 3.2 and later ssl_preencryptedfileto
stream mxr 3.2 and later ssl_preencrypted
streamtofile mxr 3.2 and later ssl_rehandshake mxr 3.2 and later ssl_rehandshakewithtimeout mxr 3.11.4 and later ssl_resethandshake mxr 3.2 and later ssl_restarthandshakeaftercertreq mxr 3.2 and later ssl_restarthandshakeafterservercert mxr 3.2 and later ssl_r...
Utility functions
mxr 3.2 and later sec_asn1encode mxr 3.2 and later sec_asn1encodeinteger mxr 3.2 and later sec_asn1encodeitem mxr 3.2 and later sec_asn1encoderabort mxr 3.9 and later sec_asn1encoderclearnotifyproc mxr 3.2 and later sec_asn1encoderclear
streaming mxr 3.2 and later sec_asn1encodercleartakefrombuf mxr 3.2 and later sec_asn1encoderfinish mxr 3.2 and later sec_asn1encodersetnotifyproc mxr 3.2 and later sec_asn1encoderset
streaming mxr 3.2 and later sec_asn1encodersettakefrombuf mxr 3.2 and l...
NSS tools : ssltap
cepted and passed on to the browser by the debugging tool on intercept. on its way to the browser, the data is printed to the command shell from which you issued the command. data sent from the client to the server is surrounded by the following symbols: --> [ data ] data sent from the server to the client is surrounded by the following symbols: "left arrow"-- [ data ] the raw data
stream is sent to standard output and is not interpreted in any way. this can result in peculiar effects, such as sounds, flashes, and even crashes of the command shell window. to output a basic, printable interpretation of the data, use the -h option, or, if you are looking at an ssl connection, the -s option. you will notice that the page you retrieved looks incomplete in the browser. t...
Rhino Debugger
script-arguments] where the options are the same as the shell. the rhino javascript debugger can debug scripts running in multiple threads and provides facilities to set and clear breakpoints, control execution, view variables, and evaluate arbitrary javascript code in the current scope of an executing script. console window the debugger redirects the system.out, system.in, and system.err
streams to an internal javascript console window which provides an editable command line for you to enter javascript code and view system output. the console window maintains a history of the commands you have entered. you may move backward and forward through the history list by pressing the up/down arrow keys on the keyboard. opening scripts you may select the file->open menu item on the menu bar t...
SpiderMonkey 1.8.5
flags))\ $(filter -wl%,$(jsapi_ldflags)) jsapi_ldflags := $(filter-out $(mozjs_install_name_opt),$(jsapi_ldflags)) endif jsapi_ldflags := $(filter-out %libffi.a,$(jsapi_ldflags)) ldflags += $(jsapi_ldflags) future direction the spidermonkey 1.8.5 source release includes an experimental library versioning scheme. this versioning scheme will not be rolled back into the up
stream mozilla source tree(s), and may not be used in future source releases. comments in bug 628723 with regard to its usefulness are appreciated. bugs with the source release tar ball should be copied to wes@page.ca. spidermonkey embedders should also be aware that mozilla has no plans to keep the jsapi, nor the jsdbgapi stable for embedders. we have chosen to concentrate on performance and correctn...
SpiderMonkey 1.8.7
flags))\ $(filter -wl%,$(jsapi_ldflags)) jsapi_ldflags := $(filter-out $(mozjs_install_name_opt),$(jsapi_ldflags)) endif jsapi_ldflags := $(filter-out %libffi.a,$(jsapi_ldflags)) ldflags += $(jsapi_ldflags) future direction the spidermonkey 1.8.5 source release includes an experimental library versioning scheme. this versioning scheme will not be rolled back into the up
stream mozilla source tree(s), and may not be used in future source releases. comments in bug 628723 with regard to its usefulness are appreciated. bugs with the source release tar ball should be copied to wes@page.ca. spidermonkey embedders should also be aware that mozilla has no plans to keep the jsapi, nor the jsdbgapi stable for embedders. we have chosen to concentrate on performance and correctn...
WebReplayRoadmap
systems (linux, android) will be easier than windows, due to the overlap with macos. there is, however, a partial windows port from an older version of the architecture that can replay a simple page but not rewind, which should make writing a complete windows port easier. cloud integration (partially implemented) storing recordings in the cloud and interacting with them via the debugger could
streamline several features described above: difficulties when recording and replaying on different machines with incompatible firefox builds or operating systems will be smoothed out. recordings can be uploaded, and cloud services can locate the correct build and os needed to replay them. management of a corpus of recordings (some which may have been made with different builds or operating systems...
Feed content access API
ue); try { httprequest.onload = inforeceived; httprequest.send(null); } catch(e) { alert(e); } } the nsifeedprocessor interface lets you parse the feed data from several possible sources; in this case, we're loading a document into a string, then parsing that string using its parsefromstring() method. however, you could also parse it from a file using parsefrom
stream(), or directly from an url using parseasync(). the actual processing of the parsed feed is done by a method called handleresult() on the feedtestresultlistener object. that code looks like this: feedtestresultlistener.prototype = { handleresult: function(result) { var feed = result.doc; feed.queryinterface(components.interfaces.nsifeed); // open a new window ...
XML Extras
uctured as a drop-in component and exposes its xml-as-data features both to javascript and c++/xpcom users. the xml extras module is built by default on all platforms, and is included in the browser installers so it is available in the nightly builds. feature status feature status xmlserializer available xmlhttprequest available domparser (string and
stream input source) available web services with soap and wsdl no longer available from gecko 1.9/firefox 3. xml persistence fixptr and xpointer available since 1.4alpha in the core mozilla. moved to xml extras during 1.4beta. see also: xml in mozilla document.load() a few examples dealing with xml from mozillazine knowledge base. qa and testing th...
XPCOM guide
bility are taking place in gecko 2. this article details those changes, and provides suggestions for how to update your code.xpcom hashtable guidea hashtable is a data construct that stores a set of items. each item has a key that identifies the item. items are found, added, and removed from the hashtable by using the key. hashtables may seem like arrays, but there are important differences:xpcom
stream guidein mozilla code, a
stream is an object which represents access to a sequence of characters. it is not that sequence of characters, though: the characters may not all be available when you read from the
stream. ...
Standard XPCOM components
egory manager.nsdirectoryservicethe xpcom directory service. this service returns the locations of "well known" directories in an os-independent manner. for instance, it can give you the path of the system's temporary directory, desktop directory, current working directory, and so on.nslocalfilea component implementing nsilocalfile. nsobserverservicethe xpcom observer service.nsscriptableinput
streama component implementing nsiscriptableinput
stream. ...
imgIEncoder
modules/libpr0n/public/imgiencoder.idlscriptable please add a summary to this article. ...
Initialization and Destruction - Plugins
ivate data at this time. nperror npp_new(npmimetype plugintype, npp instance, uint16 mode, int16 argc, char *argn[], char *argv[], npsaveddata *saved); the plugintype parameter represents the mime type of this instance of the plug-in. you can assign more than one mime type to a plug-in, which could potentially allow the plug-in to respond to data
streams of different types with different interfaces and behavior. the instance parameter represents an npp object, created by the browser. you can store the instance-specific private data in its pdata field (instance->pdata). the mode parameter identifies the display mode in which the plug-in was invoked, either np_embed or np_full. np_embed means that the instance was created by an embed and shar...
Web Audio Editor - Firefox Developer Tools
nd will soon be removed from firefox. for details, see deprecated tools. with the web audio api, developers create an audio context. within that context they then construct a number of audio nodes, including: nodes providing the audio source, such as an oscillator or a data buffer source nodes performing transformations such as delay and gain nodes representing the destination of the audio
stream, such as the speakers each node has zero or more audioparam properties that configure its operation. for example, the gainnode has a single gain property, while the oscillatornode has frequency and detune properties. the developer connects the nodes in a graph, and the complete graph defines the behavior of the audio
stream. the web audio editor examines an audio context constructed in the pa...
AbortController.abort() - Web APIs
syntax controller.abort(); parameters none. return value void. examples in the following snippet, we aim to download a video using the fetch api. we first create a controller using the abortcontroller() constructor, then grab a reference to its associated abortsignal object using the abortcontroller.signal property. ...
AbortController - Web APIs
object. constructor abortcontroller() creates a new abortcontroller object instance. properties abortcontroller.signal read only returns a abortsignal object instance, which can be used to communicate with/abort a dom request. methods abortcontroller.abort() aborts a dom request before it has completed. this is able to abort fetch requests, consumption of any response body, and
streams. examples in the following snippet, we aim to download a video using the fetch api. we first create a controller using the abortcontroller() constructor, then grab a reference to its associated abortsignal object using the abortcontroller.signal property. when the fetch request is initiated, we pass in the abortsignal as an option inside the request's options object (see {signal}, below). t...
AnalyserNode - Web APIs
an analysernode has exactly one input and one output. the node works even if the output is not connected. ...
AudioBufferSourceNode - Web APIs
urcenode which represents an audio source consisting of in-memory audio data, stored in an audiobuffer. it's especially useful for playing back audio which has particularly stringent timing accuracy requirements, such as for sounds that must match a specific rhythm and can be kept in memory rather than being played from disk or the network. to play sounds which require accurate timing but must be
streamed from the network or played from disk, use a audioworkletnode to implement its playback. <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><...
AudioContext.createJavaScriptNode() - Web APIs
iptnode(buffersize, numinputchannels, numoutputchannels); parameters buffersize the buffer size must be in units of sample frames, i.e., one of: 256, 512, 1024, 2048, 4096, 8192, or 16384. it controls the frequency of callbacks asking for a buffer refill. smaller sizes allow for lower latency and higher for better overall quality. numinputchannels the number of input channels in the audio
stream. numoutputchannels the number of output channels in the audio
stream. example the following script illustrates the use of createjavascriptnode(): var sinewave = function(context) { var that = this; this.x = 0; // initial sample number this.context = context; this.node = context.createjavascriptnode(1024, 1, 1); this.node.onaudioprocess = function(e) { that.process(e) }; } sinewav...
AudioContext.getOutputTimestamp() - Web APIs
the getoutputtimestamp() property of the audiocontext interface returns a new audiotimestamp object containing two audio timestamp values relating to the current audio context. the two values are as follows: audiotimestamp.contexttime: the time of the sample frame currently being rendered by the audio output device (i.e., output audio
stream position), in the same units and origin as the context's audiocontext.currenttime. basically, this is the time after the audio context was first created. audiotimestamp.performancetime: an estimation of the moment when the sample frame corresponding to the stored contexttime value was rendered by the audio output device, in the same units and origin as performance.now(). this is the time after the document containing the audio context was first rendere...
AudioListener - Web APIs
lue representing the amount of pitch shift to use when rendering a doppler effect. audiolistener.speedofsound is a double value representing the speed of sound, in meters per second. in a previous version of the specification, the dopplerfactor and speedofsound properties and the setposition() method could be used to control the doppler effect applied to audiobuffersourcenodes connected down
stream — these would be pitched up and down according to the relative speed of the pannernode and the audiolistener. these features had a number of problems: only audiobuffersourcenodes were pitched up or down, not other source nodes. the behavior to adopt when an audiobuffersourcenode was connected to multiple pannernodes was unclear. because the velocity of the panner and the listener were not ...
AudioScheduledSourceNode - Web APIs
event handler. you can't create an audioscheduledsourcenode object directly. instead, use the interface which extends it, such as audiobuffersourcenode, oscillatornode, and constantsourcenode. unless stated otherwise, nodes based upon audioscheduledsourcenode output silence when not playing (that is, before start() is called and after stop() is called). silence is represented, as always, by a
stream of samples with the value zero (0). properties inherits properties from its parent interface, audionode. methods inherits methods from its parent interface, audionode, and adds the following methods: start() schedules the node to begin playing the constant sound at the specified time. if no time is specified, the node begins playing immediately. stop() schedules the node to stop playing...
AudioTrackList - Web APIs
fired when a new audio track has been removed from the media element. also available via the onremovetrack property. usage notes in addition to being able to obtain direct access to the audio tracks present on a media element, audiotracklist lets you set event handlers on the addtrack and removetrack events, so that you can detect when tracks are added to or removed from the media element's
stream. see onaddtrack and onremovetrack for details and examples. examples getting a media element's audio track list to get a media element's audiotracklist, use its audiotracks property. var audiotracks = document.queryselector("video").audiotracks; monitoring track count changes in this example, we have an app that displays information about the number of channels available. to keep it up to d...
AudioWorkletProcessor - Web APIs
roperties port read only returns a messageport used for bidirectional communication between the processor and the audioworkletnode which it belongs to. the other end is available under the port property of the node. methods the audioworkletprocessor interface does not define any methods of its own. however, you must provide a process() method, which is called in order to process the audio
stream. events the audioworkletprocessor interface doesn't respond to any events. usage notes deriving classes to define custom audio processing code you have to derive a class from the audioworkletprocessor interface. although not defined on the interface, the deriving class must have the process method. this method gets called for each block of 128 sample-frames and takes input and output arrays ...
BaseAudioContext.createBiquadFilter() - Web APIs
new (window.audiocontext || window.webkitaudiocontext)(); //set up the different audio nodes we will use for the app var analyser = audioctx.createanalyser(); var distortion = audioctx.createwaveshaper(); var gainnode = audioctx.creategain(); var biquadfilter = audioctx.createbiquadfilter(); var convolver = audioctx.createconvolver(); // connect the nodes together source = audioctx.createmedia
streamsource(
stream); source.connect(analyser); analyser.connect(distortion); distortion.connect(biquadfilter); biquadfilter.connect(convolver); convolver.connect(gainnode); gainnode.connect(audioctx.destination); // manipulate the biquad filter biquadfilter.type = "lowshelf"; biquadfilter.frequency.setvalueattime(1000, audioctx.currenttime); biquadfilter.gain.setvalueattime(25, audioctx.currenttime);...
BaseAudioContext.createPanner() - Web APIs
the panner node is spatialized in relation to the audiocontext's audiolistener (defined by the audiocontext.listener attribute), which represents the position and orientation of the person listening to the audio. syntax baseaudioctx.createpanner(); returns a pannernode. example in the following example, you can see an example of how the createpanner() method, audiolistener and pannernode would be used to control audio spatialisation. ...
BaseAudioContext.createStereoPanner() - Web APIs
syntax baseaudiocontext.createstereopanner(); returns a stereopannernode. example in our stereopannernode example (see source code) html we have a simple <audio> element along with a slider <input> to increase and decrease pan value. ...
BiquadFilterNode.Q - Web APIs
new (window.audiocontext || window.webkitaudiocontext)(); //set up the different audio nodes we will use for the app var analyser = audioctx.createanalyser(); var distortion = audioctx.createwaveshaper(); var gainnode = audioctx.creategain(); var biquadfilter = audioctx.createbiquadfilter(); var convolver = audioctx.createconvolver(); // connect the nodes together source = audioctx.createmedia
streamsource(
stream); source.connect(analyser); analyser.connect(distortion); distortion.connect(biquadfilter); biquadfilter.connect(convolver); convolver.connect(gainnode); gainnode.connect(audioctx.destination); // manipulate the biquad filter biquadfilter.type = "lowshelf"; biquadfilter.frequency.value = 1000; biquadfilter.gain.value = 25; biquadfilter.type = "peaking"; biquadfilter.frequency.valu...
BiquadFilterNode.detune - Web APIs
new (window.audiocontext || window.webkitaudiocontext)(); //set up the different audio nodes we will use for the app var analyser = audioctx.createanalyser(); var distortion = audioctx.createwaveshaper(); var gainnode = audioctx.creategain(); var biquadfilter = audioctx.createbiquadfilter(); var convolver = audioctx.createconvolver(); // connect the nodes together source = audioctx.createmedia
streamsource(
stream); source.connect(analyser); analyser.connect(distortion); distortion.connect(biquadfilter); biquadfilter.connect(convolver); convolver.connect(gainnode); gainnode.connect(audioctx.destination); // manipulate the biquad filter biquadfilter.type = "lowshelf"; biquadfilter.frequency.value = 1000; biquadfilter.gain.value = 25; biquadfilter.detune.value = 100; specifications ...
BiquadFilterNode.frequency - Web APIs
new (window.audiocontext || window.webkitaudiocontext)(); //set up the different audio nodes we will use for the app var analyser = audioctx.createanalyser(); var distortion = audioctx.createwaveshaper(); var gainnode = audioctx.creategain(); var biquadfilter = audioctx.createbiquadfilter(); var convolver = audioctx.createconvolver(); // connect the nodes together source = audioctx.createmedia
streamsource(
stream); source.connect(analyser); analyser.connect(distortion); distortion.connect(biquadfilter); biquadfilter.connect(convolver); convolver.connect(gainnode); gainnode.connect(audioctx.destination); // manipulate the biquad filter biquadfilter.type = "lowshelf"; biquadfilter.frequency.value = 1000; biquadfilter.gain.value = 25; specifications specification status comme...
BiquadFilterNode.gain - Web APIs
new (window.audiocontext || window.webkitaudiocontext)(); //set up the different audio nodes we will use for the app var analyser = audioctx.createanalyser(); var distortion = audioctx.createwaveshaper(); var gainnode = audioctx.creategain(); var biquadfilter = audioctx.createbiquadfilter(); var convolver = audioctx.createconvolver(); // connect the nodes together source = audioctx.createmedia
streamsource(
stream); source.connect(analyser); analyser.connect(distortion); distortion.connect(biquadfilter); biquadfilter.connect(convolver); convolver.connect(gainnode); gainnode.connect(audioctx.destination); // manipulate the biquad filter biquadfilter.type = "lowshelf"; biquadfilter.frequency.value = 1000; biquadfilter.gain.value = 25; specifications specification status comme...
BiquadFilterNode.getFrequencyResponse() - Web APIs
encyarray. for any frequency in frequencyarray whose value is outside the range 0.0 to samplerate/2 (where samplerate is the sample rate of the audiocontext), the corresponding value in this array is nan. return value undefined exceptions invalidaccesserror the three arrays provided are not all of the same length. example in the following example we are using a biquad filter on a media
stream (for the full demo, see our
stream-source-buffer demo live, or read the source.) as part of this demo, we get the frequency responses for this biquad filter, for five sample frequencies. we first create the float32arrays we need, one containing the input frequencies, and two to receive the output magnitude and phase values: var myfrequencyarray = new float32array(5); myfrequencyarray[0] = 1000; ...
BiquadFilterNode.type - Web APIs
new (window.audiocontext || window.webkitaudiocontext)(); //set up the different audio nodes we will use for the app var analyser = audioctx.createanalyser(); var distortion = audioctx.createwaveshaper(); var gainnode = audioctx.creategain(); var biquadfilter = audioctx.createbiquadfilter(); var convolver = audioctx.createconvolver(); // connect the nodes together source = audioctx.createmedia
streamsource(
stream); source.connect(analyser); analyser.connect(distortion); distortion.connect(biquadfilter); biquadfilter.connect(convolver); convolver.connect(gainnode); gainnode.connect(audioctx.destination); // manipulate the biquad filter biquadfilter.type = "lowshelf"; biquadfilter.frequency.value = 1000; biquadfilter.gain.value = 25; specifications specification status comme...
BiquadFilterNode - Web APIs
new (window.audiocontext || window.webkitaudiocontext)(); //set up the different audio nodes we will use for the app var analyser = audioctx.createanalyser(); var distortion = audioctx.createwaveshaper(); var gainnode = audioctx.creategain(); var biquadfilter = audioctx.createbiquadfilter(); var convolver = audioctx.createconvolver(); // connect the nodes together source = audioctx.createmedia
streamsource(
stream); source.connect(analyser); analyser.connect(distortion); distortion.connect(biquadfilter); biquadfilter.connect(convolver); convolver.connect(gainnode); gainnode.connect(audioctx.destination); // manipulate the biquad filter biquadfilter.type = "lowshelf"; biquadfilter.frequency.setvalueattime(1000, audioctx.currenttime); biquadfilter.gain.setvalueattime(25, audioctx.currenttime);...
BlobEvent.BlobEvent() - Web APIs
blobevent object with an associated blob. syntax blobevent = new blobevent({data: aspecificblob}[, timecode]); arguments the blobevent() constructor also inherits arguments from event(). data is a blob associated with the event. timecode optional a domhighrestimestamp to be used in initializing the blob event. specifications specification status comment media
stream recordingthe definition of 'blobevent: blobevent' in that specification. working draft initial definition. ...
BlobEvent.data - Web APIs
the blobevent.data read-only property represents a blob associated with the event. syntax associatedblob = blobevent.data specifications specification status comment media
stream recordingthe definition of 'blobevent.data' in that specification. working draft initial definition. ...
BlobEvent.timecode - Web APIs
estamp indicating the difference between the timestamp of the first chunk in data, and the timestamp of the first chunk in the first blobevent produced by this recorder. note that the timecode in the first produced blobevent does not need to be zero. syntax var timecode = blobevent.timecode value a domhighrestimestamp. specifications specification status comment media
stream recordingthe definition of 'timecode' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid...
Body.arrayBuffer() - Web APIs
the arraybuffer() method of the body mixin takes a response
stream and reads it to completion. it returns a promise that resolves with an arraybuffer. syntax response.arraybuffer().then(function(buffer) { // do something with buffer }); parameters none. return value a promise that resolves with an arraybuffer. examples playing music in our fetch array buffer live, we have a play button. when pressed, the getdata() function is run. note that before playing full audio file will be downloaded. if you need to play ogg during downloading (
stream it) - consider htmlaudioelement: new audio("music.ogg").play(); in getdata() we create a new request using the request() constructor, then use it to fetch an ogg music track. we also use audiocontext.createbuffersource to create an audio buffer...
Body.blob() - Web APIs
it returns a promise that resolves with a blob. syntax response.blob().then(function(myblob) { // do something with myblob }); parameters none. note: if the response has a response.type of "opaque", the resulting blob will have a blob.size of 0 and a blob.type of empty string "", which renders it useless for methods like url.createobjecturl. return value a promise that resolves with a blob. example in our fetch request example (run fetch request live), we create a new request using the request() constructor, then use it to fetch a jpg. ...
Body.formData() - Web APIs
it returns a promise that resolves with a formdata object. note: this is mainly relevant to service workers. if a user submits a form and a service worker intercepts the request, you could for example call formdata() on it to obtain a key-value map, modify some fields, then send the form onwards to the server (or use it locally). syntax response.formdata() .then(function(formdata) { // do something with your formdata }); parameters none. return value a promise that resolves with a formdata object. example tbd. ...
Body.json() - Web APIs
it returns a promise that resolves with the result of parsing the body text as json. syntax response.json().then(data => { // do something with your data }); parameters none. return value a promise that resolves to a javascript object. this object could be anything that can be represented by json — an object, an array, a string, a number... example in our fetch json example (run fetch json live), we create a new request using the request() constructor, then use it to fetch a .json file. ...
Body.text() - Web APIs
it returns a promise that resolves with a usvstring object (text). the response is always decoded using utf-8. syntax response.text().then(function (text) { // do something with the text response }); parameters none. return value a promise that resolves with a usvstring. example in our fetch text example (run fetch text live), we have an <article> element and three links (stored in the mylinks array.) first, we loop through all of these and give each one an onclick event handler so that the getdata() function is run — with the link's data-page identifier passed to it as an argument — when one of the links is clicked. ...
ByteLengthQueuingStrategy.ByteLengthQueuingStrategy() - Web APIs
{highwatermark} an object containing a highwatermark property. this is a non-negative integer defining the total number of chunks that can be contained in the internal queue before backpressure is applied. return value an instance of the bytelengthqueuingstrategy object. exceptions none. examples const queuingstrategy = new bytelengthqueuingstrategy({ highwatermark: 1 }); const readable
stream = new readable
stream({ start(controller) { ... }, pull(controller) { ... }, cancel(err) { console.log("
stream error:", err); } }, queuingstrategy); var size = queuingstrategy.size(chunk); specifications specification status comment
streamsthe definition of 'bytelengthqueuingstrategy()' in that specification. living standard initial definiti...
ByteLengthQueuingStrategy.size() - Web APIs
the size() method of the bytelengthqueuingstrategy interface returns the given chunk’s bytelength property. syntax var size = bytelengthqueuingstrategy.size(chunk); parameters chunk a chunk of data being passed through the
stream. return value an integer representing the byte length of the given chunk. examples const queuingstrategy = new bytelengthqueuingstrategy({ highwatermark: 1 }); const readable
stream = new readable
stream({ start(controller) { ... }, pull(controller) { ... }, cancel(err) { console.log("
stream error:", err); } }, queuingstrategy); var size = queueingstrategy.size(chunk); specifications specification status comment
streamsthe definition of 'size' in that specification. living standard initial definit...
Canvas API - Web APIs
x.fillstyle = 'green'; ctx.fillrect(10, 10, 150, 100); result reference htmlcanvaselement canvasrenderingcontext2d canvasgradient canvasimagesource canvaspattern imagebitmap imagedata renderingcontext textmetrics offscreencanvas path2d imagebitmaprenderingcontext note: the interfaces related to the webglrenderingcontext are referenced under webgl. canvascapturemedia
stream is a related interface. guides and tutorials canvas tutorial a comprehensive tutorial covering both the basic usage of the canvas api and its advanced features. html5 canvas deep dive a hands-on, book-length introduction to the canvas api and webgl. canvas handbook a handy reference for the canvas api. demo: a basic ray-caster a demo of ray-tracing animation using canvas. manipulating...
ChannelMergerNode - Web APIs
2); // reduce the volume of the left channel only var gainnode = ac.creategain(); gainnode.gain.setvalueattime(0.5, ac.currenttime); splitter.connect(gainnode, 0); // connect the splitter back to the second input of the merger: we // effectively swap the channels, here, reversing the stereo image. gainnode.connect(merger, 0, 1); splitter.connect(merger, 1, 0); var dest = ac.createmedia
streamdestination(); // because we have used a channelmergernode, we now have a stereo // media
stream we can use to pipe the web audio graph to webrtc, // mediarecorder, etc. merger.connect(dest); }); specifications specification status comment web audio apithe definition of 'channelmergernode' in that specification. working draft ...
ChannelSplitterNode - Web APIs
2); // reduce the volume of the left channel only var gainnode = ac.creategain(); gainnode.gain.setvalueattime(0.5, ac.currenttime); splitter.connect(gainnode, 0); // connect the splitter back to the second input of the merger: we // effectively swap the channels, here, reversing the stereo image. gainnode.connect(merger, 0, 1); splitter.connect(merger, 1, 0); var dest = ac.createmedia
streamdestination(); // because we have used a channelmergernode, we now have a stereo // media
stream we can use to pipe the web audio graph to webrtc, // mediarecorder, etc. merger.connect(dest); }); specifications specification status comment web audio apithe definition of 'channelsplitternode' in that specification. working draft ...
CloseEvent - Web APIs
service restart the server is terminating the connection because it is restarting. [ref] 1013 try again later the server is terminating the connection due to a temporary condition, e.g. it is overloaded and is casting off some of its clients. [ref] 1014 bad gateway the server was acting as a gateway or proxy and received an invalid response from the up
stream server. this is similar to 502 http status code. 1015 tls handshake reserved. indicates that the connection was closed due to a failure to perform a tls handshake (e.g., the server certificate can't be verified). 1016–1999 reserved for future use by the websocket standard. 2000–2999 reserved for use by websocket extensions. ...
ConstrainBoolean - Web APIs
use the other value if it needs to in order to come up with a workable configuration. you can also specify the value of the property as simply true or false, in which case the user agent will use that value if possible once all efforts have been made to match the exact and ideal values for other properties. specifications specification status comment media capture and
streamsthe definition of 'constrainboolean' in that specification. candidate recommendation initial definition technically, constrainboolean is actually based on an intermediary dictionary named constrainbooleanparameters, which adds exact and ideal to the simple boolean type. however, for the sake of documentation clarity, the intermediate type (present only because of quirks in webidl sy...
ConstrainDOMString - Web APIs
if the property can't be set to one of the listed values, matching will fail. ideal either a single domstring or an arrray of domstrings specifying ideal values for the property. if possible, one of the listed values will be used, but if it's not possible, the user agent will use the closest possible match. specifications specification status comment media capture and
streamsthe definition of 'constraindomstring' in that specification. candidate recommendation initial definition technically, constraindomstring is actually based on an intermediary dictionary named constraindomstringparameters, which adds exact and ideal to domstring. however, for the sake of documentation clarity, the intermediate type (present only because of quirks in webidl syntax) is...
ConstrainDouble - Web APIs
exact a double-precision floating-point number specifying a specific, required, value the property must have to be considered acceptable. ideal a double-precision floating-point number specifying a value the property would ideally have, but which can be considered optional if necessary to find a match. specifications specification status comment media capture and
streamsthe definition of 'constraindouble' in that specification. candidate recommendation initial definition technically, constraindouble is actually based on an intermediary dictionary named constraindoublerange, which adds exact and ideal to doublerange, with constraindouble being a type that can be either a long integer or a doublerange. however, for the sake of documentation clarity, ...
ConstrainULong - Web APIs
elow in addition to the properties it inherits from ulongrange. exact an integer specifying precise, required, value the property must have to be considered acceptable. ideal an integer specifying a value the property would ideally have, but which can be considered optional if necessary to find a match. specifications specification status comment media capture and
streamsthe definition of 'constrainulong' in that specification. candidate recommendation initial definition technically, constrainulong is actually based on an intermediary dictionary named constrainulongrange, which adds exact and ideal to ulongrange, with constrainulong being a type that can be either a long integer or a ulongrange. however, for the sake of documentation clarity, the in...
Content Index API - Web APIs
and usage as it stands, offline web content is not easily discoverable by users. content indexing allows developers to tell the browser about their specific offline content. this allows users to discover and view what is available, whilst giving developers the ability to add and manage this content. examples could be a news website prefetching the latest articles in the background, or a content
streaming app registering downloaded content. the content index api is an extension to service workers, which allows developers to add urls and metadata of already cached pages, under the scope of the current service worker. the browser can then use these entries to display offline reading to a user. as a developer you can also display these entries within your application. indexed entries do not auto...
CountQueuingStrategy.CountQueuingStrategy() - Web APIs
rameters {highwatermark} an object containing a highwatermark property. this is a non-negative integer defining the total number of chunks that can be contained in the internal queue before backpressure is applied. return value an instance of the countqueuingstrategy object. exceptions none. examples const queuingstrategy = new countqueuingstrategy({ highwatermark: 1 }); const writable
stream = new writable
stream({ // implement the sink write(chunk) { ... }, close() { ... }, abort(err) { console.log("sink error:", err); } }, queuingstrategy); var size = queuingstrategy.size(); specifications specification status comment
streamsthe definition of 'countqueuingstrategy()' in that specification. living standard initial definition.
CountQueuingStrategy.size() - Web APIs
the size() method of the countqueuingstrategy interface always returns 1, so that the total queue size is a count of the number of chunks in the queue. syntax var size = countqueuingstrategy.size(); parameters none. return value 1. examples const queuingstrategy = new countqueuingstrategy({ highwatermark: 1 }); const writable
stream = new writable
stream({ // implement the sink write(chunk) { ... }, close() { ... }, abort(err) { console.log("sink error:", err); } }, queuingstrategy); var size = queuingstrategy.size(); specifications specification status comment
streamsthe definition of 'size' in that specification. living standard initial definition. ...
Document - Web APIs
ct. document.evaluate() evaluates an xpath expression. extension for html documents the document interface for html documents inherit from the htmldocument interface or, since html5, is extended for such documents: document.clear() in majority of modern browsers, including recent versions of firefox and internet explorer, this method does nothing. document.close() closes a document
stream for writing. document.execcommand() on an editable document, executes a formating command. document.getelementsbyname() returns a list of elements with the given name. document.hasfocus() returns true if the focus is currently located anywhere inside the specified document. document.open() opens a document
stream for writing. document.querycommandenabled() returns true if the formating ...
DoubleRange - Web APIs
value specifying the largest permissible value of the property it describes. min a floating-point value specifying the smallest permissible value of the property it describes. the specified min and/or and max values are required. if no match can be found that is within the given range, an error will occur. specifications specification status comment media capture and
streamsthe definition of 'doublerange' in that specification. candidate recommendation initial definition ...
Encoding API - Web APIs
the encoding api provides a mechanism for handling text in various character encodings, including legacy non-utf-8 encodings. the api provides four interfaces: textdecoder, textencoder, textdecoder
stream and textencoder
stream. interfaces textdecoder textencoder textdecoder
stream textencoder
stream tutorials & tools a shim allowing to use this interface in browsers that don't support it. stringview – a c-like representation of strings based on typed arrays. specifications specification status comment encoding living standard initial definition. ...
Event - Web APIs
ngevent beforeinputevent beforeunloadevent blobevent clipboardevent closeevent compositionevent cssfontfaceloadevent customevent devicelightevent devicemotionevent deviceorientationevent deviceproximityevent domtransactionevent dragevent editingbeforeinputevent errorevent fetchevent focusevent gamepadevent hashchangeevent idbversionchangeevent inputevent keyboardevent media
streamevent messageevent mouseevent mutationevent offlineaudiocompletionevent overconstrainederror pagetransitionevent paymentrequestupdateevent pointerevent popstateevent progressevent relatedevent rtcdatachannelevent rtcidentityerrorevent rtcidentityevent rtcpeerconnectioniceevent sensorevent storageevent svgevent svgzoomevent timeevent touchevent trackevent transitionevent uie...
FetchEvent - Web APIs
t read only the request the browser intends to make. methods inherits methods from its parent, extendableevent. fetchevent.respondwith() prevent the browser's default fetch handling, and provide (a promise for) a response yourself. extendableevent.waituntil() extends the lifetime of the event. used to notify the browser of tasks that extend beyond the returning of a response, such as
streaming and caching. examples this fetch event uses the browser default for non-get requests. for get requests it tries to return a match in the cache, and falls back to the network. if it finds a match in the cache, it asynchronously updates the cache for next time. self.addeventlistener('fetch', event => { // let the browser do its default thing // for non-get requests. if (event.request...
File.type - Web APIs
it is assumed based on the file extension; a png image file renamed to .txt would give "text/plain" and not "image/png". moreover, file.type is generally reliable only for common file types like images, html documents, audio and video. uncommon file extensions would return an empty string. client configuration (for instance, the windows registry) may result ...
File - Web APIs
ad only returns the size of the file in bytes. file.prototype.type read only returns the mime type of the file. instance methods the file interface doesn't define any methods, but inherits methods from the blob interface: blob.prototype.slice([start[, end[, contenttype]]]) returns a new blob object containing the data in the specified range of bytes of the source blob. blob.prototype.
stream() transforms the file into a readable
stream that can be used to read the file contents. blob.prototype.text() transforms the file into a
stream and reads it to completion. it returns a promise that resolves with a usvstring (text). blob.prototype.arraybuffer() transforms the file into a
stream and reads it to completion. it returns a promise that resolves with an arraybuffer. specification...
HTMLAudioElement - Web APIs
specific properties; inherits properties from its parent, htmlmediaelement, and from htmlelement. methods inherits methods from its parent, htmlmediaelement, and from htmlelement. it offers no methods of its own. obsolete mozilla-only methods the following methods are non-standard and should not be used. mozcurrentsampleoffset() returns the number of samples form the beginning of the
stream that have been written so far into the audio
stream created by calling mozwriteaudio(). mozsetup() sets up the audio
stream to allow writing, given the number of audio channels (1 or 2) and the sample rate in khz. mozwriteaudio() writes a batch of audio frames to the
stream at the current offset, returning the number of bytes actually written to the
stream. examples basic usage yo...
HTMLMediaElement.currentTime - Web APIs
cision floating-point value indicating the current playback time in seconds. if the media is not yet playing, the value of currenttime indicates the time position within the media at which playback will begin once the play() method is called. setting currenttime to a new value seeks the media to the given time, if the media is available. for media without a known duration—such as media being
streamed live—it's possible that the browser may not be able to obtain parts of the media that have expired from the media buffer. also, media whose timeline doesn't begin at 0 seconds cannot be seeked to a time before its timeline's earliest time. the length of the media in seconds can be determined using the duration property. example var video = document.createelement('video'); console.log(video...
HTMLMediaElement.duration - Web APIs
the read-only htmlmediaelement property duration indicates the length of the element's media in seconds. syntax myduration = htmlmediaelement.duration value a double-precision floating-point value indicating the duration of the media in seconds. if no media data is available, the value nan is returned. if the element's media doesn't have a known duration—such as for live media
streams—the value of duration is +infinity. examples var obj = document.createelement('video'); console.log(obj.duration); // nan specifications specification status comment html living standardthe definition of 'htmlmediaelement.duration' in that specification. living standard html5the definition of 'htmlmediaelement.duration' in that specification. recommendation ...
HTMLMediaElement.ended - Web APIs
the htmlmediaelement.ended indicates whether the media element has ended playback. syntax var isended = htmlmediaelement.ended value a boolean which is true if the media contained in the element has finished playing. if the source of the media is a media
stream, this value is true if the value of the
stream's active property is false. example var obj = document.createelement('video'); console.log(obj.ended); // false specifications specification status comment html living standardthe definition of 'htmlmediaelement.ended' in that specification. living standard html5the definition of 'htmlmediaelement.ended' in that specification. recommendation ...
HTMLMediaElement: ended event - Web APIs
the ended event is fired when playback or
streaming has stopped because the end of the media was reached or because no further data is available. this event occurs based upon htmlmediaelement (<audio> and <video>) fire ended when playback of the media reaches the end of the media. bubbles no cancelable no interface event target element default action none event handler property globaleventhandlers.onended specification html5 media this event is also defined in media capture and
streams and web audio api examples these examples add an event listener for the htmlmediaelement's ended event, then post a message when that event handler has reacted to the event firing. using addeventlistener(): const ...
HTMLMediaElement.play() - Web APIs
to a traditional exception being thrown). possible errors include: notallowederror the user agent (browser) or operating system doesn't allow playback of media in the current context or situation. this may happen, for example, if the browser requires the user to explicitly start media playback by clicking a "play" button. notsupportederror the media source (which may be specified as a media
stream, mediasource, blob, or file, for example) doesn't represent a supported media format. other exceptions may be reported, depending on browser implementation details, media player implementation, and so forth. usage notes although the term "autoplay" is usually thought of as referring to pages that immediately begin playing media upon being loaded, web browsers' autoplay policies also apply to ...
HTMLVideoElement.getVideoPlaybackQuality() - Web APIs
syntax videopq = videoelement.getvideoplaybackquality(); return value a videoplaybackquality object providing information about the video element's current playback quality. example this example updates an element to indicate the total number of video frames that have elapsed so far in the playback process. ...
HTMLVideoElement.msZoom - Web APIs
arbox are the black bars on either the left and right of the video or the top and bottom of the video. when the mszoom attribute is set to true, the rendered video is trimmed to fit the dimensions of the video object. either the top and bottom of the video is trimmed or the left and right of the video is trimmed. for instance, if the layout space for the video tag is a 4:3 aspect ratio, but the
stream coming in is in 16:9 aspect ratio, the mszoom option can be used to render the 16:9 video in 4:3 aspect ratio. the rendered video will then take up the full space of the video object. example this examples gets a video object and sets the mszoom property to true. var myvideo = document.getelementbyid("videotag1"); myvideo.mszoom = true; myvideo.play(); see also htmlvideo...
IIRFilterNode.getFrequencyResponse() - Web APIs
y response for each frequency value in the frequencyarray. phaseresponseoutput a float32array to receive the computed phase response values in radians for each frequency value in the input frequencyarray. return value undefined exceptions notsupportederror the three arrays provided are not all of the same length. examples in the following example we are using an iir filter on a media
stream (for a complete full demo, see our
stream-source-buffer demo live, or read its source.) as part of this demo, we get the frequency responses for this iir filter, for five sample frequencies. we first create the float32array objects we need, one containing the input frequencies, and two to receive the output magnitude and phase values: var myfrequencyarray = new float32array(5); myfrequencyarray[...
ImageCapture.track - Web APIs
the track read-only property of the imagecapture interface returns a reference to the media
streamtrack passed to the imagecapture() constructor. syntax const media
streamtrack = imagecaptureobj.track value a media
streamtrack object. specifications specification status comment media
stream image capturethe definition of 'track' in that specification. working draft initial definition. ...
Timing element visibility with the Intersection Observer API - Web APIs
le. it turns out that one of the most common uses of flash or other script in advertising on the web is to record how long each ad is visible, for the purpose of billing and payment of revenues. without the intersection observer api, this winds up being done using intervals and timeouts for each individual ad, or other techniques that tend to slow the page down. using this api lets everything get
streamlined by the browser to reduce the impact on performance substantially. let's get started! site structure: the html the site's structure is not too complicated. we'll be using css grid to style and lay out the site, so we can be pretty straightforward here: <div class="wrapper"> <header> <h1>a fake blog</h1> <h2>showing intersection observer in action!</h2> </header> <aside> ...
Keyboard API - Web APIs
ring associated with the key labeled w on an english qwerty keyboard. if (navigator.keyboard) { var keyboard = navigator.keyboard; keyboard.getlayoutmap() .then(keyboardlayoutmap => { var upkey = keyboardlayoutmap.get('keyw'); window.alert('press ' + upkey + ' to move up.'); }); } else { // do something else. } keyboard locking richly interactive web pages, games, and remote-
streaming experiences often require access to special keys and keyboard shortcuts while in full-screen mode. examples of such key/key combinations include escape, alt+tab, and ctrl+n. those keys and key combinations are typically captured by the user agent or the underlying operating system, as illustrated in the following example. to capture the "w", "a", "s", and "d" keys, call lock() with a list tha...
MediaCapabilities - Web APIs
the mediacapabilities interface of the media capabilities api provides information about the decoding abilities of the device, system and browser. the api can be used to query the browser about the decoding abilities of the device based on codecs, profile, resolution, and bitrates. the information can be used to serve optimal media
streams to the user and determine if playback should be smooth and power efficient. the information is accessed through the mediacapabilities property of the navigator interface. methods mediacapabilities.encodinginfo() when passed a valid media configuration, it returns a promise with information as to whether the media type is supported, and whether encoding such media would be smooth and power efficient. mediacapabilities.decodinginfo() when passed a va...
MediaDeviceInfo.deviceId - Web APIs
ss sessions. it is un-guessable by other applications, and unique to the origin of the calling application. it is reset when the user clears cookies. for private browsing, a different identifier is used that is not persisted across sessions. syntax var deviceid = mediadeviceinfo.deviceid value a domstring. specifications specification status comment media capture and
streamsthe definition of 'deviceid' in that specification. candidate recommendation initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandro...
MediaDeviceInfo.groupId - Web APIs
ier. two devices have the same group identifier if they belong to the same physical device; for example, a monitor with both a built-in camera and microphone. syntax var groupid = mediadeviceinfo.groupid; value a domstring which uniquely identifies the group of related devices to which this device belongs. specifications specification status comment media capture and
streamsthe definition of 'groupid' in that specification. candidate recommendation initial definition. examples in this example, we assemble a list of the devices which are part of the same group as a given device. this might be used to produce a user interface that gathers associated devices together for presentation purposes, or to make it easy for the user to choose to use the built-in ...
MediaDeviceInfo.label - Web APIs
the label readonlyinline property of the mediadeviceinfo interface returns a domstring, that is a label describing this device (for example "external usb webcam"). only available during active media
stream use, or when persistent permissions have been granted. syntax var label = mediadeviceinfo.label; value a domstring which describes the media device. for security reasons, the label is always an empty string ("") if the user has not obtained permission to use at least one media device, either by starting a
stream from the microphone or camera, or by persistent permissions being granted. specifications specification status comment media capture and
streamsthe definition of 'label' in that specification. candidate recommendation initial definition. ...
MediaElementAudioSourceNode - Web APIs
channel count defined by the media in the htmlmediaelement passed to the audiocontext.createmediaelementsource method that created it. constructor mediaelementaudiosourcenode() creates a new mediaelementaudiosourcenode object instance. properties inherits properties from its parent, audionode. mediaelement read only the htmlmediaelement used when constructing this media
streamaudiosourcenode. methods inherits methods from its parent, audionode. example this simple example creates a source from an <audio> element using createmediaelementsource(), then passes the audio through a gainnode before feeding it into the audiodestinationnode for playback. when the mouse pointer is moved, the updatepage() function is invoked, which calculates the current gain as a ratio of ...
MediaError.code - Web APIs
error occurred which prevented the media from being successfully fetched, despite having previously been available. media_err_decode 3 despite having previously been determined to be usable, an error occurred while trying to decode the media resource, resulting in an error. media_err_src_not_supported 4 the associated resource or media provider object (such as a media
stream) has been found to be unsuitable. example this example creates a <video> element, establishes an error handler for it, and then sets the element's src attribute to the video resource to present in the element. the error handler simply outputs a message var obj = document.createelement('video'); obj.onerror = function() {console.log("error with media: " + obj.error.code);} obj.src="https:...
Navigator.requestMediaKeySystemAccess() - Web APIs
this method is part of the encrypted media extensions api, which brings support for encrypted media and drm-protected video to the web. this method may have user-visible effects such as asking for permission to access one or more system resources. ...
Navigator - Web APIs
s a pointerlock object for the mouse lock api. methods doesn't inherit any method, but implements those defined in navigatorid, navigatorcontentutils, navigatorusermedia, and navigatorstorageutils. standard navigator.canshare() returns true if a call to navigator.share() would succeed. navigator.getusermedia() after having prompted the user for permission, returns the audio or video
stream associated to a camera or microphone on the local computer. navigator.registercontenthandler() obsolete since gecko 59 allows web sites to register themselves as a possible handler for a given mime type. navigator.registerprotocolhandler() allows web sites to register themselves as a possible handler for a given protocol. navigator.requestmediakeysystemaccess() returns a promise for a med...
OverconstrainedError.OverconstrainedError() - Web APIs
the overconstrainederror constructor creates a new overconstrainederror object which indicates that the set of desired capabilities for the current media
streamtrack cannot currently be met. when this event is thrown on a media
streamtrack, it is muted until either the current constraints can be established or until satisfiable constraints are applied. syntax var overconstrainederror = new overconstrainederror() parameters constraint the constraint that was not satified. message text for the error's message property. specifications specification status comment media capture and
streamsthe definition of 'overconstrainederror' in that specification. candidate recommendation initial definition. ...
PannerNode - Web APIs
red in the audiocontext.listener attribute.) pannernode.setorientation() defines the direction the audio source is playing in. pannernode.setvelocity() defines the velocity vector of the audio source — how fast it is moving and in what direction. in a previous version of the specification, the pannernode had a velocity that could pitch up or down audiobuffersourcenodes connected down
stream. this feature was not clearly specified and had a number of issues, so it was removed from the specification. examples in the following example, you can see an example of how the createpanner() method, audiolistener and pannernode would be used to control audio spatialisation. generally you will define the position in 3d space that your audio listener and panner (source) occupy initially, and...
PaymentRequest.canMakePayment() - Web APIs
the paymentrequest method canmakepayment() determines whether or not the request is configured in a way that is compatible with at least one payment method supported by the user agent. you can call this before calling show() to provide a
streamlined user experience when the user's browser can't handle any of the payment methods you accept. for instance, you might call canmakepayment() to determine if the browser will let the user pay using payment request api, and if it won't, you could fall back to another payment method, or offer a list of methods that aren't handled by payment request api (or even provide instructions for paying by mail or by phone). syntax paymentrequest.canmakepayment() .then( canpay => { ... }) .catch( error => { ... }) canpay = await paymentrequest.canmakep...
PhotoCapabilities.fillLightMode - Web APIs
rce device. options may include auto, off, or flash. syntax const lightmodes = photocapabilities.filllightmode value an array of available fill light modes. auto the device's fill light will be used automatically in low light conditions. off no fill light will be used. flash always use the device's fill light. specifications specification status comment media
stream image capturethe definition of 'filllightmode' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafa...
PhotoCapabilities.imageHeight - Web APIs
the imageheight read-only property of the photocapabilities interface returns a mediasettingsrange object indicating the image height range supported by the user agent. syntax var mediasettingsrange = photocapabilities.imageheight value a mediasettingsrange object. specifications specification status comment media
stream image capturethe definition of 'imageheight' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for android...
imageWidth - Web APIs
the imagewidth read-only property of the photocapabilities interface returns a mediasettingsrange object indicating the image width range supported by the user agent. syntax var mediasettingsrange = photocapabilities.imagewidth value a mediasettingsrange is an object. specifications specification status comment media
stream image capturethe definition of 'imagewidth' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for andro...
PhotoCapabilities.redEyeReduction - Web APIs
ocapabilities.redeyereduction value one of "never", "always", or "controllable". never red-eye reduction is not available. always red-eye reduction is available in the source and it is always turned on. controllable red-eye reduction is available in the source and it is configurable via the photosettings object. specifications specification status comment media
stream image capturethe definition of 'redeyereduction' in that specification. working draft initial definition. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasa...
RTCConfiguration - Web APIs
, in order to support non-multiplexed rtcp. the value must be one of those from the rtcrtcpmuxpolicy enum. the default is "require". constants rtcbundlepolicy enum the rtcbundlepolicy enum defines string constants which are used to request a specific policy for gathering ice candidates if the remote peer isn't "bundle-aware" (compatible with the sdp bundle standard for bundling multiple media
streams on a single transport link). all browser implementations are bundle-aware. if the remote endpoint is bundle-aware, all media tracks and data channels are bundled onto a single transport at the completion of negotiation, regardless of policy used, and any superfluous transports that were created initially are closed at that point. note: in technical terms, a bundle lets all media flow between ...
RTCDataChannel: error event - Web APIs
e no interface rtcerrorevent event handler property onerror the rtcerrorevent object provides details about the error that occurred; see that article for details. ...
RTCDataChannel.id - Web APIs
t at the time the data channel is created, either by the user agent (if rtcdatachannel.negotiated is false) or by the site or app script (if negotiated is true). each rtcpeerconnection can therefore have up to a theoretical maximum of 65,534 data channels on it, although the actual maximum may vary from browser to browser. in early versions of the webrtc specification, this property's name was
stream. code that uses that property needs to be updated. syntax var id = adatachannel.id; value an unsigned short value (that is, an integer between 0 and 65,535) which uniquely identifies the data channel. while the label property doesn't have to be unique, this id number is guaranteed to be unique among all data channels. additionally, known implementations of webrtc use the same id on both pe...
RTCDataChannel - Web APIs
en the data channel was created, then this property's value is "" (the empty string).readystate read only the read-only rtcdatachannel property readystate returns an enum of type rtcdatachannelstate which indicates the state of the data channel's underlying data connection.reliable read only the read-only rtcdatachannel property reliable indicates whether or not the data channel is reliable.
stream read only the deprecated (and never part of the official specification) read-only rtcdatachannel property
stream returns an id number (between 0 and 65,535) which uniquely identifies the rtcdatachannel.event handlersalso inherits event handlers from: eventtargetonbufferedamountlow the rtcdatachannel.onbufferedamountlow property is an eventhandler which specifies a function the browser calls ...
RTCIceCandidate.sdpMid - Web APIs
this property can be configured by specifying the value of the sdpmid property when constructing the new candidate object using rtcicecandidate(). if you call the constructor with an m-line string instead of an rtcicecandidateinit object, the value of sdpmid is extracted from the specified candidate m-line string. ...
RTCIceCandidate - Web APIs
ate's ip address. for host candidates, this value is null. relatedport read only for a candidate that is derived from another, such as a relay or reflexive candidate, the relatedport is a number indicating the port number of the candidate from which this candidate is derived. for host candidates, the relatedport property is null. sdpmid read only a domstring specifying the candidate's media
stream identification tag which uniquely identifies the media
stream within the component with which the candidate is associated, or null if no such association exists. sdpmlineindex read only if not null, sdpmlineindex indicates the zero-based index number of the media description (as defined in rfc 4566) in the sdp with which the candidate is associated. tcptype read only if protocol is "tcp", t...
RTCIceCandidateInit - Web APIs
be passed directly into rtcpeerconnection.addicecandidate() to add a candidate to the peer connection. properties candidate optional the ice candidate-attribute. if the candidate is an indicator that there are no further candidates (rather than representing a new candidate), this is the empty string (""). the default is the empty string. sdpmid optional the identification tag of the media
stream with which the candidate is associated, or null if there is no associated media
stream. the default is null. sdpmlineindex optional the zero-based index of the m-line within the sdp of the media description with which the candidate is associated, or null if no such associated exists. the default is null. usernamefragment optional a domstring containing a string which uniquely identifies the r...
RTCIceCandidatePairStats.availableIncomingBitrate - Web APIs
comingbitrate = rtcicecandidatepairstats.availableincomingbitrate; value a floating-point value which approximates the amount of available bandwidth for incoming data on the network connection described by the rtcicecandidatepair. the value is reported in bits per second and is computed over a 1-second interval. the value returned is calculated by adding up the available bit rate for every rtp
stream using the connection described by this candidate pair. the returned value doesn't take into account overhead introduced by underlying protocols, including ip, udp, or tcp. note: the returned value is computed using a method similar—but not identical—to the transport independent application specific maximum (tias) described in rfc 3890: 6.2. specifications specification status...
RTCIceCandidatePairStats.availableOutgoingBitrate - Web APIs
interval. the returned value is undefined in each of the following situations: the underlying implementation doesn't support computing a sender-side estimate of the outgoing bit rate. the rtcicecandidatepair described by this object has never been used. the candidate pair was once in use, but no longer is. the value returned is calculated by adding up the available bit rate for every rtp
stream using the connection described by this candidate pair. the returned value doesn't take into account overhead introduced by underlying protocols, including ip, udp, or tcp. note: the returned value is computed using a method similar—but not identical—to the transport independent application specific maximum (tias) described in rfc 3890: 6.2. specifications specification status...
RTCIceCandidatePairStats - Web APIs
ecandidatepairstats object. properties rtcicecandidatepairstats is based upon rtcstats and inherits its properties. in addition, it adds the following new properties: availableincomingbitrate optional provides an informative value representing the available inbound capacity of the network by reporting the total number of bits per second available for all of the candidate pair's incoming rtp
streams. this does not take into account the size of the ip overhead, nor any other transport layers such as tcp or udp. availableoutgoingbitrate optional provides an informative value representing the available outbound capacity of the network by reporting the total number of bits per second available for all of the candidate pair's outoing rtp
streams. this does not take into account the size of the...
RTCPeerConnection.createOffer() - Web APIs
the createoffer() method of the rtcpeerconnection interface initiates the creation of an sdp offer for the purpose of starting a new webrtc connection to a remote peer. the sdp offer includes information about any media
streamtracks already attached to the webrtc session, codec, and options supported by the browser, and any candidates already gathered by the ice agent, for the purpose of being sent over the signaling channel to a potential peer to request a connection or to update the configuration of an existing connection. the return value is a promise which, when the offer has been created, is resolved with a rtcsessiondescription object containing the newly-created offer. syntax apromise = mypeerconnection.createoffer([options]); mypeerconnection.createoffer(successcallback, failurecallb...
RTCRtpContributingSource.source - Web APIs
the value is the contributing source (csrc) or synchronization source (ssrc) identifier, depending on whether the object is an rtcrtpcontributingsource or rtcrtpsynchronizationsource, which is based on the former. syntax var sourceid = rtcrtpcontributingsource.source value an unsigned, 32-bit integer value which uniquely identifies the source of rtp packets described by this rtcrtpcontributingsource (in which case the value is a csrc identifier) or rtcrtpsynchronizationsource (the value is an ssrc identifier). ...
RTCRtpContributingSource - Web APIs
e indicated by timestamp. this value is a source-generated time value which can be used to help with sequencing and synchronization. source optional a 32-bit unsigned integer value specifying the csrc identifier of the contributing source. timestamp optional a domhighrestimestamp indicating the most recent time at which a frame originating from this source was delivered to the receiver's media
streamtrack specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpcontributingsource' in that specification. candidate recommendation initial definition. ...
RTCRtpReceiver.getContributingSources() - Web APIs
source instances, each corresponding to one csrc (contributing source) identifier received by the current rtcrtpreceiver in the last ten seconds. syntax var rtcrtpcontributingsources = rtcrtpreceiver.getcontributingsources() parameters none. return value an array of rtcrtpcontributingsource instances. each instance describes one of the contributing sources that provided data to the incoming
stream in the past ten seconds. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'getcontributingsources()' in that specification. candidate recommendation initial definition. ...
RTCRtpReceiver.getStats() - Web APIs
eturning a promise whose fulfillment handler will be called once the results are available. syntax var promise = rtcrtpreceiver.getstats(); return value a javascript promise which is fulfilled once the statistics are available. the promise's fulfillment handler receives as a parameter a rtcstatsreport object containing the collected statistics. the returned statistics include those from all
streams which are coming in through the rtcrtpreceiver, as well as any of their dependencies. example this simple example obtains the statistics for an rtcrtpreceiver and updates an element's innertext to display the number of packets lost. receiver.getstats().then(function(stats) { document.getelementbyid("lostpackets").innertext = stats.packetslost; }); specifications specif...
RTCRtpReceiver.getSynchronizationSources() - Web APIs
stances, each corresponding to one ssrc (synchronization source) identifier received by the current rtcrtpreceiver in the last ten seconds. syntax var rtcrtpcontributingsources = rtcrtpreceiver.getcontributingsources() parameters none. return value an array of rtcrtpsynchronizationsource instances. each instance describes one of the synchronization sources that provided data to the incoming
stream in the past ten seconds. as you'll see in the documentarion for rtcrtpsynchronizationsource, it inherits the properties of rtcrtpcontributingsource, including timestamp, source, and audiolevel. the synchronization source objects add a voiceactivityflag property, which indicates if the last rtp packet received contained voice activity. specifications specification status comment...
RTCTrackEvent.track - Web APIs
the webrtc api interface rtctrackevent's read-only track property specifies the media
streamtrack that has been added to the rtcpeerconnection. syntax var track = trackevent.track; value a media
streamtrack indicating the track which has been added to the rtcpeerconnection. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackevent.track' in that specification. candidate recommendation initial specification. ...
RTCTrackEvent.transceiver - Web APIs
the webrtc api interface rtctrackevent's read-only transceiver property indicates the rtcrtptransceiver affiliated with the event's track. the transceiver pairs the track's receiver with an rtcrtpsender. syntax var rtptransceiver = trackevent.transceiver; value the rtcrtptransceiver which pairs the receiver with a sender and other properties which establish a single bidirectional srtp
stream for use by the track associated with the rtctrackevent. note: the rtcrtpreceiver referred to by this rtcrtpreceiver's receiver property will always be the same as the rtctrackevent's receiver property. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackevent.transceiver' in that specification. can...
RTCTrackEventInit.transceiver - Web APIs
the rtctrackeventinit dictionary's transceiver property specifies the rtcrtptransceiver associated with the track event. the transceiver pairs the track's receiver with an rtcrtpsender to allow bidirectional communication. syntax var trackeventinit = { receiver: rtpreceiver, track: media
streamtrack,
streams: [video
stream], transceiver: rtptransceiver }; var rtptransceiver = trackeventinit.transceiver; value the rtcrtptransceiver which pairs the receiver with a sender and other properties which establish a single bidirectional srtp
stream for use by the track associated with the rtctrackevent. note: the rtcrtpreceiver referred to by this rtcrtpreceiver's receiver property will always be the same as the rtctrackevent's receiver property. specifications specification ...
RTCTrackEventInit - Web APIs
the webrtc api's rtctrackeventinit dictionary is used to provide information describing an rtctrackevent when instantiating a new track event using new rtctrackevent(). properties rtctrackeventinit inherits properties from the eventinit dictionary, and also includes the following properties: receiver the rtcrtpreceiver which is being used to receive the track's media.
streams optional an array of media
stream objects representing each of the
streams that comprise the event's corresponding track. track the media
streamtrack the event is associated with. transceiver the rtcrtptransceiver associated with the event. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackeventinit' in that ...
Request() - Web APIs
u want to apply to the request. the possible options are: method: the request method, e.g., get, post. the default is get. headers: any headers you want to add to your request, contained within a headers object or an object literal with bytestring values. body: any body that you want to add to your request: this can be a blob, buffersource, formdata, urlsearchparams, usvstring, or readable
stream object. note that a request using the get or head method cannot have a body. mode: the mode you want to use for the request, e.g., cors, no-cors, same-origin, or navigate. the default is cors. credentials: the request credentials you want to use for the request: omit, same-origin, or include. the default is same-origin. cache: the cache mode you want to use for the request. redirect: the ...
Response() - Web APIs
the response() constructor creates a new response object. syntax var myresponse = new response(body, init); parameters body optional an object defining a body for the response. this can be null (which is the default value), or one of: blob buffersource formdata readable
stream urlsearchparams usvstring init optional an options object containing any custom settings that you want to apply to the response, or an empty object (which is the default value). the possible options are: status: the status code for the reponse, e.g., 200. statustext: the status message associated with the status code, e.g., ok. headers: any headers you want to add to your response, contained within a headers object or object literal of bytestring key/value pairs (see http headers for a re...
Response.redirect() - Web APIs
the redirect() method of the response interface returns a response resulting in a redirect to the specified url. note: this is mainly relevant to the serviceworker api. a controlling service worker could intercept a page's request and redirect it as desired. this will actually lead to a real redirect if a service worker sends it up
stream. syntax var response = response.redirect(url, status); parameters url the url that the new response is to originate from. status optional an optional status code for the response (e.g., 302.) return value a response object. exceptions exception explanation rangeerror the specified status is not a redirect status. typeerror the specified url is invalid. example responseobj.redirect('https://www.exa...
Using Service Workers - Web APIs
romise. when that promise resolves, cache.put() is used to add the resource to the cache. the resource is grabbed from event.request, and the response is then cloned with response.clone() and added to the cache. the clone is put in the cache, and the original response is returned to the browser to be given to the page that called it. cloning the response is necessary because request and response
streams can only be read once. in order to return the response to the browser and put it in the cache we have to clone it. so the original gets returned to the browser and the clone gets sent to the cache. they are each read once. the only trouble we have now is that if the request doesn’t match anything in the cache, and the network is not available, our request will still fail. let’s provide a ...
SourceBuffer.changeType() - Web APIs
one scenario in which this is helpful is to support adapting the media source to changing bandwidth availability, by transitioning from one codec to another as resource constraints change. syntax sourcebuffer.changetype(type); parameters type a domstring specifying the mime type that future buffers will conform to. ...
StereoPannerNode.StereoPannerNode() - Web APIs
syntax var stereopannernode = stereopannernode(context, options) parameters inherits parameters from the audionodeoptions dictionary. context a reference to an audiocontext. options optional options are as follows: pan: a floating point number in the range [-1,1] indicating the position of an audionode in an output image. ...
TextDecoder.prototype.decode() - Web APIs
domstring containing the text, given in parameters, decoded with the specific method for that textdecoder object. syntax b1 = decoder.decode(buffer, options); b2 = decoder.decode(buffer); b3 = decoder.decode(); parameters buffer optional is either an arraybuffer or an arraybufferview containing the text to decode. options optional is a textdecodeoptions dictionary with the property:
stream a boolean flag indicating that additional data will follow in subsequent calls to decode(). set to true if processing the data in chunks, and false for the final chunk or if the data is not chunked. it defaults to false. example this example encodes and decodes the euro symbol, €. html <p>encoded value: <span id="encoded-value"></span></p> <p>decoded value: <span id="decoded-value"><...
TextTrackList - Web APIs
ack fired when a new text track has been removed from the media element. also available via the onremovetrack property. usage notes in addition to being able to obtain direct access to the text tracks present on a media element, texttracklist lets you set event handlers on the addtrack and removetrack events, so that you can detect when tracks are added to or removed from the media element's
stream. see onaddtrack and onremovetrack for details and examples. examples getting a video element's text track list to get a media element's texttracklist, use its texttracks property. var texttracks = document.queryselector("video").texttracks; monitoring track count changes in this example, we have an app that displays information about the number of channels available. to keep it up to date, ...
Using Touch Events - Web APIs
a disadvantage to using mouse events is that they do not support concurrent user input, whereas touch events support multiple simultaneous inputs (possibly at different locations on the touch surface), thus enhancing user experiences. ...
TrackDefault - Web APIs
gments of a media chunk. a trackdefault object is provided to a sourcebuffer object by setting its sourcebuffer.trackdefaults property. constructor trackdefault() constructs and returns a new trackdefault object. properties trackdefault.type read only returns the type of track that this sourcebuffer's media segment data relates to (i.e. audio, video, or text track.) trackdefault.byte
streamtrackid read only returns the id of the specific track that the sourcebuffer should apply to. trackdefault.language read only returns the default language to use when an initialization segment does not contain language information for a new track. trackdefault.label read only returns the default label to use when an initialization segment does not contain label information for a new track.
ULongRange - Web APIs
issible value of the property it describes. min a numeric value in the range of signed 32-bit integers, specifying the smallest permissible value of the property it describes. the specified min and/or and max values are required. if no match can be found that is within the given range, an error will occur. specifications specification status comment media capture and
streamsthe definition of 'ulongrange' in that specification. candidate recommendation initial definition ...
USBEndpoint - Web APIs
constructor usbendpoint.usbendpoint creates a new usbendpoint object which will be populated with information about the endpoint on the provided usbaltenateinterface with the given endpoint number and transfer direction. properties usbendpoint.endpointnumber returns this endpoint's "endpoint number" which is a value from 1 to 15 extracted from the bendpointaddress field of the endpoint descriptor defining this endpoint. ...
VideoPlaybackQuality.droppedVideoFrames - Web APIs
rather than being displayed since the last time the media was loaded into the htmlvideoelement. syntax value = videoplaybackquality.droppedvideoframes; value an unsigned 64-bit value indicating the number of frames that have been dropped since the last time the media in the <video> element was loaded or reloaded. this information can be used to determine whether or not to downgrade the video
stream to avoid dropping frames. frames are typically dropped either before or after decoding them, when it's determined that it will not be possible to draw them to the screen at the correct time. example this example calls getvideoplaybackquality() to obtain a videoplaybackquality object, then determines what percentage of frames have been dropped. that value is then presented in an element for t...
VideoTrackList - Web APIs
fired when a new video track has been removed from the media element. also available via the onremovetrack property. usage notes in addition to being able to obtain direct access to the video tracks present on a media element, videotracklist lets you set event handlers on the addtrack and removetrack events, so that you can detect when tracks are added to or removed from the media element's
stream. see onaddtrack and onremovetrack for details and examples. examples getting a media element's video track list to get a media element's videotracklist, use its videotracks property. var videotracks = document.queryselector("video").videotracks; monitoring track count changes in this example, we have an app that displays information about the number of channels available. to keep it up to d...
WebGL2RenderingContext.fenceSync() - Web APIs
syntax webglsync gl.fencesync(condition, flags); parameters condition a glenum specifying the condition that must be met to set the sync object's state to signaled. must be gl.sync_gpu_commands_complete. flags a glbitfield specifying a bitwise combination of flags controlling the behavior of the sync object. must be 0 (exists for extensions only). return value a webglsync object. examples gl must be a webgl2renderingcontext. webglsync objects are not available in webgl 1. ...
WebGL2RenderingContext - Web APIs
r to a texture unit. webgl2renderingcontext.issampler() returns true if a given object is a valid webglsampler object. webgl2renderingcontext.samplerparameter[if]() sets sampler parameters. webgl2renderingcontext.getsamplerparameter() returns sampler parameter information. sync objects webgl2renderingcontext.fencesync() creates a new webglsync object and inserts it into the gl command
stream. webgl2renderingcontext.issync() returns true if the passed object is a valid webglsync object. webgl2renderingcontext.deletesync() deletes a given webglsync object. webgl2renderingcontext.clientwaitsync() blocks and waits for a webglsync object to become signaled or a given timeout to be passed. webgl2renderingcontext.waitsync() returns immediately, but waits on the gl server until t...
WebRTC coding guide - Web APIs
once you have an overall understanding of what webrtc does and how it works, your mind likely turns to implementation. how do you create a web application that uses two-way video or data
streams without having to do all the hard work of compressing frames, building
streams, and so forth by yourself? this coding guide will explain in depth how webrtc works, and will dive into actual code that uses webrtc to do useful things. there are no subpages at this time. if you need to learn more about the fundamentals of how webrtc and its protocols work, check out our high-level guides for webrtc. ...
Lifetime of a WebRTC session - Web APIs
order to make it possible to begin a webrtc session: each peer creates an rtcpeerconnection object representing their end of the webrtc session. each peer establishes a handler for icecandidate events, which handles sending those candidates to the other peer over the signaling channel. each peer establishes a handler for track event, which is received when the remote peer adds a track to the
stream. this code should connect the tracks to its consumer, such as a <video> element. the caller creates and shares with the receiving peer a unique identifier or token of some kind so that the call between them can be identified by the code on the signaling server. the exact contents and form of this identifier is up to you. each peer connects to an agreed-upon signaling server, such as a websocket...
Controlling multiple parameters with ConstantSourceNode - Web APIs
sending the value 0.5 to the two gain nodes' values, and any change to constantnode.offset will automatically set the gain of both gainnode2 and gainnode3 (affecting their audio inputs as expected). finally, we connect all the gain nodes to the audiocontext's destination, so that any sound delivered to the gain nodes will reach the output, whether that output be speakers, headphones, a recording
stream, or any other destination type. after setting the window's load event handler to be the setup() function, the stage is set. let's see how the action plays out. toggling the oscillators on and off because oscillatornode doesn't support the notion of being in a paused state, we have to simulate it by terminating the oscillators and starting them again when the play button is clicked again to tog...
Migrating from webkitAudioContext - Web APIs
ibute as implemented in webkitaudiocontext implementations is unused, and always returns 0. there is no reason why you should need this attribute. removal of mediaelementaudiosourcenode.mediaelement the mediaelement attribute of mediaelementaudiosourcenode has been removed. you can keep a reference to the media element used to create this node if you need to access it later. removal of media
streamaudiosourcenode.media
stream the media
stream attribute of media
streamaudiosourcenode has been removed. you can keep a reference to the media
stream used to create this node if you need to access it later. ...
Using the Web Audio API - Web APIs
. // for legacy browsers const audiocontext = window.audiocontext || window.webkitaudiocontext; const audiocontext = new audiocontext(); so what's going on when we do this? a baseaudiocontext is created for us automatically and extended to an online audio context. we'll want this because we're looking to play live sound. note: if you just want to process audio data, for instance, buffer and
stream it but not play it, you might want to look into creating an offlineaudiocontext. loading sound now, the audio context we've created needs some sound to play through it. there are a few ways to do this with the api. let's begin with a simple method — as we have a boombox, we most likely want to play a full song track. also, for accessibility, it's nice to expose that track in the dom. we'll e...
Using the Web Speech API - Web APIs
entered your text, you can press enter/return to hear it spoken. to run the demo, you can clone (or directly download) the github repo it is part of, open the html index file in a supporting desktop browser, or navigate to the live demo url in a supporting mobile browser like chrome, or firefox os. browser support support for web speech api speech synthesis is still getting there across main
stream browsers, and is currently limited to the following: firefox desktop and mobile support it in gecko 42+ (windows)/44+, without prefixes, and it can be turned on by flipping the media.webspeech.synth.enabled flag to true in about:config. firefox os 2.5+ supports it, by default, and without the need for any permissions. chrome for desktop and android have supported it since around...
WindowOrWorkerGlobalScope.fetch() - Web APIs
ethod of head or get. (this behavior was corrected in firefox 65 — see bug 1508661). headers any headers you want to add to your request, contained within a headers object or an object literal with bytestring values. note that some names are forbidden. body any body that you want to add to your request: this can be a blob, buffersource, formdata, urlsearchparams, usvstring, or readable
stream object. note that a request using the get or head method cannot have a body. mode the mode you want to use for the request, e.g., cors, no-cors, or same-origin. credentials the request credentials you want to use for the request: omit, same-origin, or include. to automatically send cookies for the current domain, this option must be provided. starting with chrome 50, this property also ta...
XMLHttpRequest.multipart - Web APIs
facing the web: it will not work for every user. there may also be large incompatibilities between implementations and the behavior may change in the future. obsolete since gecko 22 this gecko-only feature was removed in firefox/gecko 22. please use server-sent events, web sockets, or responsetext from progress events instead. this boolean indicates if the response is expected to be a
stream of possibly multiple xml documents. if set to true, the content type of the initial response must be multipart/x-mixed-replace or an error will occur. all requests must be asynchronous. this enables support for server push; for each xml document that's written to this request, a new xml dom document is created and the onload handler is called between documents. note: when this is set, the onlo...
XMLHttpRequest.overrideMimeType() - Web APIs
this method must be called before calling send(). syntax xmlhttprequest.overridemimetype(mimetype) parameters mimetype a domstring specifying the mime type to use instead of the one specified by the server. ...
XMLHttpRequest.response - Web APIs
ob object containing the binary data. document the response is an html document or xml xmldocument, as appropriate based on the mime type of the received data. see html in xmlhttprequest to learn more about using xhr to fetch html content. json the response is a javascript object created by parsing the contents of received data as json. text the response is a text in a domstring object. ms-
stream the response is part of a
streaming download; this response type is only allowed for download requests, and is only supported by internet explorer. example this example presents a function, load(), which loads and processes a page from the server. it works by creating an xmlhttprequest object and creating a listener for readystatechange events such that that when readystate changes to do...
XMLHttpRequest.responseType - Web APIs
ob object containing the binary data. document the response is an html document or xml xmldocument, as appropriate based on the mime type of the received data. see html in xmlhttprequest to learn more about using xhr to fetch html content. json the response is a javascript object created by parsing the contents of received data as json. text the response is a text in a domstring object. ms-
stream the response is part of a
streaming download; this response type is only allowed for download requests, and is only supported by internet explorer. exceptions invalidaccesserror an attempt was made to change the value of responsetype on anxmlhttprequest which is in synchronous mode but not in a worker. for additional details, see synchronous xhr restrictions below. usage notes synchro...
msCaching - Web APIs
non-standard this feature is non-standard and is not on a standards track. do not use it on production sites facing the web: it will not work for every user. there may also be large incompatibilities between implementations and the behavior may change in the future. the mscaching read/write property specifies whether
stream data downloaded using xmlhttprequestis cached to disk or not. this proprietary method is specific to internet explorer and microsoft edge. syntax cachestate = object.mscaching values type: domstring property value description auto disables caching for
stream or ms-
stream data. enabled enables caching for
stream or ms-
stream data. disabled disables caching for any data. see also mscac...
ARIA: application role - Accessibility
easons, especially on windows, screen readers and some other assistive technologies (at) have traditionally grabbed the whole web content from the browser at once after it had finished loading. the ats build their own representation of it that makes the most sense for a blind user to consume the content. this is often referred to as virtual document, browse mode, or similar terms. the document is
streamlined to a single-column view. a keyboard interaction model is generated that is very similar to a word processor where users can read line by line, sentence by sentence, or paragraph by paragraph. the at will read any semantics like links, headings, form controls, tables, lists, or images. in addition, a set of so-called quick navigation keys has been established over the years that allows blind...
WAI-ARIA Roles - Accessibility
ument role tells assistive technologies with reading or browse modes to use the document mode to read the content contained within this element.aria: feed rolea feed is a dynamic scrollable list of articles in which articles are added to or removed from either end of the list as the user scrolls. a feed enables screen readers to use the browse mode reading cursor to both read and scroll through a
stream of rich content that may continue scrolling infinitely by loading more content as the user reads.aria: figure rolethe aria figure role can be used to identify a figure inside page content where appropriate semantics do not already exist. a figure is generally considered to be one or more images, code snippets, or other content that puts across information in a different way to a regular flow of t...
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
using screen reader commands or browser commands, and the two pieces of software must remain in sync. some screen readers can even show information on a refreshable braille display. screen magnifiers will zoom to the focus, keeping it on the screen at all times, or even allow the user to enter a special low vision document reading mode, with a variety of features such as ticker mode where text is
streamed on a single line. finally, voice dictation software needs to know what's in the current document or ui in order to implement "say what you see" kinds of features. on microsoft windows, these kinds of assistive technology acquire this necessary information via a combination of hacks, msaa and proprietary doms. msaa is supposed to be the "right way" for accessibility aids to get information, but...
Accessibility documentation index - Accessibility
wse modes to use the document mode to read the content contained within this element. 61 aria: feed role aria, aria role, reference, feed a feed is a dynamic scrollable list of articles in which articles are added to or removed from either end of the list as the user scrolls. a feed enables screen readers to use the browse mode reading cursor to both read and scroll through a
stream of rich content that may continue scrolling infinitely by loading more content as the user reads. 62 aria: figure role aria, aria role, aria figure, accessibility, reference, rôle, figure the aria figure role can be used to identify a figure inside page content where appropriate semantics do not already exist. a figure is generally considered to be one or more images, code s...
Column layouts - CSS: Cascading Style Sheets
into newspaper-style columns. a single row of items arranged as columns, with all heights being equal. multiple rows of columns lined up by row and column. the recipes you need to choose different layout methods in order to achieve your requirements. a continuous thread of content — multi-column layout if you create columns using multi-column layout your text will remain as a continuous
stream filling each column in turn. the columns must all be the same size, and you are unable to target an individual column or the content of an individual column. you can control the gaps between columns with the column-gap property, and add a rule between columns using column-rule. download this example use multicol when: you want your text to display in newspaper-like columns. you have a ...
line-height - CSS: Cascading Style Sheets
prefer unitless numbers for line-height values this example shows why it is better to use <number> values instead of <length> values. we will use two <div> elements. the first, with the green border...
Demos of open web technologies
bubblemenu (visual effects and interaction) html transformations using foreignobject (visual effects and transforms) phonetics guide (interactive) 3d objects demo (interactive) blobular (interactive) video embedded in svg (or use the local download) summer html image map creator (source code) video video 3d animation "mozilla constantly evolving" video 3d animation "floating dance"
streaming anime, movie trailer and interview billy's browser firefox flick virtual barber shop transformers movie trailer a scanner darkly movie trailer (with built in controls) events firing and volume control dragable and sizable videos 3d graphics webgl web audio fireworks ioquake3 (source code) escher puzzle (source code) kai 'opua (source code) virtual reality the polar sea (sou...
Event reference
displayed). copy clipboardevent clipboard the text selection has been added to the clipboard. cut clipboardevent clipboard the text selection has been removed from the document and added to the clipboard. dblclick mouseevent dom l3 a pointing device button is clicked twice on an element. devicechange event media capture and
streams a media device such as a camera, microphone, or speaker is connected or removed from the system. devicemotion devicemotionevent device orientation events fresh data is available from a motion sensor. deviceorientation deviceorientationevent device orientation events fresh data is available from an orientation sensor. dischargingtimechange ev...
Guide to Web APIs - Developer guides
nter stylescss font loading api cssomcanvas apichannel messaging apiconsole apicredential management apiddomeencoding apiencrypted media extensionsffetch apifile system api frame timing apifullscreen apiggamepad api geolocation apihhtml drag and drop apihigh resolution timehistory apiiimage capture apiindexeddbintersection observer apillong tasks api mmedia capabilities api media capture and
streamsmedia session apimedia source extensions media
stream recordingnnavigation timingnetwork information api ppage visibility apipayment request apiperformance apiperformance timeline apipermissions apipointer eventspointer lock apiproximity events push api rresize observer apiresource timing apisserver sent eventsservice workers apistoragestorage access api
streams ttouch eventsuurl apivvibration...
Writing Web Audio API code that works in every browser - Developer guides
ction, and you now know why. there's a section in the spec that lists the old names and their updated equivalences; be sure to check it out and change your code accordingly. you can also check this article on porting which covers more cases and has many code samples. things that are not ready yet second, ensure that your project doesn't use node types that are not implemented yet in firefox: media
streamaudiosourcenode, mediaelementaudiosourcenode and oscillatornode. if it's using, for example, oscillatornode, you will have to wait until it is supported, or maybe, if you're really eager, hack in some replacement using scriptprocessornode, which allows you to write a node with callbacks that get called periodically, so that your javascript code generates or processes audio. the node parameters you...
Graphics on the Web - Developer guides
any size. view all... 3d graphics webgl a guide to getting started with webgl, the 3d graphics api for the web. this technology lets you use standard opengl es in web content. video using html5 audio and video embedding video and/or audio in a web page and controlling its playback. webrtc the rtc in webrtc stands for real-time communications, a technology that enables audio/video
streaming and data sharing between browser clients (peers). ...
HTML elements reference - HTML: Hypertext Markup Language
region on an image, and optionally associates it with a hypertext link. this element is used only within a <map> element. <audio> the html <audio> element is used to embed sound content in documents. it may contain one or more audio sources, represented using the src attribute or the <source> element: the browser will choose the most suitable one. it can also be the destination for
streamed media, using a media
stream. <img> the html <img> element embeds an image into the document. <map> the html <map> element is used with <area> elements to define an image map (a clickable link area). <track> the html <track> element is used as a child of the media elements, <audio> and <video>. it lets you specify timed text tracks (or time-based data), f...
Browser detection using the user agent - HTTP
ht be beneficial to use user agent sniffing to save on performance. for example, webkit 6 has a bug whereby when the device orientation changes, the browser might not fire mediaquerylist listeners when it should. to overcome this bug, observe the code below. ...
Cross-Origin Resource Sharing (CORS) - HTTP
ut note the additional requirements below) dpr downlink save-data viewport-width width the only allowed values for the content-type header are: application/x-www-form-urlencoded multipart/form-data text/plain no event listeners are registered on any xmlhttprequestupload object used in the request; these are accessed using the xmlhttprequest.upload property. no readable
stream object is used in the request. note: these are the same kinds of cross-site requests that web content can already issue, and no response data is released to the requester unless the server sends an appropriate header. therefore, sites that prevent cross-site request forgery have nothing new to fear from http access control. note: webkit nightly and safari technology preview place additional r...
Configuring servers for Ogg media - HTTP
e) using the accept-encoding: gzip,deflate header when requesting media files. your server should be configured to not do so. the data in media files is already compressed, so you won't get any real benefit from compression, and the use of compression makes it impossible for the browser to properly seek the video or determine its duration. another probelm with allowing http compression for media
streaming: apache servers don't send the content-length response header if gzip encoding is used. getting the duration of ogg media you can use the oggz-info tool to get the media duration; this tool is included with the oggz-tools package. the output from oggz-info looks like this: $ oggz-info /g/media/bruce_vs_ironman.ogv content-duration: 00:01:00.046 skeleton: serialno 1976223438 4 p...
CSP: base-uri - HTTP
the current protocol. <scheme-source> a scheme such as http: or https:. the colon is required. unlike other values below, single quotes shouldn't be used. you can also specify data schemes (not recommended). data: allows data: uris to be used as a content source. this is insecure; an attacker can also inject arbitrary data: uris. use this sparingly and definitely not for scripts. media
stream: allows media
stream: uris to be used as a content source. blob: allows blob: uris to be used as a content source. filesystem: allows filesystem: uris to be used as a content source. 'self' refers to the origin from which the protected document is being served, including the same url scheme and port number. you must include the single quotes. some browsers specifically exclude blob and f...
CSP: child-src - HTTP
n of example.com using the current protocol. <scheme-source> a schema such as 'http:' or 'https:'. the colon is required, single quotes shouldn't be used. you can also specify data schemas (not recommended). data: allows data: uris to be used as a content source. this is insecure; an attacker can also inject arbitrary data: uris. use this sparingly and definitely not for scripts. media
stream: allows media
stream: uris to be used as a content source. blob: allows blob: uris to be used as a content source. filesystem: allows filesystem: uris to be used as a content source. 'self' refers to the origin from which the protected document is being served, including the same url scheme and port number. you must include the single quotes. some browsers specifically exclude blob and f...
CSP: connect-src - HTTP
the current protocol. <scheme-source> a scheme such as http: or https:. the colon is required. unlike other values below, single quotes shouldn't be used. you can also specify data schemes (not recommended). data: allows data: uris to be used as a content source. this is insecure; an attacker can also inject arbitrary data: uris. use this sparingly and definitely not for scripts. media
stream: allows media
stream: uris to be used as a content source. blob: allows blob: uris to be used as a content source. filesystem: allows filesystem: uris to be used as a content source. 'self' refers to the origin from which the protected document is being served, including the same url scheme and port number. you must include the single quotes. some browsers specifically exclude blob and f...
CSP: default-src - HTTP
the current protocol. <scheme-source> a scheme such as http: or https:. the colon is required. unlike other values below, single quotes shouldn't be used. you can also specify data schemes (not recommended). data: allows data: uris to be used as a content source. this is insecure; an attacker can also inject arbitrary data: uris. use this sparingly and definitely not for scripts. media
stream: allows media
stream: uris to be used as a content source. blob: allows blob: uris to be used as a content source. filesystem: allows filesystem: uris to be used as a content source. 'self' refers to the origin from which the protected document is being served, including the same url scheme and port number. you must include the single quotes. some browsers specifically exclude blob and f...
CSP: font-src - HTTP
n of example.com using the current protocol. <scheme-source> a schema such as 'http:' or 'https:'. the colon is required, single quotes shouldn't be used. you can also specify data schemas (not recommended). data: allows data: uris to be used as a content source. this is insecure; an attacker can also inject arbitrary data: uris. use this sparingly and definitely not for scripts. media
stream: allows media
stream: uris to be used as a content source. blob: allows blob: uris to be used as a content source. filesystem: allows filesystem: uris to be used as a content source. 'self' refers to the origin from which the protected document is being served, including the same url scheme and port number. you must include the single quotes. some browsers specifically exclude blob and f...
CSP: form-action - HTTP
the current protocol. <scheme-source> a scheme such as http: or https:. the colon is required. unlike other values below, single quotes shouldn't be used. you can also specify data schemes (not recommended). data: allows data: uris to be used as a content source. this is insecure; an attacker can also inject arbitrary data: uris. use this sparingly and definitely not for scripts. media
stream: allows media
stream: uris to be used as a content source. blob: allows blob: uris to be used as a content source. filesystem: allows filesystem: uris to be used as a content source. 'self' refers to the origin from which the protected document is being served, including the same url scheme and port number. you must include the single quotes. some browsers specifically exclude blob and f...
CSP: frame-ancestors - HTTP
per the w3c spec on matching source expressions. <scheme-source> a scheme such as http: or https:. the colon is required and scheme should not be quoted. you can also specify data schemes (not recommended). data: allows data: uris to be used as a content source. this is insecure; an attacker can also inject arbitrary data: uris. use this sparingly and definitely not for scripts. media
stream: allows media
stream: uris to be used as a content source. blob: allows blob: uris to be used as a content source. filesystem: allows filesystem: uris to be used as a content source. 'self' refers to the origin from which the protected document is being served, including the same url scheme and port number. you must include the single quotes. some browsers specifically exclude blob and f...
CSP: frame-src - HTTP
n of example.com using the current protocol. <scheme-source> a schema such as 'http:' or 'https:'. the colon is required, single quotes shouldn't be used. you can also specify data schemas (not recommended). data: allows data: uris to be used as a content source. this is insecure; an attacker can also inject arbitrary data: uris. use this sparingly and definitely not for scripts. media
stream: allows media
stream: uris to be used as a content source. blob: allows blob: uris to be used as a content source. filesystem: allows filesystem: uris to be used as a content source. 'self' refers to the origin from which the protected document is being served, including the same url scheme and port number. you must include the single quotes. some browsers specifically exclude blob and f...
CSP: img-src - HTTP
the current protocol. <scheme-source> a scheme such as http: or https:. the colon is required. unlike other values below, single quotes shouldn't be used. you can also specify data schemes (not recommended). data: allows data: uris to be used as a content source. this is insecure; an attacker can also inject arbitrary data: uris. use this sparingly and definitely not for scripts. media
stream: allows media
stream: uris to be used as a content source. blob: allows blob: uris to be used as a content source. filesystem: allows filesystem: uris to be used as a content source. 'self' refers to the origin from which the protected document is being served, including the same url scheme and port number. you must include the single quotes. some browsers specifically exclude blob and f...
CSP: manifest-src - HTTP
n of example.com using the current protocol. <scheme-source> a schema such as 'http:' or 'https:'. the colon is required, single quotes shouldn't be used. you can also specify data schemas (not recommended). data: allows data: uris to be used as a content source. this is insecure; an attacker can also inject arbitrary data: uris. use this sparingly and definitely not for scripts. media
stream: allows media
stream: uris to be used as a content source. blob: allows blob: uris to be used as a content source. filesystem: allows filesystem: uris to be used as a content source. 'self' refers to the origin from which the protected document is being served, including the same url scheme and port number. you must include the single quotes. some browsers specifically exclude blob and f...
CSP: media-src - HTTP
n of example.com using the current protocol. <scheme-source> a schema such as 'http:' or 'https:'. the colon is required, single quotes shouldn't be used. you can also specify data schemas (not recommended). data: allows data: uris to be used as a content source. this is insecure; an attacker can also inject arbitrary data: uris. use this sparingly and definitely not for scripts. media
stream: allows media
stream: uris to be used as a content source. blob: allows blob: uris to be used as a content source. filesystem: allows filesystem: uris to be used as a content source. 'self' refers to the origin from which the protected document is being served, including the same url scheme and port number. you must include the single quotes. some browsers specifically exclude blob and f...
CSP: navigate-to - HTTP
the current protocol. <scheme-source> a scheme such as http: or https:. the colon is required. unlike other values below, single quotes shouldn't be used. you can also specify data schemes (not recommended). data: allows data: uris to be used as a content source. this is insecure; an attacker can also inject arbitrary data: uris. use this sparingly and definitely not for scripts. media
stream: allows media
stream: uris to be used as a content source. blob: allows blob: uris to be used as a content source. filesystem: allows filesystem: uris to be used as a content source. 'self' refers to the origin from which the protected document is being served, including the same url scheme and port number. you must include the single quotes. some browsers specifically exclude blob and f...
CSP: object-src - HTTP
n of example.com using the current protocol. <scheme-source> a schema such as 'http:' or 'https:'. the colon is required, single quotes shouldn't be used. you can also specify data schemas (not recommended). data: allows data: uris to be used as a content source. this is insecure; an attacker can also inject arbitrary data: uris. use this sparingly and definitely not for scripts. media
stream: allows media
stream: uris to be used as a content source. blob: allows blob: uris to be used as a content source. filesystem: allows filesystem: uris to be used as a content source. 'self' refers to the origin from which the protected document is being served, including the same url scheme and port number. you must include the single quotes. some browsers specifically exclude blob and f...
CSP: prefetch-src - HTTP
the current protocol. <scheme-source> a scheme such as http: or https:. the colon is required. unlike other values below, single quotes shouldn't be used. you can also specify data schemes (not recommended). data: allows data: uris to be used as a content source. this is insecure; an attacker can also inject arbitrary data: uris. use this sparingly and definitely not for scripts. media
stream: allows media
stream: uris to be used as a content source. blob: allows blob: uris to be used as a content source. filesystem: allows filesystem: uris to be used as a content source. 'self' refers to the origin from which the protected document is being served, including the same url scheme and port number. you must include the single quotes. some browsers specifically exclude blob and f...
CSP: script-src-attr - HTTP
the current protocol. <scheme-source> a scheme such as http: or https:. the colon is required. unlike other values below, single quotes shouldn't be used. you can also specify data schemes (not recommended). data: allows data: uris to be used as a content source. this is insecure; an attacker can also inject arbitrary data: uris. use this sparingly and definitely not for scripts. media
stream: allows media
stream: uris to be used as a content source. blob: allows blob: uris to be used as a content source. filesystem: allows filesystem: uris to be used as a content source. 'self' refers to the origin from which the protected document is being served, including the same url scheme and port number. you must include the single quotes. some browsers specifically exclude blob and f...
CSP: script-src-elem - HTTP
the current protocol. <scheme-source> a scheme such as http: or https:. the colon is required. unlike other values below, single quotes shouldn't be used. you can also specify data schemes (not recommended). data: allows data: uris to be used as a content source. this is insecure; an attacker can also inject arbitrary data: uris. use this sparingly and definitely not for scripts. media
stream: allows media
stream: uris to be used as a content source. blob: allows blob: uris to be used as a content source. filesystem: allows filesystem: uris to be used as a content source. 'self' refers to the origin from which the protected document is being served, including the same url scheme and port number. you must include the single quotes. some browsers specifically exclude blob and f...
CSP: script-src - HTTP
the current protocol. <scheme-source> a scheme such as http: or https:. the colon is required. unlike other values below, single quotes shouldn't be used. you can also specify data schemes (not recommended). data: allows data: uris to be used as a content source. this is insecure; an attacker can also inject arbitrary data: uris. use this sparingly and definitely not for scripts. media
stream: allows media
stream: uris to be used as a content source. blob: allows blob: uris to be used as a content source. filesystem: allows filesystem: uris to be used as a content source. 'self' refers to the origin from which the protected document is being served, including the same url scheme and port number. you must include the single quotes. some browsers specifically exclude blob and f...
CSP: style-src-attr - HTTP
the current protocol. <scheme-source> a scheme such as http: or https:. the colon is required. unlike other values below, single quotes shouldn't be used. you can also specify data schemes (not recommended). data: allows data: uris to be used as a content source. this is insecure; an attacker can also inject arbitrary data: uris. use this sparingly and definitely not for scripts. media
stream: allows media
stream: uris to be used as a content source. blob: allows blob: uris to be used as a content source. filesystem: allows filesystem: uris to be used as a content source. 'self' refers to the origin from which the protected document is being served, including the same url scheme and port number. you must include the single quotes. some browsers specifically exclude blob and f...
CSP: style-src-elem - HTTP
the current protocol. <scheme-source> a scheme such as http: or https:. the colon is required. unlike other values below, single quotes shouldn't be used. you can also specify data schemes (not recommended). data: allows data: uris to be used as a content source. this is insecure; an attacker can also inject arbitrary data: uris. use this sparingly and definitely not for scripts. media
stream: allows media
stream: uris to be used as a content source. blob: allows blob: uris to be used as a content source. filesystem: allows filesystem: uris to be used as a content source. 'self' refers to the origin from which the protected document is being served, including the same url scheme and port number. you must include the single quotes. some browsers specifically exclude blob and f...
CSP: style-src - HTTP
the current protocol. <scheme-source> a scheme such as http: or https:. the colon is required. unlike other values below, single quotes shouldn't be used. you can also specify data schemes (not recommended). data: allows data: uris to be used as a content source. this is insecure; an attacker can also inject arbitrary data: uris. use this sparingly and definitely not for scripts. media
stream: allows media
stream: uris to be used as a content source. blob: allows blob: uris to be used as a content source. filesystem: allows filesystem: uris to be used as a content source. 'self' refers to the origin from which the protected document is being served, including the same url scheme and port number. you must include the single quotes. some browsers specifically exclude blob and f...
CSP: worker-src - HTTP
n of example.com using the current protocol. <scheme-source> a schema such as 'http:' or 'https:'. the colon is required, single quotes shouldn't be used. you can also specify data schemas (not recommended). data: allows data: uris to be used as a content source. this is insecure; an attacker can also inject arbitrary data: uris. use this sparingly and definitely not for scripts. media
stream: allows media
stream: uris to be used as a content source. blob: allows blob: uris to be used as a content source. filesystem: allows filesystem: uris to be used as a content source. 'self' refers to the origin from which the protected document is being served, including the same url scheme and port number. you must include the single quotes. some browsers specifically exclude blob and f...
Transfer-Encoding - HTTP
transfer-encoding is a hop-by-hop header, that is applied to a message between two nodes, not to a resource itself. each segment of a multi-node connection can use different transfer-encoding values. ...
HTTP Index - HTTP
er protocol (http) 503 service unavailable server error response code indicates that the server is not ready to handle the request. 265 504 gateway timeout http, server error, status code the hypertext transfer protocol (http) 504 gateway timeout server error response code indicates that the server, while acting as a gateway or proxy, did not get a response in time from the up
stream server that it needed in order to complete the request. 266 505 http version not supported http, reference, server error, status code the hypertext transfer protocol (http) 505 http version not supported response status code indicates that the http version used in the request is not supported by the server. 267 506 variant also negotiates http, server error, st...
HTTP Messages - HTTP
mance: headers, unlike bodies, are uncompressed. headers are often very similar from one message to the next one, yet still repeated across connections. no multiplexing can be done. several connections need opening on the same server: and warm tcp connections are more efficient than cold ones. http/2 introduces an extra step: it divides http/1.x messages into frames which are embedded in a
stream. data and header frames are separated, this allows header compression. several
streams can be combined together, a process called multiplexing, allowing more efficient underlying tcp connections. http frames are now transparent to web developers. this is an additional step in http/2, between http/1.1 messages and the underlying transport protocol. no changes are needed in the apis used by web ...
CONNECT - HTTP
ted resource. it can be used to open a tunnel. for example, the connect method can be used to access websites that use ssl (https). the client asks an http proxy server to tunnel the tcp connection to the desired destination. the server then proceeds to make the connection on behalf of the client. once the connection has been established by the server, the proxy server continues to proxy the tcp
stream to and from the client. connect is a hop-by-hop method. request has body no successful response has body yes safe no idempotent no cacheable no allowed in html forms no syntax connect www.example.com:443 http/1.1 example some proxy servers might need authority to create a tunnel. see also the proxy-authorization ...
502 Bad Gateway - HTTP
note: a gateway might refer to different things in networking and a 502 error is usually not something you can fix, but requires a fix by the web server or the proxies you are trying to get access through. ...
504 Gateway Timeout - HTTP
note: a gateway might refer to different things in networking and a 504 error is usually not something you can fix, but requires a fix by the web server or the proxies you are trying to get access through. ...
WebAssembly.Global() constructor - JavaScript
ted) { output.innerhtml += `testing ${msg}: `; if (got !== expected) output.innerhtml += `fail!<br>got: ${got}<br>expected: ${expected}<br>`; else output.innerhtml += `success! ...
WebAssembly.Global - JavaScript
ted) { output.innerhtml += `testing ${msg}: `; if (got !== expected) output.innerhtml += `fail!<br>got: ${got}<br>expected: ${expected}<br>`; else output.innerhtml += `success! ...
WebAssembly.Module() constructor - JavaScript
be called to synchronously compile given webassembly binary code. however, the primary way to get a module is through an asynchronous compilation function like webassembly.compile(). syntax important: since compilation for large modules can be expensive, developers should only use the module() constructor when synchronous compilation is absolutely required; the asynchronous webassembly.compile
streaming() method should be used at all other times. new webassembly.module(buffersource); parameters buffersource a typed array or arraybuffer containing the binary code of the .wasm module you want to compile. examples synchronously compiling a webassembly module var importobject = { imports: { imported_func: function(arg) { console.log(arg); } } }; function createwasmmo...
WebAssembly.Module.customSections() - JavaScript
ample (see the custom-section.html source and live example) compiles the loaded simple-name-section.wasm byte code. we then do a check using webassembly.module.customsections, looking to see whether the module instance contains a "name" custom section by checking that its length is more than 0. since there is a "name" section in the example, an arraybuffer object is returned. ...
WebAssembly.Module.exports() - JavaScript
sembly.module object. return value an array containing objects representing the exported functions of the given module. exceptions if module is not a webassembly.module object instance, a typeerror is thrown. examples using exports the following example (see our index-compile.html demo on github, and view it live also) compiles the loaded simple.wasm byte code using the webassembly.compile
streaming() method and then sends it to a worker using postmessage(). var worker = new worker("wasm_worker.js"); webassembly.compile
streaming(fetch('simple.wasm')) .then(mod => worker.postmessage(mod) ); in the worker (see wasm_worker.js) we define an import object for the module to use, then set up an event handler to receive the module from the main thread. when the module is received, we create ...
WebAssembly.Module.imports() - JavaScript
ect. return value an array containing objects representing the imported functions of the given module. exceptions if module is not a webassembly.module object instance, a typeerror is thrown. examples using imports the following example (see imports.html source code; see it live also) compiles the loaded simple.wasm module. this module is then queried for its imports. webassembly.compile
streaming(fetch('simple.wasm')) .then(function(mod) { var imports = webassembly.module.imports(mod); console.log(imports[0]); }); the output looks like this: { module: "imports", name: "imported_func", kind: "function" } specifications specification webassembly javascript interfacethe definition of 'imports()' in that specification. browser compatibility the compa...
WebAssembly.Module - JavaScript
, returns an array containing descriptions of all the declared exports. webassembly.module.imports() given a module, returns an array containing descriptions of all the declared imports. examples sending a compiled module to a worker the following example (see our index-compile.html demo on github, and view it live also) compiles the loaded simple.wasm byte code using the webassembly.compile
streaming() method and then sends the resulting module instance to a worker using postmessage(). var worker = new worker("wasm_worker.js"); webassembly.compile
streaming(fetch('simple.wasm')) .then(mod => worker.postmessage(mod) ); in the worker (see wasm_worker.js) we define an import object for the module to use, then set up an event handler to receive the module from the main thread. when the mod...
WebAssembly.compile() - JavaScript
ile the following example compiles the loaded simple.wasm byte code using the compile() function and then sends it to a worker using postmessage(). var worker = new worker("wasm_worker.js"); fetch('simple.wasm').then(response => response.arraybuffer() ).then(bytes => webassembly.compile(bytes) ).then(mod => worker.postmessage(mod) ); note: you'll probably want to use webassembly.compile
streaming() in most cases, as it is more efficient than compile(). specifications specification webassembly javascript interfacethe definition of 'compile()' in that specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-d...
Lexical grammar - JavaScript
t, module declaration expression statement debugger continue, break, throw return the ecmascript specification mentions three rules of semicolon insertion. 1. a semicolon is inserted before, when a line terminator or "}" is encountered that is not allowed by the grammar. { 1 2 } 3 // is transformed by asi into { 1 2 ;} 3; 2. a semicolon is inserted at the end, when the end of the input
stream of tokens is detected and the parser is unable to parse the single input
stream as a complete program. here ++ is not treated as a postfix operator applying to variable b, because a line terminator occurs between b and ++. a = b ++c // is transformend by asi into a = b; ++c; 3. a semicolon is inserted at the end, when a statement with restricted productions in the grammar is followed by a l...
Digital video concepts - Web media technologies
er components and using floating-point components. when using integer components, rgb color uses 8 bits each of red, green, and blue, as well as potentially 8 bits of alpha (the amount of transparency). yuv unlike rgb, the yuv (or y'uv) color encoding system is based around how humans perceive a color image. doing so allows color data to be represented using fewer total bits of space in a video
stream. the name "yuv" is generally used today to describe this color system, even though the term was originally used specifically for analog coding of color, while ycbcr was used for digital color. however, today both terms are used for digital color. the prime symbol, ', indicates that gamma compression is being used. contemplating human vision we're able to represent an image this way because the...
Media type and format guide: image, audio, and video content - Web media technologies
and browser support levels and restrictions. the "codecs" parameter in common media types when specifying the mime type describing a media format, you can provide details using the codecs parameter as part of the type string. this guide describes the format and possible values of the codecs parameter for the common media types. codecs used by webrtc webrtc doesn't use a container, but instead
streams the encoded media itself from peer to peer using media
streamtrack objects to represent each audio or video track. this guide discusses the codecs commonly used with webrtc. guides concepts digital audio concepts an introduction to how audio is converted into digital form and stored for use by computers. it explains basic concepts about how audio is sampled, as well as concepts such as s...
Mobile first - Progressive web apps (PWAs)
inside the mobile first umbrella. first things first — mobile as a default you may think that concentrating on the mobile experience first sounds pointless, as we are more used to dealing with desktop sites, and we surely need to consider the full gamut of features for the overall experience across desktop, mobile, etc., before then paring it down to a mobile experience that is simpler, more
streamlined, or whatever. this rings true, yes, but in our experience mobile first is more about having the mobile implementation as a default layer to build on. we consider the overall experience during the planning stage, look at what subset of features will be available on mobile, desktop, etc. in tandem and how they will be implemented. then at implementation stage, we present the mobile layout and...
The building blocks of responsive design - Progressive web apps (PWAs)
measurements for our application layout — essentially, this means using a combination of percentages and ems/rems to size your containers and text, not fixed widths such as pixels. this has a lot of advantages in that the layout will adapt to different viewport dimensions. let's look at an example. we've written a simple-but-fun prototype for an application called snapshot, which takes a video
stream from your webcam (using getusermedia()) then allows you to capture stills from that video
stream (using html5 <canvas>), and save them to a gallery. you can then view previously-captured images and delete them. other articles will discuss the functionality in more detail, but here we're interested in the layout. note: you can find the snapshot app on github; check out the code and help improve ...