the solve of volume problem
来源:互联网 发布:看图软件apk 编辑:程序博客网 时间:2024/05/21 09:01
i finally solved this problem as follow :
this problem can be very well solved by using the <audio > label,
this is a test file.
<!DOCTYPE html><html><head><meta charset="utf-8" /><title> HTML5 input元素type=range </title></head><body><input id="range" type="range" min="1" max="100" value="5" onchange="change()" ><span id="value">5</span><br><br><br> <video style="float:left;" id="video1" preload="metadata" src="test1.mp3" height="300" autoplay="autoplay" controls="controls"> 你的浏览器不支持html5视频 </video><br><br><br><!-- <button id="upVolume" onclick="getVolume()" >音量+</button> <button id="downVolume">音量-</button> --><script type='text/javascript'>// var value = document.getElementById('range').value ;// var myVid=document.getElementById("video1");// function getVolume()// { // myVid.volume=change().value;// alert(myVid.volume);// } // var button=document.getElementById("upVolume"); // // var button=document.getElementById("upVolume").contentWindow.document.getElementById("clickindoc"); // button.onclick=function(){ // getvolume(); // // window.location.assign( "#gallery"); // // alert("you are being hacked!!!"); // } function change() { var value = document.getElementById('range').value ; document.getElementById('value').innerHTML= value; var getvalue=value; // alert(getvalue); myVid=document.getElementById("video1"); myVid.volume=getvalue/100; }// var $ = function(id){return document.getElementById(id);};// var _video = $("testVideo");//加大声音,每次加大1/10// upVolume : function(){// _video.volume += 0.1;// },// //减小声音,每次减小1/10// downVolume : function(){// _video.volume -= 0.1;// },// //绑定页面上各个按钮的事件// var btns = document.getElementsByTagName("button");// for(var i = 0 ;i < btns.length ; i++){// var el = btns[i];// el.onclick = self[el.id];// }</script></body></html>can play the music and the volume can be change by that processbar.
阅读全文
0 0
- the solve of volume problem
- Solve the problem of System.IO.FileLoadException
- 9 kinds of fruit Solve the problem of male genitals
- Solve the problem of "Java: illegal start of expression"
- [转] Strategy: Solve Only 80 Percent of the Problem
- Q.3.4 To solve the problem of hanoi
- How to solve the issue of RSARTE's starting problem
- solve the sdk rename problem
- ubuntu source for caffe reference to solve the problem of the LIB
- the study of volume change
- 解决线性规划的工具(the tool of solving linear programming problem):lp-solve
- What are some of the differences between using recursion to solve a problem versus using iteration?
- solve the problem of 'java web project cannot display verification code'
- method to solve the problem : Could not cast value of type 'NSManagedObject_ to
- solve the problem showing bash-3.2
- how to solve the problem we met?
- How to solve the Candy problem?
- BlueROV-16: Solve the initialization problem
- MongoDb 将 BsonDocument 集合 转换为强类型 List
- groovy之list和map方法
- 小程序点击获取循环列表中的内容
- 餐馆与UX中的用户引导
- CaffeOnSpark 安装笔记 可以正常运行
- the solve of volume problem
- 保留小数点后两位(必须是数字)
- sublime text3快捷键设置为eclipse差不多
- merge and rebase
- Java Map释放内存置null以及调用clear()的区别
- cypher实践之获取路径中name属性最短的那个节点
- chrome开发者工具使用技巧(看了定不让你失望)
- jhat:虚拟机堆转储快照分析工具
- Groovy集合(map)