Set currenttime on html5 audio player with link -


Does anyone have to click the link over time to set the current time property of html5 audio? How does YouTube do the same? Say I click on a link "3:10", it will change the currently running audio current at 3:10.

  & lt; Audio control loop class = "sound" & gt; & Lt; Source src = "../../ site / music / music 1.mp3" /> & Lt; Source src = "../../ site / music / music 2. og" /> & Lt; / Audio & gt; For this website, & lt; B & gt; & Lt; One & gt; 3: 10 & lt; / A & gt; & Lt; / B & gt; Half-century    

Simple, just use the property of currentTime Or tags

Notes:
- The current time is not set in second minutes, so 3:10 means the second is 190.
- You must provide an id for your audio / video example:

  & lt; Audio id = "myAud" control loop class = "" & gt; & Lt; A href = "#" onClick = "{myAud.currentTime = 190;}" & gt; Set Critam & lt; / A & gt;    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -