- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我使用了链接上的代码来录制音频并上传到服务器。
我找到了一些上传进度条代码,但无法与此代码合并。
音频记录可能为30-40 mb,并且上传时间较长。
如何在下面添加此代码的上传状态?
https://blog.addpipe.com/using-recorder-js-to-capture-wav-audio-in-your-html5-web-site/
var upload = document.createElement('a');
upload.href="#";
upload.innerHTML = "Upload";
upload.addEventListener("click", function(event){
var xhr=new XMLHttpRequest();
xhr.onload=function(e) {
if(this.readyState === 4) {
console.log("Server returned: ",e.target.responseText);
}
};
var fd=new FormData();
fd.append("audio_data",blob, filename);
fd.append("filename",blob, 'audiofile');
xhr.open("POST","upload.php",true);
xhr.send(fd);
alert('Uploaded');
}) ```
最佳答案
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/upload
var xhr = new XMLHttpRequest();
xhr.upload.addEventListener('progress', function(event)
{
var progress = event.loaded / event.total * 100;
console.log('Progress: ' + progress);
});
关于php - PHP录制声音并使用progressbar上传php,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63424688/
我的应用程序中有一个 ProgressBar 小部件,无论我做什么,它总是显示为粗橙色(2.x 样式)而不是细蓝色(4.x 样式) . 项目构建目标设置为 Google API 4.0.3(API 级
private static ProgressDialog pDialog; pDialog = new ProgressDialog(activity); pDialog.setIndetermin
我试图让 TalkBack 阅读进度条上的进度,但运气不佳。关于如何获取该信息以便 TalkBack 可以说出来的任何想法。 谢谢 公共(public)类 MainActivity 扩展 Activi
进度条总是返回null public void calcola(View view) { final Dialog myDialog = new Dialog(this);
我正在尝试用选取框样式测试进度条,但没有成功 private void Form1_Load(object sender, EventArgs e) { Applica
我使用以下 Ruby 片段下载 a 8.9MB file . require 'open-uri' require 'net/http' require 'uri' def http_download
我为操作栏按钮尝试了两种不同的进度条样式,通过 refreshMenuItem.setActionView(R.layout.actionbar_indeterminate_progress); ac
每当我输入 fragment 时,我都会看到几秒钟的空白,然后 WebView 中的网页就会出现。 ProgressBar 好像没有显示。 这是我的 XML 文件,用于 WebView 和 Progr
我的包依赖于一个名为 progressbar 的包。有一个bug in progressbar 2.3导致Python>3.3安装失败,因此我安装了latest git repo from this
任何默认的 ProgressBar 都有一个 ClipDrawable 级别,例如,一个绿色的 Drawable 在我的设备上填充灰色背景,在其他设备上填充黄色。 我的问题:当进度小于最大值时,是否可
这是随意的原型(prototype)代码,因此我尝试了我认为应该有效的方法,如果没有,则在谷歌上搜索,然后在仔细阅读类似问题后在这里提问。 我的 Shell 中有以下标记看法:
要在执行查询时显示 ProgressBar,我使用以下代码: if not Query1.Prepared then Query1.Prepare; Query1.Open; ProgressBa
我有三个类,例如 View 、逻辑、 Controller 。 class View{ Progressbutton pb; void start animation(){
我正在用 C#/WPF(.Net 框架 4.0)编写一个应用程序。我遇到的一件事是如何在应用程序非常繁忙时更新控件(如果可能)。我想我只是在努力尝试我在网上找到的东西来让它工作(而且在极少数情况下它会
要在执行查询时显示 ProgressBar,我使用以下代码: if not Query1.Prepared then Query1.Prepare; Query1.Open; ProgressBa
已关闭。此问题不符合 Stack Overflow guidelines 。目前不接受答案。 这个问题似乎与 help center 中定义的范围内的编程无关。 已关闭 3 年前。 奥 git _a
我创建了一个 ping 程序来 ping 5 服务器。如何在进度运行时让进度条运行。当 ping 完成时,进度条将为 100% private void btnGetstatusActionPer
我想在流程完成后在 PrimeFaces 上隐藏一个进度条。我认为没有必要在不工作时显示进度条。 html代码:
我想添加JProgressBar,它将在下载文件的程序中填充。 第三个问题是如何使进度条在 setValue 中添加正确的金额(例如:当它下载最后一个文件时,JPB 将完成)。 请注意,要下载的文件数
给定一个变量 N,反射(reflect)秒数,我想要一个 jQueryUI Progressbar顺利地从空更新到反射(reflect)该时间段内的完成。 换句话说,我想要一个显示进度条的functi
我是一名优秀的程序员,十分优秀!