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

index.html 3.9KB

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