Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
164
rated 0 times [  169] [ 5]  / answers: 1 / hits: 21935  / 12 Years ago, thu, june 14, 2012, 12:00:00

The video player actually loads fine. My actual problem is when I refresh some parts of my page with AJAX and those parts contains a video player, the HTML5 player loads fine, but not the Video.js part that customizes it.



The video.js file is loaded in the header of the page. I have read the doc and can't find how to initialize a video player on a page that has already been loaded. Isn't there a myPlayer.initialize() kind of function I can call when my part of page containing the video is loaded to make the video player load correctly with Video.js?



I think the video.js file does it automatically only on page load.



Thanks for your precious help!


More From » html

 Answers
11

Yes, according to the docs you can do:



videojs(example_video_1, {}, function(){
// Player (this) is initialized and ready.
});


It's specifically to be used with dynamic content :)



Source: http://docs.videojs.com/docs/guides/setup.html (at the bottom)


[#84903] Wednesday, June 13, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
victorr

Total Points: 193
Total Questions: 86
Total Answers: 105

Location: Pitcairn Islands
Member since Thu, Jun 24, 2021
3 Years ago
victorr questions
Fri, Nov 13, 20, 00:00, 4 Years ago
Sat, Jul 25, 20, 00:00, 4 Years ago
Thu, Jun 11, 20, 00:00, 4 Years ago
;