record_audio.tpl 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <div class="alert alert-warning">
  2. <span class="fa fa-warning fa-fw" aria-hidden="true"></span> {{ 'WamiNeedFilename'|get_lang }}
  3. </div>
  4. <div id="record-audio-recordrtc" class="row text-center">
  5. <form>
  6. <div class="row">
  7. <div class="col-sm-4 col-sm-offset-4">
  8. <div class="form-group">
  9. <span class="fa fa-microphone fa-5x fa-fw" aria-hidden="true"></span>
  10. <span class="sr-only">{{ 'RecordAudio'|get_lang }}</span>
  11. </div>
  12. <div class="form-group">
  13. <input type="text" name="audio_title" id="audio-title-rtc" class="form-control" placeholder="{{ 'InputNameHere'|get_lang }}">
  14. </div>
  15. </div>
  16. </div>
  17. <div class="text-center">
  18. <div class="form-group">
  19. <button class="btn btn-primary" type="button" id="btn-start-record">
  20. <span class="fa fa-circle fa-fw" aria-hidden="true"></span> {{ 'StartRecordingAudio'|get_lang }}
  21. </button>
  22. <button class="btn btn-danger hidden" type="button" id="btn-stop-record" disabled>
  23. <span class="fa fa-square fa-fw" aria-hidden="true"></span> {{ 'StopRecordingAudio'|get_lang }}
  24. </button>
  25. <button class="btn btn-success hidden" type="button" id="btn-save-record"
  26. data-loadingtext="{{ 'Uploading'|get_lang }}" disabled>
  27. <span class="fa fa-send fa-fw" aria-hidden="true"></span> {{ 'SaveRecordedAudio'|get_lang }}
  28. </button>
  29. </div>
  30. <div class="form-group">
  31. <audio class="skip hidden center-block" controls id="record-preview"></audio>
  32. </div>
  33. </div>
  34. </form>
  35. </div>
  36. <div class="row" id="record-audio-wami">
  37. <div class="col-sm-3 col-sm-offset-3">
  38. <br>
  39. <form>
  40. <div class="form-group">
  41. <input type="text" name="audio_title" id="audio-title-wami" class="form-control" placeholder="{{ 'InputNameHere'|get_lang }}">
  42. </div>
  43. <div class="form-group text-center">
  44. <button class="btn btn-primary" type="button" id="btn-activate-wami">
  45. <span class="fa fa-check fa-fw" aria-hidden=""></span> {{ 'Activate'|get_lang }}
  46. </button>
  47. </div>
  48. </form>
  49. </div>
  50. <div class="col-sm-3">
  51. <div id="record-audio-wami-container" class="wami-container"></div>
  52. </div>
  53. </div>
  54. <script>
  55. $(document).on('ready', function () {
  56. RecordAudio.init(
  57. {
  58. blockId: '#record-audio-recordrtc',
  59. btnStartId: '#btn-start-record',
  60. btnPauseId: '#btn-pause-record',
  61. btnPlayId: '#btn-play-record',
  62. btnStopId: '#btn-stop-record',
  63. btnSaveId: '#btn-save-record',
  64. plyrPreviewId: '#record-preview',
  65. directory: '{{ directory }}',
  66. reload_page: 1,
  67. type: 'document'
  68. },
  69. {
  70. blockId: '#record-audio-wami',
  71. containerId: 'record-audio-wami-container',
  72. directory: '{{ directory }}',
  73. userId: {{ user_id }},
  74. type: 'document'
  75. },
  76. null
  77. );
  78. });
  79. </script>