From 51a10a8e1781f5bfe60d5567ca7806f30ab0b0e0 Mon Sep 17 00:00:00 2001 From: Steve Heffernan Date: Tue, 20 Jul 2010 13:39:50 -0700 Subject: [PATCH] Added addVideos function by nicholasbs --- video.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/video.js b/video.js index 03dce0d7c..43b29f3e3 100644 --- a/video.js +++ b/video.js @@ -768,6 +768,22 @@ VideoJS.setup = function(options){ } } +// Add video-js to the video tag or array of video tags (or IDs) passed in. +// Typically used when videos are being added to a page dynamically. +VideoJS.addVideos = function(videos, options) { + videos = videos instanceof Array ? videos : [videos]; + var videoTag; + for (var i=0; i