sing

[ASAP] Acoustic Vibrations of Al Nanocrystals: Size, Shape, and Crystallinity Revealed by Single-Particle Transient Extinction Spectroscopy

The Journal of Physical Chemistry A
DOI: 10.1021/acs.jpca.0c01190




sing

[ASAP] Using Machine Learning to Predict the Dissociation Energy of Organic Carbonyls

The Journal of Physical Chemistry A
DOI: 10.1021/acs.jpca.0c01280




sing

[ASAP] The Conformational Landscape, Internal Rotation, and Structure of 1,3,5-Trisilapentane using Broadband Rotational Spectroscopy and Quantum Chemical Calculations

The Journal of Physical Chemistry A
DOI: 10.1021/acs.jpca.0c01100




sing

[ASAP] Finite Systems under Pressure: Assessing Volume Definition Models from Parallel-Tempering Monte Carlo Simulations

The Journal of Physical Chemistry A
DOI: 10.1021/acs.jpca.0c00881




sing

Neoadjuvant Nivolumab 'Promising' in Merkel Cell Carcinoma

A longer follow-up and larger cohort are needed, but results from a new study showed safety and a survival benefit among patients who received nivolumab as an adjunct to surgery.
Medscape Medical News




sing

Metrics for Assessing Physician Activity Using Electronic Health Record Log Data

Electronic health record (EHR) log data have shown promise in measuring physician time spent on clinical activities, contributing to deeper understanding and further optimization of the clinical environment.




sing

The Role of the Workforce System in Addressing the Opioid Crisis: A Review of the Literature

This literature review was conducted as part of an evaluation of the National Health Emergency demonstration grants awarded by the U.S. Department of Labor to states that using their workforce systems to address problems presented by the opioid crisis.




sing

The Role of the Workforce System in Addressing the Opioid Crisis: A Resource Guide

This guide supports state recipients of the U.S. Department of Labor National Health Emergency demonstration grants that leverage their workforce systems to address problems presented by the opioid crisis.




sing

Arnold Ventures Awards $6 Million Grant to Study Replication and Evaluation of Penn Nursing’s Transitional Care Model

Mathematica study will evaluate the effectiveness of the Transitional Care Model (TCM) in reducing rehospitalizations and will promote widespread use of the program in a number of health systems.




sing

Touchpoints for Addressing Substance Use Issues in Home Visiting: Phase 1 Final Report

This report describes project findings around six touchpoints and four implementation system inputs through which home visiting programs can engage and support families to prevent, identify, and address substance use issues.




sing

Touchpoints for Addressing Substance Use Issues in Home Visiting: Executive Summary of Phase 1 Final Report

This report describes project findings around six touchpoints and four implementation system inputs through which home visiting programs can engage and support families to prevent, identify, and address substance use issues.




sing

Recent trends in human and animal mycology / Karuna Singh, Neelabh Srivastava, editors

Online Resource




sing

Powdery mildew disease of crucifers: biology, ecology and disease management / Govin Singh Saharan, Naresh K. Mehta, Prabhu Dayal Meena

Online Resource




sing

Microbial interventions in agriculture and environment. Dhananjaya Pratap Singh, Vijai Kumar Gupta, Ratna Prabha, editors

Online Resource




sing

Microbial interventions in agriculture and environment. Dhananjaya Pratap Singh, Ratna Prabha, editors

Online Resource




sing

Microbial Interventions in Agriculture and Environment. edited by Dhananjaya Pratap Singh, Vijai Kumar Gupta, Ratna Prabha

Online Resource




sing

The lupin genome Karam B. Singh, Lars G. Kamphuis, Matthew N. Nelson, editors

Online Resource




sing

Management of fungal pathogens in pulses: current status and future challenges / Bhim Pratap Singh, Garima Singh, Krishna Kumar, S. Chandra Nayak, N. Srinivasa, editors

Online Resource




sing

Housing reform and China's real estate industry: review and forecast / Pengfei Ni, Linhua Zou, Guangchun Gao, Xuemei Jiang

Online Resource




sing

Possessing the city: property and politics in Delhi, 1911-1947 / Anish Vanaik

Rotch Library - HD880.D4 V36 2020




sing

Innovative pest management approaches for the 21st Century: harnessing automated unmanned technologies / Akshay Kumar Chakravarthy, editor

Online Resource




sing

Wheat quality for improving processing and human health / Gilberto Igrejas, Tatsuya M. Ikeda, Carlos Guzmán, editors

Online Resource




sing

Ocean outbreak: confronting the rising tide of marine disease / Drew Harvell

