Recorders.js 568 B

123456789101112131415161718192021222324
  1. var Recorders = function(){
  2. this.recorders = new Array();
  3. this.audios = new Array();
  4. }
  5. Recorders.prototype = {
  6. getLength : function(){
  7. return this.recorders.length;
  8. },
  9. getAudioByIndex : function(index){
  10. return this.audios[i];
  11. },
  12. getRecorderByIndex : function(index){
  13. return this.recorders[i];
  14. },
  15. addRecorders : function(recoder){
  16. this.recorders.push(recoder);
  17. var audio = new Audio();
  18. audio.controls = true;
  19. audio.autoplay = true;
  20. audio.style = 'display:none;';
  21. this.audios.push(audio);
  22. }
  23. }