using

Rapid miRNA detection in skin interstitial fluid using a hydrogel microneedle patch integrated with DNA probes and graphene oxide

Lab Chip, 2024, 24,4989-4997
DOI: 10.1039/D4LC00715H, Paper
Hanjia Zheng, Fatemeh Keyvani, Sadegh Sadeghzadeh, Dragos F. Mantaila, Fasih A. Rahman, Joe Quadrilatero, Mahla Poudineh
A simple and rapid fluorescence-based sensor sensors using DNA functionalized graphene oxide for miRNA detection from skin interstitial fluid.
The content of this RSS Feed (c) The Royal Society of Chemistry




using

Dynamic sampling from ex vivo adipose tissue using droplet-based microfluidics supports separate mechanisms for glycerol and fatty acid secretion

Lab Chip, 2024, 24,5020-5031
DOI: 10.1039/D4LC00664J, Paper
Md Moniruzzaman, Andresa B. Bezerra, Md Mohibullah, Robert L. Judd, James G. Granneman, Christopher J. Easley
Droplet-based microfluidic sampling of adipose tissue reveals unique information on lipolytic dynamics.
The content of this RSS Feed (c) The Royal Society of Chemistry




using

Inertial co-focusing of heterogeneous particles in hybrid microfluidic channels with constantly variable cross-sections

Lab Chip, 2024, 24,5032-5042
DOI: 10.1039/D4LC00479E, Paper
Tianwei Zhao, Peng Zeng, Yuanting Zhang, Jinxia Li, Hui Sun, Imrich Gablech, Honglong Chang, Xichen Yuan, Pavel Neužil, Jianguo Feng
Inertial focusing chips based on hybrid microfluidic channels were presented for high-efficiency heterogeneous particle co-focusing, offering significant applications in microfluidic flow cytometry and single-cell analysis.
The content of this RSS Feed (c) The Royal Society of Chemistry




using

Exploring cancer-associated fibroblast-induced resistance to tyrosine kinase inhibitors in hepatoma cells using a liver-on-a-chip model

Lab Chip, 2024, 24,5043-5054
DOI: 10.1039/D4LC00624K, Paper
Madhu Shree Poddar, Yu-De Chu, Gaurav Pendharkar, Cheng-Hsien Liu, Chau-Ting Yeh
3D liver-on-a-chip reveals AHSG and CLEC3B to mediate cancer-associated fibroblast-induced resistance to TKIs in hepatoma cells.
The content of this RSS Feed (c) The Royal Society of Chemistry




using

Compact lens-free imager using a thin-film transistor for long-term quantitative monitoring of stem cell culture and cardiomyocyte production

Lab Chip, 2024, Advance Article
DOI: 10.1039/D4LC00528G, Paper
Open Access
Taishi Kakizuka, Tohru Natsume, Takeharu Nagai
A novel compact lens-free imager achieved high-throughput long-term monitoring within an incubator, demonstrating the quantification of the confluency of human iPS cells, epithelial-to-mesenchymal transition, and cardiomyocyte beating dynamics.
To cite this article before page numbers are assigned, use the DOI form of citation above.
The content of this RSS Feed (c) The Royal Society of Chemistry




using

Observing root growth and signalling responses to stress gradients and pathogens using the bi-directional dual-flow RootChip

Lab Chip, 2024, Advance Article
DOI: 10.1039/D4LC00659C, Paper
Open Access
Claudia Allan, Yiling Sun, Stephen C. Whisson, Michael Porter, Petra C. Boevink, Volker Nock, Claudia-Nicole Meisrimler
Using a bi-directional dual-flow RootChip with integrated force sensing micropillars, root growth and signalling responses to stress gradients and pathogens were studied in Arabidopsis thaliana, Nicotiana benthamiana and Solanum lycopersicum.
To cite this article before page numbers are assigned, use the DOI form of citation above.
The content of this RSS Feed (c) The Royal Society of Chemistry




using

Discretised microfluidics for noninvasive health monitoring using sweat sensing

Lab Chip, 2024, Advance Article
DOI: 10.1039/D4LC00763H, Paper
Open Access
Emma J. M. Moonen, Walther Verberne, Eduard Pelssers, Jason Heikenfeld, Jaap M. J. den Toonder
We present the first wearable device with integrated electrowetting, which collects and transports sweat from single glands and measures sweat rate for extremely low sweat rate. This enables non-invasive biomarker monitoring of hospitalized patients.
To cite this article before page numbers are assigned, use the DOI form of citation above.
The content of this RSS Feed (c) The Royal Society of Chemistry




