video.html 626 B

123456789101112131415
  1. <p>Video File Preview</p>
  2. <video src="{{preview_url}}" style="width:100%" volume="0" controls></video>
  3. <textarea id="embeddedCode" class="u-full-width" style="height: 100px;">
  4. </textarea>
  5. <script>
  6. document.getElementsByTagName('video')[0].volume = 0.2;
  7. //Render an embedded code for this video preview
  8. var port = window.location.port;
  9. if (port != ""){
  10. port = ":" + port;
  11. }
  12. $("#embeddedCode").text(`<video src="${location.protocol}//${window.location.hostname}${port}{{preview_url}}{{filename}}" style="width:560px; height: 340px; background-color: #000000;" controls></video>`);
  13. </script>