eco

Misinformation fears mount over second Trump term

In the closing weeks of his 2024 campaign, Mr. Trump aired false claims about weather manipulation and government assistance after hurricanes hit North Carolina, a swing state




eco

 Political instability, economic woes stare at Germany 

The German economy, the largest in Europe, has not been performing well and is looking at a second consecutive year of contraction; Germany was the only G-7 country to contract in 2024, with its economy expected to shrink by 0.2%




eco

Japan’s record number of women MPs still a minority

Japan ranks 118th of 146 in the 2024 World Economic Forum’s Global Gender Gap report




eco

P3MOT-decorated metal-porphyrin-based zirconium-MOF for the efficient electrochemical detection of 4-nitrobenzaldehyde

Anal. Methods, 2024, 16,2093-2100
DOI: 10.1039/D4AY00152D, Paper
Wen-yi Chen, Xin-yu Huang, Qian Sun, En-qing Gao
Developed a novel hybrid P3MOT@PCN-222(Fe) via in situ polymerization for 4-NBA detection. Showcased broad detection range, high sensitivity, selectivity and stability, laying groundwork for environmental monitoring.
The content of this RSS Feed (c) The Royal Society of Chemistry




eco

A novel isophorone-based fluorescent probe for recognizing Al3+ and its bioimaging in plants

Anal. Methods, 2024, 16,2120-2126
DOI: 10.1039/D4AY00023D, Paper
Yanna Zhao, Yuqi Wang, Yingying Zhang, Xiaowei Bai, Wentong Hou, Yuqing Huang
Aluminium ions (Al3+) are widely present in industries and daily life and are closely related to human health and environmental protection.
The content of this RSS Feed (c) The Royal Society of Chemistry




eco

Simple and convenient preconcentration procedure for the isotopic analysis of uranium in seawater

Anal. Methods, 2024, Advance Article
DOI: 10.1039/D3AY01381B, Paper
Minami Abe, Noriaki Seko, Hiroyuki Hoshina, Shigeki Wada, Shinya Yamasaki, Keisuke Sueki, Aya Sakaguchi
Amidoxime adsorbent was synthesised by graft polymerisation. The adsorbent was efficient for collection of U in seawater for both the adsorption and desorption steps, thus affording a new strategy for measurement of U isotopes.
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




eco

Fate of nations: On the 2024 Economics Nobel

The 2024 Nobel recognises the need for ‘inclusive’ institutions




eco

Growth prescription: On the latest World Economic Outlook 

The IMF’s ‘mediocre’ medium-term outlook merits policy attention




eco

613: Recording Live Music, WebC, Open Source, & WordPress Studio

Chris bought recording gear off an Instagram ad, our thoughts on WebC, CodePen upgrades Yarn, thoughts on the commercial value of open source, Automattic releases an app to install WordPress locally, IBM buys Hashicorp, income tax software, and a hack for getting Safari to respect background colors used in a pseudo selector.




eco

617: Economic & AI Vibes with Jason Grigsby

We're chatting with Jason Grigsby about what a white-collar recession means, how the sources and methods of consuming news shape our perspectives, whether the current economic conditions represent a market correction and if a rebound is imminent. We explore the critical decision of whether to embrace AI advancements or risk being left behind. We also talk about AI-generated voices, large language models and ethics, and the impact of social media signals in an AI world.




eco

631: Dave’s Second Brain Idea, Notion Thoughts, and Google’s LLM in Chrome

Dave's got an idea for a second brain app that's customized to his brain, where we're at with Notion and other notes apps, and accessibility on LLM's in browsers.




eco

Will real estate recover in 2015?

The top localities that have generated a lot of interest among buyers in Hyderabad are Uppal, Chandanagar, Gachibowli, Kondapur, Kukatpally, Manikonda and Miyapur




eco

Typecasting eco-ideas

Important public buildings ignore the time-tested lessons of sustainability found in local architecture. By SATHYA PRAKASH VARANASHI




eco

Becoming nature-friendly, voluntarily

We should not wait for rules and regulations to save the earth from depradation. By Sathya Prakash Varanashi




eco

Getting the gig economy to care for its backbone

Why startups in India cannot afford to take a hands-off approach towards the armies of gig workers they have created




eco

Economic results in a year of elections

Nearly half the world voted this year to choose governments and fiscal roadmaps 




eco

Attempts to douse Alipur warehouse fire continue on second day




eco

ARRL Recognizes University of Scranton During Amateur Radio Station Dedication

The University of Scranton in Pennsylvania has a new amateur radio station, W3USR. A dedication was held at the university’s Loyola Science Center on Friday, October 25, 2024, led by Dr. Nathaniel Frissell, W2NAF, an associate professor of physics and electrical engineering, and club advisor for the University of Scranton Amateur Radio Club.

The new W3USR University of Scranton Amateur Radio Sta...




eco

Learning from US gig economy debate

What are the implications for India in terms of non-formal employment, labour laws and social security?




eco

Economic reforms’ eventful journey

Bimal Jalan gives a bird’s eye view of how the Indian economy and polity evolved since 1991




eco

16 leaders, as many economic verities

Vince Cable profiles 16 personalities who rung in deep rooted economic change in their societies




eco

The economics of everyday life

An economics book shorn of jargon, equations and graphs




eco

Decoding the Xiaomi playbook

A look at the smart strategies that have taken the Chinese ‘internet company’ shooting to the top




eco

Policy prescription for economic and political maladies

Bimal Jalan delves deep into issues that are critical to the country with suggestions on how to overcome challenges 




eco

Booming Digital Stars: 11 Inspiring Journeys from India’s Creator Economy 

