Turn audio into a shareable video. forked from nypublicradio/audiogram

index.html 4.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <title>Audiogram</title>
  5. <meta charset="utf-8" />
  6. <meta name="robots" content="noindex, nofollow" />
  7. <meta name="googlebot" content="noindex, nofollow" />
  8. <meta name="viewport" content="width=device-width, initial-scale=1">
  9. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
  10. <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,300,600" rel="stylesheet" type="text/css">
  11. <link href="/css/base.css" rel="stylesheet" type="text/css">
  12. <link href="/css/editor.css" rel="stylesheet" type="text/css">
  13. <link href="/fonts/fonts.css" rel="stylesheet" type="text/css">
  14. </head>
  15. <body class="loading">
  16. <div class="container">
  17. <h1>Audiogram</h1>
  18. <div>
  19. <a href="/theme">Go to theme editor</a>
  20. </div>
  21. <div id="loading">
  22. <div id="loading-bars">
  23. <div class="r1"></div><div class="r2"></div><div class="r3"></div><div class="r4"></div><div class="r5"></div>
  24. </div>
  25. <div id="loading-message">Loading...</div>
  26. </div><!-- #loading -->
  27. <div id="loaded">
  28. <div id="error"></div>
  29. <div class="row form-row" id="row-audio">
  30. <label for="input-audio">Audio</label>
  31. <input id="input-audio" name="audio" type="file" />
  32. </div>
  33. <div class="row form-row" id="row-subtitle">
  34. <label for="input-subtitle">Subtitles</label>
  35. <input id="input-subtitle" name="subtitle" type="file" />
  36. </div>
  37. <div class="row form-row" id="row-theme">
  38. <label for="input-theme">Theme</label>
  39. <select id="input-theme" name="theme"></select>
  40. </div>
  41. <div class="row form-row" id="row-caption">
  42. <label for="input-caption">
  43. Caption
  44. <div class="note">Add two spaces in a row to force a line break.</div>
  45. </label>
  46. <input id="input-caption" name="caption" type="text" autocomplete="off" placeholder="Add a caption" />
  47. </div>
  48. <div id="preview">
  49. <div>
  50. <div id="canvas">
  51. <canvas width="640" height="360"></canvas>
  52. <div id="preview-label">Preview</div>
  53. </div>
  54. </div>
  55. <div id="minimap" class="hidden">
  56. <svg width="640" height="80" xmlns="http://www.w3.org/2000/svg">
  57. <defs>
  58. <clipPath id="clip">
  59. <rect height="80" width="640" x="0" y="0"></rect>
  60. </clipPath>
  61. </defs>
  62. <g class="waveform background">
  63. <line x1="0" x2="640" y1="40" y2="40"></line>
  64. <path></path>
  65. </g>
  66. <g class="waveform foreground" clip-path="url(#clip)">
  67. <line x1="0" x2="640" y1="40" y2="40"></line>
  68. <path></path>
  69. </g>
  70. <g class="brush"></g>
  71. <g class="time">
  72. <line x1="0" x2="0" y1="0" y2="80"></line>
  73. </g>
  74. </svg>
  75. <div id="controls">
  76. <span id="tip">Click and drag over the waveform to clip audio<br />Use space bar to play/pause</span>
  77. <span id="duration"><strong></strong> seconds selected</span>
  78. <button id="play"><i class="fa fa-play"></i>Play</button>
  79. <button id="pause" class="hidden"><i class="fa fa-pause"></i>Pause</button>
  80. <button id="restart"><i class="fa fa-step-backward"></i>Restart</button>
  81. </div>
  82. </div>
  83. </div>
  84. <div id="audio">
  85. <audio controls>
  86. <source />
  87. </audio>
  88. </div>
  89. <div id="video">
  90. <video width="640" height="360" controls>
  91. <source type="video/mp4" />
  92. </video>
  93. </div>
  94. <div class="row" id="row-submit">
  95. <button type="button" id="return" class="left"><i class="fa fa-edit"></i>Return to editor</button>
  96. <button type="button" id="submit" class="right hidden"><i class="fa fa-cloud-upload"></i>Generate</button>
  97. <a id="download" class="button right" href="#" target="_blank"><i class="fa fa-download"></i>Download</a>
  98. <div class="clear"></div>
  99. </div>
  100. </div><!-- #loaded -->
  101. </div><!-- .container -->
  102. <script src="/js/bundle.js"></script>
  103. <!-- Force load custom fonts -->
  104. <script src="/fonts/fonts.js"></script>
  105. </body>
  106. </html>