record_audio.tpl 2.8 KB

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