Hayden Library - QH541.5.S3 H37 2019




sing

New frontiers in stress management for durable agriculture Amitava Rakshit, Harikesh Bahadur Singh, Anand Kumar Singh, Uma Shankar Singh, Leonardo Fraceto, editors

Online Resource




sing

How to Easily Animate Website Elements on Scroll Using the Free AOS Library

On-scroll animations can add quite the elegant effect to your website. A little animated polish can go a long way towards making your site look well-rounded and complete. With JavaScript and CSS, you can make elements fade, slide, or even …




sing

Viscoelastic interfaces comprising of cellulose nanocrystals and lauroyl ethyl arginate for enhanced foam stability

Soft Matter, 2020, 16,3981-3990
DOI: 10.1039/C9SM02392E, Paper
Agnieszka Czakaj, Aadithya Kannan, Agnieszka Wiśniewska, Gabriela Grześ, Marcel Krzan, Piotr Warszyński, Gerald G. Fuller
At submillimolar concentrations of lauroyl ethyl arginate, cellulose nanocrystals aggregate and form elongated fibres. This interfacial assembly efficiently stabilises foams.
The content of this RSS Feed (c) The Royal Society of Chemistry




sing

Template-based fabrication of spatially organized 3D bioactive constructs using magnetic low-concentration gelation methacrylate (GelMA) microfibers

Soft Matter, 2020, 16,3902-3913
DOI: 10.1039/C9SM01945F, Paper
Tao Sun, Yibing Yao, Qing Shi, Huaping Wang, Paolo Dario, Junzhong Sun, Qiang Huang, Toshio Fukuda
A new template-based method to apply low-concentration GelMA microfibers as building blocks for higher-order cellular assembly.
The content of this RSS Feed (c) The Royal Society of Chemistry




sing

A practical guide to active colloids: choosing synthetic model systems for soft matter physics research

Soft Matter, 2020, 16,3846-3868
DOI: 10.1039/D0SM00222D, Review Article
Wei Wang, Xianglong Lv, Jeffrey L. Moran, Shifang Duan, Chao Zhou
This review article provides practical, experimentally relevant details on six common types of active colloids useful for soft matter research.
The content of this RSS Feed (c) The Royal Society of Chemistry




sing

Melting scenarios of two-dimensional Hertzian spheres with a single triangular lattice

Soft Matter, 2020, 16,3962-3972
DOI: 10.1039/C9SM02262G, Paper
E. N. Tsiok, E. A. Gaiduk, Yu. D. Fomin, V. N. Ryzhov
We present a molecular dynamics simulation study of the phase diagram and melting scenarios of two-dimensional Hertzian spheres with exponent 7/2.
The content of this RSS Feed (c) The Royal Society of Chemistry




sing

Inverse leidenfrost drop manipulation using menisci

Soft Matter, 2020, 16,4043-4048
DOI: 10.1039/C9SM02363A, Paper
Anaïs Gauthier, Guillaume Lajoinie, Jacco H. Snoeijer, Devaraj van der Meer
The motion of droplets levitated above a liquid surface is controlled using the menisci rising against partially immersed walls.
The content of this RSS Feed (c) The Royal Society of Chemistry




sing

Using microprojectiles to study the ballistic limit of polymer thin films

Soft Matter, 2020, 16,3886-3890
DOI: 10.1039/D0SM00295J, Communication
Shawn H. Chen, Amanda J. Souna, Christopher L. Soles, Stephan J. Stranick, Edwin P. Chan
In this work, a microballistic impact test called laser induced projectile impact test (LIPIT) was used to study the perforation behavior of polycarbonate thin films to demonstrate the importance of film thickness on the film's ballistic limit.
The content of this RSS Feed (c) The Royal Society of Chemistry




sing

Assessing the Extent of Structural and Dynamic Modulation of Membrane Lipids due to Pore Forming Toxins: Insights from Molecular Dynamics Simulations

Soft Matter, 2020, Accepted Manuscript
DOI: 10.1039/D0SM00086H, Paper
Vadhana Varadarajan, Rajat Desikan, Ganapathy Ayappa
Infections in many virulent bacterial strains are triggered by the release of pore forming toxins (PFTs), which form oligomeric transmembrane pore complexes on the target plasma membrane. The spatial extent...
The content of this RSS Feed (c) The Royal Society of Chemistry




sing

Rapid analysis of cell-generated forces within a multicellular aggregate using microsphere-based traction force microscopy