using

Decision on extending Warehousing Corporation MD’s tenure soon, govt. tells HC




using

Defence Ministry cautions firms using Chinese parts for drones

Ministry dashes off a letter to industry bodies asking them to sensitise manufacturers against using Chinese parts for drones




using

TN to detect land encroachments using AI, pilot study in Coimbatore




using

TDP, JSP and supporters filed 18 cases in High Court opposing housing for the poor in Amaravati: Jagan Mohan Reddy

Calling it a struggle between neo-capitalists and the poor, Mr. Reddy said the commencement of the construction of housing plots in the R-5 Zone was a historic win for the pro-poor government




using

A novel in situ method for linear alkylbenzene sulfonate quantification in environmental samples using a digital image-based method

Anal. Methods, 2024, 16,2009-2018
DOI: 10.1039/D4AY00073K, Paper
Helayne S. de Sousa, Roxanny Arruda-Santos, Eliete Zanardi-Lamardo, Willian T. Suarez, Josiane L. de Oliveira, Renata A. Farias, Vagner Bezerra dos Santos
Surfactants spilled in water resulting in the contamination of aquatic environments being in situ monitored using a smartphone.
The content of this RSS Feed (c) The Royal Society of Chemistry




using

Surface charge-induced electrospray for high-throughput analysis of complex samples and electrochemical reaction intermediates using mass spectrometry

Anal. Methods, 2024, 16,2002-2008
DOI: 10.1039/D4AY00276H, Communication
Yajie Huang, Yajun Zheng, Qianqian Zuo, Zhiming Zhang, Lixuan Zhu, Yun Li, Zhiping Zhang
A novel surface charge induced electrospray ionization is proposed due to its features of no contact between sample solution and metal electrode, fast analytical process (less than 40 s), and high analytical sensitivity.
The content of this RSS Feed (c) The Royal Society of Chemistry




using

Rapid and green quantification of phloridzin and trilobatin in Lithocarpus litseifolius (Hance) Chun (sweet tea) using an online pressurized liquid extraction high-performance liquid chromatography at equal absorption wavelength method

Anal. Methods, 2024, Advance Article
DOI: 10.1039/D4AY00170B, Paper
Zhengming Qian, Qinggui Lei, Dan Tang, Guoying Tan, Qi Huang, Fucai Zhou, Wenhao Wang
Sweet tea is a functional herbal tea with anti-inflammatory, anti-diabetic, and other effects, in which phloridzin and trilobatin are two functional compounds.
To cite this article before page numbers are assigned, use the DOI form of citation above.
The content of this RSS Feed (c) The Royal Society of Chemistry




using

Luminescent and time-resolved determination of gemifloxacin mesylate in pharmaceutical formulations and spiked blood plasma samples using a lanthanide complex as a probe

Anal. Methods, 2024, Advance Article
DOI: 10.1039/D4AY00236A, Paper
Gasser M. Khairy, Rania M. Goda, Zeinab M. Anwar, Mohamed M. Aboelnga, Axel Duerkop
A new luminescent europium probe for the determination of the antibiotic gemifloxacin is presented. Time-resolved luminescence enables its quantitation in pharmaceutical formulations and blood samples.
To cite this article before page numbers are assigned, use the DOI form of citation above.
The content of this RSS Feed (c) The Royal Society of Chemistry




using

On paper characterisation of droplet and evaporation study using impedance spectroscopy

Anal. Methods, 2024, Advance Article
DOI: 10.1039/D4AY00303A, Paper
O. Kare Siva Prakasam, Akashlina Basu, Koel Chaudhury, Soumen Das
A paper chip employs an impedance method to determine the characteristics of the droplet. We compare the traditional evaporation method with the electrical method to study the evaporation of various liquids.
To cite this article before page numbers are assigned, use the DOI form of citation above.
The content of this RSS Feed (c) The Royal Society of Chemistry




using

Direct detection of dithiocarbamate fungicides by SALDI/MS using porous TiC ceramic powder as a substrate

Anal. Methods, 2024, Advance Article
DOI: 10.1039/D3AY01533E, Paper
Hiroshi Moriwaki, Issey Osaka, Kotaro Hashimoto, Osamu Yamada
Direct detection of dithiocarbamate fungicides (DTCs) has been achieved by SALDI/MS using porous titanium carbide (TiC) ceramic powder as a substrate.
To cite this article before page numbers are assigned, use the DOI form of citation above.
The content of this RSS Feed (c) The Royal Society of Chemistry




using

The selective extraction of dietary polyamines from chicken breast using the application of a lab-on-a-chip electromembrane and dispersive liquid–liquid microextraction followed by gas chromatography-mass spectrometry

Anal. Methods, 2024, Advance Article
DOI: 10.1039/D3AY02172F, Paper
Fatemeh Barzegar, Samaneh Nabizadeh, Marzieh Kamankesh, Jahan B. Ghasemi, Abdorreza Mohammadi
Excessive dietary polyamines (PAs), including putrescine (PUT), spermine (SPM), and spermidine (SPD), have become a worldwide concern due to their carcinogenicity and reduced shelf life.
To cite this article before page numbers are assigned, use the DOI form of citation above.
The content of this RSS Feed (c) The Royal Society of Chemistry




using

Discrimination of Diptera order insects based on their saturated cuticular hydrocarbon content using a new microextraction procedure and chromatographic analysis

Anal. Methods, 2024, Accepted Manuscript
DOI: 10.1039/D4AY00214H, Paper
Open Access
Lixy Olinda León-Morán, Marta Pastor-Belda, Pilar Viñas, Natalia Arroyo-Manzanares, María Dolores García, María Isabel Arnaldos, Natalia Campillo
The nature and proportions of hydrocarbons in the cuticle of insects is characteristic of the species and age. Chemical analysis of cuticular hydrocarbons allows species discrimination, which is of great...
The content of this RSS Feed (c) The Royal Society of Chemistry




using

Caffeine quantification in dietary supplements using high-throughput on-line solid phase extraction coupled to Venturi easy ambient sonic-spray ionization mass spectrometry

Anal. Methods, 2024, Advance Article
DOI: 10.1039/D4AY00333K, Paper
David Ulisses Tega, Luan Felipe Campos Oliveira, Patrick Cesar Ferreira, Bruna Beatriz Soldera, Heliara Dalva Lopes Nascimento, Marcos Nogueira Eberlin, Alessandra Sussulini
Optimization of a LC-V-EASI-MS system. Employment of LC-V-EASI-MS and online SPE to enhance analytical performance for caffeine determination reaching 90 s per sample.
To cite this article before page numbers are assigned, use the DOI form of citation above.
The content of this RSS Feed (c) The Royal Society of Chemistry




using

A comprehensive HRMS methodology using LC-(ESI)-/GC-(APCI)-QTOF MS complementary platforms for wide-scope target screening of >750 pesticides in olive oil

Anal. Methods, 2024, Advance Article
DOI: 10.1039/D4AY00181H, Paper
Open Access
Sofia K. Drakopoulou, Stefanos E. Kokolakis, Apostolos L. Karagiannidis, Marilena E. Dasenaki, Niki C. Maragou, Nikolaos S. Thomaidis
This study presents a robust and validated HRMS method for the determination of 771 pesticides in olive oil. LC-ESI/GC-APCI-QTOF MS was employed for the analysis.
To cite this article before page numbers are assigned, use the DOI form of citation above.
The content of this RSS Feed (c) The Royal Society of Chemistry




using

Rapid detection of monkeypox virus and differentiation of West African and Congo Basin strains using endonuclease restriction-mediated real-time PCR-based testing

Anal. Methods, 2024, Advance Article
DOI: 10.1039/D4AY00492B, Paper
Juan Zhou, Fei Xiao, Xiaolan Huang, Jin Fu, Nan Jia, Chunrong Sun, Min Chen, Zheng Xu, Hui Huang, Yi Wang
A novel multiplex ET-PCR assay that integrates PCR amplification, restriction endonuclease cleavage and real-time fluorescence detection was devised to diagnose MPXV infection and distinguish the Congo Basin and West Africa MPXV strains.
To cite this article before page numbers are assigned, use the DOI form of citation above.
The content of this RSS Feed (c) The Royal Society of Chemistry




using

Ag-coated tetrapod gold nanostars (Au@AgNSs) for acetamiprid determination in tea using SERS combined with microfluidics