Lessons from the exciting success stories of social media influencers




eco

International conference to recommend policies to address gender inequality at farms

“The conference aims to promote the sharing of cutting-edge knowledge on gender and inclusion in agri-food systems.”




eco

A Match of Many Records

The first One-Day International between India and Sri Lanka witnessed important milestones being set and new records being made.




eco

Kohli surpasses Dravid's run record!

Virat Kohli surpassed Rahul Dravid to become the second highest run-scorer for India in international cricket.




eco

Jet turns around with record Rs 1,212-cr. net profit




eco

China slowdown ‘a significant risk’ for global economy

There has been a sharp contraction in China’s imports over the past year




eco

Debt private placements hit record high of Rs. 4,92,000 crore in FY16

Total mobilisation six per cent higher than previous financial year




eco

Rajan calls for global coordination to tackle spill-over economic effects

Developed countries’ policies to keep interest rates low impact emerging market economies, says Guv




eco

‘I didn’t expect to become famous again’

Budhia Singh is eagerly awaiting the response to the film about his life




eco

Hyundai Motor India's record ₹27,870 crore IPO fully subscribed

The ₹27,870 crore initial share sale got bids for 14,07,68,187 shares against 9,97,69,810 shares on offer, translating into 1.41 times the subscription, as per NSE data till 13:21 hours




eco

Rupee settles flat at 84.07 against U.S. dollar for second straight session

The local unit was also weighed down by elevated crude oil prices as well as firm American currency amid rising U.S. treasury yields, forex traders said.




eco

U.S. Stock market: Wall Street rallies on Election Day as economy remains solid

U.S. stocks rally on election day, with S&P 500 and Dow Jones climbing, despite uncertainty over results




eco

Border checkposts in Nilgiris to soon have automatic number plate recognition cameras

This comes in the wake of the Madras High Court recently expressing dissatisfaction over the implementation of the e-pass system in the Nilgiris and Kodaikanal




eco

Deputy Chief Minister launches initiatives to support start-up ecosystem in T.N.

He also presents sanction letters for pre-incubation centres, which aim to support innovative business ideas in their initial stages




eco

Chain stretching in brushes favors sequence recognition for nucleobase-functionalized flexible precise oligomers

Soft Matter, 2024, 20,8303-8311
DOI: 10.1039/D4SM00866A, Paper
Kseniia Grafskaia, Qian Qin, Jie Li, Delphine Magnin, David Dellemme, Mathieu Surin, Karine Glinel, Alain M. Jonas
Flexible oligomers having precise sequences of nucleobases do not specifically recognize surface-grafted target chains at low grafting density. Moderately higher grafting densities promote sequence-specific recognition thanks to chain stretching.
The content of this RSS Feed (c) The Royal Society of Chemistry




eco

Self-assembly of amphiphilic homopolymers grafted onto spherical nanoparticles: complete embedded minimal surfaces and a machine learning algorithm for their recognition

Soft Matter, 2024, 20,8385-8394
DOI: 10.1039/D4SM00616J, Paper
D. A. Mitkovskiy, A. A. Lazutin, A. L. Talis, V. V. Vasilevskaya
Amphiphilic macromolecules grafted onto spherical nanoparticles can self-assemble into morphological structures corresponding to the family of complete embedded minimal surfaces. They arise situationally, can coexist and transform into each other.
The content of this RSS Feed (c) The Royal Society of Chemistry




eco

Random field reconstruction of three-phase polymer structures with anisotropy from 2D-small-angle scattering data

Soft Matter, 2024, 20,8493-8504
DOI: 10.1039/D4SM00721B, Paper
Open Access
Stephen Kronenberger, Nitant Gupta, Benjamin Gould, Colin Peterson, Arthi Jayaraman
We present a computational method to analyze 2D small-angle scattering data from three-phase soft materials systems with structural anisotropy and output representative real-space structures of the three phases.
The content of this RSS Feed (c) The Royal Society of Chemistry




eco

Shape memory and recovery mechanism in hard magnetic soft materials

Soft Matter, 2024, Advance Article
DOI: 10.1039/D4SM01165A, Paper
Rong Jia, Kai Tan, Qian Deng
Two parts are integrated to close a circle: shape memory and recovery of hard-magnetic soft materials (HMSMs).
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




eco

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




eco

Uniqlo turns three in the India market; launches second edition of its collaboration with Italian luxury fashion house Marni

Headquartered in Tokyo, the Japanese apparel brand focusses on technology and sustainability, and its latest collection of fleece jackets is made of recycled PET bottles



  • Life &amp; Style

eco

Editorial. TRAI rules can ring in better telecom service quality

The changes promise a better user experience, with faster load times for web pages and smoother live streams




eco

Editorial. Economics Nobel winners examine the role of institutions in growth

The three awardees regard social institutions as being less important than state institutions




eco

Editorial. Satcom can complement telecom services in remote areas

Tech advancements have made it possible for satcom players to offer seamless broadband connectivity directly to the users’ smartphones, bypassing traditional cell towers




eco

Record profits: PNB Q2 consolidated net zooms 137% at ₹4,714 crore

On a standalone basis, PNB’s net profit for the quarter under review increased 145 per cent to ₹4,303 crore (₹1,756 crore)



  • Money &amp; Banking

eco

FSIB recommends Ashok Chandra as MD and CEO of Punjab National Bank

Chandra is currently an Executive Director at Canara Bank.



  • Money &amp; Banking

eco

bl interview. After recognising MFI pain, profitability to improve in H2FY25: IDFC First Bank MD

Deposit to continue growing faster than credit in H2FY25



  • Money &amp; Banking