Browse Source

Adds documentation.

j8
Boris Grozev 9 years ago
parent
commit
66a46fc580
1 changed files with 10 additions and 0 deletions
  1. 10
    0
      modules/UI/videolayout/SmallVideo.js

+ 10
- 0
modules/UI/videolayout/SmallVideo.js View File

@@ -329,6 +329,16 @@ SmallVideo.prototype.createModeratorIndicatorElement = function () {
329 329
     APP.translation.translateElement($('#' + this.videoSpanId + ' .focusindicator'));
330 330
 };
331 331
 
332
+/**
333
+ * This is an especially interesting function. A naive reader might think that
334
+ * it returns this SmallVideo's "video" element. But it is much more exciting.
335
+ * It first finds this video's parent element using jquery, then uses a utility
336
+ * from lib-jitsi-meet to extract the video element from it (with two more
337
+ * jquery calls), and finally uses jquery again to encapsulate the video element
338
+ * in an array. This last step allows (some might prefer "forces") users of
339
+ * this function to access the video element via the 0th element of the returned
340
+ * array (after checking its length of course!).
341
+ */
332 342
 SmallVideo.prototype.selectVideoElement = function () {
333 343
     return $(RTCUIHelper.findVideoElement($('#' + this.videoSpanId)[0]));
334 344
 };

Loading…
Cancel
Save