Anal. Methods, 2024, Advance Article
DOI: 10.1039/D4AY00297K, Paper
Qian Ke, Limei Yin, Heera Jayan, Hesham R. El-Seedi, Xiaobo Zou, Zhiming Guo
The combination of highly sensitive SERS substrate core–shell Au@AgNSs and microfluidic chip featuring four circular split hybrid structures were used for quantitative detection of acetamiprid in tea. The LOD of acetamiprid was 0.048 ng mL−1.
To cite this article before page numbers are assigned, use the DOI form of citation above.
The content of this RSS Feed (c) The Royal Society of Chemistry




using

Resolving phytosterols in microalgae using offline two-dimensional reversed phase liquid chromatography-supercritical fluid chromatography coupled with quadrupole time-of-flight mass spectrometry

Anal. Methods, 2024, 16,2278-2285
DOI: 10.1039/D3AY02261G, Paper
Magali Batteau, Elodie Bouju, Adriana Ramirez-Romero, Sylvie Nuccio, René De Vaumas, Florian Delrue, Karine Faure
Development of an off-line LC-SFc-MS method, separation of sterol isomers in algal unsaponifiable fractions, elution pattern helping in the reduction of structural candidates.
The content of this RSS Feed (c) The Royal Society of Chemistry




using

Direct solid sample analysis of low-cost jewelry using spectroanalytical techniques: exploratory chemical data evaluation and metal migration with synthetic sweat

Anal. Methods, 2024, 16,2286-2291
DOI: 10.1039/D4AY00325J, Paper
Thaila Lorena de Araújo, Fabiola Manhas Verbi Pereira, Edenir Rodrigues Pereira-Filho
Jewelry samples were directly analyzed using LIBS and XRF.
The content of this RSS Feed (c) The Royal Society of Chemistry




using

Anti-aggregation colorimetric sensing of cysteine using silver nanoparticles in the presence of Pb2+

Anal. Methods, 2024, 16,2378-2385
DOI: 10.1039/D4AY00351A, Paper
Lihui Mao, Yi Zhang, Huan Zhang, Huili Liu, Yong-ping Gao
In this study, an unmodified AgNPs was synthesized to prepare AgNPs-Pb2+ as a probe for colorimetric sensing of cysteine. We developed a AgNPs colorimetric method for the determination of cysteine in urine, utilizing the anti-aggregation principle.
The content of this RSS Feed (c) The Royal Society of Chemistry




using

A highly sensitive and selective fluorescent biosensor for breast cancer derived exosomes using click reaction of azide–CD63 aptamer and alkyne-polymer dots

Anal. Methods, 2024, Advance Article
DOI: 10.1039/D4AY00146J, Paper
Dumei Ma, Yiting Luo, Xiaoya Zhang, Zehu Xie, Yinghua Yan, Chuan-Fan Ding
A fluorescence method based on Cu-triggered click reaction of azide modified CD63 aptamer and alkyne capped Pdots was developed for breast cancer derived exosome detection.
To cite this article before page numbers are assigned, use the DOI form of citation above.
The content of this RSS Feed (c) The Royal Society of Chemistry




using

Analysis of brominide disinfection by-products in aquaculture water using ultra-high-performance liquid chromatography–quadrupole–time-of-flight mass spectrometry

Anal. Methods, 2024, Accepted Manuscript
DOI: 10.1039/D4AY00396A, Paper
Weimin Yang, Yi Zhang, Jilong Huang, Xing Yang, Ning Jiang
Background: Halogenic disinfectants have been shown to produce toxic and carcinogenic disinfection by-products (DBPs) during water disinfection. Dibromohydantoin (DBDMH) is a commonly used water disinfectant in aquaculture. Aquaculture water has...
The content of this RSS Feed (c) The Royal Society of Chemistry




using

Simple fluorescence “turn-off” assay for Congo red using commercial 2-aminophthalic acid

Anal. Methods, 2024, Advance Article
DOI: 10.1039/D4AY00506F, Paper
Jiaqi Qian, Jie Li, Yihan Jiang, Chaoyong Liu, Jiayao Zhu, Liyu Gu, Yongming Guo
2-Aminophthalic acid with a high quantum yield of 38.49% was utilized for fluorescence “turn-off” sensing of Congo red with a linear range of 0.05–50 μM and a limit of detection of 1.72 μM.
To cite this article before page numbers are assigned, use the DOI form of citation above.
The content of this RSS Feed (c) The Royal Society of Chemistry




