Search completed in 1.13 seconds.
HTMLImageElement.decoding - Web APIs
if doing so would cause problems, you can specify sync to disable asynchronous loading. ...
...if doing so would cause problems, you can specify sync to disable asynchronous loading. ...
...if doing so would cause problems, you can specify sync to disable asynchronous loading. ...
...And 6 more matches
MediaCapabilities.decodingInfo() - Web APIs
the mediacapabilities.
decodinginfo() method, part of the media capabilities api, returns a promise with the tested media configuration's mediacapabilitiesinfo; this contains the three boolean properties supported, smooth, and powerefficient, which describe whether
decoding the media described would be supported, smooth, and powerefficient. syntax mediacapabilities.
decodinginfo(media
decodingconfiguration) parameters media
decodingconfiguration a valid media
decodingconfiguration dictionary containing a valid media
decoding type of file or media-source and a valid media configuration: either an audioconfiguration or a videoconfiguration. return value a promise fulfilling with a mediacapabilitiesinfo interface containing three boolean attributes: supported smooth powerefficient except...
...onfiguration dictionary containing a valid media
decoding type of file or media-source and a valid media configuration: either an audioconfiguration or a videoconfiguration. return value a promise fulfilling with a mediacapabilitiesinfo interface containing three boolean attributes: supported smooth powerefficient exceptions a typeerror is raised if the mediaconfiguration passed to the
decodinginfo() method is invalid, either because the type is not video or audio, the contenttype is not a valid codec mime type, the media
decoding configuration is not a valid value for the media
decoding type, or any other error in the media configuration passed to the method, including omitting values required in the media
decoding configuration. example //create media configuration to be ...
...fig = { type : 'file', // or 'media-source' audio : { contenttype : "audio/ogg", // valid content type channels : 2, // audio channels used by the track bitrate : 132700, // number of bits used to encode 1s of audio samplerate : 5200 // number of audio samples making up that 1s. ...
...iacapabilities.
decodinginfo(mediaconfig).then(result => { console.log('this configuration is ' + (result.supported ? '' : 'not ') + 'supported, ' + (result.smooth ? '' : 'not ') + 'smooth, and ' + (result.powerefficient ? '' : 'not ') + 'power efficient.') }); specifications specification status comment media capabilitiesthe definition of '
decodinginfo()' in that specification. draft initial definition ...
SVGImageElement.decoding - Web APIs
the
decoding property of the svgimageelement interface represents a hint given to the browser on how it should decode the image. syntax var refstr = svgimageelement.
decoding svgimageelement.
decoding = refstr; values a domstring representing the
decoding hint. possible values are: sync: decode the image synchronously for atomic presentation with other content. async: decode the image asynchronously to reduce delay in presenting other content. auto: default mode, which indicates no preference for the
decoding mode. the browser decides what is best for the user. ...
... living standard initial definition. browser compatibility the compatibility table on this page is generated from structured data. ...
... living standard initial definition. browser compatibility the compatibility table on this page is generated from structured data. ...
...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. ...
MediaDecodingConfiguration - Web APIs
this takes one of two values: file: represents a configuration that is meant to be used for a plain file playback. media-source: represents a configuration that is meant to be used for playback of a mediasource. a media configuration — a videoconfiguration or audioconfiguration dictionary. ...
... 'media-source' video : { contenttype : "video/webm;codecs=vp8", // valid content type width : 800, // width of the video height : 600, // height of the video bitrate : 10000, // number of bits used to encode 1s of video framerate : 30 // number of frames making up that 1s. } }; // check support and performance navigator.mediacapabilities.
decodinginfo(mediaconfig).then(result => { console.log('this configuration is ' + (result.supported ? '' : 'not ') + 'supported.') }); specifications specification status comment media capabilitiesthe definition of 'media
decodingconfiguration' in that specification. draft initial definition ...
Index - Web APIs
iobuffersourcenode, media, method, reference, web audio api, sound, start undefined. 121 audioconfiguration api, audio, audioconfiguration, experimental, interface, media capabilities api, reference, video the audioconfiguration dictionary of the media capabilities api defines the audio file being tested when calling mediacapabilities.encodinginfo() or mediacapabilities.
decodinginfo() to query whether a specific audio configuration is supported, smooth, and/or power efficient. 122 audiocontext api, audio, audiocontext, interface, reference, web audio api, sound the audiocontext interface represents an audio-processing graph built from audio modules linked together, each represented by an audionode. 123 audiocontext() audio, audio conte...
... api, htmlimageelement, image, property, reference, url, currentsrc, source the read-only htmlimageelement property currentsrc indicates the url of the image which is currently presented in the <img> element it represents. ...
...g> element it represents. 1719 htmlimageelement.decode() api, decode, graphics, html dom, htmlimageelement, images, loading, method, performance, reference, async, asynchronous,
decoding the decode() method of the htmlimageelement interface returns a promise that resolves when the image is decoded and it is safe to append the image to the dom. 1720 htmlimageelement.
decoding api, dom, htmlimageelement, property, reference,
decoding the
decoding property of the htmlimageelement interface represents a hint given to the browser on how it should decode the image. 1721 htmlimageelement.height api, html, html dom, htmlimageelement, image, property, reference, dimensions, height, size the height property of the htmlimageelement interface indic...
...And 16 more matches
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, sam...
...see if the user agent supports
decoding that media configuration, and whether it will perform well in terms of smoothness and power efficiency. ...
...different browsers support different media types and new media types are always being developed. ...
...And 6 more matches
Using the Media Capabilities API - Web APIs
s, the media capabilities api is available both on the main thread and from workers. if the object exists, media capabilities api is available. you can, therefore, test for the presence of the api like so: if ("mediacapabilities" in navigator) { // mediacapabilities is available } else { // mediacapabilities is not available } taking video as an example, to obtain information about video
decoding abilities, you create a video
decoding configuration which you pass as a parameter to mediacapabilities.
decodinginfo() method. this returns a promise that fulfills with information about the media capabilities as to whether the video can be decoded, and whether
decoding will be smooth and power efficient. you can also test audio
decoding as well as video and audio encoding. creating a video dec...
...figuration which you pass as a parameter to mediacapabilities.
decodinginfo() method. this returns a promise that fulfills with information about the media capabilities as to whether the video can be decoded, and whether
decoding will be smooth and power efficient. you can also test audio
decoding as well as video and audio encoding. creating a video
decoding configuration the mediacapabilities.
decodinginfo() method takes as a parameter a media
decoding configuration. there are very specific ways to go about creating the configuration defined by the media
decodingconfiguration dictionary. in our example, we are testing the
decoding capabilities of a video configuration. the configuration requires the type of media being tested — e.g. a plain file or mediasource — and a videoconfiguration inc...
... } }; had we been testing encoding capabilities, we would have created a mediaencodingconfiguration, which requires the type of media being tested — either record (for recording media, i.e. a mediarecorder object) or transmission (for media transmitted over electronic means like rtcpeerconnection) — plus either an audio or video configuration as described above. querying the browser about
decoding abilities now that we've created a video
decoding configuration we can pass it as a paramater of the
decodinginfo() method to determine if a video matching this configuration would be decodable and if the playback would be smooth and power efficient. var promise = navigator.mediacapabilities.
decodinginfo(videoconfiguration); the
decodinginfo() and encodinginfo() methods both return promises. o...
...And 5 more matches
Web video codec guide - Web media technologies
generally speaking, any configuration option that is intended to reduce the output size of the video will probably have a negative impact on the overall quality of the video, or will introduce certain types of artifacts into the video. it's also possible to select a lossless form of encoding, which will result in a much larger encoded file but with perfect reproduction of the original video upon
decoding. in addition, each encoder utility may have variations in how they process the source video, resulting in differences in the output quality and/or size. video encoder configuration effects on quality and size feature effect on quality effect on size lossless compression no loss of quality lossless compression cannot reduce the overall video size nearly as much...
... most common ones you may see include: moiré patterns a unknown prefix: moiré pattern. is a large-scale spatial interference pattern produced when a pattern in the source image and the manner in which the encoder operates are slightly out of alignment spatially. the artifacts generated by the encoder then introduce strange, swirling effects in the source image's pattern upon
decoding. staircase effect the staircase effect is a spatial artifact that occurs when diagonal straight or curved edges that should be smooth take on a jagged appearance, looking somewhat like a set of stair steps. this is the effect that is being reduced by "anti-aliasing" filters. wagon-wheel effect the wagon-wheel effect (or stroboscopic effect) is...
...les: main, high, and professional with increasing support for color depths and chroma subsampling. in addition, a series of levels are specified, each defining limits on a range of attributes of the video. ...
...And 4 more matches
StringView - Archive of obsolete content
] = 0x80 /* 128 */ + ((nchar >>> 6) & 0x3f /* 63 */); atarget[nidx++] = 0x80 /* 128 */ + (nchar & 0x3f /* 63 */); } return nidx; }; stringview.getutf8charlength = function (nchar) { return nchar < 0x80 ? 1 : nchar < 0x800 ? 2 : nchar < 0x10000 ? 3 : nchar < 0x200000 ? 4 : nchar < 0x4000000 ? 5 : 6; }; stringview.loadutf16charcode = function (achars, nidx) { /* utf-16 to domstring
decoding algorithm */ var nfrstchr = achars[nidx]; return nfrstchr > 0xd7bf /* 55231 */ && nidx + 1 < achars.length ? (nfrstchr - 0xd800 /* 55296 */ << 10) + achars[nidx + 1] + 0x2400 /* 9216 */ : nfrstchr; }; stringview.pututf16charcode = function (atarget, nchar, nputat) { var nidx = nputat; if (nchar < 0x10000 /* 65536 */) { /* one element */ atarget[nidx++] = nchar; } el...
... if (nchar < 0x10000 /* 65536 */) { /* one element */ atarget[nidx++] = nchar; } else { /* two elements */ atarget[nidx++] = 0xd7c0 /* 55232 */ + (nchar >>> 10); atarget[nidx++] = 0xdc00 /* 56320 */ + (nchar & 0x3ff /* 1023 */); } return nidx; }; stringview.getutf16charlength = function (nchar) { return nchar < 0x10000 ? 1 : 2; }; /* array of bytes to base64 string
decoding */ stringview.b64touint6 = function (nchr) { return nchr > 64 && nchr < 91 ? nchr - 65 : nchr > 96 && nchr < 123 ? nchr - 71 : nchr > 47 && nchr < 58 ? nchr + 4 : nchr === 43 ? 62 : nchr === 47 ? 63 : 0; }; stringview.uint6tob64 = function (nuint6) { return nuint6 < 26 ? nuint6 + 65 : nuint6 < 52 ? nuint6 + 71 : ...
... arguments base64string (required) a base64-encoded string which will be decoded and copied into the new stringview object. encoding optional a string expressing the encoding type. for possible values see here. byteoffset optional a number expressing the start offset in bytes of the new stringview. if not specified (or specified as null) it ...
...ts buffer. arguments wholebuffer optional a boolean expressing whether the returned base64-encoded string will correspond to the whole buffer (true) or to the stringview (false or omitted). examples var mystringview = new stringview("\u6432\u6432\u6432\u6432"); alert(stringview.makefrombase64(mystringview.tobase64())) // 搲搲搲搲 see also: base64 encoding and
decoding. subview() syntax stringview.subview(characteroffset[, characterslength]) description returns a new stringview object which will share the same buffer. arguments characteroffset and characterslength will be treated as in string.prototype.substr(characteroffset[, characterslength) (see). if you want to create a new stringview object cloning without sharing the same buffer, loo...
Migrating from webkitAudioContext - Web APIs
odeaudiodata() method instead. ...
... file over the network, and then decoded it using createbuffer(): var xhr = new xmlhttprequest(); xhr.open("get", "/path/to/audio.ogg", true); xhr.responsetype = "arraybuffer"; xhr.send(); xhr.onload = function() { var decodedbuffer = context.createbuffer(xhr.response, false); if (decodedbuffer) { //
decoding was successful, do something useful with the audio buffer } else { alert("
decoding the audio buffer failed"); } }; converting this code to use decodeaudiodata() is relatively simple, as can be seen below: var xhr = new xmlhttprequest(); xhr.open("get", "/path/to/audio.ogg", true); xhr.responsetype = "arraybuffer"; xhr.send(); xhr.onload = function() { context.decodeaudiodata(xhr.response, function onsuccess(decodedbuffer) { //
decoding was successful, do something us...
... this means that you may need to restructure your code to run the part which happened after the createb...
...uffer"; xhr.send(); xhr.onload = function() { context.decodeaudiodata(xhr.response, function onsuccess(decodedbuffer) { //
decoding was successful, do something useful with the audio buffer }, function onfailure() { alert("
decoding the audio buffer failed"); }); }; note that the decodeaudiodata() method is asynchronous, which means that it will return immediately, and then when the
decoding finishes, one of the success or failure callback functions will get called depending on whether the audio
decoding was successful. this means that you may need to restructure your code to run the part which happened after the createbuffer() call in the success callback, as you can see in the example above. renaming of audioparam.settargetvalueattime the settargetvalueattime() method on the aud...
Web audio codec guide - Web media technologies
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. additionally, webrtc implementations generally use a subset of these codecs for their encoding and
decoding of media, and may support additional codecs as well, for optimal cross-platform support of video and audio conferencing, and to integrate better with legacy telecommunication solutions. see codecs used by webrtc for details. for information about the fundamental concepts behind how digital audio works, see the article digital audio concepts. common codecs the list below denotes the codecs most...
...d audio size several factors affect the size of the encoded audio. some of these are a matter of the form of the source audio; others are related to decisions made while encoding the audio. lossless versus lossy codecs there are two basic categories of audio compression. lossless compression algorithms reduce the size of the audio without compromising the quality or fidelity of the sound. upon
decoding audio compressed with a lossless codec such as flac or alac, the result is identical in every way to the original sound, down to the bit. lossy codecs, on the other hand, take advantage of the fact that the human ear is not a perfect interpreter of audio, and of the fact that the human brain can pluck the important information out of imperfect or noisy audio. they strip away audio frequencies th...
... advantage of the fact that the human ear is not a perfect interpreter of audio, and of the fact that the human brain can pluck the important information out of imperfect or noisy audio. they strip away audio frequencies that aren't used much, tolerate loss of precision in the decoded output, and use other methods to lose audio content, quality, and fidelity to produce smaller encoded media. upon
decoding, the output is, to varying degrees, still understandable. the specific codec used—and the compression configuration selected—determine how close to the original, uncompressed audio signal the output seems to be when heard by the human ear. because of the differences in how lossy codecs work compared to lossless ones, especially the fact that lossless ones have to be much more conservative wi...
...ent of the app, such as games, you will need more control over the encoding process and more options surrounding the format used while encoding the audio. a few popular options: ffmpeg arguably the best-known and most widely regarded open source codec packages available, ffmpeg supports the majority of the most popular audio formats and provides command-line tools and libraries for encoding,
decoding, and performing format conversions of both audio and video. binaries are available for macos, linux, and windows. handbrake a highly popular open source front-end to ffmpeg which adds a graphical user interface that makes it much easier to control the wide variety of options ffmpeg offers while encoding audio and/or video. binaries are available for macos, linux, and windows. audacity an open...
Index
ctions once a handle is no longer needed. this is particularly important for applications that might need to close a database and reinitialize nss using a different one, without restarting. such an operation might fail at runtime if data elements are still being referenced. in addition to the freebl, softoken, and ckbi modules, there is an utility library for general operations (e.g., encoding/
decoding between data formats, a list of standardized object identifiers (oid)). nss has an ssl/tls module that implements the secure sockets layer/transport layer security network protocols, an s/mime module that implements cms messaging used by secure email and some instant messaging implementations, a dbm library that implements the classic database storage, and finally a core nss library for the big s...
... -f turn on fancy printing. output is printed in colored html. data sent from the client to the server is in blue; the server's reply is in red. when used with looping mode, the different connections are separated with horizontal lines. you can use this option to upload the output into a browser. -s turn on ssl parsing and
decoding. the tool does not automatically detect ssl sessions. if you are intercepting an ssl connection, use this option so that the tool can detect and decode ssl structures. if the tool detects a certificate chain, it saves the der-encoded certificates into files in the current directory. the files are named cert.0x, where x is the sequ...
...encrypted > } ] >-- [ sslrecord { type = 23 (application_data) version = { 3,0 } length = 223 (0xdf) > encrypted > } sslrecord { type = 21 (alert) version = { 3,0 } length = 18 (0x12) > encrypted > } ] server socket closed. example 3 in this example, the -h option turns hex/ascii format. there is no ssl parsing or
decoding. the output is routed to a text file. $ ssltap -h -p 444 interzone.mcom.com:443 > h.txt output connected to interzone.mcom.com:443 --> [ 0: 80 40 01 03 00 00 27 00 00 00 10 01 00 80 02 00 | .@....'......... 10: 80 03 00 80 04 00 80 06 00 40 07 00 c0 00 00 04 | .........@...... 20: 00 ff e0 00 00 0a 00 ff e1 00 00 09 00 00 03 00 | ........á....... 30: 00 06 9...
nss tech note1
hod type, this may be a bug). sec_asn1_dynamic or sec_asn1_xtrn : specifies that the component format is defined in a dynamic subtemplate. there is no difference between the two macros. the sub field of the template points to a callback function of type sec_asn1templatechooser that returns the subtemplate depending on the component data. ...
...cros. the sub field of the template points to a callback function of type sec_asn1templatechooser that returns the subtemplate depending on the component data. sec_asn1_skip: specifies that the decoder should skip
decoding of the component. sec_asn1decodeitem can only skip required components and will assert if you try to skip an optional component. sec_quickderdecodeitem supports skipping the
decoding of optional components if you define the tag of the component in the template sec_asn1_inner: recurse into the component and saves its content, without the surrounding asn.1 tag and length sec_asn1_save: saves the component data, but does not proceed to the next component if within a sequence template array. this means the next template will reprocess the same component. sec_asn1_skip_re...
...omponents if you define the tag of the component in the template sec_asn1_inner: recurse into the component and saves its content, without the surrounding asn.1 tag and length sec_asn1_save: saves the component data, but does not proceed to the next component if within a sequence template array. this means the next template will reprocess the same component. sec_asn1_skip_rest: abort the
decoding. this is used in a template array within a sequence, if you don't care about the fields at the end of it. sec_asn1decodeitem only supports this modifier in the top-level template. sec_quickderdecodeitem allows it at any nested sublevel. sec_asn1_choice: allows
decoding of components that are of variable type. this must be the first template in a null-terminated array. the offset parameter spec...
Digital audio concepts - Web media technologies
les per second), this means each second of audio occupies 192 kb of memory. therefore, a typical three-minute song requires about 34.5 mb of memory. that's a lot of storage, but worse, it's an insane amount of network bandwidth to use for a relatively short piece of audio. that's why most digital audio is compressed. the process of compressing and decompressing audio is performed by encoding and
decoding it using an audio codec (coder/decoder). over the years, a large variety of codecs have been developed, several of which are commonly used on the web. for details about the most important and useful ones for web developers to be familiar with, see the article guide to audio codecs used on the web. audio channels and frames there are two types of audio channel. standard audio channels are used t...
...choacoustics may use any of the techniques mentioned here, and will almost certainly apply others as well. all of this means there is a fundamental question that has to be asked and answered before choosing a codec: given the content of the sound, the usage context, and the target audience, is it acceptable to lose some degree of audio fidelity, and if so, how much; or is it necessary that, upon
decoding the data, the result be identical to the source audio? lossy vs lossless compression if loss of detail and potentially fidelity is unacceptable or undesirable, a lossless codec is preferred. on the other hand, if some degree of reduction of audio fidelity is okay, a lossy codec can be used. generally, lossy compression results in significantly smaller output than lossless compression methods; a...
... then you store the values of mid and side. while mid is still the same size as your sample size (such as 16 bits), the value of side can probably be stored in a smaller number of bits, since the amplitude of the two channels is probably relatively similar. the encoder can then take this smaller number of total bits per frame and perform additional computations to further reduce the size. while
decoding the audio, the absolute left and right channel values are calculated like this: l=mid + sidel\quad =\quad mid\quad +\quad side r=mid - sidel\quad =\quad mid\quad -\quad side on its own, mid-side stereo coding is lossless, and is commonly used by both lossless and lossy audio codecs. any loss of detail comes from other steps of the encoding process. intensity stereo coding intensity stereo ...
Graceful asynchronous programming with Promises - Learn web development
n this case the .all() block will always get fulfilled. if you wanted the .all() to reject, you'd have to chain the .catch() block on to the end of the .all() instead. the code inside the function body is async and promise-based, therefore in effect, the entire function acts like a promise — convenient. next, we call our function three times to begin the process of fetching and
decoding the images and text and store each of the returned promises in a variable. add the following below your previous code: let coffee = fetchanddecode('coffee.jpg', 'blob'); let tea = fetchanddecode('tea.jpg', 'blob'); let description = fetchanddecode('description.txt', 'text'); next, we will define a promise.all() block to run some code only when all three of the promises stored above have ...
...ly attractive way! the code we provided here for displaying the items is fairly rudimentary but works as an explainer for now. note: if you get stuck, you can compare your version of the code to ours, to see what it is meant to look like — see it live, and see the source code. note: if you were improving this code, you might want to loop through a list of items to display, fetching and
decoding each one, and then loop through the results inside promise.all(), running a different function to display each one depending on what the type of code was. this would make it work for any number of items, not just three. also, you could determine what the type of file is being fetched without needing an explicit type property. you could, for example, check the content-type http header of the resp...
NSS_3.12_release_notes.html
util bug 339737: libpkix ocsp checking calls cert_verifycert bug 358785: merge nss_libpkix_branch back to trunk bug 365966: infinite recursive call in vfy_verifydigestdirect bug 382078: pkix default http client returns error when try to get an ocsp response. ...
...ug 353902: klocwork bugs in stanpcertdb.c bug 353903: klocwork oom crash in softoken/keydb.c bug 353908: klocwork oom crash in tdcache.c bug 353909: klocwork ptr dereference before null check in devutil.c bug 353912: misc klocwork bugs in lib/ckfw bug 354008: klocwork bugs in freebl bug 359331: modutil -changepw strict shutdown failure bug 373367: verify ocsp response signature in libpkix without
decoding and reencoding bug 390542: libpkix fails to validate a chain that consists only of one self issued, trusted cert bug 390728: pkix_pl_ocsprequest_create throws an error if it was not able to get aia location bug 397825: libpkix: ifdef code that uses user object types bug 397832: libpkix leaks memory if a macro calls a function that returns an error bug 402727: functions responsible for creating an...
NSS API Guidelines
ed interface. the pkcs11wrap library provides functions for selecting/finding pkcs #11 modules and slots. it also provides functions that invoke operations in selected modules and slots, such as key selection and generation, signing, encryption and decryption, etc. crypto wrapper lib/pk11wrap pk11func.h, secmod.h, secmodt.h pkcs12 provides functions and types for encoding and
decoding pkcs #12 data. pkcs #12 can be used to to encode keys, and certificates, for export or import into other applications. pkcs #12 lib/pkcs12 pkcs12t.h, pkcs12.h, p12plcy.h, p12.h, p12t.h pkcs7 provides functions and types for encoding and
decoding encrypted data in pkcs #7 format. for example, pkcs #7 is used to encrypt certificate data to exchange between applications, or to e...
...ation lib/softoken keydbt.h, keylow.h, keytboth.h, keytlow.h, secpkcs5.h, pkcs11.h, pkcs11f.h, pkcs11p.h, pkcs11t.h, pkcs11u.h ssl provides an implementation of the ssl protocol using nss and nspr. ssl lib/ssl ssl.h, sslerr.h, sslproto.h, preenc.h secutil provides utility functions and data types used by other libraries. the library supports base-64 encoding/
decoding, reader-writer locks, the secitem data type, der encoding/
decoding, error types and numbers, oid handling, and secure random number generation. utility for any layer lib/util base64.h, ciferfam.h, nssb64.h, nssb64t.h, nsslocks.h, nssrwlk.h, nssrwlkt.h, portreg.h, pqgutil.h, secasn1.h, secasn1t.h, seccomon.h, secder.h, secdert.h, secdig.h, secdigt.h, secitem.h, secoid.h, secoidt.h, secpor...
NSS tools : ssltab
e separated by a vertical bar. nonprinting characters are replaced by dots. -f turn on fancy printing. output is printed in colored html. data sent from the client to the server is in blue; the server's reply is in red. when used with looping mode, the different connections are separated with horizontal lines. you can use this option to upload the output into a browser. -s turn on ssl parsing and
decoding. the tool does not automatically detect ssl sessions. if you are intercepting an ssl connection, use this option so that the tool can detect and decode ssl structures. if the tool detects a certificate chain, it saves the der-encoded certificates into files in the current directory. the files are named cert.0x, where x is the sequence number of the certificate. if the -s option is used with -h, t...
... [ sslrecord { type = 23 (application_data) version = { 3,0 } length = 160 (0xa0) > encrypted > } ] >-- [ sslrecord { type = 23 (application_data) version = { 3,0 } length = 223 (0xdf) > encrypted > } sslrecord { type = 21 (alert) version = { 3,0 } length = 18 (0x12) > encrypted > } ] server socket closed. example 3 in this example, the -h option turns hex/ascii format. there is no ssl parsing or
decoding. the output is routed to a text file. $ ssltap -h -p 444 interzone.mcom.com:443 > h.txt output connected to interzone.mcom.com:443 --> [ 0: 80 40 01 03 00 00 27 00 00 00 10 01 00 80 02 00 | .@....'......... 10: 80 03 00 80 04 00 80 06 00 40 07 00 c0 00 00 04 | .........@...... 20: 00 ff e0 00 00 0a 00 ff e1 00 00 09 00 00 03 00 | ........á....... 30: 00 06 9b fe 5b 56 96 49 1f 9f ca dd d5 ba b9 ...
NSS tools : ssltap
e separated by a vertical bar. nonprinting characters are replaced by dots. -f turn on fancy printing. output is printed in colored html. data sent from the client to the server is in blue; the server's reply is in red. when used with looping mode, the different connections are separated with horizontal lines. you can use this option to upload the output into a browser. -s turn on ssl parsing and
decoding. the tool does not automatically detect ssl sessions. if you are intercepting an ssl connection, use this option so that the tool can detect and decode ssl structures. if the tool detects a certificate chain, it saves the der-encoded certificates into files in the current directory. the files are named cert.0x, where x is the sequence number of the certificate. if the -s option is used with -h, t...
... [ sslrecord { type = 23 (application_data) version = { 3,0 } length = 160 (0xa0) > encrypted > } ] >-- [ sslrecord { type = 23 (application_data) version = { 3,0 } length = 223 (0xdf) > encrypted > } sslrecord { type = 21 (alert) version = { 3,0 } length = 18 (0x12) > encrypted > } ] server socket closed. example 3 in this example, the -h option turns hex/ascii format. there is no ssl parsing or
decoding. the output is routed to a text file. $ ssltap -h -p 444 interzone.mcom.com:443 > h.txt output connected to interzone.mcom.com:443 --> [ 0: 80 40 01 03 00 00 27 00 00 00 10 01 00 80 02 00 | .@....'......... 10: 80 03 00 80 04 00 80 06 00 40 07 00 c0 00 00 04 | .........@...... 20: 00 ff e0 00 00 0a 00 ff e1 00 00 09 00 00 03 00 | ........á....... 30: 00 06 9b fe 5b 56 96 49 1f 9f ca dd d5 ba b9 ...
NSS Tools ssltap
parated by a vertical bar. nonprinting characters are replaced by dots. -f turn on fancy printing. output is printed in colored html. data sent from the client to the server is in blue; the server's reply is in red. when used with looping mode, the different connections are separated with horizontal lines. you can use this option to upload the output into a browser. -s turn on ssl parsing and
decoding. the tool does not automatically detect ssl sessions. if you are intercepting an ssl connection, use this option so that the tool can detect and decode ssl structures. if the tool detects a certificate chain, it saves the der-encoded certificates into files in the current directory. the files are named cert.0x, where x is the sequence number of the certificate. if the -s option is used with -h...
... length = 160 (0xa0) < encrypted >}]<-- [sslrecord { type = 23 (application_data) version = { 3,0 } length = 223 (0xdf) < encrypted >}sslrecord { type = 21 (alert) version = { 3,0 } length = 18 (0x12) < encrypted >}]server socket closed. example 3 in this example, the -h option turns hex/ascii format. there is no ssl parsing or
decoding. the output is routed to a text file. command ssltap.exe -h -p 444 interzone.mcom.com:443 > h.txt output connected to interzone.mcom.com:443--> [ 0: 80 40 01 03 00 00 27 00 00 00 10 01 00 80 02 00 | .@....'......... 10: 80 03 00 80 04 00 80 06 00 40 07 00 c0 00 00 04 | .........@...... 20: 00 ff e0 00 00 0a 00 ff e1 00 00 09 00 00 03 00 | ........á....... 30: 00 06 ...
NSS tools : ssltap
-f turn on fancy printing. output is printed in colored html. data sent from the client to the server is in blue; the server's reply is in red. when used with looping mode, the different connections are separated with horizontal lines. you can use this option to upload the output into a browser. -s turn on ssl parsing and
decoding. the tool does not automatically detect ssl sessions. if you are intercepting an ssl connection, use this option so that the tool can detect and decode ssl structures. if the tool detects a certificate chain, it saves the der-encoded certificates into files in the current directory. the files are named cert.0x, where x is the sequ...
...encrypted > } ] >-- [ sslrecord { type = 23 (application_data) version = { 3,0 } length = 223 (0xdf) > encrypted > } sslrecord { type = 21 (alert) version = { 3,0 } length = 18 (0x12) > encrypted > } ] server socket closed. example 3 in this example, the -h option turns hex/ascii format. there is no ssl parsing or
decoding. the output is routed to a text file. $ ssltap -h -p 444 interzone.mcom.com:443 > h.txt output connected to interzone.mcom.com:443 --> [ 0: 80 40 01 03 00 00 27 00 00 00 10 01 00 80 02 00 | .@....'......... 10: 80 03 00 80 04 00 80 06 00 40 07 00 c0 00 00 04 | .........@...... 20: 00 ff e0 00 00 0a 00 ff e1 00 00 09 00 00 03 00 | ........á....... 30: 00 06 9...
Multithreading in Necko
ate. it was last updated in 2001. necko's primary interfaces are not thread safe. there has not yet been a need to make necko entirely thread safe as most of mozilla (and especially most of gecko) run only on the main/primordial thread. in the future, necko may be made thread safe to support changes to gecko that would put some other processing work on background threads (eg. multithreaded image
decoding). however, most necko protocols utilize background threads. background threads are used to manage all i/o operations (with the exception of few cases). most simple protocol handlers (eg. file, finger, datetime) do not worry about threading issues. the internal i/o interfaces default to proxying all callbacks to the main thread. this keeps simple protocol handlers simple :-) more complex protocol ...
...simply promises to read from a nsiinputstream (or write to a nsioutputstream) 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 nsiinputstream impl that does gzip
decoding on the fly. dns thread (0-1) on most platforms dns requests a processed on a background thread. however, the details of the implementation are heavily platform dependent. for example, on xp_win an invisible window is created with a message pump on a background thread for processing wsa asynchronous dns events. in this way, necko takes advantage of the platforms specific routines for dns lookup...
imgIContainer
agelength, [array, size_is(palettelength)] out pruint32 palettedata, out unsigned long palettelength); native code only! obsolete since gecko 2.0 void clear(); obsolete since gecko 1.9.2 gfximagesurface copycurrentframe(); native code only! obsolete since gecko 2.0 gfximagesurface copyframe(in pruint32 awhichframe, in pruint32 aflags); native code only! void
decodingcomplete(); obsolete since gecko 2.0 void draw(in gfxcontext acontext, in gfxgraphicsfilter afilter, [const] in gfxmatrix auserspacetoimagespace, [const] in gfxrect afill, [const] in nsintrect asubimage, [const] in nsintsize aviewportsize, in pruint32 aflags); native code only! void endframedecode(in unsigned long framenumber); obsolete since gecko 2.0 void ensurecleanf...
...return a new copy of the given frame that you can write to and otherwise inspect the pixels of. gfximagesurface copyframe( in pruint32 awhichframe, in pruint32 aflags ); parameters awhichframe frame specifier of the frame_* variety. aflags flags of the flag_* variety. return value missing description exceptions thrown missing exception missing description
decodingcomplete() obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) void
decodingcomplete(); parameters none. exceptions thrown missing exception missing description native code only!draw draw the current frame on to the context specified. void draw( in gfxcontext acontext, in gfxgraphicsfilter afilter, [const] in gfxmatrix auserspacetoimagespace, ...
imgIDecoderObserver
request, in imgicontainer acontainer ); parameters arequest the request on which data is available, or null if being called for an imgidecoder object. acontainer missing description onstopdecode() in theory a decode notification, but currently a load notification. ideally this would be called when the decode is complete. unfortunately, this is currently the only way to signal
decoding errors to consumers, and the only
decoding errors that consumers care about (indeed, the only ones that they're prepared to hear about) are failures to instantiate the decoder (<img src="foo.html"> for example). thus, currently this is just a companion to onstoprequest to signal success or failure. you probably want onstopcontainer instead. this will be revisited in bug 505385. if you're thinking...
...his, please talk to bholley first. void onstopdecode( in imgirequest arequest, in nsresult status, in wstring statusarg ); parameters arequest the request on which data is available, or null if being called for an imgidecoder object. status missing description statusarg missing description onstopframe() a decode notification that is called when a frame is finished
decoding. void onstopframe( in imgirequest arequest, in unsigned long aframe ); parameters arequest the request on which data is available, or null if being called for an imgidecoder object. aframe missing description onstoprequest() a load notification that is called at the same time that nsirequestobserver.onstoprequest() would be (used only for observers of imgirequest objects, w...
nsIExternalHelperAppService
e. inherits from: nsisupports last changed in gecko 1.7 implemented by: @mozilla.org/uriloader/external-helper-app-service;1. ...
...pp-service;1"] .getservice(components.interfaces.nsiexternalhelperappservice); method overview boolean apply
decodingforextension(in autf8string aextension, in acstring aencodingtype); nsistreamlistener docontent(in acstring amimecontenttype, in nsirequest arequest, in nsiinterfacerequestor awindowcontext, in boolean aforcesave); methods apply
decodingforextension() 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 apply
decodingforextension( in autf8string aextension, in acstring aencodingtype ); parameters aextension the filename extension to check. aencodingtype the encoding type to c...
AudioConfiguration - Web APIs
properties the audioconfiguration dictionary is made up of four audio properties, including: contenttype: a valid audio mime type, for information on possible values and what they mean, see the web audio codec guide. channels: the number of channels used by the audio track. bitrate: the number of bits used to encode one second of the audio file. ...
...le', // 'record', 'transmission', or 'media-source' audio : { contenttype : "audio/ogg", // valid content type channels : 2, // audio channels used by the track bitrate : 132700, // number of bits used to encode 1s of audio samplerate : 5200 // number of audio samples making up that 1s. ...
Background Tasks API - Web APIs
e(). below you'll find only the html and javascript for this example. the css is not shown, since it's not particularly crucial to understanding this functionality. html content in order to be oriented about what we're trying to accomplish, let's have a look at the html. ...
...how long
decoding "quantum filament tachyon emissions" will take, after all) as well as a second main box (with the id "logbox"), which is used to display textual output. <p> demonstration of using <a href="/docs/web/api/background_tasks_api"> cooperatively scheduled background tasks</a> using the <code>requestidlecallback()</code> method. ...
BaseAudioContext.decodeAudioData() - Web APIs
ocontext.decodeaudiodata(arraybuffer, successcallback, errorcallback); newer promise-based syntax: promise<decodeddata> baseaudiocontext.decodeaudiodata(arraybuffer); parameters arraybuffer an arraybuffer containing the audio data to be decoded, usually grabbed from xmlhttprequest, windoworworkerglobalscope.fetch() or filereader. successcallback a callback function to be invoked when the
decoding successfully finishes. the single argument to this callback is an audiobuffer representing the decodeddata (the decoded pcm audio data). usually you'll want to put the decoded data into an audiobuffersourcenode, from which it can be played and manipulated how you want. errorcallback an optional error callback, to be invoked if an error occurs when the audio data is being decoded. return value...
...= new xmlhttprequest(); request.open('get', 'viper.ogg', true); request.responsetype = 'arraybuffer'; request.onload = function() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { source.buffer = buffer; source.connect(audioctx.destination); source.loop = true; }, function(e){ console.log("error with
decoding audio data" + e.err); }); } request.send(); } // wire up buttons to stop and play audio play.onclick = function() { getdata(); source.start(0); play.setattribute('disabled', 'disabled'); } stop.onclick = function() { source.stop(0); play.removeattribute('disabled'); } // dump script to pre element pre.innerhtml = myscript.innerhtml; new promise-based syntax ctx.decodeaudio...
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. ...
...ayback 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 valid media configuration, it returns a promise with information as to whether the media type is supported, and whether
decoding such media would be smooth and power efficient. specifications specification status comment media capabilitiesthe definition of 'mediacapabilities' in that specification. draft initial definition ...
MediaCapabilitiesInfo - Web APIs
the mediacapabilitiesinfo interface of the media capabilities api is made available when the promise returned by the mediacapabilities.encodinginfo() or mediacapabilities.
decodinginfo() methods of the mediacapabilities interface fulfills, providing information as to whether the media type is supported, and whether encoding or
decoding such media would be smooth and power efficient. properties the mediacapabilitiesinfo interface contains three boolean attribues: supported: given the properties defined in the mediaconfiguration, can the specified piece of media content be encoded (if mediaencodingconfiguration is set) or decode (if media
decodingconfiguration is set) at all? if yes, supported is true. otherwise, it is false. smooth: given the properties defined in the mediaconfiguration, will ...
...ficient until stats on this device have been recorded. all supported audio codecs are reported to be power efficient. ...
MediaConfiguration - Web APIs
the mediaconfiguration mediacapabilities dictionary of the media capabilities api describes how media and audio files must be configured, or defined, to be passed as a parameter of the mediacapabilities.encodinginfo() and mediacapabilities.encodinginfo() methods. properties a valid configuration includes a valid encoding configuration type or
decoding configuration type and a valid audio configuration or video configuration. if you plan on querying encoding information, set the media type to record or transmission. for
decoding, set the type to file or media-source. if the media is an audio file, the audio configuration must include a valid audio mime type as contenttype, the number of channels, the bitrate, and the sample rate. video configurations mush include a valid video mime type as con...
...dio file, the audio configuration must include a valid audio mime type as contenttype, the number of channels, the bitrate, and the sample rate. video configurations mush include a valid video mime type as contenttype, the bitrate, and framerate, along with the width and the height of the video file. all of these must be present, as in the examples below, or a typeerror will occur. a valid media
decoding configuration, to be submitted as the parameter for mediacapabilities.
decodinginfo() method, has it's `type` set as: file: for plain playback file. media-source: for media source files. a valid media encoding configuration, to be submitted as the parameter for mediacapabilities.encodinginfo() method, has it's `type` set as: record: for recording media. transmission: for ...
Navigator.mediaCapabilities - Web APIs
the navigator.mediacapabilities read-only property returns a mediacapabilities object that can expose information about the
decoding and encoding capabilities for a given format and output capabilities as defined by the media capabilities api. syntax mediacapabilitiesobj = globalobj.navigator.mediacapabilities value a mediacapabilities object. ...
... the navigator.mediacapabilities read-only property returns a mediacapabilities object that can expose information about the
decoding and encoding capabilities for a given format and output capabilities as defined by the media capabilities api. syntax mediacapabilitiesobj = globalobj.navigator.mediacapabilities value a mediacapabilities object. ...
RTCRtpTransceiver - Web APIs
the media id of the m-line associated with this transceiver. this association is established, when possible, whenever either a local or remote description is applied. this field is null if neither a local or remote description has been applied, or if its associated m-line is rejected by either a remote offer or any answer. receiver read only the rtcrtpreceiver object that handles receiving and
decoding incoming media. sender read only the rtcrtpsender object responsible for encoding and sending data to the remote peer. stopped indicates whether or not sending and receiving using the paired rtcrtpsender and rtcrtpreceiver has been permanently disabled, either due to sdp offer/answer, or due to a call to stop(). methods setcodecpreferences() a list of rtcrtpcodecparameters objects whic...
... permanently disabled, either due to sdp offer/answer, or due to a call to stop(). methods setcodecpreferences() a list of rtcrtpcodecparameters objects which override the default preferences used by the user agent for the transceiver's codecs. stop() permanently stops the rtcrtptransceiver. the associated sender stops sending data, and the associated receiver likewise stops receiving and
decoding incoming data. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver' in that specification. candidate recommendation ...
SVGImageElement - Web APIs
,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgimageelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, svggraphicselement. svgimageelement.crossorigin a domstring corresponding to the crossorigin attribute of the given <image> element. svgimageelement.
decoding returns a domstring representing a hint given to the browser on how it should decode the image. svgimageelement.height read only an svganimatedlength corresponding to the height attribute of the given <image> element. svgimageelement.preserveaspectratio read only an svganimatedpreserveaspectratio corresponding to the preserveaspectratio attribute of the given <image> element. svgimageelem...
...given <image> element. svgimageelement.x read only an svganimatedlength corresponding to the x attribute of the given <image> element. svgimageelement.y read only an svganimatedlength corresponding to the y attribute of the given <image> element. methods this interface also inherits methods from its parent interface, svggraphicselement. svgimageelement.decode() initiates asynchronous
decoding of the image data. returns a promise which resolves once the image data is ready to be used. specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgimageelement' in that specification. candidate recommendation changed the inheritance from svgelement to svggraphicselement, removed the implemented interfaces svgtests, svgla...
TextDecoder.prototype.encoding - Web APIs
it can be one of the following values: the recommended encoding for the web: 'utf-8'. the legacy single-byte encodings: 'ibm866', 'iso-8859-2', 'iso-8859-3', 'iso-8859-4', 'iso-8859-5', 'iso-8859-6', 'iso-8859-7', 'iso-8859-8'', 'iso-8859-8i', 'iso-8859-10', 'iso-8859-13', 'iso-8859-14', 'iso-8859-15', 'iso-8859-16', 'koi8-r', 'koi8-u', 'macintosh', 'windows-874', 'windows-1250', 'windows-1251', 'windows-1252', 'windows-1253', 'windows-1254', 'windows-1255', 'windows-1256', 'windows-1257', 'windows-1258', or 'x-mac-cyrillic'. ...
...the legacy multi-byte korean encodings: 'euc-kr', and 'iso-2022-kr'. the legacy miscelleanous encodings: 'utf-16be', 'utf-16le', and 'x-user-defined'. a special encoding, 'replacement', which only emits an error and an eof code point. it is used to prevent attacks that mismatch encodings between the client and server. it can happen with iso-2022-cn and iso-2022-cn-ext. syntax var b = decoder.
decoding; specifications specification status comment encodingthe definition of 'textdecoder.encoding' in that specification. living standard initial definition. ...
VideoConfiguration - Web APIs
properties the videoconfiguration dictionary is made up of five video properties, including: contenttype: a valid video mime type. see our web video codec guide for types which may be supported. width: the width of the video. height: the height of the video. ...
...eo mime type. see our web video codec guide for types which may be supported. width: the width of the video. height: the height of the video. bitrate: the number of bits used to encode one second of the video file. framerate: the number of frames making up one second of video playback. examples // create media configuration to be tested const mediaconfig = { type : 'file', // see media
decodingconfiguration and mediaencodingconfiguration video : { contenttype : "video/webm;codecs=vp8", // valid content type width : 800, // width of the video height : 600, // height of the video bitrate : 10000, // number of bits used to encode 1s of video framerate : 30 // number of frames making up that 1s. } }; specifications specif...
Writing a WebSocket server in C# - Web APIs
if we send "mdn", we get these bytes: 129 131 61 84 35 6 112 16 109 let's take a look at what these bytes mean. the first byte, which currently has a value of 129, is a bitfield that breaks down as such: fin (bit 0) rsv1 (bit 1) rsv2 (bit 2) rs...
...teger) are the length. because the first bit is always 1 for client-to-server messages, you can subtract 128 from this byte to get rid of the mask bit. note that the mask bit is set in our message. this means that the next four bytes (61, 84, 35, and 6) are the mask bytes used to decode the message. these bytes change with every message. the remaining bytes are the encoded message payload.
decoding algorithm di = ei xor m(i mod 4) where d is the decoded message array, e is the encoded message array, m is the mask byte array, and i is the index of the message byte to decode. example in c#: byte[] decoded = new byte[3]; byte[] encoded = new byte[3] {112, 16, 109}; byte[] mask = new byte[4] {61, 84, 35, 6}; for (int i = 0; i < encoded.length; i++) { decoded[i] = (byte)(encoded[i] ^ ma...
Writing a WebSocket server in Java - Web APIs
if we send "abcdef", we get these bytes: 129 134 167 225 225 210 198 131 130 182 194 135 - 129: fin (is this the whole message?) rsv1 rsv2 rsv3 opcode 1 0 0 0 0x1=0001 fin: you can send y...
...nd 125, this is the length of the message. if it is 126, the following 2 bytes (16-bit unsigned integer), if 127, the following 8 bytes (64-bit unsigned integer, the most significant bit must be 0) are the length. i can take 128 because the first bit is always 1. - 167, 225, 225 and 210 are the bytes of the key to decode. it changes every time. - the remaining encoded bytes are the message. ...
URIError: malformed URI sequence - JavaScript
an argument given to either the decodeuri, encodeuri, encodeuricomponent, or decodeuricomponent function was not valid, so that the function was unable encode or decode properly. examples encoding encoding replaces each instance of certain characters by one, two, three, or four escape sequences representing the utf-8 encoding of the character. ...
......
Digital video concepts - Web media technologies
fully grasp how to work with video on the web. encoding color representing the colors in an image or video requires several values for each pixel. what those values are depends on how you "split up" the color when converting it to numeric form. there are several color models, and video codec makes use of one or more of these to represent their pixels during the encoding process as well as after
decoding the video frames. rgb most computer graphics models use the rgb color system, wherein some number of bits of data are used to represent each of the red, green, and blue components of the color of an individual pixel, and an image is comprised of a two-dimensional array of these pixels. there are two primary methods used to represent rgb samples: using integer components and using floating-point...
...ference component of the chroma of the color sample. computed by substracting luma from the gamma corrected red value: v = r' - y'. chroma subsampling chroma subsampling is the process of converting the color pixels into a greyscale image and a matrix of u and v values indicating the colors to map to those pixels. since the color data is being encoded at a lower resolution than the luma, when
decoding the video to draw it to the screen each pixel's color is computed by calculating an appropriate color given the u and v values for the 4x2 block of 8 pixels in which the pixel resides. this
decoding operation must mirror the method used during encoding, which is represented by three numbers separated by colons (":"). the first number specifies the number of luminance samples per row encoded fr...
The "codecs" parameter in common media types - Web media technologies
the default value is 110 (4:2:0 chroma subsampling). cp the two-digit color_primaries value indicates the color system used by the media. for example, bt.2020/bt.2100 color, as used for hdr...
...sed image characteristics for dcdm. 11 smpte rp 431 (d-cinema quality: reference projector and environment). describes the reference projector and environment conditions that provide a consistent film presentation experience. 12 smpte eg 432 (digital source processing: color processing for d-cinema). engineering guideline making color signal
decoding recommendations for digital movies. 13 – 21 reserved for future use by itu-t or iso/iec 22 ebu tech 3213-e 23 – 255 reserved for future use by itu-t or iso/iec tc a two-digit integer indicating the transfercharacteristics for the video. this value is from section 8.2 of iso/ie...
base64 - Archive of obsolete content
var base64 = require("sdk/base64"); var encodeddata = base64.encode("hello, world"); var decodeddata = base64.decode(encodeddata); globals functions encode(data, charset) creates a base-64 encoded ascii string from a string of binary data. parameters data : string the data to encode charset : string the charset of the string to encode (optional). the only accepted value is "utf-8". in order to encode and decode unicode strings, the charset parameter needs to be set: var base64 = require("sdk/base64"); var encodeddata = base64.encode(unicodestring, "utf-8"); returns string : the encoded string decode(data, charset) decodes a string of data which has been encoded using base-64 encoding. ...
High-Level APIs - Archive of obsolete content
modules listed on this page implement high-level apis for building add-ons: creating user interfaces, interacting with the web, and interacting with the browser. unless the documentation explicitly says otherwise, all these modules are "stable": we'll avoid making incompatible changes to them. addon-page create a page that does not contain navigational elements. base64 data encoding and
decoding using base64 algorithms. clipboard interact with the system clipboard, setting and getting its contents. context-menu adds items, submenus, and menu separators to the page's context menu. hotkeys assign hotkey combinations to functions in your add-on. indexed-db exposes the indexeddb api to add-ons. l10n localize strings appearing in the add-on's javascript code. notifications display...
Unit Testing - Archive of obsolete content
s. if you're migrating test code from cfx to jpm, see the guide to migrating from cfx, in particular the section on loading modules from test code. the sdk provides a framework to help create and run unit tests for your code. to demonstrate how it works we'll write some unit tests for a simple base64 encoding module. a simple base64 module in a web page, you can perform base64 encoding and
decoding using the btoa() and atob() functions. unfortunately these functions are attached to the window object: since this object is not available in your main add-on code, atob() and btoa() aren't available either. so we'll create a base64 module to expose these functions from the platform (see creating reusable modules). to begin with, create a new directory, navigate to it, and run jpm init. now crea...
Downloading JSON and JavaScript in extensions - Archive of obsolete content
the javascript an extension downloads perform nasty actions? fairly easy if the webserver where the javascript is hosted were to be hijacked or compromised. it happens to the best of us. amo takes the threat very seriously. the good news is there are several ways to workaround the problem. downloading json if the extension is downloading json, then the developer should be using one of the json
decoding methods discussed here and not using eval() at all. json is about state and does not allow functions to be decoded. the json
decoding methods available to extension developers protect the extension from malicious json and javascript. downloading state from a remote webserver using json is becoming extremely popular. use the json decoders, not eval()! downloading javascript of course there are ...
Appendix D: Loading Scripts - Archive of obsolete content
ule("my-module"); dom workers: worker and chromeworker dom workers can be used to load scripts into their own global contexts which run in their own threads. in order to ensure thread safety, these contexts are extremely limited, can't be passed javascript objects, and have no access to the dom. all communication between these contexts and outer contexts is marshalled through json encoding and
decoding. chromeworkers also have access to ctypes and a limited number of thread safe xpcom classes, but are otherwise limited to simple computation based on data passed via messages and xmlhttprequests. advantages asynchronous: workers execute asynchronously in their own threads, which means that they have limited risk of interfering with the main thread. they may safely perform synchronous xmlhttpr...
Helper Apps (and a bit of Save As) - Archive of obsolete content
quest, in the helper app dialog, and as a last ditch in the launching code. limitations of nsimimeinfo no way to say "do whatever the os default is." no support for command-line arguments. no support for multiple commands connected by pipes (mostly useful on unix). ongoing work support synchronous dialogs, not just asynchronous ones (fixes many issues related to pre-downloading, content-
decoding, etc). reworking the nsimimeservice api to improve the quality of the mimeinfo we get. reworking the helper app dialog to save user choices better. gnome integration for unix. future work fix the deficiencies in nsimimeinfo. better support for mailcap syntax. possible kde integration. possibly reflecting the os settings in our helper app preferences (readonly? writable?). have a way fo...
Base64 - MDN Web Docs Glossary: Definitions of Web-related terms
designed to deal with ascii. this is to ensure that the data remain intact without modification during transport. base64 is commonly used in a number of applications including email via mime, and storing complex data in xml. one common application of base64 encoding on the web is to encode binary data so it can be included in a data: url. in javascript there are two functions respectively for
decoding and encoding base64 strings: btoa(): creates a base-64 encoded ascii string from a "string" of binary data ("btoa" should be read as "binary to ascii"). atob(): decodes a base64 encoded string("atob" should be read as "ascii to binary"). the algorithm used by atob() and btoa() is specified in rfc 4648, section 4. note that btoa() expects to be passed binary data, and will throw an exceptio...
Multimedia: Images - Learn web development
jpeg's capabilities in regards to compression, but are not available on every browser: webp — created by google and nowadays supported by all major browsers except safari. supports transparency and also animation, but not progressive display. jpeg-xr — created by microsoft and only available in internet explorer and edgehtml based edge. doesn't support progressive display and the image
decoding is not hardware accellerated and therefore resource intensive on the browser's main thread. jpeg2000 — once to be successor to jpeg but only supported in safari. doesn't support progressive display either. in the future browsers might add support for even more advanced formats like high efficiency image file format (heif) or av1 still image file format (avif). given the narrow support for j...
Performance best practices for Firefox front-end engineers
orage appcache and localstorage are synchronous storage apis that will block the main thread when you use them. avoid them at all costs! indexeddb is preferable, as the api is asynchronous (all disk operations occur off of the main thread), and can be accessed from web workers. indexeddb is also arguably better than storing and retrieving json from a file—particularly if the json encoding or
decoding is occurring on the main thread. indexeddb will do javascript object serialization and deserialization for you using the structured clone algorithm, meaning that you can stash things like maps, sets, dates, blobs, and more, without having to do conversions for json compatibility. a promise-based wrapper for indexeddb, indexeddb.jsm, is available for chrome code. test on weak hardware for the f...
An overview of NSS Internals
ctions once a handle is no longer needed. this is particularly important for applications that might need to close a database and reinitialize nss using a different one, without restarting. such an operation might fail at runtime if data elements are still being referenced. in addition to the freebl, softoken, and ckbi modules, there is an utility library for general operations (e.g., encoding/
decoding between data formats, a list of standardized object identifiers (oid)). nss has an ssl/tls module that implements the secure sockets layer/transport layer security network protocols, an s/mime module that implements cms messaging used by secure email and some instant messaging implementations, a dbm library that implements the classic database storage, and finally a core nss library for the big s...
NSS 3.12.4 release notes
_access_method sec_error_crl_import_failed new oids (see secoidt.h) sec_oid_x509_any_policy the nssckbi pkcs #11 module's version changed to 1.75. obsolete code for win16 has been removed. support for openvms has been removed. bugs fixed the following bugs have been fixed in nss 3.12.4. ...
nss tech note4
} } an example custom cert extension struct _mycertextdata { secitem version; secitem streetaddress; secitem phonenum; secitem rfc822name; secitem id; secitem maxusers; }; typedef struct _mycertextdata mycertextdata; /* template used for
decoding the extension */ const sec_asn1template mycertexttemplate[] = { { sec_asn1_sequence, 0, null, sizeof( mycertextdata ) }, { sec_asn1_integer, offsetof(mycertextdata, version) }, { sec_asn1_octet_string, offsetof( mycertextdata, streetaddress ) }, { sec_asn1_octet_string, offsetof( mycertextdata, phonenum ) }, { sec_asn1...
Python binding for NSS
ag pynss_release_0_13_0 source download https://ftp.mozilla.org/pub/mozilla.org/security/python-nss/releases/pynss_release_0_13_0/src/ change log fix nss secitem_compareitem bug via workaround. fix incorrect format strings in pyarg_parsetuple* for: generalname basicconstraints cert_x509_key_usage fix bug when
decoding certificate basicconstraints extension fix hang in setup_certs. for nss >= 3.13 support certdb_terminal_record you can now query for a specific certificate extension certficate.get_extension() the publickey formatting (i.e. format_lines) was augmented to format dsa keys (formerly it only recognized rsa keys). allow lables and values to be justified when printing objects ...
sslerr.html
ge xp_java_cert_not_exists_error -8118 this principal doesn't have a certificate. sec_error_bad_export_algorithm -8117 required algorithm is not allowed. sec_error_exporting_certificates -8116 error attempting to export certificates. sec_error_importing_certificates -8115 error attempting to import certificates. sec_error_pkcs12_
decoding_pfx -8114 unable to import.
decoding error. file not valid. sec_error_pkcs12_invalid_mac -8113 unable to import. invalid mac. incorrect password or corrupt file. sec_error_pkcs12_unsupported_mac_algorithm -8112 unable to import. mac algorithm not supported. sec_error_pkcs12_unsupported_transport_mode -8111 unable to import. only password integrit...
Animated PNG graphics
ndicating the time to display the current frame, in seconds. if the denominator is 0, it is to be treated as if it were 100 (that is, delay_num then specifies 1/100ths of a second). if the the value of the numerator is 0 the decoder should render the next frame as quickly as possible, though viewers may impose a reasonable lower bound. frame timings should be independent of the time required for
decoding and display of each frame, so that animations will run at the same rate regardless of the performance of the decoder implementation. dispose_op specifies how the output buffer should be changed at the end of the delay (before rendering the next frame). valid values for dispose_op are: value constant description 0 apng_dispose_op_none no disposal is done on this fr...
nsIFeedContainer
nsiuri a uri containing the primary link for the feed or entry. links nsiarray an array of all links for a feed or entry. rights nsifeedtextconstruct the feed or entry's rights or license text. title nsifeedtextconstruct the feed or entry's title. keep in mind that some feeds have no title, and some use markup in their titles, so be cautious when
decoding this attribute. updated astring a string containing the date the feed or entry was last updated, in rfc822 form. this string is parsable by javascript and mail code. methods normalize() synchronizes a container's fields with its convenience attributes. void normalize(); parameters none. see also nsiuri nsifeedtextconstruct interwiki link ...
Address book sync client design
forming synchronization operations against a server based address book. the general architecture for the sync component is the following: mozilla ui ab sync logic mork ab database sync protocol encoding sync protocol
decoding http "post" api mozilla networking client side sync logic the client synchronization logic defers to the server peforming some intelligence in handling duplicate entries for the sync process. the static information that is held on the client for address book sync operations is stored in a file called a...
AudioBufferSourceNode.loop - Web APIs
uest.responsetype = 'arraybuffer'; request.onload = function() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { mybuffer = buffer; source.buffer = mybuffer; source.playbackrate.value = playbackcontrol.value; source.connect(audioctx.destination); source.loop = true; }, function(e){"error with
decoding audio data" + e.err}); } request.send(); } // wire up buttons to stop and play audio, and range slider control play.onclick = function() { getdata(); source.start(0); play.setattribute('disabled', 'disabled'); playbackcontrol.removeattribute('disabled'); } specification specification status comment web audio apithe definition of 'loop' in that specifi...
AudioBufferSourceNode.loopEnd - Web APIs
loopstartcontrol.oninput = function() { source.loopstart = loopstartcontrol.value; loopstartvalue.innerhtml = loopstartcontrol.value; } loopendcontrol.oninput = function() { source.loopend = loopendcontrol.value; loopendvalue.innerhtml = loopendcontrol.value; } specifications specification status comment w...
AudioBufferSourceNode.loopStart - Web APIs
loopstartcontrol.oninput = function() { source.loopstart = loopstartcontrol.value; loopstartvalue.innerhtml = loopstartcontrol.value; } loopendcontrol.oninput = function() { source.loopend = loopendcontrol.value; loopendvalue.innerhtml = loopendcontrol.value; } specifications specification status comment w...
AudioBufferSourceNode.playbackRate - Web APIs
uest.responsetype = 'arraybuffer'; request.onload = function() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { mybuffer = buffer; source.buffer = mybuffer; source.playbackrate.value = playbackcontrol.value; source.connect(audioctx.destination); source.loop = true; }, function(e){"error with
decoding audio data" + e.err}); } request.send(); } // wire up buttons to stop and play audio, and range slider control play.onclick = function() { getdata(); source.start(0); play.setattribute('disabled', 'disabled'); playbackcontrol.removeattribute('disabled'); } stop.onclick = function() { source.stop(0); play.removeattribute('disabled'); playbackcontrol.setattribute('disabled', ...
AudioContext - Web APIs
you need to create an audiocontext before you do anything else, as everything happens inside a context. ...
AudioProcessingEvent - Web APIs
an audio track via xhr and decodeaudiodata function getdata() { request = new xmlhttprequest(); request.open('get', 'viper.ogg', true); request.responsetype = 'arraybuffer'; request.onload = function() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { mybuffer = buffer; source.buffer = mybuffer; }, function(e){"error with
decoding audio data" + e.err}); } request.send(); } // give the node a function to process audio events scriptnode.onaudioprocess = function(audioprocessingevent) { // the input buffer is the song we loaded earlier var inputbuffer = audioprocessingevent.inputbuffer; // the output buffer contains the samples that will be modified and played var outputbuffer = audioprocessingevent.outputbuffer...
AuthenticatorAttestationResponse.attestationObject - Web APIs
new keypair as well as an attestationobject for that keypair. the public key that corresponds to the private key that has created the attestation signature is well known; however, there are various well known attestation public key chains for different ecosystems (for example, android or tpm attestations). syntax attestobj = authenticatorattestationresponse.attestationobject properties after
decoding the cbor encoded arraybuffer, the resulting javascript object will contain the following properties: authdata the same as authenticatorassertionresponse.authenticatordata. note that in authenticatorassertionresponse, the authenticatordata is exposed as a property in a javascript object while in authenticatorattestationresponse, the authenticatordata is a property in a cbor map. the same auth...
BaseAudioContext.createBuffer() - Web APIs
d of the baseaudiocontext interface is used to create a new, empty audiobuffer object, which can then be populated by data, and played via an audiobuffersourcenode for more details about audio buffers, check out the audiobuffer reference page. note: createbuffer() used to be able to take compressed data and give back decoded samples, but this ability was removed from the spec, because all the
decoding was done on the main thread, therefore createbuffer() was blocking other code execution. the asynchronous method decodeaudiodata() does the same thing — takes compressed audio, say, an mp3 file, and directly gives you back an audiobuffer that you can then set to play via in an audiobuffersourcenode. for simple uses like playing an mp3, decodeaudiodata() is what you should be using. syntax va...
BaseAudioContext.createScriptProcessor() - Web APIs
an audio track via xhr and decodeaudiodata function getdata() { request = new xmlhttprequest(); request.open('get', 'viper.ogg', true); request.responsetype = 'arraybuffer'; request.onload = function() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { mybuffer = buffer; source.buffer = mybuffer; }, function(e){"error with
decoding audio data" + e.err}); } request.send(); } // give the node a function to process audio events scriptnode.onaudioprocess = function(audioprocessingevent) { // the input buffer is the song we loaded earlier var inputbuffer = audioprocessingevent.inputbuffer; // the output buffer contains the samples that will be modified and played var outputbuffer = audioprocessingevent.outputbuffer...
ConvolverNode.buffer - Web APIs
convolver.buffer = concerthallbuffer; specifications specification status comment web audio apithe definition of 'buffer' in that specification. working draft ...
ConvolverNode.normalize - Web APIs
convolver.normalize = false; // must be set before the buffer, to take effect convolver.buffer = concerthallbuffer; specifications specification status comment web audio apithe definition of 'normalize' in that specification. working draft ...
DOMException - Web APIs
operation timed out. (legacy code value: 23 and legacy constant name: timeout_err) invalidnodetypeerror the node is incorrect or has an incorrect ancestor for this operation. (legacy code value: 24 and legacy constant name: invalid_node_type_err) datacloneerror the object can not be cloned. (legacy code value: 25 and legacy constant name: data_clone_err) encodingerror the encoding or
decoding operation failed (no legacy code value and constant name). notreadableerror the input/output read operation failed (no legacy code value and constant name). unknownerror the operation failed for an unknown transient reason (e.g. out of memory) (no legacy code value and constant name). constrainterror a mutation operation in a transaction failed because a constraint was not satisfied (...
HTMLImageElement.decode() - Web APIs
pon being added to the dom. this, in turn, prevents the rendering of the next frame after adding the image to the dom from causing a delay while the image loads. syntax var promise = htmlimageelement.decode(); parameters none. return value a promise which is resolved once the image data is ready to be used. exceptions encodingerror a domexception indicating that an error occurred while
decoding the image. usage notes one potential use case for decode(): when loading very large images (for example, in an online photo album), you can present a low resolution thumbnail image initially and then replace that image with the full-resolution image by instantiating a new htmlimageelement, setting its source to the full-resolution image's url, then using decode() to get a promise which is reso...
HTMLImageElement - Web APIs
cors setting for this image element. see cors settings attributes for further details. this may be null if cors is not used. htmlimageelement.currentsrc read only returns a usvstring representing the url from which the currently displayed image was loaded. this may change as the image is adjusted due to changing conditions, as directed by any media queries which are in place. htmlimageelement.
decoding an optional domstring representing a hint given to the browser on how it should decode the image. if this value is provided, it must be one of the possible permitted values: sync to decode the image synchronously, async to decode it asynchronously, or auto to indicate no preference (which is the default). read the
decoding page for details on the implications of this property's values. htmlimag...
HTMLMediaElement: timeupdate event - Web APIs
nt frequency is dependant on the system load, but will be thrown between about 4hz and 66hz (assuming the event handlers don't take longer than 250ms to run). user agents are encouraged to vary the frequency of the event based on the system load and the average cost of processing the event each time, so that the ui updates are not any more frequent than the user agent can comfortably handle while
decoding the video. bubbles no cancelable no interface event target element default action none event handler property globaleventhandlers.ontimeupdate specification html5 media examples these examples add an event listener for the htmlmediaelement's timeupdate event, then post a message when that event handler ha...
MediaError.message - Web APIs
nt.onerror = function() { let s = ""; let err = audioelement.error; switch(err.code) { case mediaerror.media_err_aborted: s += "the user canceled the audio."; break; case mediaerror.media_err_network: s+= "a network error occurred while fetching the audio."; break; case mediaerror.media_err_decode: s+= "an error occurred while
decoding the audio."; break; case mediaerror.media_err_src_not_supported: s+= "the audio is missing or is in a format not supported by your browser."; break; default: s += "an unknown error occurred."; break; } let message = err.message; if (message && message.length) { s += " " + message; } displayerrormessage("<strong>error...
MediaSource.endOfStream() - Web APIs
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 endofstream('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 browser doesn't know how to decode. return value undefined exceptions exception explanation invalidstateerror mediasource.readystate is not equal to open, or one or more of the sourcebuffer ...
Navigator - Web APIs
nguage.languages read only returns an array of domstring representing the languages known to the user, by order of preference. navigator.locks read only returns a lockmanager object which provides methods for requesting a new lock object and querying for an existing lock object navigator.mediacapabilities read only returns a mediacapabilities object that can expose information about the
decoding and encoding capabilities for a given format and output capabilities. navigator.maxtouchpoints read only returns the maximum number of simultaneous touch contact points are supported by the current device. navigatorplugins.mimetypes read only returns an mimetypearray listing the mime types supported by the browser. navigator.online read only returns a boolean indicating whether the brow...
NotifyAudioAvailableEvent - Web APIs
not work for every user. there may also be large incompatibilities between implementations and the behavior may change in the future. the non-standard, obsolete, notifyaudioavailableevent interface defines the event sent to audio elements when the audio buffer is full. properties framebuffer read only a float32array containing the raw 32-bit floating-point audio data obtained from
decoding the audio (e.g., the raw data being sent to the audio hardware vs. encoded audio). the data is a series of audio samples, each sample containing one 32-bit value per audio channel. all audio frames are normalized to contain 1024 samples by default, but could be any length between 512 and 16384 samples if the user has set a different length using the mozframebufferlength attribute. time a floati...
RTCInboundRtpStreamStats.pliCount - Web APIs
ceiver 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 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 apit...
RTCPeerConnection.getReceivers() - Web APIs
the array is empty if there are no rtp receivers on the connection. the order of the returned rtcrtpreceiver instances is not defined by the specification, and may change from one call to getreceivers() to the next. ...
RTCPeerConnection - Web APIs
the method is called.getidentityassertion() the rtcpeerconnection.getidentityassertion() method initiates the gathering of an identity assertion. this has an effect only if the signalingstate is not "closed".getreceivers() the rtcpeerconnection.getreceivers() method returns an array of rtcrtpreceiver objects, each of which represents one rtp receiver. ...
RTCRtpEncodingParameters - Web APIs
properties active if 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. ...
RTCRtpReceiver - Web APIs
properties rtcrtpreceiver.track read only returns the mediastreamtrack associated with the current rtcrtpreceiver instance. 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. ...
RTCRtpStreamStats.pliCount - Web APIs
ream'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 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 spe...
RTCRtpStreamStats - Web APIs
kets, lost frames, and how heavily compressed the data is. fircount a count of the total number of full intra request (fir) packets received by the sender. this statistic is only available to the device which is receiving the stream and is only available for video tracks. a fir packet is sent by the receiving end of the stream when it falls behind or has lost packets and is unable to continue
decoding the stream; the sending end of the stream receives the fir packet and responds by sending a full frame instead of a delta frame, thereby letting the receiver "catch up." the higher this number is, the more often a problem of this nature arose, which can be a sign of network congestion or an overburdened receiving device. nackcount the number of times the receiver notified the sender that one or...
RTCRtpTransceiver.receiver - Web APIs
the read-only receiver property of webrtc's rtcrtptransceiver interface indicates the rtcrtpreceiver responsible for receiving and
decoding incoming media data for the transceiver's stream. syntax var rtpreceiver = rtcrtptransceiver.receiver; value an rtcrtpreceiver object which is responsible for receiving and
decoding incoming media data whose media id is the same as the current value of mid. specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.receiver' in that specification. candidate recommendation ...
SVGImageElement.decode - Web APIs
syntax var promise = svgimageelement.decode(); parameters none. return value a promise which resolves once the image data is ready to be used, such as by appending it to the dom, replacing an existing image, and so forth. exceptions none. specifications specification status comment scalable vector graphics (svg) 2 candidate recommendation initial definition. ...
ScriptProcessorNode.bufferSize - Web APIs
in an audio track via xhr and decodeaudiodata function getdata() { request = new xmlhttprequest(); request.open('get', 'viper.ogg', true); request.responsetype = 'arraybuffer'; request.onload = function() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { mybuffer = buffer; source.buffer = mybuffer; }, function(e){"error with
decoding audio data" + e.err}); } request.send(); } // give the node a function to process audio events scriptnode.onaudioprocess = function(audioprocessingevent) { // the input buffer is the song we loaded earlier var inputbuffer = audioprocessingevent.inputbuffer; // the output buffer contains the samples that will be modified and played var outputbuffer = audioprocessingevent.outputbuffer...
ScriptProcessorNode.onaudioprocess - Web APIs
an audio track via xhr and decodeaudiodata function getdata() { request = new xmlhttprequest(); request.open('get', 'viper.ogg', true); request.responsetype = 'arraybuffer'; request.onload = function() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { mybuffer = buffer; source.buffer = mybuffer; }, function(e){"error with
decoding audio data" + e.err}); } request.send(); } // give the node a function to process audio events scriptnode.onaudioprocess = function(audioprocessingevent) { // the input buffer is the song we loaded earlier var inputbuffer = audioprocessingevent.inputbuffer; // the output buffer contains the samples that will be modified and played var outputbuffer = audioprocessingevent.outputbuffer...
ScriptProcessorNode - Web APIs
in an audio track via xhr and decodeaudiodata function getdata() { request = new xmlhttprequest(); request.open('get', 'viper.ogg', true); request.responsetype = 'arraybuffer'; request.onload = function() { var audiodata = request.response; audioctx.decodeaudiodata(audiodata, function(buffer) { mybuffer = buffer; source.buffer = mybuffer; }, function(e){"error with
decoding audio data" + e.err}); } request.send(); } // give the node a function to process audio events scriptnode.onaudioprocess = function(audioprocessingevent) { // the input buffer is the song we loaded earlier var inputbuffer = audioprocessingevent.inputbuffer; // the output buffer contains the samples that will be modified and played var outputbuffer = audioprocessingevent.outputbuffer...
SourceBuffer.abort() - Web APIs
cebuffer.addeventlistener('updateend', function (_) { ... }); sourcebuffer.appendbuffer(buf); let's say that after the call to appendbuffer but before the updateend event fires (i.e. a buffer is being appended but the operation has not yet completed) a user "scrubs" the video seeking to a new point in time. in this case you would want to manually call abort() on the source buffer to stop the
decoding of the current buffer, then fetch and append the newly requested segment that relates to the current new position of the video. you can see something similar in action in nick desaulnier's bufferwhenneeded demo — in line 48, an event listener is added to the playing video so a function called seek() is run when the seeking event fires. in lines 92-101, the seek() function is defined — note t...
TextDecoder() - Web APIs
syntax decoder = new textdecoder(utflabel, options); parameters utflabeloptional is a domstring, defaulting to "utf-8", containing the label of the encoder. ...
TextDecoder - Web APIs
ws-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.prototype.ignorebomread ...
VideoPlaybackQuality.droppedVideoFrames - Web APIs
eoelement. 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 the user's reference. var videoelem = document.getelementbyid("my_vid"); var percentelem...
WebRTC API - Web APIs
n. rtcicetransport represents information about an ice transport. rtcpeerconnectioniceevent represents events that occur in relation to ice candidates with the target, usually an rtcpeerconnection. only one event is of this type: icecandidate. rtcrtpsender manages the encoding and transmission of data for a mediastreamtrack on an rtcpeerconnection. rtcrtpreceiver manages the reception and
decoding of data for a mediastreamtrack on an rtcpeerconnection. rtctrackevent the interface used to represent a track event, which indicates that an rtcrtpreceiver object was added to the rtcpeerconnection object, indicating that a new incoming mediastreamtrack was created and added to the rtcpeerconnection. rtcsctptransport provides information which describes a stream control transmission protoc...
Writing WebSocket servers - Web APIs
ays encoded in utf-8), 0x2 for binary, and other so-called "control codes" that will be discussed later. in this version of websockets, 0x3 to 0x7 and 0xb to 0xf have no meaning. the fin bit tells whether this is the last message in a series. if it's 0, then the server keeps listening for more parts of the message; otherwise, the server should consider the message delivered. more on this later.
decoding payload length to read the payload data, you must know when to stop reading. that's why the payload length is important to know. unfortunately, this is somewhat complicated. to read it, follow these steps: read bits 9-15 (inclusive) and interpret that as an unsigned integer. if it's 125 or less, then that's the length; you're done. if it's 126, go to step 2. if it's 127, go to step 3. read t...
Web Audio API - Web APIs
f functionality. general audio graph definition general containers and definitions that shape audio graphs in web audio api usage. audiocontext the audiocontext interface represents an audio-processing graph built from audio modules linked together, each represented by an audionode. an audio context controls the creation of the nodes it contains and the execution of the audio processing, or
decoding. you need to create an audiocontext before you do anything else, as everything happens inside a context. audiocontextoptions the audiocontextoptions dictionary is used to provide options when instantiating a new audiocontext. audionode the audionode interface represents an audio-processing module like an audio source (e.g. an html <audio> or <video> element), audio destination, intermediate p...
Sending and Receiving Binary Data - Web APIs
nd "text". the response property will contain the entity body according to responsetype, as an arraybuffer, blob, document, json, or string. this is null if the request is not complete or was not successful. this example reads an image as a binary file and creates an 8-bit unsigned integer array from the raw bytes. note that this will not decode the image and read the pixels. you will need a png
decoding library for that. var oreq = new xmlhttprequest(); oreq.open("get", "/myfile.png", true); oreq.responsetype = "arraybuffer"; oreq.onload = function (oevent) { var arraybuffer = oreq.response; // note: not oreq.responsetext if (arraybuffer) { var bytearray = new uint8array(arraybuffer); for (var i = 0; i < bytearray.bytelength; i++) { // do something with each byte in the array...
Web APIs
calmediastream location lock lockmanager lockedfile m midiaccess midiconnectionevent midiinput midiinputmap midimessageevent midioutputmap mscandidatewindowhide mscandidatewindowshow mscandidatewindowupdate msgestureevent msgraphicstrust msmanipulationevent msrangecollection mssitemodeevent magnetometer mathmlelement mediacapabilities mediacapabilitiesinfo mediaconfiguration media
decodingconfiguration mediadeviceinfo mediadevices mediaelementaudiosourcenode mediaencodingconfiguration mediaerror mediaimage mediakeymessageevent mediakeysession mediakeystatusmap mediakeysystemaccess mediakeysystemconfiguration mediakeys medialist mediametadata mediapositionstate mediaquerylist mediaquerylistevent mediaquerylistlistener mediarecorder mediarecordererrorevent mediasession mediasessi...
Cognitive accessibility - Accessibility
specialized jargon. non-native language speakers may also struggle with these terms. if a word or phrase has a unique meaning, in the document provide a definition inline or linked, within a glossary, or to an online dictionary. if a word or phrase is used to mean more than one thing, define each use. define abbreviations abbreviations can be confusing for people who: have difficulty
decoding words. have limited memory. have difficulty using context to aid understanding. rely on screen magnifiers (which often reduce contextual cues). provide an expanded form of the abbreviation the first time it is used, followed by the abbreviation placed within an <abbr> element. if an abbreviation has no expanded form, or is an abbreviation for a word that is not in the document's main languag...
Live streaming web audio and video - Developer guides
</video> media source extensions (mse) media source extensions is a w3c working draft that plans to extend htmlmediaelement to allow javascript to generate media streams for playback. allowing javascript to generate streams facilitates a variety of use cases like adaptive streaming and time shifting live streams. for example, you could implement mpeg-dash using javascript while offloading the
decoding to mse. note: time shifting is the process of consuming a live stream sometime after it happened. video streaming file formats a couple of http-based live streaming video formats are beginning to see support across browsers. note: you can find a guide to encoding hls and mpeg-dash for use on the web at setting up adaptive streaming media sources. mpeg-dash dash stands for dynamic adapti...
Setting up adaptive streaming media sources - Developer guides
<!-- fallback --> <source src="my.mp4" type="video/mp4"> <source src="my.webm" type="video/webm"> </video> live profile a useful piece of software when dealing with mpeg-dash is dash encoder. this uses mp4box to encode media into mpeg-dash format. note: you will need to be comfortable with make files and installing dependencies to get this software up and running. note: since mpeg-dash
decoding is done partially using javascript and mse files are often grabbed using xhr, keep same origin rules in mind. note: if you use webm you can use the methods shown in this tutorial dash adaptive streaming for html 5 video. once encoded your file structure may look something like this: play list -> /segments/news.mp4.mpd main segment folder -> /segments/main/ 100 kbps seg...
HTML attribute reference - HTML: Hypertext Markup Language
ts csp <iframe> specifies the content security policy that an embedded document must agree to enforce upon itself. data <object> specifies the url of the resource. data-* global attribute lets you attach custom attributes to an html element. datetime <del>, <ins>, <time> indicates the date and time associated with the element.
decoding <img> indicates the preferred method to decode the image. default <track> indicates that the track should be enabled unless the user's preferences indicate something different. defer <script> indicates that the script should be executed after the page has been parsed. dir global attribute defines the text direction. allowed values are ltr (left-t...
<img>: The Image Embed element - HTML: Hypertext Markup Language
ader). if the server does not opt into sharing credentials with the origin site (by sending back the access-control-allow-credentials: true response header), then the browser marks the image as tainted and restricts access to its image data. if the attribute has an invalid value, browsers handle it as if the anonymous value was used. see cors settings attributes for additional information.
decoding provides an image
decoding hint to the browser. allowed values: sync decode the image synchronously, for atomic presentation with other content. async decode the image asynchronously, to reduce delay in presenting other content. auto default: no preference for the
decoding mode. the browser decides what is best for the user. height the intrinsic height of the image, in ...
Data URLs - HTTP
4 is a group of binary-to-text encoding schemes that represent binary data in an ascii string format by translating it into a radix-64 representation. by consisting only in ascii characters, base64 strings are generally url-safe, and that's why they can be used to encode data in data urls. encoding in javascript the web apis have native methods to encode or decode to base64: base64 encoding and
decoding. encoding on a unix system base64 encoding of a file or string on linux and mac os x systems can be achieved using the command-line base64 (or, as an alternative, the uuencode utility with -m argument). echo -n hello|base64 # outputs to console: agvsbg8= echo -n hello>a.txt base64 a.txt # outputs to console: agvsbg8= base64 a.txt>b.txt # outputs to file b.txt: agvsbg8= encoding on microsof...
WebAssembly.CompileError() constructor - JavaScript
syntax new webassembly.compileerror(message, filename, linenumber) parameters message optional human-readable description of the error. filename optional the name of the file containing the code that caused the exception. linenumber optional the line number of the code that caused the exception. ...
WebAssembly.CompileError - JavaScript
constructor webassembly.compileerror() creates a new webassembly.compileerror object. instance properties webassembly.compileerror.prototype.message error message. although ecma-262 specifies that urierror should provide its own message property, in spidermonkey, it inherits error.prototype.message. webassembly.compileerror.prototype.name error name. inherited from error. webassembly.compileerror.prototype.filename path to file that raised this error. inherited from error. webassembly.compileerror.prototype.linenumber line number in file that raised this error. inherited from error. ...
WebAssembly - JavaScript
webassembly.instantiate() function. creating new memory and table instances via the webassembly.memory()/webassembly.table() constructors. providing facilities to handle errors that occur in webassembly via the webassembly.compileerror()/webassembly.linkerror()/webassembly.runtimeerror() constructors. constructor properties webassembly.compileerror() indicates an error during webassembly
decoding or validation. webassembly.global() represents a global variable instance, accessible from both javascript and importable/exportable across one or more webassembly.module instances. this allows dynamic linking of multiple modules. webassembly.instance() is a stateful, executable instance of a webassembly.module webassembly.linkerror() indicates an error during module instantiation (besides ...
decodeURI() - JavaScript
dentifier (uri). exceptions throws an urierror ("malformed uri sequence") exception when encodeduri contains invalid character sequences. description replaces each escape sequence in the encoded uri with the character that it represents, but does not decode escape sequences that could not have been introduced by encodeuri. the character “#” is not decoded from escape sequences. ...
decodeURIComponent() - JavaScript
duri an encoded component of a uniform resource identifier. return value a new string representing the decoded version of the given encoded uniform resource identifier (uri) component. exceptions throws an urierror ("malformed uri sequence") exception when used wrongly. description replaces each escape sequence in the encoded uri component with the character that it represents. examples
decoding a cyrillic url component decodeuricomponent('javascript_%d1%88%d0%b5%d0%bb%d0%bb%d1%8b'); // "javascript_шеллы" catching errors try { var a = decodeuricomponent('%e0%a4%a'); } catch(e) { console.error(e); } // urierror: malformed uri sequence
decoding query parameters from a url decodeuricomponent cannot be used directly to parse query parameters from a url. it needs a bit of prep...
encodeURIComponent() - JavaScript
uri sequence" console.log(encodeuricomponent('\ud800')); // lone low surrogate throws "urierror: malformed uri sequence" console.log(encodeuricomponent('\udfff')); use encodeuricomponent() on user-entered fields from forms post'd to the server. this will encode "&" symbols that may inadvertently be generated during data entry for special html entities or other characters that require encoding/
decoding. for example, if a user writes "jack & jill", the text may get encoded as "jack & jill". without encodeuricomponent() the ampersand could be interpretted on the server as the start of a new field and jeopardize the integrity of the data. for application/x-www-form-urlencoded, spaces are to be replaced by "+", so one may wish to follow a encodeuricomponent() replacement with an additional re...
Image file type and format guide - Web media technologies
e. 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> element. ...
Codecs used by WebRTC - Web media technologies
atory codecs for video—vp8 and avc/h.264—only vp8 is completely free of licensing requirements. if you select avc, make sure you're; aware of any potential fees you may need to pay; that said, the patent holders have generally said that most typical web site developers shouldn't need to worry about paying the license fees, which are typically focused more on the developers of the encoding and
decoding software. warning: the information here does not constitute legal advice! be sure to confirm your exposure to liability before making any final decisions where potential exists for licensing issues. power needs and battery life another factor to consider—especially on mobile platforms—is the impact a codec may have on battery life. if a codec is handled in hardware on a given platform, t...
Web media technologies
ipt as htmltrackelement objects. <source> the html <source> element is used within an <audio> or <video> element to specify source media to present. multiple sources 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. mediastream reco...
Performance fundamentals - Web Performance
nimations are "offloaded" to the system compositor, which can render them in a performant, power-efficient fashion. an app's startup performance matters just as much as its runtime performance. gecko is optimized to load a wide variety of content efficiently: the entire web! many years of improvements targeting this content, like parallel html parsing, intelligent scheduling of reflows and image
decoding, clever layout algorithms, etc., translate just as well to improving web applications on firefox. application performance this section is intended for developers asking the question: "how can i make my app fast"? startup performance application startup is punctuated by three user-perceived events, generally speaking: the first is the application first paint — the point at which sufficien...
Optimizing startup performance - Web Performance
s for how to build your startup process to be as asynchronous as possible (whether it's a new app or a port): use the defer or async attribute on script tags needed by the web application. this allows html parsers to continue processing the document, instead of having to wait until the scripts have been downloaded and executed before continuing. if you need to decode asset files (for example,
decoding jpeg files and turning them into raw texture data for later use by webgl), that's great to do in workers. when dealing with data supported by the browser (for example,
decoding image data), use the decoders built into the browser or device rather than rolling your own or using one from the original codebase. the provided one is almost certainly significantly faster, and will reduce your app size...