admin管理员组

文章数量:1333729

I am starting off on HTML5 and javascript and I have a basic doubt about video.js regarding the relation between HTML5 player/html "video" tag and video.js and the purpose of video.js. My specific questions are:

  1. Does video.js internally uses the HTML5 native player or does it create and use its own player?

If yes then:

a. Is there any other reason in using Video.js apart from the better look and feel and controls it provides. I understand that there are plugins available for video.js which have addition functionalities like playing HLS and DASH video etc, but here I am talking about the core video.js module.

b. Is it necessary to use the HTML5 player or it can be changed to use a custom player inside video.js

If answer to Q1 is no then:

a. If video.js is using its own player, then why does it even need a "video" tag in the HTML file for it to create and use its own player. This seems to indicate that there is some relation between the video.js and the HTML5 player.

b. Also I see that the constructor for the video.js seems to be called only when the "video" tag is parsed/loaded in the html file and not when the javascript file in included in the "head" section of the html. So what/how/who creates the mapping(if any) between the "video" element of HTML and video.js getting initialized.

I am starting off on HTML5 and javascript and I have a basic doubt about video.js regarding the relation between HTML5 player/html "video" tag and video.js and the purpose of video.js. My specific questions are:

  1. Does video.js internally uses the HTML5 native player or does it create and use its own player?

If yes then:

a. Is there any other reason in using Video.js apart from the better look and feel and controls it provides. I understand that there are plugins available for video.js which have addition functionalities like playing HLS and DASH video etc, but here I am talking about the core video.js module.

b. Is it necessary to use the HTML5 player or it can be changed to use a custom player inside video.js

If answer to Q1 is no then:

a. If video.js is using its own player, then why does it even need a "video" tag in the HTML file for it to create and use its own player. This seems to indicate that there is some relation between the video.js and the HTML5 player.

b. Also I see that the constructor for the video.js seems to be called only when the "video" tag is parsed/loaded in the html file and not when the javascript file in included in the "head" section of the html. So what/how/who creates the mapping(if any) between the "video" element of HTML and video.js getting initialized.

Share Improve this question edited May 13, 2016 at 17:05 Archit Sinha asked May 13, 2016 at 17:02 Archit SinhaArchit Sinha 7851 gold badge11 silver badges33 bronze badges 2
  • 1 Have you read the video.js "about" section? It's a pretty good summary. stackoverflow./tags/video.js/info – Matt Ball Commented May 13, 2016 at 17:09
  • Thanks. That was helpful. Should have checked it before – Archit Sinha Commented May 16, 2016 at 14:46
Add a ment  | 

1 Answer 1

Reset to default 8

video.js it's checking if the browser supports the HTML5 in case it doesn't then it will run a flash player. Basically it provides you with browser patibility.

本文标签: javascriptRelation between html5 video player and video jsStack Overflow