using

Electroanalysis overview: additive manufactured biosensors using fused filament fabrication

Anal. Methods, 2024, Advance Article
DOI: 10.1039/D4AY00278D, Minireview
Open Access
  This article is licensed under a Creative Commons Attribution 3.0 Unported Licence.
Robert D. Crapnell, Craig E. Banks
Additive manufacturing (3D-printing), in particular fused filament fabrication, presents a paradigm shift in the way electrochemical based biosensing platforms are produced, giving rise to a new generation of personalized and on-demand biosensors.
To cite this article before page numbers are assigned, use the DOI form of citation above.
The content of this RSS Feed (c) The Royal Society of Chemistry




using

Quantifying platinum binding on protein-functionalized magnetic microparticles using single particle-ICP-TOF-MS

Anal. Methods, 2024, Advance Article
DOI: 10.1039/D4AY00268G, Paper
Open Access
  This article is licensed under a Creative Commons Attribution 3.0 Unported Licence.
Veronica C. Bradley, Benjamin T. Manard, Lyndsey Hendriks, Daniel R. Dunlap, Amber N. Bible, Ada Sedova, Patricia Saint-Vincent, Brian C. Sanders, Hunter B. Andrews
This work describes an analytical procedure, single particle-inductively coupled plasma-time-of-flight-mass spectrometry (SP-ICP-TOF-MS), that was developed to determine the platinum binding efficiency of protein-coated magnetic microparticles.
To cite this article before page numbers are assigned, use the DOI form of citation above.
The content of this RSS Feed (c) The Royal Society of Chemistry




using

Railways using treated water from its STP for maintaining green spaces

The treated water is stored in an overhead tank and used in gardens at the two railway rest houses meant for officers at Kallukuzhi near Tiruchi Railway Junction




using

556: Andrey Sitnik and Using OKLCH for Color

Andrey Sitnik from Evil Martians talks with us about why OKCLH is the best way forward for color on the web, how to incorporate it into design systems, getting your designers to use OKCLH, and what kind of fallback support is needed.




using

Housing.com to post $10 million revenue this year




using

Tata Housing raises $25 m from CDC




using

Stress amplification and relaxation imaging around cracks in nanocomposite gels using ultrasound elastography

Soft Matter, 2024, Advance Article
DOI: 10.1039/D4SM00909F, Paper
H. Le Blay, T. Deffieux, L. Laiarinandrasana, M. Tanter, A. Marcellan
Stress visualization around cracks in NC gels was performed using ultrasonic elastography. Temporal and spatial mapping are performed non-invasively. Over time, the stress gradient is erased by large-scale reorganization of the polymer network.
To cite this article before page numbers are assigned, use the DOI form of citation above.
The content of this RSS Feed (c) The Royal Society of Chemistry




using

Revealing microscale bulk structures in polymer–carbon nanocomposites using spin-echo SANS

Soft Matter, 2024, 20,8663-8674
DOI: 10.1039/D4SM00578C, Paper
Open Access
  This article is licensed under a Creative Commons Attribution 3.0 Unported Licence.
L. V. Tiihonen, M. P. Weir, A. J. Parnell, S. C. Boothroyd, D. W. Johnson, R. M. Dalgliesh, M. Bleuel, C. P. Duif, W. G. Bouwman, R. L. Thompson, K. S. Coleman, N. Clarke, W. A. Hamilton, A. L. Washington, S. R. Parnell
Spin-echo small-angle neutron scattering (SESANS) revealed structure in polymer–carbon nanocomposites over multiple length scales with unprecedented range (10 nm–16 μm). Data from two SESANS instruments and other methods were analysed with SasView.
The content of this RSS Feed (c) The Royal Society of Chemistry




using

Understanding Polymer-Colloid Gels: A Solvent Perspective Using Low-Field NMR

Soft Matter, 2024, Accepted Manuscript
DOI: 10.1039/D4SM01098A, Communication
Léo Hervéou, Gauthier Legrand, Thibaut Divoux, Guilhem Pablo Baeza
The present work emphasizes the relevance of low-field NMR relaxometry to investigate colloid-polymer hydrogels by probing water dynamics across a wide range of formulations between 10°C and 80°C. By examining...
The content of this RSS Feed (c) The Royal Society of Chemistry




