Guest User

Untitled

a guest
Nov 22nd, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. <table cellpadding="0" cellspacing="0">
  2. <tr>
  3. <td runat="server" width="680px" height="383px" id="vContainer">
  4. <div style="z-index: 1;" runat="server" id="cont">
  5. <div runat="server" style="background: rgba(200, 200, 200, 0.6) url('/images/Play.png') no-repeat center center;" id="img">
  6. </div>
  7. <video id="player" style="z-index: 1; border: 1px solid #000000;" width="100%" height="100% "
  8. title="" controls runat="server">
  9. <source runat="server" id="ffVideo" type="video/ogg" />
  10. <source runat="server" id="mp4Video" type="video/mp4" />
  11. </video>
  12. <embed id="playerOld" width="680px" height="383px" autostart="false" allowfullscreen="true"
  13. title="" style="display: none" type="application/mp4" runat="server" />
  14. </div>
  15. </td>
  16. </tr>
  17. </table
  18.  
  19. //assign video element to variable vid
  20. var vid = document.getElementById("player");
  21.  
  22. function videoTimeUpdate(e)
  23. {
  24. //set controls settings to controls,this make controls show everytime this event is triggered
  25. vid.setAttribute("controls","controls");
  26. }
  27.  
  28. //add event listener to video for timeupdate event
  29. vid.addEventListener('timeupdate', videoTimeUpdate, false);
  30.  
  31. video::-webkit-media-controls-panel {
  32. display: flex !important;
  33. opacity: 1 !important;
  34. }
Add Comment
Please, Sign In to add comment