Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/videojs/video.js
/ functions
Functions
1,624 in github.com/videojs/video.js
⨍
Functions
1,624
◇
Types & classes
230
↓ 550 callers
Method
trigger
* Triggers an event on the plugin object and overrides * {@link module:evented~EventedMixin.trigger|EventedMixin.trigger}. * * @param {stri
src/js/plugin.js:265
↓ 538 callers
Method
dispose
()
test/unit/tech/tech.test.js:331
↓ 359 callers
Method
on
(type, fn)
src/js/component.js:155
↓ 265 callers
Method
el
* Get the `Component`s DOM element * * @return {Element} * The DOM element for this `Component`.
src/js/component.js:339
↓ 185 callers
Method
off
(type, fn)
src/js/component.js:170
↓ 158 callers
Method
hasClass
* Check if a component's element has a CSS class name. * * @param {string} classToCheck * CSS class name to check. * * @return {
src/js/component.js:956
↓ 134 callers
Function
createEl
* create an element * * @param {string} type - the element type * @param {object} attributes - attributes to add to the element * @return {objec
docs/legacy-docs/api/js/doc-script.js:139
↓ 115 callers
Method
setAttribute
* Set the value of an attribute on the `Component`'s element * * @param {string} attribute * Name of the attribute to set. * * @
src/js/component.js:1061
↓ 114 callers
Method
one
(type, fn)
src/js/component.js:185
↓ 102 callers
Function
videojs
* The `videojs()` function doubles as the main function for users to create a * {@link Player} instance as well as the main library namespace. * *
src/js/video.js:130
↓ 90 callers
Method
registerComponent
* Register a `Component` with `videojs` given the name and the component. * * > NOTE: {@link Tech}s should not be registered as a `Component`. {
src/js/component.js:1988
↓ 83 callers
Method
addClass
* Add a CSS class name to the `Component`s element. * * @param {...string} classesToAdd * One or more CSS class name to add.
src/js/component.js:966
↓ 80 callers
Method
$
* Find a single DOM element matching a `selector`. This can be within the `Component`s * `contentEl()` or another custom context. * * @param
src/js/component.js:920
↓ 78 callers
Method
error
* Set or get the current MediaError * * @fires Player#error * * @param {MediaError|string|number} [err] * A MediaError or a st
src/js/player.js:4234
↓ 78 callers
Method
textTracks
()
test/api/api.js:254
↓ 72 callers
Method
src
(src)
test/unit/tech/tech-faker.js:108
↓ 71 callers
Method
getAttribute
* Get the value of an attribute on the `Component`s element. * * @param {string} attribute * Name of the attribute to get the value fr
src/js/component.js:1046
↓ 67 callers
Method
getChild
* Returns the child `Component` with the given `name`. * * @param {string} name * The name of the child `Component` to get. * *
src/js/component.js:503
↓ 67 callers
Method
removeClass
* Remove a CSS class name from the `Component`s element. * * @param {...string} classesToRemove * One or more CSS class name to remove
src/js/component.js:976
↓ 67 callers
Function
validateSource
(player, expectedSources, event, srcOverrides = {})
test/unit/sourceset.test.js:31
↓ 66 callers
Function
done
(stream, er)
docs/legacy-docs/js/index.js:5078
↓ 56 callers
Function
addText
* creates a text node and adds it to an element * @param {object|node} el - the node (element) to add the text to * @param {string} str - the text t
docs/legacy-docs/api/js/doc-script.js:157
↓ 56 callers
Method
getComponent
* Get a `Component` based on the name it was registered with. * * @param {string} name * The Name of the component to get. * * @
src/js/component.js:2052
↓ 54 callers
Method
children
* Get an array of all child components * * @return {Array} * The children
src/js/component.js:477
↓ 50 callers
Method
addTrack
* Add a {@link Track} to the `TrackList` * * @param {Track} track * The audio, video, or text track to add to the list. * * @fir
src/js/tracks/track-list.js:51
↓ 50 callers
Method
createEl
()
test/unit/tech/tech-faker.js:26
↓ 49 callers
Function
evented
* Applies {@link module:evented~EventedMixin|EventedMixin} to a target object. * * @param {Object} target * The object to which to add eve
src/js/mixins/evented.js:476
↓ 49 callers
Method
localize
* Localize a string given the string in english. * * If tokens are provided, it'll try and run a simple token replacement on the provided string
src/js/component.js:400
↓ 46 callers
Method
duration
()
test/unit/tech/tech.test.js:562
↓ 46 callers
Function
filterSource
(src)
src/js/utils/filter-source.js:20
↓ 46 callers
Method
removeTrack
* Remove a {@link Track} from the `TrackList` * * @param {Track} rtrack * The audio, video, or text track to remove from the list.
src/js/tracks/track-list.js:109
↓ 45 callers
Method
addChild
* Add a child `Component` inside of this `Button`. * * @param {string|Component} child * The name or instance of a child to add. *
src/js/button.js:77
↓ 39 callers
Method
addRemoteTextTrack
* Create a remote {@link TextTrack} and an {@link HTMLTrackElement}. * * @param {Object} options * Options to pass to {@link HTMLTrack
src/js/player.js:4768
↓ 39 callers
Method
currentTime
()
test/unit/tech/tech-faker.js:92
↓ 37 callers
Method
addCue
* Add a cue to the internal list of cues. * * @param {TextTrack~Cue} cue * The cue to add to our internal list
src/js/tracks/text-track.js:394
↓ 37 callers
Function
isDefined
* tests for all the ways a variable might be undefined or not have a value * * @param {*} x - the variable to test * @return {Boolean} true if vari
docs/legacy-docs/api/js/doc-script.js:18
↓ 35 callers
Method
id
* Get this `Component`s ID * * @return {string} * The id of this `Component`
src/js/component.js:456
↓ 34 callers
Method
currentSource
* Returns the current source object. * * @return {Tech~SourceObject} * The current source object
src/js/player.js:3897
↓ 34 callers
Method
player
* Return the {@link Player} that the `Component` has attached to. * * @return {Player} * The player that this `Component` has attache
src/js/component.js:309
↓ 34 callers
Method
setTimeout
* Creates a function that runs after an `x` millisecond timeout. This function is a * wrapper around `window.setTimeout`. There are a few reasons t
src/js/component.js:1568
↓ 33 callers
Method
autoplay
()
test/unit/tech/tech-faker.js:130
↓ 31 callers
Method
audioOnlyMode
* Get the current audioOnlyMode state or set audioOnlyMode to true or false. * * Setting this to `true` will hide all player components except t
src/js/player.js:4634
↓ 31 callers
Method
techGet_
* Mediate attempt to call playback tech method * and return the value of the method called. * * @param {string} method * Tech metho
src/js/player.js:2340
↓ 30 callers
Method
currentTime
* Get or set the current time (in seconds) * * @param {number|string} [seconds] * The time to seek to in seconds * * @return {nu
src/js/player.js:2550
↓ 30 callers
Function
validateListenerCall
(call, thisValue, eventExpectation)
test/unit/mixins/evented.test.js:17
↓ 29 callers
Method
pendingSeekTime
* Getter and setter for pendingSeekTime. * Ensures the value is clamped between 0 and duration. * * @param {number|null} [time] - Optional. T
src/js/control-bar/progress-control/seek-bar.js:245
↓ 28 callers
Function
formatTime
(seconds, guide = seconds)
src/js/utils/time.js:235
↓ 28 callers
Method
start
* Starts the spatial navigation by adding a keydown event listener to the video container. * This method ensures that the event listener is added o
src/js/spatial-navigation.js:43
↓ 28 callers
Method
update
* Update the contents of the title bar component with new title and * description text. * * If both title and description are missing, the ti
src/js/title-bar.js:115
↓ 27 callers
Method
controlText
* Get or set the localized control text that will be used for accessibility. * * > NOTE: This will come from the internal `menuButton_` element.
src/js/menu/menu-button.js:233
↓ 27 callers
Function
createTimeRanges
(start, end)
src/js/utils/time.js:141
↓ 27 callers
Method
currentSources
* Returns all of the current source objects. * * @return {Tech~SourceObject[]} * The current source objects
src/js/player.js:3879
↓ 27 callers
Method
open
* Opens the modal. * * @fires ModalDialog#beforemodalopen * @fires ModalDialog#modalopen
src/js/modal-dialog.js:161
↓ 27 callers
Method
setIcon
* Overwrites the `setIcon` method from `Component`. * In this case, we want the icon to be appended to the menuButton. * * @param {string} na
src/js/menu/menu-button.js:174
↓ 27 callers
Method
techCall_
* Pass values to the playback tech * * @param {string} [method] * the method to call * * @param {Object} [arg] * the a
src/js/player.js:2305
↓ 25 callers
Method
get
()
src/js/tracks/track.js:80
↓ 25 callers
Method
handleKeyDown
* This gets called when a `Button` has focus and `keydown` is triggered via a key * press. * * @param {KeyboardEvent} event * The e
src/js/button.js:113
↓ 24 callers
Function
merge
(...sources)
src/js/utils/obj.js:126
↓ 23 callers
Method
focus
* Set focus on a {@link MenuItem} in the `Menu`. * * @param {Object|string} [item=0] * Index of child item set focus on.
src/js/menu/menu.js:260
↓ 23 callers
Method
removeAttribute
* Remove an attribute from the `Component`s element. * * @param {string} attribute * Name of the attribute to remove. * * @see [
src/js/component.js:1073
↓ 22 callers
Method
close
* Closes the modal, does nothing if the `ModalDialog` is * not open. * * @fires ModalDialog#beforemodalclose * @fires ModalDialog#modalclo
src/js/modal-dialog.js:237
↓ 22 callers
Method
isFullscreen
* Check if the player is in fullscreen mode or tell the player that it * is or is not in fullscreen mode. * * > NOTE: As of the latest HTML5
src/js/player.js:2940
↓ 22 callers
Method
language
* Set or get the player's language code. * * Changing the language will trigger * [languagechange]{@link Player#event:languagechange} * wh
src/js/player.js:4851
↓ 22 callers
Method
triggerReady
* Trigger all the ready listeners for this `Component`. * * @fires Component#ready
src/js/component.js:875
↓ 22 callers
Method
userActive
* Get/set if user is active * * @fires Player#useractive * @fires Player#userinactive * * @param {boolean} [bool] * - true if
src/js/player.js:4328
↓ 21 callers
Method
isInPictureInPicture
* Check if the player is in Picture-in-Picture mode or tell the player that it * is or is not in Picture-in-Picture mode. * * @param {boolea
src/js/player.js:3204
↓ 21 callers
Method
ready
* Bind a listener to the component's ready state. * Different from event listeners in that if the ready event has already happened * it will tri
src/js/component.js:851
↓ 21 callers
Method
removeChild
* This method will be called indirectly when the component has been added * before the component adds to the new menu instance by `addItem`. * I
src/js/menu/menu.js:86
↓ 21 callers
Function
toTitleCase
(string)
src/js/utils/str.js:32
↓ 20 callers
Method
currentHeight
* Get the computed height of the component's element. * * Uses `window.getComputedStyle`. * * @return {number} * The computed h
src/js/component.js:1290
↓ 20 callers
Method
debug
* Set debug mode to enable/disable logs at info level. * * @param {boolean} enabled * @fires Player#debugon * @fires Player#debugoff *
src/js/player.js:5318
↓ 20 callers
Method
duration
* Get the current duration of the HTML5 media element. * * @return {number} * The duration of the media or 0 if there is no duration.
src/js/tech/html5.js:577
↓ 20 callers
Method
registerPlugin
* Register a Video.js plugin. * * @param {string} name * The name of the plugin to be registered. Must be a string and *
src/js/plugin.js:346
↓ 20 callers
Method
requestNamedAnimationFrame
* Request an animation frame, but only one named animation * frame will be queued. Another will never be added until * the previous one finishes
src/js/component.js:1725
↓ 19 callers
Function
getSubArray
* get a subset of objects in array of objects * based on some property value * * @param {array} targetArray - array to search * @param {string} ob
docs/legacy-docs/api/js/doc-script.js:103
↓ 19 callers
Method
poster
()
test/unit/tech/tech-faker.js:35
↓ 19 callers
Function
sortArray
* sort an array of objects based on an object property * * @param {array} targetArray - array to sort * @param {string} objProperty - property whos
docs/legacy-docs/api/js/doc-script.js:119
↓ 19 callers
Method
width
* A getter/setter for the `Player`'s width. Returns the player's configured value. * To get the current width use `currentWidth()`. * * @para
src/js/player.js:923
↓ 18 callers
Function
checkOffset
(offset, ext, length)
docs/legacy-docs/js/index.js:960
↓ 18 callers
Function
mockKeyDownEvent
(key)
test/unit/player-user-actions.test.js:264
↓ 17 callers
Method
hide
* Hide the `Component`s element if it is currently showing by adding the * 'vjs-hidden` class name to it.
src/js/component.js:1007
↓ 17 callers
Method
play
()
test/unit/tech/tech-faker.js:142
↓ 16 callers
Function
findObjectInArray
* find index of an object in array of objects * based on some property value * generally useful for finding a unique object * * @param {array} tar
docs/legacy-docs/api/js/doc-script.js:63
↓ 16 callers
Method
paused
* Check if the player is paused or has yet to play * * @return {boolean} * - false: if the media is currently playing * -
src/js/player.js:2497
↓ 16 callers
Method
volume
()
test/unit/tech/tech-faker.js:121
↓ 15 callers
Method
audioPosterMode
* Get the current audioPosterMode state or set audioPosterMode to true or false * * @param {boolean} [value] * The value to set audio
src/js/player.js:4693
↓ 15 callers
Method
contentEl
* Return the `Component`s DOM element. This is where children get inserted. * This will usually be the the same as the element returned in {@link C
src/js/component.js:446
↓ 15 callers
Function
isObject
(arg)
docs/legacy-docs/js/index.js:2276
↓ 15 callers
Method
isTracking
* Whether live tracker is currently tracking or not.
src/js/live-tracker.js:352
↓ 15 callers
Method
muted
* Get the current muted state, or turn mute on or off * * @param {boolean} [muted] * - true to mute * - false to unmute *
src/js/player.js:2849
↓ 15 callers
Function
newTrack
(id)
test/unit/tracks/track-list.test.js:5
↓ 15 callers
Method
playbackRates
* Set or get current playback rates. * Takes an array and updates the playback rates menu with the new items. * Pass in an empty array to hide t
src/js/player.js:5348
↓ 15 callers
Method
reset
* Reset the player. Loads the first tech in the techOrder, * removes all the text tracks in the existing `tech`, * and calls `reset` on the `tec
src/js/player.js:3774
↓ 14 callers
Method
$$
* Finds all DOM element matching a `selector`. This can be within the `Component`s * `contentEl()` or another custom context. * * @param {str
src/js/component.js:942
↓ 14 callers
Function
checkInt
(buf, value, offset, ext, max, min)
docs/legacy-docs/js/index.js:1132
↓ 14 callers
Method
currentBreakpoint
* Get current breakpoint name, if any. * * @return {string} * If there is currently a breakpoint set, returns a the key from the *
src/js/player.js:5098
↓ 14 callers
Function
deprecateForMajor
(major, oldName, newName, fn)
src/js/utils/deprecate.js:46
↓ 14 callers
Function
escape
(value)
docs/legacy-docs/js/index.js:7505
↓ 14 callers
Method
height
* A getter/setter for the `Player`'s height. Returns the player's configured value. * To get the current height use `currentheight()`. * * @p
src/js/player.js:938
↓ 14 callers
Method
opened
* If the `ModalDialog` is currently open or closed. * * @param {boolean} [value] * If given, it will open (`true`) or close (`false`
src/js/modal-dialog.js:223
next →
1–100 of 1,624, ranked by callers