using

Create Neon Style Buttons Using CSS

CSS truly is a remarkable tool in a web designer’s toolkit, capable of bringing even the most vibrant creative visions to life. Today, we’re immersing ourselves in the radiant world of neon style buttons, showcasing the impressive spectrum of CSS …




using

How to Animate Gradient Text Using CSS

Web design takes a captivating turn when CSS comes into play. It enables a world of transformations, such as taking static text elements and infusing them with life. Our focus today is one such engaging transformation – animate gradient text …




using

Ripple Button Effect Using Pure CSS

Google’s Material Design guidelines introduced the ripple effect, a subtle animation that indicates user action. The ripple effect rapidly gained popularity in web design as a sophisticated visual feedback form that refines user interaction, particularly on buttons. Today, we’ll show …




using

Building a Dictaphone Using Media Recorder and getUserMedia

Chris Mills brushes up his shorthand and shows how the MediaStream Recording API in modern browsers can be used to capture audio directly from the user’s device. Inching ever closer to the capabilities of native software, it truly is an exciting time to be a web developer.


The MediaStream Recording API makes it easy to record audio and/or video streams. When used with MediaDevices.getUserMedia(), it provides an easy way to record media from the user’s input devices and instantly use the result in web apps. This article shows how to use these technologies to create a fun dictaphone app.

A sample application: Web Dictaphone

To demonstrate basic usage of the MediaRecorder API, we have built a web-based dictaphone. It allows you to record snippets of audio and then play them back. It even gives you a visualisation of your device’s sound input, using the Web Audio API. We’ll just concentrate on the recording and playback functionality in this article, for brevity’s sake.

You can see this demo running live, or grab the source code on GitHub. This has pretty good support on modern desktop browsers, but pretty patchy support on mobile browsers currently.

Basic app setup

To grab the media stream we want to capture, we use getUserMedia(). We then use the MediaRecorder API to record the stream, and output each recorded snippet into the source of a generated <audio> element so it can be played back.

We’ll first declare some variables for the record and stop buttons, and the <article> that will contain the generated audio players:

const record = document.querySelector('.record');
const stop = document.querySelector('.stop');
const soundClips = document.querySelector('.sound-clips');

Next, we set up the basic getUserMedia structure:

if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
   console.log('getUserMedia supported.');
   navigator.mediaDevices.getUserMedia (
      // constraints - only audio needed for this app
      {
         audio: true
      })

      // Success callback
      .then(function(stream) {

      })

      // Error callback
      .catch(function(err) {
         console.log('The following `getUserMedia` error occured: ' + err);
      }
   );
} else {
   console.log('getUserMedia not supported on your browser!');
}

The whole thing is wrapped in a test that checks whether getUserMedia is supported before running anything else. Next, we call getUserMedia() and inside it define:

  • The constraints: Only audio is to be captured for our dictaphone.
  • The success callback: This code is run once the getUserMedia call has been completed successfully.
  • The error/failure callback: The code is run if the getUserMedia call fails for whatever reason.

Note: All of the code below is found inside the getUserMedia success callback in the finished version.

Capturing the media stream

Once getUserMedia has created a media stream successfully, you create a new Media Recorder instance with the MediaRecorder() constructor and pass it the stream directly. This is your entry point into using the MediaRecorder API — the stream is now ready to be captured into a <Blob>, in the default encoding format of your browser.

const mediaRecorder = new MediaRecorder(stream);

There are a series of methods available in the MediaRecorder interface that allow you to control recording of the media stream; in Web Dictaphone we just make use of two, and listen to some events. First of all, MediaRecorder.start() is used to start recording the stream once the record button is pressed:

record.onclick = function() {
  mediaRecorder.start();
  console.log(mediaRecorder.state);
  console.log("recorder started");
  record.style.background = "red";
  record.style.color = "black";
}

When the MediaRecorder is recording, the MediaRecorder.state property will return a value of “recording”.

As recording progresses, we need to collect the audio data. We register an event handler to do this using mediaRecorder.ondataavailable:

let chunks = [];

mediaRecorder.ondataavailable = function(e) {
  chunks.push(e.data);
}

Last, we use the MediaRecorder.stop() method to stop the recording when the stop button is pressed, and finalize the Blob ready for use somewhere else in our application.

