Skip to content

Commit

Permalink
Export bind on videojs. Fixes #2322
Browse files Browse the repository at this point in the history
  • Loading branch information
gkatsev committed Jul 9, 2015
1 parent 004b1e8 commit a63a28f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/js/video.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import globalOptions from './global-options.js';
import Player from './player';
import plugin from './plugins.js';
import mergeOptions from '../../src/js/utils/merge-options.js';
import * as Fn from './utils/fn.js';

import assign from 'object.assign';
import log from './utils/log.js';
Expand Down Expand Up @@ -243,6 +244,16 @@ videojs.extends = extendsFn;
*/
videojs.mergeOptions = mergeOptions;

/**
* Bind (a.k.a proxy or Context). A simple method for changing the context of a function
It also stores a unique id on the function so it can be easily removed from events
* @param {*} context The object to bind as scope
* @param {Function} fn The function to be bound to a scope
* @param {Number=} uid An optional unique ID for the function to be set
* @return {Function}
*/
videojs.bind = Fn.bind;

/**
* Create a Video.js player plugin
*
Expand Down

0 comments on commit a63a28f

Please sign in to comment.