Video.js is an awesome free HTML5 video player, built with Javascript and CSS that helps codec detection and will fall back on Flash if it is not supported. It uses the new element of HTML – video tag that is built into modern browsers and javascript to add custom controls, new functionality, and fix cross browser bugs. Boolean indicating whether the HTML5 tech currently supports the media element moving in the DOM. IOS breaks if you move the media element, so this is set.
Hi i am trying to dynamically set some of the contents of an html5 body with var strings defined in a JS.
below is what i have written so far and it doesnt seem to display the value specified.
i am trying to insert John Smith inside the 'Your Name: text.
Thanks
jonneyjonney6,93841 gold badges101 silver badges176 bronze badges
5 Answers
You should either give the VAR-Tag itself or it's wrapping LI-Tag an unique ID.
And by the way:
You shouldn't nest a Heading inside of a Paragraph, this doesn't make any sense.Paragraphs are INLINE while Headings are BLOCKELEMENTS.
Check out this FIDDLE
dschudschu2,5923 gold badges20 silver badges37 bronze badges
You will have to use JavaScript to 'print' the contents of a variable, to the HTML-source. Here's an example:
But since you're using jQuery, you could do this as well:
EricEric15k2 gold badges26 silver badges37 bronze badges
You probably want something like below. Have global JS variables assigned, reference them with a VAR html5 tag, use JS at the end of body (or after DOM load) to substitute the keys in the VAR tags with the values held in the global VARS object.
Louis RicciLouis Ricci17k4 gold badges37 silver badges57 bronze badges
The tag isn't supposed to be used this wayTry this:
Edit: just to clarify one thing. The tag isn't supposed to be used to hold the place to the value of a variable. It's correct semantic meaning is more to represent a mathematical variable or a programming variable when you are showing some code on your page. If I'm wrong here, please someone correct me.
Rafael EyngRafael Eyng2,9541 gold badge24 silver badges32 bronze badges
try this
Add some classes on your divs, to easuly select the good tags
useruser
Not the answer you're looking for? Browse other questions tagged javascriptjqueryhtml5 or ask your own question.
Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upHave a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
commented Oct 19, 2012
Have not changed this part of my setup, but now the flowplayer watermark appears on the HTML5 version (does not appear if Flash is forced). |
commented Oct 20, 2012
Any chance to see your page? |
commented Oct 20, 2012
Unfortunately no, it's an application for a client of ours that is private. What happens is that the flowplayer logo appears briefly, then disappears everytime you mouse into the video area. |
commented Oct 20, 2012
What is your username at flowplayer.org? I could check the domain / key combo and check those issues. |
commented Oct 20, 2012
My username is: [email protected] Just to re-iterate, the only thing I changed between v5.0 and v5.1 was to add the tag to explicitly specify video type MP4 for IE8 compatibility (see issue #52). I had no logo issues in v5.0. |
commented Oct 21, 2012
I used the latest version: And following HTML layout and commercial key Then I set the domain from your account to /etc/hosts and the watermark was gone. |
commented Oct 21, 2012
It's happening consistently for me, using the 5.1.1 version. The flowplayer logo appears for the first 10 seconds of the video if the mouse is over the video, then after that the logo appears for less than a second and disappears on every subsequent mouse in. Happens on Chrome and Safari. UPDATE: the logo does not appear if I use the URL you pasted above for the flow player js. It does appear if I point to my own js. Strange! |
commented Oct 21, 2012
What?? Please download the same file to your own server and try from there. |
commented Oct 21, 2012
You can also run a diff command against those files to see if there are any differences. |
commented Oct 21, 2012
That was the problem; the flowplayer.min.js contained in http://releases.flowplayer.org/5.1.1/flowplayer-5.1.1.zip is NOT the same as http://releases.flowplayer.org/5.1.1/commercial/flowplayer.min.js. Once I uploaded the the file from the last url to my own server, problem was solved. |
commented Oct 21, 2012
@humancyborg - The commercial version of the flowplayer zip file is available here: http://releases.flowplayer.org/5.1.1/commercial/flowplayer.commercial-5.1.1.zip. You can also find the link to the zip file in your account page. |
commented Oct 21, 2012
Thank you. I had no idea that the commercial package was different! |
commented Nov 20, 2012
The commercial build is different? Why is this not in the docs? |
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment