GithubHelp home page GithubHelp logo

[Priority] Audios about thunderwave HOT 5 OPEN

danimesq avatar danimesq commented on July 17, 2024
[Priority] Audios

from thunderwave.

Comments (5)

AnthyG avatar AnthyG commented on July 17, 2024 1

There already is a ZeroFrame-API-point for localstorage. But yeah, maybe it could also support media capture.

from thunderwave.

AnthyG avatar AnthyG commented on July 17, 2024

Audio in general has been implemented with #99, but I will look into using Plyr as a player for the ThunderWave Beta.

So maybe change this to "Better Audio/Video player"?

from thunderwave.

danimesq avatar danimesq commented on July 17, 2024

@AnthyG there is a dedicated button for audio, where user can press and record a message?

from thunderwave.

AnthyG avatar AnthyG commented on July 17, 2024

I found these:
https://stackoverflow.com/questions/34820578/how-to-capture-audio-in-javascript
https://stackoverflow.com/questions/30909901/how-to-record-audio-from-audio-element-using-javascript/30910347
https://stackoverflow.com/questions/16413063/html5-record-audio-to-file/22420137

And this seems to work (from here: https://jsfiddle.net/sasivarunan/bv55z5fe/):

navigator.mediaDevices.getUserMedia({ audio: true })
	.then(stream => {
		rec = new MediaRecorder(stream);
		rec.ondataavailable = e => {
			audioChunks.push(e.data);
			if (rec.state == "inactive") {
                let blob = new Blob(audioChunks,{type:'audio/x-mpeg-3'});
                recordedAudio.src = URL.createObjectURL(blob);
                recordedAudio.controls=true;
                recordedAudio.autoplay=true;
                audioDownload.href = recordedAudio.src;
                audioDownload.download = 'mp3';
                audioDownload.innerHTML = 'download';
            }
		}
	})
    .catch(e=>console.log(e));
  
startRecord.onclick = e => {
    startRecord.disabled = true;
    stopRecord.disabled=false;
    audioChunks = [];
    rec.start();
}
stopRecord.onclick = e => {
    startRecord.disabled = false;
    stopRecord.disabled=true;
    rec.stop();
}

But as ZeroNet does not serve the zites with https (at least if I'm up to date), there is no way I will be able to get this working.

from thunderwave.

danimesq avatar danimesq commented on July 17, 2024

Also, iFrame blocks features such as LocalStorage.
Maybe ZeroFrame API can support media capture.

from thunderwave.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.