Soft Matter, 2020, 16,4192-4199
DOI: 10.1039/C9SM02377A, Paper
Buğra Kaytanlı, Aimal H. Khankhel, Noy Cohen, Megan T. Valentine
We measure cell-generated forces from the deformations of elastic microspheres embedded within multicellular aggregates. Using a computationally efficient analytical model, we directly obtain the full 3D mapping of surface stresses within minutes.
The content of this RSS Feed (c) The Royal Society of Chemistry




sing

Systematic approach for wettability prediction using molecular dynamics simulations

Soft Matter, 2020, 16,4299-4310
DOI: 10.1039/D0SM00197J, Paper
Open Access
  This article is licensed under a Creative Commons Attribution 3.0 Unported Licence.
Ahmed Jarray, Herman Wijshoff, Jurriaan A. Luiken, Wouter K. den Otter
An efficient approach for fast screening of liquids in terms of their wetting properties.
The content of this RSS Feed (c) The Royal Society of Chemistry




sing

Structural characterization of fibrous synthetic hydrogels using fluorescence microscopy

Soft Matter, 2020, 16,4210-4219
DOI: 10.1039/C9SM01828J, Paper
Open Access
Johannes Vandaele, Boris Louis, Kaizheng Liu, Rafael Camacho, Paul H. J. Kouwer, Susana Rocha
The structural features of the matrix surrounding the cells play a crucial role in regulating their behavior.
The content of this RSS Feed (c) The Royal Society of Chemistry




sing

Harnessing biomimetic cryptic bonds to form self-reinforcing gels

Soft Matter, 2020, Advance Article
DOI: 10.1039/D0SM00145G, Paper
Santidan Biswas, Victor V. Yashin, Anna C. Balazs
Cryptic sites, which lay hidden in folded biomolecules, become exposed by applied force and form new bonds that reinforce the biomaterial.
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




sing

Investigation of Thermal Conductivity for Liquid Metal Composites Using Micromechanics-Based Mean-Field Homogenization Theory

Soft Matter, 2020, Accepted Manuscript
DOI: 10.1039/D0SM00279H, Paper
JiYoung Jung, Seunghee Jeong, Klas Hjort, Seunghwa Ryu
For the facile use of liquid metal composite (LMC) for soft, stretchable and thermal systems, it is crucial to understand and predict the thermal conductivity of the composite as a...
The content of this RSS Feed (c) The Royal Society of Chemistry




sing

Single chain in mean field simulation of flexible and semiflexible polymers: Comparison with discrete chain self-consistent field theory

Soft Matter, 2020, Accepted Manuscript
DOI: 10.1039/D0SM00620C, Paper
So Jung Park, Jaeup Kim
Single chain in mean field (SCMF) simulation is a theoretical framework performing Monte Carlo moves of explicit polymer chains under quasi-instantaneously updated external fields which were originally imported from the...
The content of this RSS Feed (c) The Royal Society of Chemistry




sing

Understanding and increasing digital readiness


The Cisco Digital Readiness Index was developed to holistically measure a countryâ€TMs level of digital readiness.
More RSS Feed for Cisco: newsroom.cisco.com/rss-feeds ...




sing

[ASAP] Low-Threshold Lasing up to 360 K in All-Dielectric Subwavelength-Nanowire Nanocavities

ACS Photonics
DOI: 10.1021/acsphotonics.0c00166




sing

[ASAP] Describing Meta-Atoms Using the Exact Higher-Order Polarizability Tensors

ACS Photonics
DOI: 10.1021/acsphotonics.9b01776




sing

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




sing

Reflections on socialism in the Twenty-First Century: facing market liberalism, rising inequalities and the environmental imperative / Claes Brundenius, editor

Online Resource




sing

The light that failed: why the West is losing the fight for democracy / Ivan Krastev and Stephen Holmes

Dewey Library - JC574.K74 2019




sing

The Putin system: an opposing view / Grigory Yavlinsky

Dewey Library - JN6695.I36813 2019




sing

Electronic warfare signal processing / James Genova

Barker Library - UG485.G46 2018




sing

Navjot Singh Sidhu to begin fast-unto-death from Saturday

"My duty towards Amritsar would never be stopped"




sing

Rahul Gandhi should apologise for his remarks on ordinance: Shivraj Singh Chouhan

"By making such a statement, Rahul has lowered the country's image"




sing

Small-time actress held for threatening and abusing cops

Anjum Nayar was arrested and booked under IPC sections 294, 504 and 506.




sing

Aarushi murder case: Talwars using dilatory tactics, says SC rejecting their plea

Aarushi was found dead with her throat slit in her bedroom on May 16, 2008.