Wednesday, June 5, 2024
 Popular · Latest · Hot · Upcoming
51
rated 0 times [  53] [ 2]  / answers: 1 / hits: 27437  / 12 Years ago, wed, october 10, 2012, 12:00:00

I want to use either native JavaScript or jQuery to change the poster attribute on the HTML video tag. Any help would be greatly appreciated.



<div id=videoplayer class=video-player style=overflow: hidden; width: 582px; height: 326px; > 
<div id=myPlayer>
<video id=htmlFive width=100% height=100% controls= poster=undefined>
<source src=blank.m3u8>
</video>
</div>
</div>


Thank you!


More From » jquery

 Answers
2

To do it natively, just change the attribute:



document.getElementById('htmlFive').setAttribute('poster','newvalue');


[#82624] Tuesday, October 9, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jarrettw

Total Points: 300
Total Questions: 98
Total Answers: 103

Location: Saudi Arabia
Member since Mon, Sep 5, 2022
2 Years ago
;