Link to home
Start Free TrialLog in
Avatar of thuhue
thuhue

asked on

How to add video player on an HTML Page?

How can we add video player on an HTML Page? Please provide simplest solution.
ASKER CERTIFIED SOLUTION
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The control attribute adds video controls, like play, pause, and volume.

It is also a good idea to always include width and height attributes. If height and width are set, the space required for the video is reserved when the page is loaded. However, without these attributes, the browser does not know the size of the video, and cannot reserve the appropriate space to it. The effect will be that the page layout will change during loading (while the video loads).

You should also insert text content between the <video> and </video> tags for browsers that do not support the <video> element.

The <video> element allows multiple <source> elements. <source> elements can link to different video files. The browser will use the first recognized format.
Avatar of thuhue
thuhue

ASKER

Let's say you have a video already uploaded to YouTube.
How would you embed it in your html page?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of thuhue

ASKER

As I test the above in VS 2012, I get the following error:

Exception was thrown at line 82, column 191 in http://imasdk.googleapis.com/js/sdkloader/lidar.js

0x80070005 - JavaScript runtime error: Access is denied.

If there is a handler for this exception, the program may be safely continued.
What is that js file from?
Avatar of thuhue

ASKER

See second line in my last post
Well, I asked what the js file is used for.  I can clearly see you show an exception thrown.

It  looks like that has something to do with google adwords.  Since your question here is about video, temporarily remove that js file and let's work on your video solution.

I found this http://googleadsdeveloper.blogspot.com/2014/05/ima-sdk-moving-off-of-s02mdnnet.html that makes me think it is for ads.