stop.onclick = function() {
  mediaRecorder.stop();
  console.log(mediaRecorder.state);
  console.log("recorder stopped");
  record.style.background = "";
  record.style.color = "";
}

Note that the recording may also stop naturally if the media stream ends (e.g. if you were grabbing a song track and the track ended, or the user stopped sharing their microphone).

Grabbing and using the blob

When recording has stopped, the state property returns a value of “inactive”, and a stop event is fired. We register an event handler for this using mediaRecorder.onstop, and construct our blob there from all the chunks we have received:

mediaRecorder.onstop = function(e) {
  console.log("recorder stopped");

  const clipName = prompt('Enter a name for your sound clip');

  const clipContainer = document.createElement('article');
  const clipLabel = document.createElement('p');
  const audio = document.createElement('audio');
  const deleteButton = document.createElement('button');

  clipContainer.classList.add('clip');
  audio.setAttribute('controls', '');
  deleteButton.innerHTML = "Delete";
  clipLabel.innerHTML = clipName;

  clipContainer.appendChild(audio);
  clipContainer.appendChild(clipLabel);
  clipContainer.appendChild(deleteButton);
  soundClips.appendChild(clipContainer);

  const blob = new Blob(chunks, { 'type' : 'audio/ogg; codecs=opus' });
  chunks = [];
  const audioURL = window.URL.createObjectURL(blob);
  audio.src = audioURL;

  deleteButton.onclick = function(e) {
    let evtTgt = e.target;
    evtTgt.parentNode.parentNode.removeChild(evtTgt.parentNode);
  }
}

Let’s go through the above code and look at what’s happening.

First, we display a prompt asking the user to name their clip.

Next, we create an HTML structure like the following, inserting it into our clip container, which is an <article> element.

<article class="clip">
  <audio controls></audio>
  <p>_your clip name_</p>
  <button>Delete</button>
</article>

After that, we create a combined Blob out of the recorded audio chunks, and create an object URL pointing to it, using window.URL.createObjectURL(blob). We then set the value of the <audio> element’s src attribute to the object URL, so that when the play button is pressed on the audio player, it will play the Blob.

Finally, we set an onclick handler on the delete button to be a function that deletes the whole clip HTML structure.

So that’s basically it — we have a rough and ready dictaphone. Have fun recording those Christmas jingles! As a reminder, you can find the source code, and see it running live, on the MDN GitHub.


This article is based on Using the MediaStream Recording API by Mozilla Contributors, and is licensed under CC-BY-SA 2.5.


About the author

Chris Mills manages the MDN web docs writers’ team at Mozilla, which involves spreadsheets, meetings, writing docs and demos about open web technologies, and occasional tech talks at conferences and universities. He used to work for Opera and W3C, and enjoys playing heavy metal drums and drinking good beer.

More articles by Chris




using

PNB Housing Finance Q2 net up 22.7 per cent at ₹470 crore 

The portfolio asset quality continues to improve with Gross NPA at 1.24 percent as on end September 2024



  • Money &amp; Banking

using

PNB Housing Finance to expand corporate lending portfolio to boost margins, says MD & CEO Kousgi

Confident of sustaining Q2 bottomline growth performance in remaining quarters this fiscal 



  • Money &amp; Banking

using

Aptus Value Housing posts 16% rise in Q2 standalone net at ₹137 cr

The Company achieved a 22 per cent % year-on-year increase in net profit in Q2 FY25, driven by business growth, stable asset quality, and a continuous focus on enhancing productivity



  • Money &amp; Banking

using

Algebraic graph algorithms [electronic resource] : a practical guide using Python / K. Erciyes.

Cham, Switzerland : Springer, 2021.




using

Applied structural equation modeling using AMOS [electronic resource]: basic to advanced techniques / Joel E. Collie

New York : Routledge, 2020




using

Field-level police personnel in DK, Udupi start using bodycams

“In addition to brining in transparency, the bodycams will make police personnel more conscious and improve their conduct with people,” Mangaluru Police Commissioner Anupam Agrawal said




using

Kannada Ratha gets rousing welcome in Udupi district

Ratha with Kannada Jyothi has been touring Karnataka ahead of the Mandya sahitya sammelana




using

Conservation technologist Arpit Deomurari on his experience in using tech for Nature

Wearing many hats — ecologist, GIS expert, data scientist, and conservation technologist — allows for a view of the connections between different fields