Comparar commits
296 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| 6958643678 | |||
| d55227668c | |||
| ce18a9af74 | |||
| a70b9e4957 | |||
| 38f1024ad3 | |||
| 6093d35b4c | |||
| 330aed03c6 | |||
| f27bdd27ca | |||
| 4199c3e5a9 | |||
| fdb34f3179 | |||
| f5117ae976 | |||
| 4b818d9ebf | |||
| b8cc047a2e | |||
| 906de96632 | |||
| d0a918404f | |||
| a35da3e995 | |||
| d63912dd35 | |||
| 1369e17dc9 | |||
| af02d158da | |||
| a6019d4207 | |||
| b848fd736d | |||
| b619404069 | |||
| 5e82f52a17 | |||
| 4711895d43 | |||
| 375cc1ecf9 | |||
| 0b75b0f843 | |||
| 2e3d2417fb | |||
| 33f7805c2b | |||
| 5e70bef2ab | |||
| 064ab1166b | |||
| 85730d7a1b | |||
| 18b6d25bc7 | |||
| 8273809a18 | |||
| 9bfe3fe5ae | |||
| ce97c24d79 | |||
| 9b7882e395 | |||
| 6c4eac47a0 | |||
| 13f154d4d6 | |||
| e526c9335d | |||
| 61aee3376b | |||
| 27d32d52c9 | |||
| ba7871dc5d | |||
| 675856aaf6 | |||
| 6040a61498 | |||
| 64f3b7774c | |||
| f47bf26e49 | |||
| e0a124890b | |||
| 585befce81 | |||
| d93bea98d7 | |||
| fd181aa9cd | |||
| 2a71d69c72 | |||
| c0518a1ff0 | |||
| bb52851aa4 | |||
| f53583e275 | |||
| a2710b60f1 | |||
| 2b57ada7df | |||
| d43831d6d0 | |||
| 72cb71c3a5 | |||
| ded72386ca | |||
| 757c592b4a | |||
| 737b989d5e | |||
| ae04900c54 | |||
| 518614ca57 | |||
| 0ef6b4af73 | |||
| ca1fdbb238 | |||
| 53d690c212 | |||
| 186ead6b10 | |||
| 4b64a92a2d | |||
| b65f2da65e | |||
| ee7c962494 | |||
| 05c18b7049 | |||
| 53ea60cd06 | |||
| cc5b2b838e | |||
| 25044e34b0 | |||
| 2219cd0f01 | |||
| 9dc4ed29f2 | |||
| 18965bb8d7 | |||
| 3a1239df1e | |||
| 49197e4f0e | |||
| 08da4c889f | |||
| 1ff1d76a8c | |||
| 5abff360cc | |||
| 18be3ef9ac | |||
| 864432d7d3 | |||
| 6c2efbf999 | |||
| eec1fc13fe | |||
| 54b175d988 | |||
| b9181ee55b | |||
| d385f8257f | |||
| 0ac8bcd389 | |||
| 88f59d7ad6 | |||
| 1c84f37fa0 | |||
| 7d4b26625f | |||
| 7ead5f708f | |||
| 16640274d7 | |||
| 5f7ae5a7ba | |||
| f3925c7364 | |||
| c90d7d36f6 | |||
| 6f069b765c | |||
| a6fa0dcc80 | |||
| e72d682028 | |||
| 599217f158 | |||
| e60f2eef5c | |||
| 7caa2fc1a7 | |||
| c0f91674e4 | |||
| e6897b6219 | |||
| 65e4b9f167 | |||
| 011861bbdb | |||
| df1944e9ff | |||
| 1aabc440b6 | |||
| c5bd01160a | |||
| 82aa55795e | |||
| 7c27add29d | |||
| 11b592ae01 | |||
| a582c833e3 | |||
| c4b4ebea4a | |||
| 1f33546f90 | |||
| 521f0eb941 | |||
| 22aa758067 | |||
| 537ae2b805 | |||
| fc0d37daec | |||
| 2a9f1cdaac | |||
| 87e25dd38e | |||
| 16321d6208 | |||
| 34a8d64c04 | |||
| 58c081f154 | |||
| 68ad48d8e8 | |||
| 49f58e0bbd | |||
| f716807852 | |||
| 6d65871cb0 | |||
| 055d81dc3a | |||
| 760eb308db | |||
| 03059c17d8 | |||
| 5ee97ea9a1 | |||
| 5761ab33bd | |||
| c19a3f3f48 | |||
| a888108e2c | |||
| a1eb8dd975 | |||
| 21f2d3c150 | |||
| dd0c7efa60 | |||
| ec61386f47 | |||
| 98edeccb3f | |||
| 342bdce748 | |||
| 7baa40220f | |||
| aaab1500c8 | |||
| 487c05628c | |||
| dfdbdbc9bb | |||
| f037818656 | |||
| f4ce62d4b1 | |||
| 0b4737d209 | |||
| 3cfbf94245 | |||
| e4a0d264d6 | |||
| 7f4e6eb432 | |||
| 692a0e9c09 | |||
| a7d6c350e7 | |||
| 9e34570c0f | |||
| c529f0898d | |||
| 3bf4afc831 | |||
| f3d7196a73 | |||
| 7ea1d8f544 | |||
| 6b612d8cdc | |||
| e4fbf27358 | |||
| 0af41818e0 | |||
| 1ffea6ce07 | |||
| bf8b62cc81 | |||
| f32ec15344 | |||
| 949bfa2d39 | |||
| bae224e4c4 | |||
| 64564c0dcd | |||
| 003c5ef38d | |||
| 7dc919c89e | |||
| 52667554dc | |||
| a0d8db9ed1 | |||
| d64205de79 | |||
| 527a33a252 | |||
| b3bbb17dd4 | |||
| 403afcf57d | |||
| 3c4c5a5aee | |||
| cfb688983b | |||
| bcf3f34dde | |||
| 4c42446d44 | |||
| 2619593691 | |||
| fa5116ffe7 | |||
| 49eeb600fd | |||
| 39fe83e1c0 | |||
| 8b5eb5089f | |||
| fa75d61cf8 | |||
| c5fb952935 | |||
| f00f354ab9 | |||
| 8afc2f919b | |||
| b2fbc8059b | |||
| 6921b552ef | |||
| aaa88c70f2 | |||
| 3da12eba29 | |||
| 14c64f197f | |||
| d10977ebf3 | |||
| f69881c276 | |||
| 116681771b | |||
| 11524ca2c3 | |||
| 624bf16070 | |||
| 0ddc344e76 | |||
| 781b4e59f5 | |||
| 0bc7ca0954 | |||
| 0ce57ae149 | |||
| f6ab92977e | |||
| 707d0e7660 | |||
| 951370dec9 | |||
| 5ef0da4ac6 | |||
| ae90526f2c | |||
| 540e7f0cb7 | |||
| cab595a5dd | |||
| 9217d5c2e7 | |||
| 34ad720626 | |||
| 97c7e4c759 | |||
| 738fa73949 | |||
| d3e03accce | |||
| edd2e11486 | |||
| 2466c76a57 | |||
| c794aeca34 | |||
| e17dd2c68d | |||
| 472988df58 | |||
| 6789c921f5 | |||
| b1c3bd4f84 | |||
| f6ba25ddf6 | |||
| 02949f5b91 | |||
| bb93a18ca8 | |||
| 3352346a74 | |||
| a97a002ed6 | |||
| fa635f835f | |||
| 2af481e0ec | |||
| 7debdea507 | |||
| a77e39f342 | |||
| da19fa3ead | |||
| d6d3dd1d4d | |||
| 926ccac6a7 | |||
| bdc89a0b24 | |||
| 392cbda095 | |||
| d5372545a2 | |||
| 813f28fb4d | |||
| 1378f566ab | |||
| ab520e9dd7 | |||
| 14ecc2fc89 | |||
| bdf6c54dbc | |||
| c0451fa674 | |||
| 5812d64154 | |||
| 3b60b9decd | |||
| b65eb0e5f3 | |||
| c9b1217e10 | |||
| 9e8a31065e | |||
| d24a9b48ac | |||
| 80147f0054 | |||
| fe6946d451 | |||
| b66ef806e5 | |||
| fc4d00c658 | |||
| 1448638285 | |||
| 0ee79afdfe | |||
| 8a05aa11a1 | |||
| 155781058e | |||
| 595a6131c1 | |||
| bb50466733 | |||
| 91aa06fe56 | |||
| 95173ebf7c | |||
| 6d78c95bb4 | |||
| 6116e3c3da | |||
| b2f6175a7b | |||
| 3720a2de12 | |||
| 39ae5178ee | |||
| e77f8c95d3 | |||
| 61a919d529 | |||
| 9d311640b1 | |||
| 17cb669047 | |||
| 71c0a72717 | |||
| aedaa17e3c | |||
| e3e836f41e | |||
| 7aeb288848 | |||
| 5edc3a5cbc | |||
| 3f9a2ca35b | |||
| 9a2bee9abf | |||
| d01de49ded | |||
| 1744d64142 | |||
| 956f3e03eb | |||
| 23ab370ab6 | |||
| bd66416b75 | |||
| 6bb92282c3 | |||
| f3ab261d5b | |||
| 38c394fc90 | |||
| a97bb5f74b | |||
| 4d05b6febb | |||
| 3189ec1a0b | |||
| b8f525cb81 | |||
| 46aa551e1e | |||
| 97c1f83dc7 | |||
| 0c3fb04acb | |||
| bad5130c8f | |||
| 8dfe0a4d06 | |||
| 047bd8f618 |
@@ -1,21 +0,0 @@
|
||||
/*
|
||||
Bunyip is a tool for multi-browser/device testing
|
||||
https://github.com/ryanseddon/bunyip
|
||||
It uses a few service under the hood including:
|
||||
Browsertack - http://browserstack.com
|
||||
Pagekite https://pagekite.net
|
||||
You'll need accounts at both to use bunyip
|
||||
You'll also need to download and install pagekite.py
|
||||
*/
|
||||
var config = {
|
||||
"browserstack": {
|
||||
"username": "your-browserstack-email@example.com",
|
||||
"password": "your browserstack password",
|
||||
"timeout": 300
|
||||
},
|
||||
"port": 9000,
|
||||
"tunnellink": "your-subdomain.pagekite.me",
|
||||
"tunnel": "pagekite.py <port> your-subdomain.pagekite.me"
|
||||
};
|
||||
|
||||
module.exports = config;
|
||||
@@ -15,9 +15,6 @@ npm-debug.log
|
||||
sandbox/*
|
||||
!sandbox/*.example
|
||||
|
||||
# ignore any Karma conf.js files in the test/ directory
|
||||
test/*.conf.js
|
||||
|
||||
*.swp
|
||||
*.swo
|
||||
|
||||
|
||||
@@ -22,8 +22,10 @@
|
||||
"define",
|
||||
"module",
|
||||
"exports",
|
||||
"process",
|
||||
|
||||
"PlayerTest",
|
||||
"TestHelpers",
|
||||
"asyncTest",
|
||||
"deepEqual",
|
||||
"equal",
|
||||
|
||||
+13
-1
@@ -1,3 +1,15 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- 0.8
|
||||
- 0.10
|
||||
before_script:
|
||||
- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then curl https://gist.githubusercontent.com/santiycr/5139565/raw/sauce_connect_setup.sh | bash; fi
|
||||
notifications:
|
||||
irc:
|
||||
channels:
|
||||
- "chat.freenode.net#videojs"
|
||||
use_notice: true
|
||||
on_success: never
|
||||
env:
|
||||
global:
|
||||
- secure: K6JpKwMkfNaJix3Bb0tLjVMzHMJgtBXdd/dvfw1BMb9DCBpd81PqXbDs7yXCddUxnUPTBPxZCrQgWsw71Wn+qEoIG5MU3uOT5A2rBbx/yZonVAGv5ed/9w0xk0OzO383CmPMFqwqtp9YmdmqGjQBkYXVXJjTvNTOAExFSdhO+3U=
|
||||
- secure: GIbhjUJapvC70nIZVlhVyK+3KAD2TVKpiY/q412OO7V2izbvcM1tvU3LBoMZbROzrt5TT84tCoJDvHnrpL0OvxPwrzL5CUU7h4UTxhTOyQkEinbYAnWlW9wdrvtdczsEvANkFPqBZ53B3hVHZHMLOG8QRWaTBicF68vSHEJFqb4=
|
||||
|
||||
+127
-2
@@ -2,6 +2,124 @@ CHANGELOG
|
||||
=========
|
||||
|
||||
## HEAD (Unreleased)
|
||||
_(none)_
|
||||
|
||||
--------------------
|
||||
|
||||
## 4.10.0 (2014-10-28)
|
||||
* @aptx4869 fixed an issue where the native JSON parser wasn't used ([view](https://github.com/videojs/video.js/pull/1565))
|
||||
* @andekande improved the German translation ([view](https://github.com/videojs/video.js/pull/1555))
|
||||
* @OlehTsvirko added a Ukrainian translation ([view](https://github.com/videojs/video.js/pull/1562))
|
||||
* @OlehTsvirko added a Russian translation ([view](https://github.com/videojs/video.js/pull/1563))
|
||||
* @thijstriemstra added a Dutch translation ([view](https://github.com/videojs/video.js/pull/1566))
|
||||
* @heff updated the poster to use CSS styles to display; fixed the poster not showing if not originally set ([view](https://github.com/videojs/video.js/pull/1568))
|
||||
* @mmcc fixed an issue where errors on source tags could get missed ([view](https://github.com/videojs/video.js/pull/1575))
|
||||
* @heff enhanced the event listener API to allow for auto-cleanup of listeners on other componenets and elements ([view](https://github.com/videojs/video.js/pull/1588))
|
||||
* @mmcc fixed an issue with the VolumeButton assuming it was vertical by default ([view](https://github.com/videojs/video.js/pull/1592))
|
||||
* @DevGavin added a Simplified Chinese translation ([view](https://github.com/videojs/video.js/pull/1593))
|
||||
* @heff Added the ability to set options for child components directly in the parent options ([view](https://github.com/videojs/video.js/pull/1599))
|
||||
* @heff turned on the custom html controls for touch devices ([view](https://github.com/videojs/video.js/pull/1617))
|
||||
|
||||
## 4.9.1 (2014-10-15)
|
||||
* Bumped to videojs-swf v4.5.1 to fix a data sanitization issue ([view](https://github.com/videojs/video.js/pull/1587))
|
||||
|
||||
## 4.9.0 (2014-09-30)
|
||||
* @deedos added a Brazilian Portuguese translation ([view](https://github.com/videojs/video.js/pull/1520))
|
||||
* @baloneysandwiches added a hasClass method ([view](https://github.com/videojs/video.js/pull/1464))
|
||||
* @mynameisstephen fixed an issue where slider event listeners were not being cleaned up ([view](https://github.com/videojs/video.js/pull/1475))
|
||||
* @alexrqs cleaned up the Spanish translation ([view](https://github.com/videojs/video.js/pull/1494))
|
||||
* @t2y added a Japanese translation ([view](https://github.com/videojs/video.js/pull/1497))
|
||||
* @chikathreesix fixed an issue where data-setup options could be missed ([view](https://github.com/videojs/video.js/pull/1514))
|
||||
* @seniorflexdeveloper added new translations and translation updates ([view](https://github.com/videojs/video.js/pull/1530))
|
||||
* @chikathreesix exported the videojs.Flash.embed method ([view](https://github.com/videojs/video.js/pull/1533))
|
||||
* @doublex fixed an issue with IE7 backwards compatibility ([view](https://github.com/videojs/video.js/pull/1542))
|
||||
* @mmcc made it possible to override the font-size of captions and subtitles ([view](https://github.com/videojs/video.js/pull/1547))
|
||||
* @philipgiuliani added an Italian translation ([view](https://github.com/videojs/video.js/pull/1550))
|
||||
* @twentyrogersc fixed the return value when setting the poster source ([view](https://github.com/videojs/video.js/pull/1552))
|
||||
* @heff updated to swf v4.5.0 to fix event issues ([view](https://github.com/videojs/video.js/pull/1554))
|
||||
* @rpless made the VolumeMenuButton volume more accesible via tab navigation ([view](https://github.com/videojs/video.js/pull/1519))
|
||||
* @mmcc added support for audio tags (html5 audio only) ([view](https://github.com/videojs/video.js/pull/1540))
|
||||
|
||||
## 4.8.5 (2014-09-25)
|
||||
* Updated to the latest version of the swf to fix HLS playback ([view](https://github.com/videojs/video.js/pull/1538))
|
||||
|
||||
## 4.8.4 (2014-09-23)
|
||||
* @gkatsev fixed isFullscreen reporting on iOS devices ([view](https://github.com/videojs/video.js/pull/1511))
|
||||
|
||||
## 4.8.3 (2014-09-22)
|
||||
* @heff updated to the latest version of the SWF to 4.4.4 ([view](https://github.com/videojs/video.js/pull/1526))
|
||||
|
||||
## 4.8.2 (2014-09-16)
|
||||
* @gkatsev fixed an IE11 bug where pause was not fired when the video ends ([view](https://github.com/videojs/video.js/pull/1512))
|
||||
|
||||
## 4.8.1 (2014-09-05)
|
||||
* @dmlap fixed an issue where an error could be fired after player disposal ([view](https://github.com/videojs/video.js/pull/1481))
|
||||
* @dmlap fixed poster error handling ([view](https://github.com/videojs/video.js/pull/1482))
|
||||
* @dmlap fixed an issue with languages and subclassing the player ([view](https://github.com/videojs/video.js/pull/1483))
|
||||
* @mmcc fixed a few CSS issues with the poster and the error 'X' ([view](https://github.com/videojs/video.js/pull/1487))
|
||||
* @MrVaykadji and @Calinou added a french translation ([view](https://github.com/videojs/video.js/pull/1467))
|
||||
* @heff fixed an internal deprecation warning and missing deprecated functions ([view](https://github.com/videojs/video.js/pull/1488))
|
||||
|
||||
## 4.8.0 (2014-09-03)
|
||||
* @andekande added a German translation ([view](https://github.com/videojs/video.js/pull/1426))
|
||||
* @mattosborn fixed a bug where getting the video element src would overwrite it ([view](https://github.com/videojs/video.js/pull/1430))
|
||||
* @songpete fixed a bug where keyboard events were bubbling and causing additional actions ([view](https://github.com/videojs/video.js/pull/1455))
|
||||
* @knabar made the inactivity timeout configurable ([view](https://github.com/videojs/video.js/pull/1409))
|
||||
* @seniorflexdeveloper added language files to the distribution for including specific languages ([view](https://github.com/videojs/video.js/pull/1453))
|
||||
* @gkatsev improved handling of null and NaN dimension values ([view](https://github.com/videojs/video.js/pull/1449))
|
||||
* @gkatsev fixed an issue where the controls would break if Flash was initialized too quickly ([view](https://github.com/videojs/video.js/pull/1470))
|
||||
* @mmcc fixed an issue where if no playback tech was supported the error could not be caught ([view](https://github.com/videojs/video.js/pull/1473))
|
||||
|
||||
## 4.7.3 (2014-08-20)
|
||||
* Added function for adding new language translations, updated docs, and fixed the notSupportedMessage translation ([view](https://github.com/videojs/video.js/pull/1427))
|
||||
* Exposed the player.selectSource method to allow overriding the source selection order ([view](https://github.com/videojs/video.js/pull/1424))
|
||||
|
||||
## 4.7.2 (2014-08-14)
|
||||
* Fixed a case where timeupdate events were not firing, and fixed and issue with the Flash player version ([view](https://github.com/videojs/video.js/pull/1417))
|
||||
|
||||
## 4.7.1 (2014-08-06)
|
||||
* Fixed the broken bower.json config ([view](https://github.com/videojs/video.js/pull/1401))
|
||||
|
||||
## 4.7.0 (2014-08-05)
|
||||
* Added cross-browser isArray for cross-frame support. fixes #1195 ([view](https://github.com/videojs/video.js/pull/1218))
|
||||
* Fixed support for webvtt chapters. Fixes #676. ([view](https://github.com/videojs/video.js/pull/1221))
|
||||
* Fixed issues around webvtt cue time parsing. Fixed #877, fixed #183. ([view](https://github.com/videojs/video.js/pull/1236))
|
||||
* Fixed an IE11 issue where clicking on the video wouldn't show the controls ([view](https://github.com/videojs/video.js/pull/1291))
|
||||
* Added a composer.json for PHP packages ([view](https://github.com/videojs/video.js/pull/1241))
|
||||
* Exposed the vertical option for slider controls ([view](https://github.com/videojs/video.js/pull/1303))
|
||||
* Fixed an error when disposing a tech using manual timeupdates ([view](https://github.com/videojs/video.js/pull/1312))
|
||||
* Exported missing Player API methods (remainingTime, supportsFullScreen, enterFullWindow, exitFullWindow, preload) ([view](https://github.com/videojs/video.js/pull/1328))
|
||||
* Added a base for running saucelabs tests from grunt ([view](https://github.com/videojs/video.js/pull/1215))
|
||||
* Added additional browsers for saucelabs testing ([view](https://github.com/videojs/video.js/pull/1216))
|
||||
* Added support for listening to multiple events through a types array ([view](https://github.com/videojs/video.js/pull/1231))
|
||||
* Exported the vertical option for the volume slider ([view](https://github.com/videojs/video.js/pull/1378))
|
||||
* Fixed Component trigger function arguments and docs ([view](https://github.com/videojs/video.js/pull/1310))
|
||||
* Now copying all attributes from the original video tag to the generated video element ([view](https://github.com/videojs/video.js/pull/1321))
|
||||
* Added files to be ignored in the bower.json ([view](https://github.com/videojs/video.js/pull/1337))
|
||||
* Fixed an error that could happen if Flash was diposed before the ready callback was fired ([view](https://github.com/videojs/video.js/pull/1340))
|
||||
* The up and down arrows can now be used to control sliders in addition to left and right ([view](https://github.com/videojs/video.js/pull/1345))
|
||||
* Added a player.currentType() function to get the MIME type of the current source ([view](https://github.com/videojs/video.js/pull/1320))
|
||||
* Fixed a potential conflict with other event listener shims ([view](https://github.com/videojs/video.js/pull/1363))
|
||||
* Added support for multiple time ranges in the load progress bar ([view](https://github.com/videojs/video.js/pull/1253))
|
||||
* Added vjs-waiting and vjs-seeking css classnames and updated the spinner to use them ([view](https://github.com/videojs/video.js/pull/1351))
|
||||
* Now restoring the original video tag attributes on a tech change to support webkit-playsinline ([view](https://github.com/videojs/video.js/pull/1369))
|
||||
* Fixed an issue where the user was unable to scroll/zoom page if touching the video ([view](https://github.com/videojs/video.js/pull/1373))
|
||||
* Added "sliding" class for when slider is sliding to help with handle styling ([view](https://github.com/videojs/video.js/pull/1385))
|
||||
|
||||
## 4.6.4 (2014-07-11)
|
||||
* Fixed an issue where Flash autoplay would not show the controls ([view](https://github.com/videojs/video.js/pull/1343))
|
||||
|
||||
## 4.6.3 (2014-06-12)
|
||||
* Updated to version 4.4.1 of the SWF ([view](https://github.com/videojs/video.js/pull/1285))
|
||||
* Fixed a minification issue with the fullscreen event. fixes #1282 ([view](https://github.com/videojs/video.js/pull/1286))
|
||||
|
||||
## 4.6.2 (2014-06-10)
|
||||
* Fixed an issue with the firstplay event not firing when autoplaying ([view](https://github.com/videojs/video.js/pull/1271))
|
||||
|
||||
## 4.6.1 (2014-05-20)
|
||||
* Udpated playbackRate menu to work in minified version ([view](https://github.com/videojs/video.js/pull/1223))
|
||||
|
||||
## 4.6.0 (2014-05-20)
|
||||
* Updated the UI to support live video ([view](https://github.com/videojs/video.js/pull/1121))
|
||||
* The UI now resets after a source change ([view](https://github.com/videojs/video.js/pull/1124))
|
||||
* Now assuming smart CSS defaults for sliders to prevent reflow on player init ([view](https://github.com/videojs/video.js/pull/1122))
|
||||
@@ -17,8 +135,15 @@ CHANGELOG
|
||||
* Fixed the default flag for captions/subtitles tracks [[view](https://github.com/videojs/video.js/pull/1153)]
|
||||
* Fixed compilation failures with LESS v1.7.0 and GRUNT v0.4.4 [[view](https://github.com/videojs/video.js/pull/1180)]
|
||||
* Added better error handling across the library [[view](https://github.com/videojs/video.js/pull/1197)]
|
||||
|
||||
--------------------
|
||||
* Updated captions/subtiles file fetching to support cross-origin requests in older IE browsers [[view](https://github.com/videojs/video.js/pull/1095)]
|
||||
* Added support for playback rate switching [[view](https://github.com/videojs/video.js/pull/1132)]
|
||||
* Fixed an issue with the loadstart event order that caused the big play button to not hide [[view](https://github.com/videojs/video.js/pull/1209)]
|
||||
* Modernized the fullscreen API and added support for IE11 [[view](https://github.com/videojs/video.js/pull/1205)]
|
||||
* Added cross-browser testing with SauceLabs, and added Karma as the default test runner ([view](https://github.com/videojs/video.js/pull/1187))
|
||||
* Fixed saucelabs integration to run on commits in TravisCI ([view](https://github.com/videojs/video.js/pull/1214))
|
||||
* Added a clearer error message when a tech is undefined ([view](https://github.com/videojs/video.js/pull/1210))
|
||||
* Added a cog icon to the font icons ([view](https://github.com/videojs/video.js/pull/1211))
|
||||
* Added a player option to offset the subtitles/captions timing ([view](https://github.com/videojs/video.js/pull/1212))
|
||||
|
||||
## 4.5.2 (2014-04-12)
|
||||
* Updated release versioning to include bower.json and component.json
|
||||
|
||||
+2
-6
@@ -4,7 +4,7 @@ So you want to help out? Great! There's a number of ways you can get involved.
|
||||
|
||||
* [File and discuss issues](#filing-issues)
|
||||
* [Contribute code](#contributing-code)
|
||||
* [Build and share plugins](docs/plugins.md)
|
||||
* [Build and share plugins](docs/guides/plugins.md)
|
||||
* [Answer questions on Stack Overflow](http://stackoverflow.com/questions/tagged/video.js)
|
||||
|
||||
There's also other Video.js projects where you can help. (check the [video.js org](https://github.com/videojs) for an up-to-date list of projects)
|
||||
@@ -148,12 +148,8 @@ grunt
|
||||
grunt test
|
||||
```
|
||||
|
||||
Video.js is also configured to run tests with Karma. Karma is installed as a grunt plugin to run QUnit tests in real browsers, as opposed to simply running the tests in phantomjs, a headless browser.
|
||||
Video.js is also configured to run tests with Karma. Karma is installed as a grunt plugin to run QUnit tests in real browsers, as opposed to simply running the tests in phantomjs, a headless browser. To run the tests with Karma:
|
||||
|
||||
To run the QUnit test suite in Karma, do the following:
|
||||
1. Copy test/karma.conf.js.example and rename the copy test/karma.conf.js. Please note that if you decide to name the file something other than karma.conf.js, or if you decide to change the location of your conf.js file from the test/ folder, you will need to change references to karma.conf.js in Gruntfile and .gitignore to your new file name and location, so that you don't inadvertently add your conf.js file to any of your video.js pull requests.
|
||||
2. Open test/karma.conf.js in an editor, and configure the properties in it as desired. At a minimum, you'll want to add the browsers that you want to run your tests in. The karma.conf.js.example file has detailed information on usage in the file itself.
|
||||
After you've configured the desired properties in your karma.conf.js, run:
|
||||
```bash
|
||||
grunt karma:dev
|
||||
```
|
||||
|
||||
+216
-14
@@ -1,9 +1,10 @@
|
||||
module.exports = function(grunt) {
|
||||
var pkg, s3, semver, version, verParts, uglify;
|
||||
var pkg, s3, semver, version, verParts, uglify, exec;
|
||||
|
||||
semver = require('semver');
|
||||
pkg = grunt.file.readJSON('package.json');
|
||||
uglify = require('uglify-js');
|
||||
exec = require('child_process').exec;
|
||||
|
||||
try {
|
||||
s3 = grunt.file.readJSON('.s3config.json');
|
||||
@@ -30,7 +31,6 @@ module.exports = function(grunt) {
|
||||
// Project configuration.
|
||||
grunt.initConfig({
|
||||
pkg: pkg,
|
||||
|
||||
build: {
|
||||
src: 'src/js/dependencies.js',
|
||||
options: {
|
||||
@@ -135,16 +135,115 @@ module.exports = function(grunt) {
|
||||
}
|
||||
},
|
||||
karma: {
|
||||
// this config file applies to all following configs except if overwritten
|
||||
options: {
|
||||
configFile: 'test/karma.conf.js'
|
||||
},
|
||||
dev: {
|
||||
configFile: 'test/karma.conf.js',
|
||||
autoWatch: true
|
||||
|
||||
// this only runs on PRs from the mainrepo on saucelabs
|
||||
saucelabs: {
|
||||
browsers: ['chrome_sl']
|
||||
},
|
||||
ci: {
|
||||
configFile: 'test/karma.conf.js',
|
||||
autoWatch: false
|
||||
chrome_sl: {
|
||||
browsers: ['chrome_sl']
|
||||
},
|
||||
firefox_sl: {
|
||||
browsers: ['firefox_sl']
|
||||
},
|
||||
safari_sl: {
|
||||
browsers: ['safari_sl']
|
||||
},
|
||||
ipad_sl: {
|
||||
browsers: ['ipad_sl']
|
||||
},
|
||||
android_sl: {
|
||||
browsers: ['android_sl']
|
||||
},
|
||||
ie_sl: {
|
||||
browsers: ['ie_sl']
|
||||
},
|
||||
|
||||
// these are run locally on local browsers
|
||||
dev: {
|
||||
browsers: ['Chrome', 'Firefox', 'Safari']
|
||||
},
|
||||
chromecanary: {
|
||||
browsers: ['ChromeCanary']
|
||||
},
|
||||
chrome: {
|
||||
browsers: ['Chrome']
|
||||
},
|
||||
firefox: {
|
||||
browsers: ['Firefox']
|
||||
},
|
||||
safari: {
|
||||
browsers: ['Safari']
|
||||
},
|
||||
ie: {
|
||||
browsers: ['IE']
|
||||
},
|
||||
phantomjs: {
|
||||
browsers: ['PhantomJS']
|
||||
},
|
||||
|
||||
// This is all the minified tests run locally on local browsers
|
||||
minified_dev: {
|
||||
browsers: ['Chrome', 'Firefox', 'Safari'],
|
||||
configFile: 'test/karma.minified.conf.js'
|
||||
},
|
||||
minified_chromecanary: {
|
||||
browsers: ['ChromeCanary'],
|
||||
configFile: 'test/karma.minified.conf.js'
|
||||
},
|
||||
minified_chrome: {
|
||||
browsers: ['Chrome'],
|
||||
configFile: 'test/karma.minified.conf.js'
|
||||
},
|
||||
minified_firefox: {
|
||||
browsers: ['Firefox'],
|
||||
configFile: 'test/karma.minified.conf.js'
|
||||
},
|
||||
minified_safari: {
|
||||
browsers: ['Safari'],
|
||||
configFile: 'test/karma.minified.conf.js'
|
||||
},
|
||||
minified_ie: {
|
||||
browsers: ['IE'],
|
||||
configFile: 'test/karma.minified.conf.js'
|
||||
},
|
||||
minified_phantomjs: {
|
||||
browsers: ['PhantomJS'],
|
||||
configFile: 'test/karma.minified.conf.js'
|
||||
},
|
||||
|
||||
// This is all the minified api tests run locally on local browsers
|
||||
minified_api_dev: {
|
||||
browsers: ['Chrome', 'Firefox', 'Safari'],
|
||||
configFile: 'test/karma.minified.api.conf.js'
|
||||
},
|
||||
minified_api_chromecanary: {
|
||||
browsers: ['ChromeCanary'],
|
||||
configFile: 'test/karma.minified.api.conf.js'
|
||||
},
|
||||
minified_api_chrome: {
|
||||
browsers: ['Chrome'],
|
||||
configFile: 'test/karma.minified.api.conf.js'
|
||||
},
|
||||
minified_api_firefox: {
|
||||
browsers: ['Firefox'],
|
||||
configFile: 'test/karma.minified.api.conf.js'
|
||||
},
|
||||
minified_api_safari: {
|
||||
browsers: ['Safari'],
|
||||
configFile: 'test/karma.minified.api.conf.js'
|
||||
},
|
||||
minified_api_ie: {
|
||||
browsers: ['IE'],
|
||||
configFile: 'test/karma.minified.api.conf.js'
|
||||
},
|
||||
minified_api_phantomjs: {
|
||||
browsers: ['PhantomJS'],
|
||||
configFile: 'test/karma.minified.api.conf.js'
|
||||
}
|
||||
},
|
||||
vjsdocs: {
|
||||
@@ -156,6 +255,13 @@ module.exports = function(grunt) {
|
||||
}
|
||||
}
|
||||
},
|
||||
vjslanguages: {
|
||||
defaults: {
|
||||
files: {
|
||||
'build/files/lang': ['lang/*.json']
|
||||
}
|
||||
}
|
||||
},
|
||||
zip: {
|
||||
dist: {
|
||||
router: function (filepath) {
|
||||
@@ -210,6 +316,7 @@ module.exports = function(grunt) {
|
||||
}
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks('grunt-videojs-languages');
|
||||
grunt.loadNpmTasks('grunt-contrib-connect');
|
||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||
grunt.loadNpmTasks('grunt-contrib-qunit');
|
||||
@@ -231,16 +338,101 @@ module.exports = function(grunt) {
|
||||
// grunt.loadTasks('./docs/tasks/');
|
||||
// grunt.loadTasks('../videojs-doc-generator/tasks/');
|
||||
|
||||
grunt.registerTask('pretask', ['jshint', 'less', 'vjslanguages', 'build', 'minify', 'usebanner']);
|
||||
// Default task.
|
||||
grunt.registerTask('default', ['jshint', 'less', 'build', 'minify', 'usebanner', 'dist']);
|
||||
grunt.registerTask('default', ['pretask', 'dist']);
|
||||
// Development watch task
|
||||
grunt.registerTask('dev', ['jshint', 'less', 'build', 'qunit:source']);
|
||||
grunt.registerTask('test', ['jshint', 'less', 'build', 'minify', 'usebanner', 'qunit']);
|
||||
grunt.registerTask('dev', ['jshint', 'less', 'vjslanguages', 'build', 'qunit:source']);
|
||||
grunt.registerTask('test-qunit', ['pretask', 'qunit']);
|
||||
|
||||
var fs = require('fs'),
|
||||
gzip = require('zlib').gzip;
|
||||
// The test task will run `karma:saucelabs` when running in travis,
|
||||
// when running via a PR from a fork, it'll run qunit tests in phantom using
|
||||
// karma otherwise, it'll run the tests in chrome via karma
|
||||
// You can specify which browsers to build with by using grunt-style arguments
|
||||
// or separating them with a comma:
|
||||
// grunt test:chrome:firefox # grunt-style
|
||||
// grunt test:chrome,firefox # comma-separated
|
||||
grunt.registerTask('test', function() {
|
||||
var tasks = this.args,
|
||||
tasksMinified,
|
||||
tasksMinifiedApi;
|
||||
|
||||
grunt.task.run(['pretask']);
|
||||
|
||||
if (process.env.TRAVIS_PULL_REQUEST !== 'false') {
|
||||
grunt.task.run(['karma:phantomjs', 'karma:minified_phantomjs', 'karma:minified_api_phantomjs']);
|
||||
} else if (process.env.TRAVIS) {
|
||||
grunt.task.run(['karma:phantomjs', 'karma:minified_phantomjs', 'karma:minified_api_phantomjs']);
|
||||
//Disabling saucelabs until we figure out how to make it run reliably.
|
||||
//grunt.task.run([
|
||||
//'karma:chrome_sl',
|
||||
//'karma:firefox_sl',
|
||||
//'karma:safari_sl',
|
||||
//'karma:ipad_sl',
|
||||
//'karma:android_sl',
|
||||
//'karma:ie_sl'
|
||||
//]);
|
||||
} else {
|
||||
// if we aren't running this in a CI, but running it manually, we can
|
||||
// supply arguments to this task. These arguments are either colon (`:`)
|
||||
// separated which is the default grunt separator for arguments, or they
|
||||
// are comma (`,`) separated to make it easier.
|
||||
// The arguments are the names of which browsers you want. It'll then
|
||||
// make sure you have the `minified` and `minified_api` for those browsers
|
||||
// as well.
|
||||
if (tasks.length === 0) {
|
||||
tasks.push('chrome');
|
||||
}
|
||||
if (tasks.length === 1) {
|
||||
tasks = tasks[0].split(',');
|
||||
}
|
||||
|
||||
tasksMinified = tasks.slice();
|
||||
tasksMinifiedApi = tasks.slice();
|
||||
|
||||
tasksMinified = tasksMinified.map(function(task) {
|
||||
return 'minified_' + task;
|
||||
});
|
||||
|
||||
tasksMinifiedApi = tasksMinifiedApi.map(function(task) {
|
||||
return 'minified_api_' + task;
|
||||
});
|
||||
|
||||
tasks = tasks.concat(tasksMinified).concat(tasksMinifiedApi);
|
||||
tasks = tasks.map(function(task) {
|
||||
return 'karma:' + task;
|
||||
});
|
||||
|
||||
grunt.task.run(tasks);
|
||||
}
|
||||
});
|
||||
|
||||
grunt.registerTask('saucelabs', function() {
|
||||
var done = this.async();
|
||||
|
||||
if (this.args[0] == 'connect') {
|
||||
exec('curl https://gist.githubusercontent.com/santiycr/5139565/raw/sauce_connect_setup.sh | bash',
|
||||
function(error, stdout, stderr) {
|
||||
if (error) {
|
||||
grunt.log.error(error);
|
||||
return done();
|
||||
}
|
||||
|
||||
grunt.verbose.error(stderr.toString());
|
||||
grunt.verbose.writeln(stdout.toString());
|
||||
grunt.task.run(['karma:saucelabs']);
|
||||
done();
|
||||
});
|
||||
} else {
|
||||
grunt.task.run(['karma:saucelabs']);
|
||||
done();
|
||||
}
|
||||
});
|
||||
|
||||
var fs = require('fs');
|
||||
|
||||
grunt.registerMultiTask('build', 'Building Source', function(){
|
||||
|
||||
// Fix windows file path delimiter issue
|
||||
var i = sourceFiles.length;
|
||||
while (i--) {
|
||||
@@ -254,6 +446,7 @@ module.exports = function(grunt) {
|
||||
});
|
||||
// Replace CDN version ref in js. Use major/minor version.
|
||||
combined = combined.replace(/GENERATED_CDN_VSN/g, version.majorMinor);
|
||||
|
||||
grunt.file.write('build/files/combined.video.js', combined);
|
||||
|
||||
// Copy over other files
|
||||
@@ -353,6 +546,15 @@ module.exports = function(grunt) {
|
||||
}
|
||||
});
|
||||
|
||||
// Copy over language files
|
||||
grunt.file.recurse('build/files/lang', function(absdir, rootdir, subdir, filename) {
|
||||
// Block .DS_Store files
|
||||
if ('filename'.substring(0,1) !== '.') {
|
||||
grunt.file.copy(absdir, 'dist/cdn/lang/' + filename);
|
||||
grunt.file.copy(absdir, 'dist/video-js/lang/' + filename);
|
||||
}
|
||||
});
|
||||
|
||||
// ds_store files sometime find their way in
|
||||
if (grunt.file.exists('dist/video-js/.DS_Store')) {
|
||||
grunt.file['delete']('dist/video-js/.DS_Store');
|
||||
@@ -368,7 +570,7 @@ module.exports = function(grunt) {
|
||||
|
||||
// Replace font urls with CDN versions
|
||||
css = grunt.file.read('dist/cdn/video-js.css');
|
||||
css = css.replace(/font\//g, '../f/2/');
|
||||
css = css.replace(/font\//g, '../f/3/');
|
||||
grunt.file.write('dist/cdn/video-js.css', css);
|
||||
|
||||
// Add CDN-specfic JS
|
||||
|
||||
+46
-3
@@ -1,8 +1,51 @@
|
||||
# [Video.js - HTML5 Video Player](http://videojs.com) [](https://travis-ci.org/zencoder/video-js)
|
||||

|
||||
|
||||
> Video.js is a web video player built from the ground up for an HTML5 world. It supports HTML5 and Flash video, as well as YouTube and Vimeo (through [plugins](https://github.com/videojs/video.js/wiki/Plugins)). It supports video playback on desktops and mobile devices. This project was started mid 2010, and the player is now used on over 50,000 websites.
|
||||
# [Video.js - HTML5 Video Player](http://videojs.com) [](https://travis-ci.org/videojs/video.js)
|
||||
|
||||
Visit [videojs.com](http://videojs.com) for an overview, download options, and instructions on how to use the player on your site.
|
||||
> Video.js is a web video player built from the ground up for an HTML5 world. It supports HTML5 and Flash video, as well as YouTube and Vimeo (through [plugins](https://github.com/videojs/video.js/wiki/Plugins)). It supports video playback on desktops and mobile devices. This project was started mid 2010, and the player is now used on over ~~50,000~~ 100,000 websites.
|
||||
|
||||
## Quick start
|
||||
Thanks to the awesome folks over at [Fastly](http://www.fastly.com/), there's a free, CDN hosted version of Video.js that anyone can use. Simply add these includes to your document's
|
||||
`<head>`:
|
||||
|
||||
```html
|
||||
<link href="http://vjs.zencdn.net/4.9/video-js.css" rel="stylesheet">
|
||||
<script src="http://vjs.zencdn.net/4.9/video.js"></script>
|
||||
```
|
||||
|
||||
Then, whenever you want to use Video.js you can simply use the `<video>` element as your normally would, but with an additional `data-setup` attribute containing any Video.js options. These options
|
||||
can include any Video.js option plus potential [plugin](https://github.com/videojs/video.js/wiki/Plugins) options, just make sure they're valid JSON!
|
||||
|
||||
```html
|
||||
<video id="really-cool-video" class="video-js vjs-default-skin" controls
|
||||
preload="auto" width="640" height="264" poster="really-cool-video-poster.jpg"
|
||||
data-setup='{}'>
|
||||
<source src="really-cool-video.mp4" type='video/mp4'>
|
||||
<source src="really-cool-video.webm" type='video/webm'>
|
||||
<p class="vjs-no-js">
|
||||
To view this video please enable JavaScript, and consider upgrading to a web browser
|
||||
that <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>
|
||||
</p>
|
||||
</video>
|
||||
```
|
||||
|
||||
If you don't want to use auto-setup, you can leave off the `data-setup` attribute and initialize a video element manually.
|
||||
|
||||
```javascript
|
||||
var player = videojs('really-cool-video', { /* Options */ }, function() {
|
||||
console.log('Good to go!');
|
||||
|
||||
this.play(); // if you don't trust autoplay for some reason
|
||||
|
||||
// How about an event listener?
|
||||
this.on('ended', function() {
|
||||
console.log('awww...over so soon?');
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
If you're ready to dive in, the [documentation](/blob/master/docs/index.md) is the first place to go for more information. Generally the
|
||||
[player API docs](/blob/master/docs/api/vjs.Player.md) are the most pertinent.
|
||||
|
||||
## Contributing
|
||||
Video.js is a free and open source library, and we appreciate any help you're willing to give. Check out the [contributing guide](CONTRIBUTING.md).
|
||||
|
||||
+9
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "video.js",
|
||||
"description": "An HTML5 and Flash video player with a common API and skin for both.",
|
||||
"version": "4.5.2",
|
||||
"version": "4.10.0",
|
||||
"main": [
|
||||
"dist/video-js/video.js",
|
||||
"dist/video-js/video-js.css"
|
||||
@@ -12,5 +12,13 @@
|
||||
"flash",
|
||||
"video",
|
||||
"player"
|
||||
],
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"test",
|
||||
"tests",
|
||||
"build"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
[
|
||||
{
|
||||
"os": "win",
|
||||
"browser": "chrome",
|
||||
"version": "27.0"
|
||||
},
|
||||
{
|
||||
"os": "win",
|
||||
"browser": "firefox",
|
||||
"version": "20.0"
|
||||
},
|
||||
{
|
||||
"os": "win",
|
||||
"browser": "ie",
|
||||
"version": "9.0"
|
||||
},
|
||||
{
|
||||
"os": "win",
|
||||
"browser": "ie",
|
||||
"version": "10.0"
|
||||
},
|
||||
{
|
||||
"os": "ios",
|
||||
"device": "iPhone 5",
|
||||
"version": "6.0"
|
||||
},
|
||||
{
|
||||
"os": "ios",
|
||||
"device": "iPad 3rd (6.0)",
|
||||
"version": "6.0"
|
||||
},
|
||||
{
|
||||
"os": "android",
|
||||
"device": "Samsung Galaxy Tab 2 10.1",
|
||||
"version": "4.0"
|
||||
}
|
||||
]
|
||||
@@ -394,7 +394,7 @@ goog.global.CLOSURE_BASE_PATH;
|
||||
* the deps are written.
|
||||
* @type {boolean|undefined}
|
||||
*/
|
||||
goog.global.CLOSURE_NO_DEPS = true;
|
||||
// goog.global.CLOSURE_NO_DEPS = true;
|
||||
// goog.global.CLOSURE_NO_DEPS;
|
||||
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ var sourceFiles = [
|
||||
"src/js/slider.js",
|
||||
"src/js/menu.js",
|
||||
"src/js/media-error.js",
|
||||
"src/js/fullscreen-api.js",
|
||||
"src/js/player.js",
|
||||
"src/js/control-bar/control-bar.js",
|
||||
"src/js/control-bar/live-display.js",
|
||||
@@ -35,6 +36,7 @@ var sourceFiles = [
|
||||
"src/js/control-bar/volume-control.js",
|
||||
"src/js/control-bar/mute-toggle.js",
|
||||
"src/js/control-bar/volume-menu-button.js",
|
||||
"src/js/control-bar/playback-rate-menu-button.js",
|
||||
"src/js/poster.js",
|
||||
"src/js/loading-spinner.js",
|
||||
"src/js/big-play-button.js",
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "video.js",
|
||||
"description": "An HTML5 and Flash video player with a common API and skin for both.",
|
||||
"version": "4.5.2",
|
||||
"version": "4.10.0",
|
||||
"keywords": [
|
||||
"videojs",
|
||||
"html5",
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "videojs/video.js",
|
||||
"description": "An HTML5 and Flash video player with a common API and skin for both.",
|
||||
"type": "library",
|
||||
"keywords": [
|
||||
"videojs",
|
||||
"html5",
|
||||
"flash",
|
||||
"video",
|
||||
"player"
|
||||
],
|
||||
"homepage": "http://www.videojs.com/",
|
||||
"license": "Apache-2.0"
|
||||
}
|
||||
+234
-374
@@ -2,407 +2,267 @@
|
||||
"project": {
|
||||
"owner": "videojs",
|
||||
"name": "video.js",
|
||||
"urls": {
|
||||
"git": "https://github.com/videojs/video.js.git"
|
||||
},
|
||||
"requirements": [
|
||||
{
|
||||
"name": "git",
|
||||
"info": "http://git-scm.com",
|
||||
"test": "which git"
|
||||
"info": "http://git-scm.com"
|
||||
},
|
||||
{
|
||||
"name": "node.js",
|
||||
"info": "http://nodejs.org",
|
||||
"test": "which node"
|
||||
"info": "http://nodejs.org"
|
||||
}
|
||||
]
|
||||
],
|
||||
"urls": {
|
||||
"git": "https://github.com/videojs/video.js.git",
|
||||
"repo_api": "https://api.github.com/repos/videojs/video.js",
|
||||
"repo_ui": "https://github.com/videojs/video.js"
|
||||
},
|
||||
"branches": {
|
||||
"development": "master",
|
||||
"release": "stable"
|
||||
}
|
||||
},
|
||||
|
||||
"install": {
|
||||
"steps": [
|
||||
{
|
||||
"desc": "Get all git branches",
|
||||
"exec": "git fetch origin"
|
||||
},
|
||||
{
|
||||
"desc": "Create the stable branch for patches",
|
||||
"exec": "git checkout -b stable origin/stable"
|
||||
},
|
||||
{
|
||||
"desc": "Add the upstream project as a remote so new changes can be pulled",
|
||||
"exec": "git remote add upstream <%= project.urls.git %>"
|
||||
},
|
||||
{
|
||||
"desc": "Get all upstream branches and changes",
|
||||
"exec": "git fetch upstream"
|
||||
},
|
||||
{
|
||||
"contrib": "update"
|
||||
}
|
||||
]
|
||||
},
|
||||
"install": [
|
||||
[ "git fetch origin", "Get all git branches" ],
|
||||
[ "git checkout -b stable origin/stable", "Create the stable branch for patches" ],
|
||||
[ "git remote add upstream {{project.urls.git}}", "Add the upstream project as a remote for pulling changes" ],
|
||||
[ "git fetch upstream", "Get all upstream branches and changes" ],
|
||||
{ "include": "update all" }
|
||||
],
|
||||
|
||||
"update": {
|
||||
"all": {
|
||||
"steps": [
|
||||
{ "include": "update stable" },
|
||||
{ "include": "update master" },
|
||||
[ "npm install", "Download dependencies"],
|
||||
[ "grunt", "Build the library" ]
|
||||
]
|
||||
},
|
||||
"master": {
|
||||
"steps": [
|
||||
[ "git checkout master", "Switch to the development branch" ],
|
||||
[ "git pull upstream master", "Get any changes to master in the main project" ],
|
||||
[ "git push origin master", "Push any changes to your copy of the main project" ]
|
||||
]
|
||||
},
|
||||
"stable": {
|
||||
"steps": [
|
||||
[ "git checkout stable", "Switch to the release branch" ],
|
||||
[ "git pull upstream stable", "Get any changes to stable in the main project" ],
|
||||
[ "git push origin stable", "Push any changes to your copy of the main project" ]
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
"test": "grunt test" ,
|
||||
"watch": "grunt watch",
|
||||
"server": "grunt connect",
|
||||
|
||||
"feature": {
|
||||
"desc": "Create a new feature or general enhancement",
|
||||
"baseBranch": "master",
|
||||
"start": {
|
||||
"desc": "Start a new feature",
|
||||
"steps": [
|
||||
{ "include": "update {{project.branches.development}}" },
|
||||
{ "include": "branch start" }
|
||||
]
|
||||
},
|
||||
"submit": {
|
||||
"desc": "Submit a pull request for a feature when it's finished",
|
||||
"steps": [
|
||||
{ "include": "branch submit" }
|
||||
]
|
||||
},
|
||||
"delete": {
|
||||
"desc": "Delete the current feature branch",
|
||||
"steps": [
|
||||
{ "include": "branch delete" }
|
||||
]
|
||||
},
|
||||
"accept": {
|
||||
"steps": [
|
||||
{ "include": "update {{project.branches.development}}" },
|
||||
{ "include": "pull_request accept" }
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
"patch": {
|
||||
"desc": "Create an urgent fix for the latest stable version",
|
||||
"baseBranch": "stable",
|
||||
"start": {
|
||||
"desc": "Start a new patch",
|
||||
"finished": "Make your changes and then run `contrib patch submit`",
|
||||
"steps": [
|
||||
{ "include": "update {{project.branches.release}}" },
|
||||
{ "include": "branch start" }
|
||||
]
|
||||
},
|
||||
"submit": {
|
||||
"desc": "Submit a pull request for a patch when it's finished",
|
||||
"steps": [
|
||||
{ "include": "branch submit" }
|
||||
]
|
||||
},
|
||||
"delete": {
|
||||
"desc": "Delete the current patch branch",
|
||||
"steps": [
|
||||
{ "include": "branch delete" }
|
||||
]
|
||||
},
|
||||
"accept": {
|
||||
"steps": [
|
||||
{ "include": "update {{project.branches.release}}" },
|
||||
{ "include": "pull_request accept" }
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
"report": {
|
||||
"desc": "Submit a bug report",
|
||||
"steps": [
|
||||
{
|
||||
"desc": "Switch to the development branch",
|
||||
"exec": "git checkout master"
|
||||
},
|
||||
{
|
||||
"desc": "Get any changes to master in the main project",
|
||||
"exec": "git pull upstream master"
|
||||
},
|
||||
{
|
||||
"desc": "Switch to the release branch",
|
||||
"exec": "git checkout stable"
|
||||
},
|
||||
{
|
||||
"desc": "Get any changes to stable in the main project",
|
||||
"exec": "git pull upstream stable"
|
||||
},
|
||||
{
|
||||
"desc": "Install dependencies",
|
||||
"exec": "npm install"
|
||||
},
|
||||
{
|
||||
"desc": "Build the distribution",
|
||||
"exec": "grunt"
|
||||
}
|
||||
{ "prompt": "text", "desc": "Create a title that is descriptive of the problem", "id": "title" },
|
||||
{ "prompt": "text", "desc": "What did you do? (steps to reproduce)", "id": "reproduce" },
|
||||
{ "prompt": "text", "desc": "What did you expect to happen?", "id": "expected" },
|
||||
{ "prompt": "text", "desc": "What actually happened?", "id": "actual" },
|
||||
{ "prompt": "text", "desc": "What version of video.js are you using?", "id": "version" },
|
||||
{ "prompt": "text", "desc": "Are you using any video.js plugins?", "id": "plugins" },
|
||||
{ "prompt": "text", "desc": "What browsers/platforms did you experience this in (e.g. Win 7, IE10; Android 4, Chrome;)?", "id": "browsers" },
|
||||
{ "prompt": "text", "desc": "Is there a URL to a live example, or a jsbin (e.g. http://jsbin.com/axedog/9999/edit)?", "id": "example" },
|
||||
{ "prompt": "text", "desc": "Are there any other details you'd like to provide?", "id": "details" },
|
||||
{ "open": "{{project.urls.repo_ui}}/issues/new?title={{title}}&body=**Steps to reproduce:**\n> {{reproduce}}\n\n**What was expected:**\n> {{expected}}\n\n**What Happened:**\n> {{actual}}\n\n**Video.js Version:**\n> {{version}}\n\n**Plugins:**\n> {{plugins}}\n\n**Browsers experienced on:**\n> {{browsers}}\n\n**Example:**\n> {{example}}\n\n**Other details:**\n> {{details}}" }
|
||||
],
|
||||
"finished": "Thanks for submitting a bug report! One of our contributors will address it as soon as possible."
|
||||
},
|
||||
|
||||
"request": {
|
||||
"desc": "Submit a feature/enhancement request",
|
||||
"steps": [
|
||||
{ "prompt": "text", "desc": "Create a title that is descriptive of the enhancement", "id": "title" },
|
||||
{ "prompt": "text", "desc": "Describe the feature/enhancement (be as detailed as possible so it's clear who, why, and how it would be used)", "id": "describe" },
|
||||
{ "prompt": "text", "desc": "Is there any existing documentation or related specifications?", "id": "docs" },
|
||||
{ "prompt": "text", "desc": "Are there any existing examples?", "id": "examples" },
|
||||
{ "prompt": "confirm", "desc": "You will be redirected to Github where you can submit this issue, OK?" },
|
||||
{ "open": "{{project.urls.repo_ui}}/issues/new?title={{ title }}&body=**Describe the feature/enhancement:**\n> {{ describe }}\n\n**Existing docs/specs:**\n> {{ docs }}\n\n**Existing examples:**\n> {{ examples }}" }
|
||||
],
|
||||
"finished": "Thanks for submitting a feature request! One of our contributors will address it as soon as possible."
|
||||
},
|
||||
|
||||
"release": {
|
||||
"desc": "Create and publish a release",
|
||||
"steps": [
|
||||
[ "git diff --exit-code", "Ensure there's no unadded changes" ],
|
||||
[ "git diff --cached --exit-code", "Ensure there's no added changes" ],
|
||||
{ "prompt": "confirm", "desc": "Have the changes been merged into the release branch (stable)?" },
|
||||
{ "prompt": "text", "desc": "Provide the release type (major, minor, patch)", "id": "type" },
|
||||
[ "git checkout stable", "Checkout the release branch" ],
|
||||
[ "git pull upstream stable", "Update the release branch" ],
|
||||
[ "grunt test", "Run tests" ],
|
||||
[ "grunt chg-release:{{ type }}", "Update the changelog with the new release" ],
|
||||
[ "grunt version:{{ type }}", "Bump package versions" ],
|
||||
[ "grunt", "Build the release" ],
|
||||
[ "git add dist/video-js --force", "Add the (otherwise ignored) release files" ],
|
||||
[ "grunt vjsdocs", "Rebuild the docs" ],
|
||||
[ "grunt cdn-links", "Update the cdn urls in the docs" ],
|
||||
[ "grunt tagrelease", "Tag the release" ],
|
||||
[ "git push upstream stable", "Push changes to the remote" ],
|
||||
[ "git push upstream --tags", "Push tags to the remote" ],
|
||||
[ "npm publish", "Publish to npm" ],
|
||||
[ "git checkout master", "Checkout the development branch" ],
|
||||
[ "git pull upstream master", "Update the development branch" ],
|
||||
[ "git merge stable", "Merge changes" ],
|
||||
[ "grunt clean:dist", "Remove built dist files to re-ignore them" ],
|
||||
[ "git add -u", "Add the changes for the removed dist files" ],
|
||||
[ "git commit -m 'Removed dist files'", "Commit the removed dist files" ],
|
||||
[ "git push upstream master", "Push development branch changes" ]
|
||||
]
|
||||
},
|
||||
|
||||
"test": {
|
||||
"steps": [
|
||||
{
|
||||
"desc": "Run automated tests",
|
||||
"exec": "grunt test"
|
||||
}
|
||||
]
|
||||
"branch": {
|
||||
"private": true,
|
||||
"start": {
|
||||
"steps": [
|
||||
{ "prompt": "text", "desc": "Name the branch", "id": "name" },
|
||||
[ "git checkout -b {{name}} {{baseBranch}}", "Create the branch" ],
|
||||
[ "git push -u origin {{name}}", "Push the branch to your remote copy of the project" ]
|
||||
]
|
||||
},
|
||||
"submit": {
|
||||
"desc": "Submit a pull request for when the change is finished",
|
||||
"steps": [
|
||||
{ "exec": "git diff --exit-code", "desc": "Test for unadded changes {{ args.[0] }}", "fail": "Make sure all changes have been added and committed, or stashed, before switching branches" },
|
||||
{ "exec": "git diff --cached --exit-code", "desc": "Test for uncommitted changes", "fail": "Make sure all changes have been added and committed, or stashed, before switching branches" },
|
||||
{ "include": "test" },
|
||||
{ "exec": "git rev-parse --abbrev-ref HEAD", "desc": "Get the current branch", "id": "branch" },
|
||||
{ "prompt": "confirm", "desc": "Are you sure {{branch}} is the branch you want to submit?" },
|
||||
{ "prompt": "text", "desc": "Which github user or org are you submitting from?", "id": "user" },
|
||||
{ "open": "{{project.urls.repo_ui}}/compare/videojs:{{baseBranch}}...{{user}}:{{branch}}", "desc": "Open the github pull request page" }
|
||||
]
|
||||
},
|
||||
"delete": {
|
||||
"desc": "Delete the current branch",
|
||||
"steps": [
|
||||
{ "exec": "git rev-parse --abbrev-ref HEAD", "desc": "Get the current branch name", "id": "name" },
|
||||
{ "prompt": "confirm", "desc": "Are you sure '{{name}}' is the branch you want to delete?" },
|
||||
{ "exec": "git branch -D {{name}}", "desc": "Delete the local copy of the branch" },
|
||||
{ "exec": "git push origin :{{name}}", "desc": "Delete the remote copy of the branch" }
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
"contributions": {
|
||||
"pull_request": {
|
||||
"private": true,
|
||||
|
||||
"feature": {
|
||||
"desc": "Create a new feature or general enhancement",
|
||||
"start": {
|
||||
"desc": "Start a new feature",
|
||||
"steps": [
|
||||
{
|
||||
"id": "name",
|
||||
"desc": "Name the feature branch",
|
||||
"prompt": {
|
||||
"type": "text",
|
||||
"message": "name"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Check out the development branch and get any updates",
|
||||
"exec": "git checkout master && git pull upstream master"
|
||||
},
|
||||
{
|
||||
"desc": "Create the patch branch",
|
||||
"exec": "git checkout -b feature/<%= name %>"
|
||||
},
|
||||
{
|
||||
"desc": "Push the branch to the origin repo",
|
||||
"exec": "git push -u origin feature/<%= name %>"
|
||||
}
|
||||
]
|
||||
},
|
||||
"submit": {
|
||||
"desc": "Submit a pull request for a feature when it's finished",
|
||||
"steps": [
|
||||
{
|
||||
"desc": "Test for unadded changes <%= args[0] %>",
|
||||
"exec": "git diff --exit-code",
|
||||
"fail": "Make sure all changes have been added and committed, or stashed, before switching branches"
|
||||
},
|
||||
{
|
||||
"desc": "Test for uncommitted changes",
|
||||
"exec": "git diff --cached --exit-code",
|
||||
"fail": "Make sure all changes have been added and committed, or stashed, before switching branches"
|
||||
},
|
||||
{
|
||||
"contrib": "test"
|
||||
},
|
||||
{
|
||||
"id": "branch",
|
||||
"desc": "Get the current branch",
|
||||
"exec": "git rev-parse --abbrev-ref HEAD"
|
||||
},
|
||||
{
|
||||
"desc": "Are you sure <%= branch %> is the branch you want to submit",
|
||||
"confirm": "confirm"
|
||||
},
|
||||
{
|
||||
"id": "user",
|
||||
"desc": "Which github user or org are you submitting from?",
|
||||
"prompt": {
|
||||
"type": "text",
|
||||
"message": "user"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Open the github pull request page",
|
||||
"open": "https://github.com/videojs/video.js/compare/videojs:master...<%= user %>:<%= branch %>"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
"patch": {
|
||||
"desc": "Create an urgent fix for the latest stable version",
|
||||
"new": {
|
||||
"desc": "Start a new patch",
|
||||
"steps": [
|
||||
{
|
||||
"id": "name",
|
||||
"desc": "Name the patch branch",
|
||||
"prompt": {
|
||||
"type": "text",
|
||||
"message": "name"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Check out the release branch and get any updates",
|
||||
"exec": "git checkout stable && git pull upstream stable"
|
||||
},
|
||||
{
|
||||
"desc": "Create the patch branch",
|
||||
"exec": "git checkout -b patch/<%= name %>"
|
||||
},
|
||||
{
|
||||
"desc": "Push the branch to the origin repo",
|
||||
"exec": "git push -u origin patch/<%= name %>"
|
||||
}
|
||||
]
|
||||
},
|
||||
"submit": {
|
||||
"desc": "Submit a pull request for a patch when it's finished",
|
||||
"steps": [
|
||||
{
|
||||
"contrib": "test"
|
||||
},
|
||||
{
|
||||
"desc": "Test for unadded changes",
|
||||
"exec": "git diff --exit-code",
|
||||
"fail": "Make sure all changes have been added and committed, or stashed, before switching branches"
|
||||
},
|
||||
{
|
||||
"desc": "Test for uncommitted changes",
|
||||
"exec": "git diff --cached --exit-code",
|
||||
"fail": "Make sure all changes have been added and committed, or stashed, before switching branches"
|
||||
},
|
||||
{
|
||||
"id": "branch",
|
||||
"desc": "Get the current branch",
|
||||
"exec": "git rev-parse --abbrev-ref HEAD"
|
||||
},
|
||||
{
|
||||
"desc": "Are you sure <%= branch %> is the branch you want to submit",
|
||||
"confirm": "confirm"
|
||||
},
|
||||
{
|
||||
"id": "user",
|
||||
"desc": "Which github user or org are you submitting from?",
|
||||
"prompt": {
|
||||
"type": "text",
|
||||
"message": "user"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Open the github pull request page",
|
||||
"open": "https://github.com/videojs/video.js/compare/videojs:stable...<%= user %>:<%= branch %>"
|
||||
}
|
||||
]
|
||||
},
|
||||
"delete": {
|
||||
"desc": "Delete the current patch branch",
|
||||
"steps": [
|
||||
{
|
||||
"id": "name",
|
||||
"guide": false,
|
||||
"desc": "Get the current branch name",
|
||||
"exec": "git rev-parse --abbrev-ref HEAD"
|
||||
},
|
||||
{
|
||||
"desc": "Confirm you are deleting the correct branch",
|
||||
"confirm": "Delete branch '<%= name %>'?"
|
||||
},
|
||||
{
|
||||
"desc": "Delete the local copy of the branch",
|
||||
"exec": "git branch -D <%= name %>"
|
||||
},
|
||||
{
|
||||
"desc": "Delete the remote copy of the branch",
|
||||
"exec": "git push origin :<%= name %>"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
"bug": {
|
||||
"desc": "Submit a bug report",
|
||||
"review": {
|
||||
"steps": [
|
||||
{
|
||||
"id": "title",
|
||||
"prompt": "Title your bug report"
|
||||
},
|
||||
{
|
||||
"id": "reproduce",
|
||||
"prompt": "What did you do? (steps to reproduce)"
|
||||
},
|
||||
{
|
||||
"id": "expected",
|
||||
"prompt": "What did you expect to happen?"
|
||||
},
|
||||
{
|
||||
"id": "actual",
|
||||
"prompt": "What actually happened?"
|
||||
},
|
||||
{
|
||||
"id": "version",
|
||||
"prompt": "What version of video.js are you using?"
|
||||
},
|
||||
{
|
||||
"id": "plugins",
|
||||
"prompt": "Are you using any video.js plugins?"
|
||||
},
|
||||
{
|
||||
"id": "browsers",
|
||||
"prompt": "What browsers/platforms did you experience this in (e.g. Win 7, IE10; Android 4, Chrome;)?"
|
||||
},
|
||||
{
|
||||
"id": "example",
|
||||
"prompt": "Is there a URL to a live example, or a jsbin (e.g. http://jsbin.com/axedog/9999/edit)?"
|
||||
},
|
||||
{
|
||||
"id": "details",
|
||||
"prompt": "Are there any other details you'd like to provide?"
|
||||
},
|
||||
{
|
||||
"open": "https://github.com/videojs/video.js/issues/new?title=<%= title %>&body=**Steps to reproduce:**\n> <%= reproduce %>\n\n**What was expected:**\n> <%= expected %>\n\n**What Happened:**\n> <%= actual %>\n\n**Video.js Version:**\n> <%= version %>\n\n**Plugins:**\n> <%= plugins %>\n\n**Browsers experienced on:**\n> <%= browsers %>\n\n**Example:**\n> <%= example %>\n\n**Other details:**\n> <%= details %>"
|
||||
}
|
||||
{ "prompt": "text", "desc": "What is the the pull request number?", "id": "prNum" },
|
||||
{ "get": "{{project.urls.repo_api}}/pulls/{{prNum}}", "desc": "Get the PR information", "id": "pr" },
|
||||
[ "git fetch {{pr.head.repo.ssh_url}} {{pr.head.ref}}", "Get the pull request changes but don't merge them" ],
|
||||
[ "git merge-base master FETCH_HEAD", "Get the common ancestor commit", "base" ],
|
||||
[ "git checkout -b review-{{pr.user.login}}-{{pr.head.ref}} {{base}}", "Create a new local branch for the pull request that has a base of the common commit" ],
|
||||
[ "git merge FETCH_HEAD", "Merge in the pull request changes" ],
|
||||
[ "grunt test", "Build and run tests" ]
|
||||
]
|
||||
},
|
||||
|
||||
"request": {
|
||||
"desc": "Submit a feature/enhancement request",
|
||||
"modify": {
|
||||
"desc": "Submit a modification to an existing pull request",
|
||||
"steps": [
|
||||
{
|
||||
"id": "title",
|
||||
"prompt": "Title your request"
|
||||
},
|
||||
{
|
||||
"id": "describe",
|
||||
"prompt": "Describe the feature/enhancement (be as detailed as possible so it's clear who, why, and how it would be used)"
|
||||
},
|
||||
{
|
||||
"id": "docs",
|
||||
"prompt": "Is there any existing documentation or related specifications?"
|
||||
},
|
||||
{
|
||||
"id": "examples",
|
||||
"prompt": "Are there any existing examples?"
|
||||
},
|
||||
{
|
||||
"confirm": "You will be redirected to Github where you can submit this issue, OK?"
|
||||
},
|
||||
{
|
||||
"open": "https://github.com/videojs/video.js/issues/new?title=<%= title %>&body=**Describe the feature/enhancement:**\n> <%= describe %>\n\n**Existing docs/specs:**\n> <%= docs %>\n\n**Existing examples:**\n> <%= examples %>"
|
||||
}
|
||||
{ "exec": "git diff --exit-code", "desc": "Test for unadded changes", "fail": "Make sure all changes have been added and committed before submitting changes" },
|
||||
{ "exec": "git diff --cached --exit-code", "desc": "Test for uncommitted changes", "fail": "Make sure all changes have been committed before submitting changes" },
|
||||
{ "include": "test" },
|
||||
{ "exec": "git rev-parse --abbrev-ref HEAD", "desc": "Get the current branch", "id": "branch" },
|
||||
{ "prompt": "confirm", "desc": "Are you sure {{branch}} is the branch you want to submit?" },
|
||||
{ "prompt": "text", "desc": "Which github user or org are you submitting from?", "id": "user" },
|
||||
{ "prompt": "text", "desc": "What is the the pull request number?", "id": "prNum" },
|
||||
{ "get": "{{project.urls.repo_api}}/pulls/{{prNum}}", "desc": "Get the PR information", "id": "pr" },
|
||||
{ "exec": "git push -u origin {{branch}}", "desc": "Push the changes to the remote repo" },
|
||||
{ "open": "https://github.com/{{user}}/video.js/compare/{{pr.head.label}}...{{user}}:{{branch}}", "desc": "Open the github pull request page" }
|
||||
]
|
||||
},
|
||||
|
||||
"release": {
|
||||
"desc": "Create and publish a release",
|
||||
"accept": {
|
||||
"steps": [
|
||||
{
|
||||
"desc": "Ensure there's no unadded changes",
|
||||
"exec": "git diff --exit-code"
|
||||
},
|
||||
{
|
||||
"desc": "Ensure there's no added changes",
|
||||
"exec": "git diff --cached --exit-code"
|
||||
},
|
||||
{
|
||||
"desc": "Have the changes been merged into the release branch (stable)?",
|
||||
"confirm": "confirm"
|
||||
},
|
||||
{
|
||||
"id": "type",
|
||||
"desc": "Provide the release type",
|
||||
"prompt": {
|
||||
"message": "release type",
|
||||
"default": "patch",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"desc": "Checkout and update the release branch",
|
||||
"exec": "git checkout stable & git pull"
|
||||
},
|
||||
{
|
||||
"desc": "Run tests",
|
||||
"exec": "grunt test"
|
||||
},
|
||||
{
|
||||
"desc": "Update the changelog with the new release",
|
||||
"exec": "grunt chg-release:<%= type %>"
|
||||
},
|
||||
{
|
||||
"desc": "Bump package versions",
|
||||
"exec": "grunt version:<%= type %>"
|
||||
},
|
||||
{
|
||||
"desc": "Build the release",
|
||||
"exec": "grunt"
|
||||
},
|
||||
{
|
||||
"desc": "Add the (otherwise ignored) release files",
|
||||
"exec": "git add dist/video-js --force"
|
||||
},
|
||||
{
|
||||
"desc": "Rebuild the docs",
|
||||
"exec": "grunt vjsdocs"
|
||||
},
|
||||
{
|
||||
"desc": "Update the cdn urls in the docs",
|
||||
"exec": "grunt cdn-links"
|
||||
},
|
||||
{
|
||||
"desc": "Tag the release",
|
||||
"exec": "grunt tagrelease"
|
||||
},
|
||||
{
|
||||
"desc": "Push changes to the remote",
|
||||
"exec": "git push origin stable"
|
||||
},
|
||||
{
|
||||
"desc": "Push tags to the remote",
|
||||
"exec": "git push --tags"
|
||||
},
|
||||
{
|
||||
"desc": "Publish to npm",
|
||||
"exec": "npm publish"
|
||||
},
|
||||
{
|
||||
"desc": "Checkout the development branch (master) and merge changes",
|
||||
"exec": "git checkout master && git merge stable"
|
||||
},
|
||||
{
|
||||
"desc": "Remove built dist files to re-ignore them",
|
||||
"exec": "grunt clean:dist"
|
||||
},
|
||||
{
|
||||
"desc": "Commit the removed dist files",
|
||||
"exec": "git add -u && git commit -m 'Removed dist files'"
|
||||
},
|
||||
{
|
||||
"desc": "Push development branch changes",
|
||||
"exec": "git push origin master"
|
||||
}
|
||||
{ "prompt": "text", "desc": "What is the the pull request number?", "id": "prNum" },
|
||||
{ "get": "{{project.urls.repo_api}}/pulls/{{prNum}}", "desc": "Get the PR information", "id": "pr" },
|
||||
{ "get": "{{project.urls.repo_api}}/pulls/{{prNum}}/commits", "desc": "Get the PR commits to access author info", "id": "prCommits" },
|
||||
[ "git checkout -b {{pr.user.login}}-{{pr.head.ref}} {{pr.base.ref}}", "Create a new branch for merging the changes" ],
|
||||
[ "git fetch {{pr.head.repo.ssh_url}} {{pr.head.ref}}", "Fetch the changes" ],
|
||||
[ "git merge --no-commit --squash FETCH_HEAD", "Merge the changes in without committing so they can be squashed" ],
|
||||
[ "grunt test", "Run tests to make sure they still pass" ],
|
||||
{ "prompt": "text", "desc": "Describe this change in one line", "id": "line" },
|
||||
[ "grunt chg-add:'{{line}} ([view](https\\://github.com/videojs/video.js/pull/{{prNum}}))'", "Add a line to the changelog" ],
|
||||
[ "git add CHANGELOG.md", "Add the changlelog change to be committed" ],
|
||||
[ "git commit -a --author='{{prCommits.[0].commit.author.name}} <{{prCommits.[0].commit.author.email}}>' -m '{{line}}. closes #{{prNum}}'", "Commit the changes" ],
|
||||
{ "prompt": "confirm", "desc": "Does everything look ok?" },
|
||||
[ "git checkout {{pr.base.ref}}", "Check out the base branch" ],
|
||||
[ "git merge {{pr.user.login}}-{{pr.head.ref}}", "Merge the changes" ],
|
||||
[ "git push origin {{pr.base.ref}}", "Push the changes to your remote copy of the project" ],
|
||||
[ "git push upstream {{pr.base.ref}}", "Push the changes to the main project" ],
|
||||
[ "git branch -D {{pr.user.login}}-{{pr.head.ref}}", "Delete the local branch used for merging" ]
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
externo
+41
@@ -0,0 +1,41 @@
|
||||
WEBVTT
|
||||
|
||||
00:00.700 --> 00:04.110
|
||||
Captions describe all relevant audio for the hearing impaired.
|
||||
[ Heroic music playing for a seagull ]
|
||||
|
||||
00:04.500 --> 00:05.000
|
||||
[ Splash!!! ]
|
||||
|
||||
00:05.100 --> 00:06.000
|
||||
[ Sploosh!!! ]
|
||||
|
||||
00:08.000 --> 00:09.225
|
||||
[ Splash...splash...splash splash splash ]
|
||||
|
||||
00:10.525 --> 00:11.255
|
||||
[ Splash, Sploosh again ]
|
||||
|
||||
00:13.500 --> 00:14.984
|
||||
Dolphin: eeeEEEEEeeee!
|
||||
|
||||
00:14.984 --> 00:16.984
|
||||
Dolphin: Squawk! eeeEEE?
|
||||
|
||||
00:25.000 --> 00:28.284
|
||||
[ A whole ton of splashes ]
|
||||
|
||||
00:29.500 --> 00:31.000
|
||||
Mine. Mine. Mine.
|
||||
|
||||
00:34.300 --> 00:36.000
|
||||
Shark: Chomp
|
||||
|
||||
00:36.800 --> 00:37.900
|
||||
Shark: CHOMP!!!
|
||||
|
||||
00:37.861 --> 00:41.193
|
||||
EEEEEEOOOOOOOOOOWHALENOISE
|
||||
|
||||
00:42.593 --> 00:45.611
|
||||
[ BIG SPLASH ]
|
||||
externo
+32
@@ -0,0 +1,32 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Video.js | HTML5 Video Player</title>
|
||||
|
||||
<!-- Chang URLs to wherever Video.js files will be hosted -->
|
||||
<link href="video-js.css" rel="stylesheet" type="text/css">
|
||||
<!-- video.js must be in the <head> for older IEs to work. -->
|
||||
<script src="video.js"></script>
|
||||
|
||||
<!-- Unless using the CDN hosted version, update the URL to the Flash SWF -->
|
||||
<script>
|
||||
videojs.options.flash.swf = "video-js.swf";
|
||||
</script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<video id="example_video_1" class="video-js vjs-default-skin" controls preload="none" width="640" height="264"
|
||||
poster="http://video-js.zencoder.com/oceans-clip.png"
|
||||
data-setup="{}">
|
||||
<source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4' />
|
||||
<source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm' />
|
||||
<source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg' />
|
||||
<track kind="captions" src="demo.captions.vtt" srclang="en" label="English"></track><!-- Tracks need an ending tag thanks to IE9 -->
|
||||
<track kind="subtitles" src="demo.captions.vtt" srclang="en" label="English"></track><!-- Tracks need an ending tag thanks to IE9 -->
|
||||
<p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a></p>
|
||||
</video>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
externo
BIN
Arquivo binário não exibido.
externo
+28
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Generated by IcoMoon</metadata>
|
||||
<defs>
|
||||
<font id="icomoon" horiz-adv-x="1024">
|
||||
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
||||
<missing-glyph horiz-adv-x="1024" />
|
||||
<glyph unicode=" " d="" horiz-adv-x="512" />
|
||||
<glyph unicode="" d="M1024 960v-416l-160 160-192-192-96 96 192 192-160 160zM448 288l-192-192 160-160h-416v416l160-160 192 192z" />
|
||||
<glyph unicode="" d="M192 832l640-384-640-384z" />
|
||||
<glyph unicode="" d="M128 832h320v-768h-320zM576 832h320v-768h-320z" />
|
||||
<glyph unicode="" d="M401.332 881.332c25.668 25.668 46.668 16.968 46.668-19.332v-828c0-36.3-21-44.998-46.668-19.33l-241.332 241.33h-160v384h160l241.332 241.332z" />
|
||||
<glyph unicode="" d="M549.020 218.98c-12.286 0-24.568 4.686-33.942 14.058-18.746 18.746-18.746 49.136 0 67.882 81.1 81.1 81.1 213.058 0 294.156-18.746 18.746-18.746 49.138 0 67.882 18.746 18.744 49.136 18.744 67.882 0 118.53-118.53 118.53-311.392 0-429.922-9.372-9.37-21.656-14.056-33.94-14.056zM401.332 881.332c25.668 25.668 46.668 16.968 46.668-19.332v-828c0-36.3-21-44.998-46.668-19.33l-241.332 241.33h-160v384h160l241.332 241.332z" />
|
||||
<glyph unicode="" d="M719.53 128.47c-12.286 0-24.568 4.686-33.942 14.058-18.744 18.744-18.744 49.136 0 67.882 131.006 131.006 131.006 344.17 0 475.176-18.744 18.746-18.744 49.138 0 67.882 18.744 18.742 49.138 18.744 67.882 0 81.594-81.592 126.53-190.076 126.53-305.468 0-115.39-44.936-223.876-126.53-305.47-9.372-9.374-21.656-14.060-33.94-14.060zM549.020 218.98c-12.286 0-24.568 4.686-33.942 14.058-18.746 18.746-18.746 49.136 0 67.882 81.1 81.1 81.1 213.058 0 294.156-18.746 18.746-18.746 49.138 0 67.882 18.746 18.744 49.136 18.744 67.882 0 118.53-118.53 118.53-311.392 0-429.922-9.372-9.37-21.656-14.056-33.94-14.056zM401.332 881.332c25.668 25.668 46.668 16.968 46.668-19.332v-828c0-36.3-21-44.998-46.668-19.33l-241.332 241.33h-160v384h160l241.332 241.332z" />
|
||||
<glyph unicode="" d="M890.040 37.96c-12.286 0-24.568 4.686-33.942 14.058-18.744 18.746-18.744 49.136 0 67.882 87.638 87.642 135.904 204.16 135.904 328.1 0 123.938-48.266 240.458-135.904 328.098-18.744 18.746-18.744 49.138 0 67.882 18.744 18.744 49.138 18.744 67.882 0 105.77-105.772 164.022-246.4 164.022-395.98 0-149.582-58.252-290.208-164.022-395.98-9.372-9.374-21.656-14.060-33.94-14.060zM719.53 128.47c-12.286 0-24.568 4.686-33.942 14.058-18.744 18.744-18.744 49.136 0 67.882 131.006 131.006 131.006 344.17 0 475.176-18.744 18.746-18.744 49.138 0 67.882 18.744 18.742 49.138 18.744 67.882 0 81.594-81.592 126.53-190.076 126.53-305.468 0-115.39-44.936-223.876-126.53-305.47-9.372-9.374-21.656-14.060-33.94-14.060zM549.020 218.98c-12.286 0-24.568 4.686-33.942 14.058-18.746 18.746-18.746 49.136 0 67.882 81.1 81.1 81.1 213.058 0 294.156-18.746 18.746-18.746 49.138 0 67.882 18.746 18.744 49.136 18.744 67.882 0 118.53-118.53 118.53-311.392 0-429.922-9.372-9.37-21.656-14.056-33.94-14.056zM401.332 881.332c25.668 25.668 46.668 16.968 46.668-19.332v-828c0-36.3-21-44.998-46.668-19.33l-241.332 241.33h-160v384h160l241.332 241.332z" horiz-adv-x="1088" />
|
||||
<glyph unicode="" d="M512 960l-320-512 320-512 320 512z" />
|
||||
<glyph unicode="" d="M0 960h1374.316v-1030.414h-1374.316v1030.414zM1245.462 449.276c-1.706 180.052-8.542 258.568-51.2 314.036-7.68 11.946-22.186 18.772-34.132 27.296-41.814 30.73-238.944 41.814-467.636 41.814-228.702 0-435.21-11.084-476.17-41.814-12.8-8.524-27.316-15.35-35.84-27.296-41.822-55.468-47.786-133.984-50.346-314.036 2.56-180.062 8.524-258.57 50.346-314.036 8.524-12.8 23.040-18.774 35.84-27.306 40.96-31.574 247.468-41.814 476.17-43.52 228.692 1.706 425.822 11.946 467.636 43.52 11.946 8.532 26.452 14.506 34.132 27.306 42.658 55.466 49.494 133.974 51.2 314.036zM662.358 495.904c-11.58 140.898-86.51 223.906-220.556 223.906-122.458 0-218.722-110.432-218.722-287.88 0-178.212 87.73-289.396 232.734-289.396 115.766 0 196.798 85.298 209.588 226.95h-138.302c-5.48-52.548-27.414-92.914-73.72-92.914-73.108 0-86.51 72.354-86.51 149.27 0 105.868 30.46 159.932 81.032 159.932 45.082 0 73.718-32.75 77.976-89.868h136.48zM1140.026 495.904c-11.57 140.898-86.51 223.906-220.546 223.906-122.466 0-218.722-110.432-218.722-287.88 0-178.212 87.73-289.396 232.734-289.396 115.758 0 196.788 85.298 209.58 226.95h-138.304c-5.47-52.548-27.404-92.914-73.71-92.914-73.116 0-86.518 72.354-86.518 149.27 0 105.868 30.468 159.932 81.030 159.932 45.084 0 73.728-32.75 77.986-89.868h136.47z" horiz-adv-x="1374" />
|
||||
<glyph unicode="" d="M128 832h768v-768h-768z" />
|
||||
<glyph unicode="" d="M384 832c0-70.692 57.308-128 128-128s128 57.308 128 128c0 70.692-57.308 128-128 128-70.692 0-128-57.308-128-128zM655.53 719.53c0-70.692 57.308-128 128-128s128 57.308 128 128c0 70.692-57.308 128-128 128-70.692 0-128-57.308-128-128zM832 448c0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64-35.346 0-64-28.654-64-64zM719.53 176.47c0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64-35.346 0-64-28.654-64-64zM448.002 64c0 0 0 0 0 0 0-35.346 28.654-64 64-64 35.346 0 64 28.654 64 64 0 0 0 0 0 0 0 0 0 0 0 0 0 35.346-28.654 64-64 64-35.346 0-64-28.654-64-64s0 0 0 0zM176.472 176.47c0 0 0 0 0 0 0-35.346 28.654-64 64-64 35.346 0 64 28.654 64 64 0 0 0 0 0 0 0 0 0 0 0 0 0 35.346-28.654 64-64 64-35.346 0-64-28.654-64-64s0 0 0 0zM144.472 719.53c0 0 0 0 0 0 0-53.019 42.981-96 96-96 53.019 0 96 42.981 96 96 0 0 0 0 0 0 0 0 0 0 0 0 0 53.019-42.981 96-96 96-53.019 0-96-42.981-96-96s0 0 0 0zM56 448c0-39.765 32.235-72 72-72s72 32.235 72 72c0 39.765-32.235 72-72 72-39.765 0-72-32.235-72-72z" />
|
||||
<glyph unicode="" d="M448 384v-416l-160 160-192-192-96 96 192 192-160 160zM1024 864l-192-192 160-160h-416v416l160-160 192 192z" />
|
||||
<glyph unicode="" d="M512 896c282.77 0 512-186.25 512-416 0-229.752-229.23-416-512-416-27.156 0-53.81 1.734-79.824 5.044-109.978-109.978-241.25-129.7-368.176-132.596v26.916c68.536 33.578 128 94.74 128 164.636 0 9.754-0.758 19.33-2.164 28.696-115.796 76.264-189.836 192.754-189.836 323.304 0 229.75 229.23 416 512 416z" />
|
||||
<glyph unicode="" d="M512 960c-282.77 0-512-229.23-512-512s229.23-512 512-512 512 229.23 512 512-229.23 512-512 512zM512 704c141.384 0 256-114.616 256-256s-114.616-256-256-256-256 114.616-256 256 114.616 256 256 256zM817.47 142.53c-81.594-81.594-190.080-126.53-305.47-126.53-115.392 0-223.876 44.936-305.47 126.53-81.594 81.594-126.53 190.078-126.53 305.47 0 115.39 44.936 223.876 126.53 305.47l67.882-67.882c0 0 0 0 0 0-131.006-131.006-131.006-344.17 0-475.176 63.462-63.462 147.838-98.412 237.588-98.412 89.748 0 174.124 34.95 237.588 98.412 131.006 131.006 131.006 344.168 0 475.176l67.882 67.882c81.594-81.594 126.53-190.080 126.53-305.47 0-115.392-44.936-223.876-126.53-305.47z" />
|
||||
<glyph unicode="" d="M864 256c-45.16 0-85.92-18.738-115.012-48.83l-431.004 215.502c1.314 8.252 2.016 16.706 2.016 25.328s-0.702 17.076-2.016 25.326l431.004 215.502c29.092-30.090 69.852-48.828 115.012-48.828 88.366 0 160 71.634 160 160s-71.634 160-160 160-160-71.634-160-160c0-8.622 0.704-17.076 2.016-25.326l-431.004-215.504c-29.092 30.090-69.852 48.83-115.012 48.83-88.366 0-160-71.636-160-160 0-88.368 71.634-160 160-160 45.16 0 85.92 18.738 115.012 48.828l431.004-215.502c-1.312-8.25-2.016-16.704-2.016-25.326 0-88.368 71.634-160 160-160s160 71.632 160 160c0 88.364-71.634 160-160 160z" />
|
||||
<glyph unicode="" d="M1024 448c-1.278 66.862-15.784 133.516-42.576 194.462-26.704 61-65.462 116.258-113.042 161.92-47.552 45.696-103.944 81.82-164.984 105.652-61.004 23.924-126.596 35.352-191.398 33.966-64.81-1.282-129.332-15.374-188.334-41.356-59.048-25.896-112.542-63.47-156.734-109.576-44.224-46.082-79.16-100.708-102.186-159.798-23.114-59.062-34.128-122.52-32.746-185.27 1.286-62.76 14.964-125.148 40.134-182.206 25.088-57.1 61.476-108.828 106.11-151.548 44.61-42.754 97.472-76.504 154.614-98.72 57.118-22.304 118.446-32.902 179.142-31.526 60.708 1.29 120.962 14.554 176.076 38.914 55.15 24.282 105.116 59.48 146.366 102.644 41.282 43.14 73.844 94.236 95.254 149.43 13.034 33.458 21.88 68.4 26.542 103.798 1.246-0.072 2.498-0.12 3.762-0.12 35.346 0 64 28.652 64 64 0 1.796-0.094 3.572-0.238 5.332h0.238zM922.306 278.052c-23.472-53.202-57.484-101.4-99.178-141.18-41.67-39.81-91-71.186-144.244-91.79-53.228-20.678-110.29-30.452-166.884-29.082-56.604 1.298-112.596 13.736-163.82 36.474-51.25 22.666-97.684 55.49-135.994 95.712-38.338 40.198-68.528 87.764-88.322 139.058-19.87 51.284-29.228 106.214-27.864 160.756 1.302 54.552 13.328 108.412 35.254 157.69 21.858 49.3 53.498 93.97 92.246 130.81 38.73 36.868 84.53 65.87 133.874 84.856 49.338 19.060 102.136 28.006 154.626 26.644 52.5-1.306 104.228-12.918 151.562-34.034 47.352-21.050 90.256-51.502 125.624-88.782 35.396-37.258 63.21-81.294 81.39-128.688 18.248-47.392 26.782-98.058 25.424-148.496h0.238c-0.144-1.76-0.238-3.536-0.238-5.332 0-33.012 24.992-60.174 57.086-63.624-6.224-34.822-16.53-68.818-30.78-100.992z" />
|
||||
<glyph unicode="" d="M512 960c-278.748 0-505.458-222.762-511.848-499.974 5.92 241.864 189.832 435.974 415.848 435.974 229.75 0 416-200.576 416-448 0-53.020 42.98-96 96-96 53.020 0 96 42.98 96 96 0 282.77-229.23 512-512 512zM512-64c278.748 0 505.458 222.762 511.848 499.974-5.92-241.864-189.832-435.974-415.848-435.974-229.75 0-416 200.576-416 448 0 53.020-42.98 96-96 96-53.020 0-96-42.98-96-96 0-282.77 229.23-512 512-512z" />
|
||||
<glyph unicode="" d="M1024 351.906v192.188l-146.774 24.462c-5.958 18.132-13.222 35.668-21.694 52.5l86.454 121.034-135.896 135.898-120.826-86.304c-16.91 8.554-34.538 15.888-52.768 21.902l-24.402 146.414h-192.188l-24.402-146.416c-18.23-6.014-35.858-13.348-52.766-21.902l-120.828 86.304-135.898-135.898 86.454-121.036c-8.47-16.83-15.734-34.366-21.692-52.498l-146.774-24.46v-192.188l147.118-24.52c5.96-17.968 13.21-35.348 21.642-52.030l-86.748-121.448 135.898-135.896 121.654 86.894c16.602-8.35 33.89-15.528 51.764-21.434l24.578-147.472h192.188l24.578 147.474c17.874 5.906 35.162 13.084 51.766 21.432l121.652-86.892 135.896 135.896-86.744 121.446c8.432 16.682 15.678 34.062 21.64 52.032l147.118 24.518zM512 320c-70.692 0-128 57.306-128 128 0 70.692 57.308 128 128 128 70.694 0 128-57.308 128-128 0-70.694-57.306-128-128-128z" />
|
||||
</font></defs></svg>
|
||||
|
Depois Largura: | Altura: | Tamanho: 10 KiB |
externo
BIN
Arquivo binário não exibido.
externo
BIN
Arquivo binário não exibido.
externo
+26
@@ -0,0 +1,26 @@
|
||||
videojs.addLanguage("de",{
|
||||
"Play": "Wiedergabe",
|
||||
"Pause": "Pause",
|
||||
"Current Time": "Aktueller Zeitpunkt",
|
||||
"Duration Time": "Dauer",
|
||||
"Remaining Time": "Verbleibende Zeit",
|
||||
"Stream Type": "Streamtyp",
|
||||
"LIVE": "LIVE",
|
||||
"Loaded": "Geladen",
|
||||
"Progress": "Status",
|
||||
"Fullscreen": "Vollbild",
|
||||
"Non-Fullscreen": "Kein Vollbild",
|
||||
"Mute": "Ton aus",
|
||||
"Unmuted": "Ton ein",
|
||||
"Playback Rate": "Wiedergabegeschwindigkeit",
|
||||
"Subtitles": "Untertitel",
|
||||
"subtitles off": "Untertitel aus",
|
||||
"Captions": "Untertitel",
|
||||
"captions off": "Untertitel aus",
|
||||
"Chapters": "Kapitel",
|
||||
"You aborted the video playback": "Sie haben die Videowiedergabe abgebrochen.",
|
||||
"A network error caused the video download to fail part-way.": "Der Videodownload ist aufgrund eines Netzwerkfehlers fehlgeschlagen.",
|
||||
"The video could not be loaded, either because the server or network failed or because the format is not supported.": "Das Video konnte nicht geladen werden, da entweder ein Server- oder Netzwerkfehler auftrat oder das Format nicht unterstützt wird.",
|
||||
"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "Die Videowiedergabe wurde entweder wegen eines Problems mit einem beschädigten Video oder wegen verwendeten Funktionen, die vom Browser nicht unterstützt werden, abgebrochen.",
|
||||
"No compatible source was found for this video.": "Für dieses Video wurde keine kompatible Quelle gefunden."
|
||||
});
|
||||
externo
+26
@@ -0,0 +1,26 @@
|
||||
videojs.addLanguage("es",{
|
||||
"Play": "Reproducción",
|
||||
"Pause": "Pausa",
|
||||
"Current Time": "Tiempo reproducido",
|
||||
"Duration Time": "Duración total",
|
||||
"Remaining Time": "Tiempo restante",
|
||||
"Stream Type": "Tipo de secuencia",
|
||||
"LIVE": "DIRECTO",
|
||||
"Loaded": "Cargado",
|
||||
"Progress": "Progreso",
|
||||
"Fullscreen": "Pantalla completa",
|
||||
"Non-Fullscreen": "Pantalla no completa",
|
||||
"Mute": "Silenciar",
|
||||
"Unmuted": "No silenciado",
|
||||
"Playback Rate": "Velocidad de reproducción",
|
||||
"Subtitles": "Subtítulos",
|
||||
"subtitles off": "Subtítulos desactivados",
|
||||
"Captions": "Subtítulos especiales",
|
||||
"captions off": "Subtítulos especiales desactivados",
|
||||
"Chapters": "Capítulos",
|
||||
"You aborted the video playback": "Ha interrumpido la reproducción del vídeo.",
|
||||
"A network error caused the video download to fail part-way.": "Un error de red ha interrumpido la descarga del vídeo.",
|
||||
"The video could not be loaded, either because the server or network failed or because the format is not supported.": "No se ha podido cargar el vídeo debido a un fallo de red o del servidor o porque el formato es incompatible.",
|
||||
"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "La reproducción de vídeo se ha interrumpido por un problema de corrupción de datos o porque el vídeo precisa funciones que su navegador no ofrece.",
|
||||
"No compatible source was found for this video.": "No se ha encontrado ninguna fuente compatible con este vídeo."
|
||||
});
|
||||
externo
+26
@@ -0,0 +1,26 @@
|
||||
videojs.addLanguage("fr",{
|
||||
"Play": "Lecture",
|
||||
"Pause": "Pause",
|
||||
"Current Time": "Temps actuel",
|
||||
"Duration Time": "Durée",
|
||||
"Remaining Time": "Temps restant",
|
||||
"Stream Type": "Type de flux",
|
||||
"LIVE": "EN DIRECT",
|
||||
"Loaded": "Chargé",
|
||||
"Progress": "Progression",
|
||||
"Fullscreen": "Plein écran",
|
||||
"Non-Fullscreen": "Fenêtré",
|
||||
"Mute": "Sourdine",
|
||||
"Unmuted": "Son activé",
|
||||
"Playback Rate": "Vitesse de lecture",
|
||||
"Subtitles": "Sous-titres",
|
||||
"subtitles off": "Sous-titres désactivés",
|
||||
"Captions": "Sous-titres",
|
||||
"captions off": "Sous-titres désactivés",
|
||||
"Chapters": "Chapitres",
|
||||
"You aborted the video playback": "Vous avez interrompu la lecture de la vidéo.",
|
||||
"A network error caused the video download to fail part-way.": "Une erreur de réseau a interrompu le téléchargement de la vidéo.",
|
||||
"The video could not be loaded, either because the server or network failed or because the format is not supported.": "Cette vidéo n'a pas pu être chargée, soit parce que le serveur ou le réseau a échoué ou parce que le format n'est pas reconnu.",
|
||||
"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "La lecture de la vidéo a été interrompue à cause d'un problème de corruption ou parce que la vidéo utilise des fonctionnalités non prises en charge par votre navigateur.",
|
||||
"No compatible source was found for this video.": "Aucune source compatible n'a été trouvée pour cette vidéo."
|
||||
});
|
||||
externo
+26
@@ -0,0 +1,26 @@
|
||||
videojs.addLanguage("it",{
|
||||
"Play": "Play",
|
||||
"Pause": "Pausa",
|
||||
"Current Time": "Orario attuale",
|
||||
"Duration Time": "Durata",
|
||||
"Remaining Time": "Tempo rimanente",
|
||||
"Stream Type": "Tipo del Streaming",
|
||||
"LIVE": "LIVE",
|
||||
"Loaded": "Caricato",
|
||||
"Progress": "Stato",
|
||||
"Fullscreen": "Schermo intero",
|
||||
"Non-Fullscreen": "Chiudi schermo intero",
|
||||
"Mute": "Muto",
|
||||
"Unmuted": "Audio",
|
||||
"Playback Rate": "Tasso di riproduzione",
|
||||
"Subtitles": "Sottotitoli",
|
||||
"subtitles off": "Senza sottotitoli",
|
||||
"Captions": "Sottotitoli non udenti",
|
||||
"captions off": "Senza sottotitoli non udenti",
|
||||
"Chapters": "Capitolo",
|
||||
"You aborted the video playback": "La riproduzione del filmato è stata interrotta.",
|
||||
"A network error caused the video download to fail part-way.": "Il download del filmato è stato interrotto a causa di un problema rete.",
|
||||
"The video could not be loaded, either because the server or network failed or because the format is not supported.": "Il filmato non può essere caricato a causa di un errore nel server o nella rete o perché il formato non viene supportato.",
|
||||
"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "La riproduzione del filmato è stata interrotta a causa di un file danneggiato o per l’utilizzo di impostazioni non supportate dal browser.",
|
||||
"No compatible source was found for this video.": "Non ci sono fonti compatibili per questo filmato."
|
||||
});
|
||||
externo
+26
@@ -0,0 +1,26 @@
|
||||
videojs.addLanguage("ja",{
|
||||
"Play": "再生",
|
||||
"Pause": "一時停止",
|
||||
"Current Time": "現在の時間",
|
||||
"Duration Time": "長さ",
|
||||
"Remaining Time": "残りの時間",
|
||||
"Stream Type": "ストリームの種類",
|
||||
"LIVE": "ライブ",
|
||||
"Loaded": "ロード済み",
|
||||
"Progress": "進行状況",
|
||||
"Fullscreen": "フルスクリーン",
|
||||
"Non-Fullscreen": "フルスクリーン以外",
|
||||
"Mute": "ミュート",
|
||||
"Unmuted": "ミュート解除",
|
||||
"Playback Rate": "再生レート",
|
||||
"Subtitles": "サブタイトル",
|
||||
"subtitles off": "サブタイトル オフ",
|
||||
"Captions": "キャプション",
|
||||
"captions off": "キャプション オフ",
|
||||
"Chapters": "チャプター",
|
||||
"You aborted the video playback": "動画再生を中止しました",
|
||||
"A network error caused the video download to fail part-way.": "ネットワーク エラーにより動画のダウンロードが途中で失敗しました",
|
||||
"The video could not be loaded, either because the server or network failed or because the format is not supported.": "サーバーまたはネットワークのエラー、またはフォーマットがサポートされていないため、動画をロードできませんでした",
|
||||
"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "破損の問題、またはお使いのブラウザがサポートしていない機能が動画に使用されていたため、動画の再生が中止されました",
|
||||
"No compatible source was found for this video.": "この動画に対して互換性のあるソースが見つかりませんでした"
|
||||
});
|
||||
externo
+26
@@ -0,0 +1,26 @@
|
||||
videojs.addLanguage("ko",{
|
||||
"Play": "재생",
|
||||
"Pause": "일시중지",
|
||||
"Current Time": "현재 시간",
|
||||
"Duration Time": "지정 기간",
|
||||
"Remaining Time": "남은 시간",
|
||||
"Stream Type": "스트리밍 유형",
|
||||
"LIVE": "라이브",
|
||||
"Loaded": "로드됨",
|
||||
"Progress": "진행",
|
||||
"Fullscreen": "전체 화면",
|
||||
"Non-Fullscreen": "전체 화면 해제",
|
||||
"Mute": "음소거",
|
||||
"Unmuted": "음소거 해제",
|
||||
"Playback Rate": "재생 비율",
|
||||
"Subtitles": "서브타이틀",
|
||||
"subtitles off": "서브타이틀 끄기",
|
||||
"Captions": "자막",
|
||||
"captions off": "자막 끄기",
|
||||
"Chapters": "챕터",
|
||||
"You aborted the video playback": "비디오 재생을 취소했습니다.",
|
||||
"A network error caused the video download to fail part-way.": "네트워크 오류로 인하여 비디오 일부를 다운로드하지 못 했습니다.",
|
||||
"The video could not be loaded, either because the server or network failed or because the format is not supported.": "비디오를 로드할 수 없습니다. 서버 혹은 네트워크 오류 때문이거나 지원되지 않는 형식 때문일 수 있습니다.",
|
||||
"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "비디오 재생이 취소됐습니다. 비디오가 손상되었거나 비디오가 사용하는 기능을 브라우저에서 지원하지 않는 것 같습니다.",
|
||||
"No compatible source was found for this video.": "비디오에 호환되지 않는 소스가 있습니다."
|
||||
});
|
||||
externo
+26
@@ -0,0 +1,26 @@
|
||||
videojs.addLanguage("nl",{
|
||||
"Play": "Afspelen",
|
||||
"Pause": "Pauze",
|
||||
"Current Time": "Huidige Tijd",
|
||||
"Duration Time": "Looptijd",
|
||||
"Remaining Time": "Resterende Tijd",
|
||||
"Stream Type": "Stream Type",
|
||||
"LIVE": "LIVE",
|
||||
"Loaded": "Geladen",
|
||||
"Progress": "Status",
|
||||
"Fullscreen": "Volledig scherm",
|
||||
"Non-Fullscreen": "Geen volledig scherm",
|
||||
"Mute": "Geluid Uit",
|
||||
"Unmuted": "Geluid Aan",
|
||||
"Playback Rate": "Weergave Rate",
|
||||
"Subtitles": "Ondertiteling",
|
||||
"subtitles off": "Ondertiteling uit",
|
||||
"Captions": "Onderschriften",
|
||||
"captions off": "Onderschriften uit",
|
||||
"Chapters": "Hoofdstukken",
|
||||
"You aborted the video playback": "Je hebt de video weergave afgebroken.",
|
||||
"A network error caused the video download to fail part-way.": "De video download is mislukt door een netwerkfout.",
|
||||
"The video could not be loaded, either because the server or network failed or because the format is not supported.": "De video kon niet worden geladen, veroorzaakt door een server of netwerkfout of het formaat word niet ondersteund.",
|
||||
"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "De video weergave is afgebroken omdat deze beschadigd is of de video gebruikt functionaliteit die niet door je browser word ondersteund.",
|
||||
"No compatible source was found for this video.": "Voor deze video is geen ondersteunde bron gevonden."
|
||||
});
|
||||
externo
+26
@@ -0,0 +1,26 @@
|
||||
videojs.addLanguage("pt-BR",{
|
||||
"Play": "Tocar",
|
||||
"Pause": "Pause",
|
||||
"Current Time": "Tempo",
|
||||
"Duration Time": "Duração",
|
||||
"Remaining Time": "Tempo Restante",
|
||||
"Stream Type": "Tipo de Stream",
|
||||
"LIVE": "AO VIVO",
|
||||
"Loaded": "Carregado",
|
||||
"Progress": "Progressão",
|
||||
"Fullscreen": "Tela Cheia",
|
||||
"Non-Fullscreen": "Tela Normal",
|
||||
"Mute": "Mudo",
|
||||
"Unmuted": "Habilitar Som",
|
||||
"Playback Rate": "Velocidade",
|
||||
"Subtitles": "Legendas",
|
||||
"subtitles off": "Sem Legendas",
|
||||
"Captions": "Anotações",
|
||||
"captions off": "Sem Anotações",
|
||||
"Chapters": "Capítulos",
|
||||
"You aborted the video playback": "Você parou a execução de vídeo.",
|
||||
"A network error caused the video download to fail part-way.": "Um erro na rede fez o vídeo parar parcialmente.",
|
||||
"The video could not be loaded, either because the server or network failed or because the format is not supported.": "O vídeo não pode ser carregado, ou porque houve um problema com sua rede ou pelo formato do vídeo não ser suportado.",
|
||||
"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "A Execução foi interrompida por um problema com o vídeo ou por seu navegador não dar suporte ao seu formato.",
|
||||
"No compatible source was found for this video.": "Não foi encontrada fonte de vídeo compatível."
|
||||
});
|
||||
externo
+26
@@ -0,0 +1,26 @@
|
||||
videojs.addLanguage("ru",{
|
||||
"Play": "Воспроизвести",
|
||||
"Pause": "Приостановить",
|
||||
"Current Time": "Текущее время",
|
||||
"Duration Time": "Продолжительность",
|
||||
"Remaining Time": "Оставшееся время",
|
||||
"Stream Type": "Тип потока",
|
||||
"LIVE": "ОНЛАЙН",
|
||||
"Loaded": "Загрузка",
|
||||
"Progress": "Прогресс",
|
||||
"Fullscreen": "Полноэкранный режим",
|
||||
"Non-Fullscreen": "Неполноэкранный режим",
|
||||
"Mute": "Без звука",
|
||||
"Unmuted": "Со звуком",
|
||||
"Playback Rate": "Скорость воспроизведения",
|
||||
"Subtitles": "Субтитры",
|
||||
"subtitles off": "Субтитры выкл.",
|
||||
"Captions": "Подписи",
|
||||
"captions off": "Подписи выкл.",
|
||||
"Chapters": "Главы",
|
||||
"You aborted the video playback": "Вы прервали воспроизведение видео",
|
||||
"A network error caused the video download to fail part-way.": "Ошибка сети вызвала сбой во время загрузки видео.",
|
||||
"The video could not be loaded, either because the server or network failed or because the format is not supported.": "Невозможно загрузить видео из-за сетевого или серверного сбоя либо формат не поддерживается.",
|
||||
"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "Воспроизведение видео было приостановлено из-за повреждения либо в связи с тем, что видео использует функции, неподдерживаемые вашим браузером.",
|
||||
"No compatible source was found for this video.": "Совместимые источники для этого видео отсутствуют."
|
||||
});
|
||||
externo
+26
@@ -0,0 +1,26 @@
|
||||
videojs.addLanguage("uk",{
|
||||
"Play": "Відтворити",
|
||||
"Pause": "Призупинити",
|
||||
"Current Time": "Поточний час",
|
||||
"Duration Time": "Тривалість",
|
||||
"Remaining Time": "Час, що залишився",
|
||||
"Stream Type": "Тип потоку",
|
||||
"LIVE": "НАЖИВО",
|
||||
"Loaded": "Завантаження",
|
||||
"Progress": "Прогрес",
|
||||
"Fullscreen": "Повноекранний режим",
|
||||
"Non-Fullscreen": "Неповноекранний режим",
|
||||
"Mute": "Без звуку",
|
||||
"Unmuted": "Зі звуком",
|
||||
"Playback Rate": "Швидкість відтворення",
|
||||
"Subtitles": "Субтитри",
|
||||
"subtitles off": "Без субтитрів",
|
||||
"Captions": "Підписи",
|
||||
"captions off": "Без підписів",
|
||||
"Chapters": "Розділи",
|
||||
"You aborted the video playback": "Ви припинили відтворення відео",
|
||||
"A network error caused the video download to fail part-way.": "Помилка мережі викликала збій під час завантаження відео.",
|
||||
"The video could not be loaded, either because the server or network failed or because the format is not supported.": "Неможливо завантажити відео через мережевий чи серверний збій або формат не підтримується.",
|
||||
"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "Відтворення відео було припинено через пошкодження або у зв'язку з тим, що відео використовує функції, які не підтримуються вашим браузером.",
|
||||
"No compatible source was found for this video.": "Сумісні джерела для цього відео відсутні."
|
||||
});
|
||||
externo
+27
@@ -0,0 +1,27 @@
|
||||
videojs.addLanguage("zh",{
|
||||
"Play": "播放",
|
||||
"Pause": "暂停",
|
||||
"Current Time": "当前时间",
|
||||
"Duration Time": "时长",
|
||||
"Remaining Time": "剩余时间",
|
||||
"Stream Type": "媒体流类型",
|
||||
"LIVE": "直播",
|
||||
"Loaded": "加载完毕",
|
||||
"Progress": "进度",
|
||||
"Fullscreen": "全屏",
|
||||
"Non-Fullscreen": "退出全屏",
|
||||
"Mute": "静音",
|
||||
"Unmuted": "取消静音",
|
||||
"Playback Rate": "播放码率",
|
||||
"Subtitles": "字幕",
|
||||
"subtitles off": "字幕关闭",
|
||||
"Captions": "内嵌字幕",
|
||||
"captions off": "内嵌字幕关闭",
|
||||
"Chapters": "节目段落",
|
||||
"You aborted the video playback": "视频播放被终止",
|
||||
"A network error caused the video download to fail part-way.": "网络错误导致视频下载中途失败。",
|
||||
"The video could not be loaded, either because the server or network failed or because the format is not supported.": "视频因格式不支持或者服务器或网络的问题无法加载。",
|
||||
"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "由于视频文件损坏或是该视频使用了你的浏览器不支持的功能,播放终止。",
|
||||
"No compatible source was found for this video.": "无法找到此视频兼容的源。",
|
||||
"The video is encrypted and we do not have the keys to decrypt it.": "视频已加密,无法解密。"
|
||||
});
|
||||
externo
+968
@@ -0,0 +1,968 @@
|
||||
/*!
|
||||
Video.js Default Styles (http://videojs.com)
|
||||
Version 4.10.0
|
||||
Create your own skin at http://designer.videojs.com
|
||||
*/
|
||||
/* SKIN
|
||||
================================================================================
|
||||
The main class name for all skin-specific styles. To make your own skin,
|
||||
replace all occurances of 'vjs-default-skin' with a new name. Then add your new
|
||||
skin name to your video tag instead of the default skin.
|
||||
e.g. <video class="video-js my-skin-name">
|
||||
*/
|
||||
.vjs-default-skin {
|
||||
color: #cccccc;
|
||||
}
|
||||
/* Custom Icon Font
|
||||
--------------------------------------------------------------------------------
|
||||
The control icons are from a custom font. Each icon corresponds to a character
|
||||
(e.g. "\e001"). Font icons allow for easy scaling and coloring of icons.
|
||||
*/
|
||||
@font-face {
|
||||
font-family: 'VideoJS';
|
||||
src: url('font/vjs.eot');
|
||||
src: url('font/vjs.eot?#iefix') format('embedded-opentype'), url('font/vjs.woff') format('woff'), url('font/vjs.ttf') format('truetype'), url('font/vjs.svg#icomoon') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
/* Base UI Component Classes
|
||||
--------------------------------------------------------------------------------
|
||||
*/
|
||||
/* Slider - used for Volume bar and Seek bar */
|
||||
.vjs-default-skin .vjs-slider {
|
||||
/* Replace browser focus hightlight with handle highlight */
|
||||
outline: 0;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
/* background-color-with-alpha */
|
||||
background-color: #333333;
|
||||
background-color: rgba(51, 51, 51, 0.9);
|
||||
}
|
||||
.vjs-default-skin .vjs-slider:focus {
|
||||
/* box-shadow */
|
||||
-webkit-box-shadow: 0 0 2em #ffffff;
|
||||
-moz-box-shadow: 0 0 2em #ffffff;
|
||||
box-shadow: 0 0 2em #ffffff;
|
||||
}
|
||||
.vjs-default-skin .vjs-slider-handle {
|
||||
position: absolute;
|
||||
/* Needed for IE6 */
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
.vjs-default-skin .vjs-slider-handle:before {
|
||||
content: "\e009";
|
||||
font-family: VideoJS;
|
||||
font-size: 1em;
|
||||
line-height: 1;
|
||||
text-align: center;
|
||||
text-shadow: 0em 0em 1em #fff;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
/* Rotate the square icon to make a diamond */
|
||||
/* transform */
|
||||
-webkit-transform: rotate(-45deg);
|
||||
-moz-transform: rotate(-45deg);
|
||||
-ms-transform: rotate(-45deg);
|
||||
-o-transform: rotate(-45deg);
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
/* Control Bar
|
||||
--------------------------------------------------------------------------------
|
||||
The default control bar that is a container for most of the controls.
|
||||
*/
|
||||
.vjs-default-skin .vjs-control-bar {
|
||||
/* Start hidden */
|
||||
display: none;
|
||||
position: absolute;
|
||||
/* Place control bar at the bottom of the player box/video.
|
||||
If you want more margin below the control bar, add more height. */
|
||||
bottom: 0;
|
||||
/* Use left/right to stretch to 100% width of player div */
|
||||
left: 0;
|
||||
right: 0;
|
||||
/* Height includes any margin you want above or below control items */
|
||||
height: 3.0em;
|
||||
/* background-color-with-alpha */
|
||||
background-color: #07141e;
|
||||
background-color: rgba(7, 20, 30, 0.7);
|
||||
}
|
||||
/* Show the control bar only once the video has started playing */
|
||||
.vjs-default-skin.vjs-has-started .vjs-control-bar {
|
||||
display: block;
|
||||
/* Visibility needed to make sure things hide in older browsers too. */
|
||||
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
/* transition */
|
||||
-webkit-transition: visibility 0.1s, opacity 0.1s;
|
||||
-moz-transition: visibility 0.1s, opacity 0.1s;
|
||||
-o-transition: visibility 0.1s, opacity 0.1s;
|
||||
transition: visibility 0.1s, opacity 0.1s;
|
||||
}
|
||||
/* Hide the control bar when the video is playing and the user is inactive */
|
||||
.vjs-default-skin.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar {
|
||||
display: block;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
/* transition */
|
||||
-webkit-transition: visibility 1s, opacity 1s;
|
||||
-moz-transition: visibility 1s, opacity 1s;
|
||||
-o-transition: visibility 1s, opacity 1s;
|
||||
transition: visibility 1s, opacity 1s;
|
||||
}
|
||||
.vjs-default-skin.vjs-controls-disabled .vjs-control-bar {
|
||||
display: none;
|
||||
}
|
||||
.vjs-default-skin.vjs-using-native-controls .vjs-control-bar {
|
||||
display: none;
|
||||
}
|
||||
/* The control bar shouldn't show after an error */
|
||||
.vjs-default-skin.vjs-error .vjs-control-bar {
|
||||
display: none;
|
||||
}
|
||||
/* Don't hide the control bar if it's audio */
|
||||
.vjs-audio.vjs-default-skin.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
/* IE8 is flakey with fonts, and you have to change the actual content to force
|
||||
fonts to show/hide properly.
|
||||
- "\9" IE8 hack didn't work for this
|
||||
- Found in XP IE8 from http://modern.ie. Does not show up in "IE8 mode" in IE9
|
||||
*/
|
||||
@media \0screen {
|
||||
.vjs-default-skin.vjs-user-inactive.vjs-playing .vjs-control-bar :before {
|
||||
content: "";
|
||||
}
|
||||
}
|
||||
/* General styles for individual controls. */
|
||||
.vjs-default-skin .vjs-control {
|
||||
outline: none;
|
||||
position: relative;
|
||||
float: left;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 3.0em;
|
||||
width: 4em;
|
||||
}
|
||||
/* Font button icons */
|
||||
.vjs-default-skin .vjs-control:before {
|
||||
font-family: VideoJS;
|
||||
font-size: 1.5em;
|
||||
line-height: 2;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
/* Replacement for focus outline */
|
||||
.vjs-default-skin .vjs-control:focus:before,
|
||||
.vjs-default-skin .vjs-control:hover:before {
|
||||
text-shadow: 0em 0em 1em #ffffff;
|
||||
}
|
||||
.vjs-default-skin .vjs-control:focus {
|
||||
/* outline: 0; */
|
||||
/* keyboard-only users cannot see the focus on several of the UI elements when
|
||||
this is set to 0 */
|
||||
|
||||
}
|
||||
/* Hide control text visually, but have it available for screenreaders */
|
||||
.vjs-default-skin .vjs-control-text {
|
||||
/* hide-visually */
|
||||
border: 0;
|
||||
clip: rect(0 0 0 0);
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
}
|
||||
/* Play/Pause
|
||||
--------------------------------------------------------------------------------
|
||||
*/
|
||||
.vjs-default-skin .vjs-play-control {
|
||||
width: 5em;
|
||||
cursor: pointer;
|
||||
}
|
||||
.vjs-default-skin .vjs-play-control:before {
|
||||
content: "\e001";
|
||||
}
|
||||
.vjs-default-skin.vjs-playing .vjs-play-control:before {
|
||||
content: "\e002";
|
||||
}
|
||||
/* Playback toggle
|
||||
--------------------------------------------------------------------------------
|
||||
*/
|
||||
.vjs-default-skin .vjs-playback-rate .vjs-playback-rate-value {
|
||||
font-size: 1.5em;
|
||||
line-height: 2;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.vjs-default-skin .vjs-playback-rate.vjs-menu-button .vjs-menu .vjs-menu-content {
|
||||
width: 4em;
|
||||
left: -2em;
|
||||
list-style: none;
|
||||
}
|
||||
/* Volume/Mute
|
||||
-------------------------------------------------------------------------------- */
|
||||
.vjs-default-skin .vjs-mute-control,
|
||||
.vjs-default-skin .vjs-volume-menu-button {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
}
|
||||
.vjs-default-skin .vjs-mute-control:before,
|
||||
.vjs-default-skin .vjs-volume-menu-button:before {
|
||||
content: "\e006";
|
||||
}
|
||||
.vjs-default-skin .vjs-mute-control.vjs-vol-0:before,
|
||||
.vjs-default-skin .vjs-volume-menu-button.vjs-vol-0:before {
|
||||
content: "\e003";
|
||||
}
|
||||
.vjs-default-skin .vjs-mute-control.vjs-vol-1:before,
|
||||
.vjs-default-skin .vjs-volume-menu-button.vjs-vol-1:before {
|
||||
content: "\e004";
|
||||
}
|
||||
.vjs-default-skin .vjs-mute-control.vjs-vol-2:before,
|
||||
.vjs-default-skin .vjs-volume-menu-button.vjs-vol-2:before {
|
||||
content: "\e005";
|
||||
}
|
||||
.vjs-default-skin .vjs-volume-control {
|
||||
width: 5em;
|
||||
float: right;
|
||||
}
|
||||
.vjs-default-skin .vjs-volume-bar {
|
||||
width: 5em;
|
||||
height: 0.6em;
|
||||
margin: 1.1em auto 0;
|
||||
}
|
||||
.vjs-default-skin .vjs-volume-level {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 0.5em;
|
||||
/* assuming volume starts at 1.0 */
|
||||
|
||||
width: 100%;
|
||||
background: #66a8cc url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAP0lEQVQIHWWMAQoAIAgDR/QJ/Ub//04+w7ZICBwcOg5FZi5iBB82AGzixEglJrd4TVK5XUJpskSTEvpdFzX9AB2pGziSQcvAAAAAAElFTkSuQmCC) -50% 0 repeat;
|
||||
}
|
||||
.vjs-default-skin .vjs-volume-bar .vjs-volume-handle {
|
||||
width: 0.5em;
|
||||
height: 0.5em;
|
||||
/* Assumes volume starts at 1.0. If you change the size of the
|
||||
handle relative to the volume bar, you'll need to update this value
|
||||
too. */
|
||||
|
||||
left: 4.5em;
|
||||
}
|
||||
.vjs-default-skin .vjs-volume-handle:before {
|
||||
font-size: 0.9em;
|
||||
top: -0.2em;
|
||||
left: -0.2em;
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
}
|
||||
/* The volume menu button is like menu buttons (captions/subtitles) but works
|
||||
a little differently. It needs to be possible to tab to the volume slider
|
||||
without hitting space bar on the menu button. To do this we're not using
|
||||
display:none to hide the slider menu by default, and instead setting the
|
||||
width and height to zero. */
|
||||
.vjs-default-skin .vjs-volume-menu-button .vjs-menu {
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-top-color: transparent;
|
||||
}
|
||||
.vjs-default-skin .vjs-volume-menu-button .vjs-menu .vjs-menu-content {
|
||||
height: 0;
|
||||
width: 0;
|
||||
}
|
||||
.vjs-default-skin .vjs-volume-menu-button:hover .vjs-menu,
|
||||
.vjs-default-skin .vjs-volume-menu-button .vjs-menu.vjs-lock-showing {
|
||||
border-top-color: rgba(7, 40, 50, 0.5);
|
||||
/* Same as ul background */
|
||||
|
||||
}
|
||||
.vjs-default-skin .vjs-volume-menu-button:hover .vjs-menu .vjs-menu-content,
|
||||
.vjs-default-skin .vjs-volume-menu-button .vjs-menu.vjs-lock-showing .vjs-menu-content {
|
||||
height: 2.9em;
|
||||
width: 10em;
|
||||
}
|
||||
/* Progress
|
||||
--------------------------------------------------------------------------------
|
||||
*/
|
||||
.vjs-default-skin .vjs-progress-control {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: auto;
|
||||
font-size: 0.3em;
|
||||
height: 1em;
|
||||
/* Set above the rest of the controls. */
|
||||
top: -1em;
|
||||
/* Shrink the bar slower than it grows. */
|
||||
/* transition */
|
||||
-webkit-transition: all 0.4s;
|
||||
-moz-transition: all 0.4s;
|
||||
-o-transition: all 0.4s;
|
||||
transition: all 0.4s;
|
||||
}
|
||||
/* On hover, make the progress bar grow to something that's more clickable.
|
||||
This simply changes the overall font for the progress bar, and this
|
||||
updates both the em-based widths and heights, as wells as the icon font */
|
||||
.vjs-default-skin:hover .vjs-progress-control {
|
||||
font-size: .9em;
|
||||
/* Even though we're not changing the top/height, we need to include them in
|
||||
the transition so they're handled correctly. */
|
||||
|
||||
/* transition */
|
||||
-webkit-transition: all 0.2s;
|
||||
-moz-transition: all 0.2s;
|
||||
-o-transition: all 0.2s;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
/* Box containing play and load progresses. Also acts as seek scrubber. */
|
||||
.vjs-default-skin .vjs-progress-holder {
|
||||
height: 100%;
|
||||
}
|
||||
/* Progress Bars */
|
||||
.vjs-default-skin .vjs-progress-holder .vjs-play-progress,
|
||||
.vjs-default-skin .vjs-progress-holder .vjs-load-progress,
|
||||
.vjs-default-skin .vjs-progress-holder .vjs-load-progress div {
|
||||
position: absolute;
|
||||
display: block;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
/* updated by javascript during playback */
|
||||
|
||||
width: 0;
|
||||
/* Needed for IE6 */
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
.vjs-default-skin .vjs-play-progress {
|
||||
/*
|
||||
Using a data URI to create the white diagonal lines with a transparent
|
||||
background. Surprisingly works in IE8.
|
||||
Created using http://www.patternify.com
|
||||
Changing the first color value will change the bar color.
|
||||
Also using a paralax effect to make the lines move backwards.
|
||||
The -50% left position makes that happen.
|
||||
*/
|
||||
|
||||
background: #66a8cc url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAP0lEQVQIHWWMAQoAIAgDR/QJ/Ub//04+w7ZICBwcOg5FZi5iBB82AGzixEglJrd4TVK5XUJpskSTEvpdFzX9AB2pGziSQcvAAAAAAElFTkSuQmCC) -50% 0 repeat;
|
||||
}
|
||||
.vjs-default-skin .vjs-load-progress {
|
||||
background: #646464 /* IE8- Fallback */;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
/* there are child elements of the load progress bar that represent the
|
||||
specific time ranges that have been buffered */
|
||||
.vjs-default-skin .vjs-load-progress div {
|
||||
background: #787878 /* IE8- Fallback */;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
.vjs-default-skin .vjs-seek-handle {
|
||||
width: 1.5em;
|
||||
height: 100%;
|
||||
}
|
||||
.vjs-default-skin .vjs-seek-handle:before {
|
||||
padding-top: 0.1em /* Minor adjustment */;
|
||||
}
|
||||
/* Live Mode
|
||||
--------------------------------------------------------------------------------
|
||||
*/
|
||||
.vjs-default-skin.vjs-live .vjs-time-controls,
|
||||
.vjs-default-skin.vjs-live .vjs-time-divider,
|
||||
.vjs-default-skin.vjs-live .vjs-progress-control {
|
||||
display: none;
|
||||
}
|
||||
.vjs-default-skin.vjs-live .vjs-live-display {
|
||||
display: block;
|
||||
}
|
||||
/* Live Display
|
||||
--------------------------------------------------------------------------------
|
||||
*/
|
||||
.vjs-default-skin .vjs-live-display {
|
||||
display: none;
|
||||
font-size: 1em;
|
||||
line-height: 3em;
|
||||
}
|
||||
/* Time Display
|
||||
--------------------------------------------------------------------------------
|
||||
*/
|
||||
.vjs-default-skin .vjs-time-controls {
|
||||
font-size: 1em;
|
||||
/* Align vertically by making the line height the same as the control bar */
|
||||
line-height: 3em;
|
||||
}
|
||||
.vjs-default-skin .vjs-current-time {
|
||||
float: left;
|
||||
}
|
||||
.vjs-default-skin .vjs-duration {
|
||||
float: left;
|
||||
}
|
||||
/* Remaining time is in the HTML, but not included in default design */
|
||||
.vjs-default-skin .vjs-remaining-time {
|
||||
display: none;
|
||||
float: left;
|
||||
}
|
||||
.vjs-time-divider {
|
||||
float: left;
|
||||
line-height: 3em;
|
||||
}
|
||||
/* Fullscreen
|
||||
--------------------------------------------------------------------------------
|
||||
*/
|
||||
.vjs-default-skin .vjs-fullscreen-control {
|
||||
width: 3.8em;
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
}
|
||||
.vjs-default-skin .vjs-fullscreen-control:before {
|
||||
content: "\e000";
|
||||
}
|
||||
/* Switch to the exit icon when the player is in fullscreen */
|
||||
.vjs-default-skin.vjs-fullscreen .vjs-fullscreen-control:before {
|
||||
content: "\e00b";
|
||||
}
|
||||
/* Big Play Button (play button at start)
|
||||
--------------------------------------------------------------------------------
|
||||
Positioning of the play button in the center or other corners can be done more
|
||||
easily in the skin designer. http://designer.videojs.com/
|
||||
*/
|
||||
.vjs-default-skin .vjs-big-play-button {
|
||||
left: 0.5em;
|
||||
top: 0.5em;
|
||||
font-size: 3em;
|
||||
display: block;
|
||||
z-index: 2;
|
||||
position: absolute;
|
||||
width: 4em;
|
||||
height: 2.6em;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
opacity: 1;
|
||||
/* Need a slightly gray bg so it can be seen on black backgrounds */
|
||||
/* background-color-with-alpha */
|
||||
background-color: #07141e;
|
||||
background-color: rgba(7, 20, 30, 0.7);
|
||||
border: 0.1em solid #3b4249;
|
||||
/* border-radius */
|
||||
-webkit-border-radius: 0.8em;
|
||||
-moz-border-radius: 0.8em;
|
||||
border-radius: 0.8em;
|
||||
/* box-shadow */
|
||||
-webkit-box-shadow: 0px 0px 1em rgba(255, 255, 255, 0.25);
|
||||
-moz-box-shadow: 0px 0px 1em rgba(255, 255, 255, 0.25);
|
||||
box-shadow: 0px 0px 1em rgba(255, 255, 255, 0.25);
|
||||
/* transition */
|
||||
-webkit-transition: all 0.4s;
|
||||
-moz-transition: all 0.4s;
|
||||
-o-transition: all 0.4s;
|
||||
transition: all 0.4s;
|
||||
}
|
||||
/* Optionally center */
|
||||
.vjs-default-skin.vjs-big-play-centered .vjs-big-play-button {
|
||||
/* Center it horizontally */
|
||||
left: 50%;
|
||||
margin-left: -2.1em;
|
||||
/* Center it vertically */
|
||||
top: 50%;
|
||||
margin-top: -1.4000000000000001em;
|
||||
}
|
||||
/* Hide if controls are disabled */
|
||||
.vjs-default-skin.vjs-controls-disabled .vjs-big-play-button {
|
||||
display: none;
|
||||
}
|
||||
/* Hide when video starts playing */
|
||||
.vjs-default-skin.vjs-has-started .vjs-big-play-button {
|
||||
display: none;
|
||||
}
|
||||
/* Hide on mobile devices. Remove when we stop using native controls
|
||||
by default on mobile */
|
||||
.vjs-default-skin.vjs-using-native-controls .vjs-big-play-button {
|
||||
display: none;
|
||||
}
|
||||
.vjs-default-skin:hover .vjs-big-play-button,
|
||||
.vjs-default-skin .vjs-big-play-button:focus {
|
||||
outline: 0;
|
||||
border-color: #fff;
|
||||
/* IE8 needs a non-glow hover state */
|
||||
background-color: #505050;
|
||||
background-color: rgba(50, 50, 50, 0.75);
|
||||
/* box-shadow */
|
||||
-webkit-box-shadow: 0 0 3em #ffffff;
|
||||
-moz-box-shadow: 0 0 3em #ffffff;
|
||||
box-shadow: 0 0 3em #ffffff;
|
||||
/* transition */
|
||||
-webkit-transition: all 0s;
|
||||
-moz-transition: all 0s;
|
||||
-o-transition: all 0s;
|
||||
transition: all 0s;
|
||||
}
|
||||
.vjs-default-skin .vjs-big-play-button:before {
|
||||
content: "\e001";
|
||||
font-family: VideoJS;
|
||||
/* In order to center the play icon vertically we need to set the line height
|
||||
to the same as the button height */
|
||||
|
||||
line-height: 2.6em;
|
||||
text-shadow: 0.05em 0.05em 0.1em #000;
|
||||
text-align: center /* Needed for IE8 */;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.vjs-error .vjs-big-play-button {
|
||||
display: none;
|
||||
}
|
||||
/* Error Display
|
||||
--------------------------------------------------------------------------------
|
||||
*/
|
||||
.vjs-error-display {
|
||||
display: none;
|
||||
}
|
||||
.vjs-error .vjs-error-display {
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.vjs-error .vjs-error-display:before {
|
||||
content: 'X';
|
||||
font-family: Arial;
|
||||
font-size: 4em;
|
||||
color: #666666;
|
||||
/* In order to center the play icon vertically we need to set the line height
|
||||
to the same as the button height */
|
||||
|
||||
line-height: 1;
|
||||
text-shadow: 0.05em 0.05em 0.1em #000;
|
||||
text-align: center /* Needed for IE8 */;
|
||||
vertical-align: middle;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
margin-top: -0.5em;
|
||||
width: 100%;
|
||||
}
|
||||
.vjs-error-display div {
|
||||
position: absolute;
|
||||
bottom: 1em;
|
||||
right: 0;
|
||||
left: 0;
|
||||
font-size: 1.4em;
|
||||
text-align: center;
|
||||
padding: 3px;
|
||||
background: #000000;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.vjs-error-display a,
|
||||
.vjs-error-display a:visited {
|
||||
color: #F4A460;
|
||||
}
|
||||
/* Loading Spinner
|
||||
--------------------------------------------------------------------------------
|
||||
*/
|
||||
.vjs-loading-spinner {
|
||||
/* Should be hidden by default */
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
font-size: 4em;
|
||||
line-height: 1;
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
margin-left: -0.5em;
|
||||
margin-top: -0.5em;
|
||||
opacity: 0.75;
|
||||
}
|
||||
/* Show the spinner when waiting for data and seeking to a new time */
|
||||
.vjs-waiting .vjs-loading-spinner,
|
||||
.vjs-seeking .vjs-loading-spinner {
|
||||
display: block;
|
||||
/* only animate when showing because it can be processor heavy */
|
||||
/* animation */
|
||||
-webkit-animation: spin 1.5s infinite linear;
|
||||
-moz-animation: spin 1.5s infinite linear;
|
||||
-o-animation: spin 1.5s infinite linear;
|
||||
animation: spin 1.5s infinite linear;
|
||||
}
|
||||
/* Errors are unrecoverable without user interaction so hide the spinner */
|
||||
.vjs-error .vjs-loading-spinner {
|
||||
display: none;
|
||||
/* ensure animation doesn't continue while hidden */
|
||||
/* animation */
|
||||
-webkit-animation: none;
|
||||
-moz-animation: none;
|
||||
-o-animation: none;
|
||||
animation: none;
|
||||
}
|
||||
.vjs-default-skin .vjs-loading-spinner:before {
|
||||
content: "\e01e";
|
||||
font-family: VideoJS;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
text-align: center;
|
||||
text-shadow: 0em 0em 0.1em #000;
|
||||
}
|
||||
@-moz-keyframes spin {
|
||||
0% {
|
||||
-moz-transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-moz-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes spin {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@-o-keyframes spin {
|
||||
0% {
|
||||
-o-transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
-o-transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
@keyframes spin {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
/* Menu Buttons (Captions/Subtitles/etc.)
|
||||
--------------------------------------------------------------------------------
|
||||
*/
|
||||
.vjs-default-skin .vjs-menu-button {
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
}
|
||||
.vjs-default-skin .vjs-menu {
|
||||
display: none;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0em;
|
||||
/* (Width of vjs-menu - width of button) / 2 */
|
||||
|
||||
width: 0em;
|
||||
height: 0em;
|
||||
margin-bottom: 3em;
|
||||
border-left: 2em solid transparent;
|
||||
border-right: 2em solid transparent;
|
||||
border-top: 1.55em solid #000000;
|
||||
/* Same width top as ul bottom */
|
||||
|
||||
border-top-color: rgba(7, 40, 50, 0.5);
|
||||
/* Same as ul background */
|
||||
|
||||
}
|
||||
/* Button Pop-up Menu */
|
||||
.vjs-default-skin .vjs-menu-button .vjs-menu .vjs-menu-content {
|
||||
display: block;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
width: 10em;
|
||||
bottom: 1.5em;
|
||||
/* Same bottom as vjs-menu border-top */
|
||||
|
||||
max-height: 15em;
|
||||
overflow: auto;
|
||||
left: -5em;
|
||||
/* Width of menu - width of button / 2 */
|
||||
|
||||
/* background-color-with-alpha */
|
||||
background-color: #07141e;
|
||||
background-color: rgba(7, 20, 30, 0.7);
|
||||
/* box-shadow */
|
||||
-webkit-box-shadow: -0.2em -0.2em 0.3em rgba(255, 255, 255, 0.2);
|
||||
-moz-box-shadow: -0.2em -0.2em 0.3em rgba(255, 255, 255, 0.2);
|
||||
box-shadow: -0.2em -0.2em 0.3em rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
.vjs-default-skin .vjs-menu-button:hover .vjs-control-content .vjs-menu,
|
||||
.vjs-default-skin .vjs-control-content .vjs-menu.vjs-lock-showing {
|
||||
display: block;
|
||||
}
|
||||
.vjs-default-skin .vjs-menu-button ul li {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0.3em 0 0.3em 0;
|
||||
line-height: 1.4em;
|
||||
font-size: 1.2em;
|
||||
text-align: center;
|
||||
text-transform: lowercase;
|
||||
}
|
||||
.vjs-default-skin .vjs-menu-button ul li.vjs-selected {
|
||||
background-color: #000;
|
||||
}
|
||||
.vjs-default-skin .vjs-menu-button ul li:focus,
|
||||
.vjs-default-skin .vjs-menu-button ul li:hover,
|
||||
.vjs-default-skin .vjs-menu-button ul li.vjs-selected:focus,
|
||||
.vjs-default-skin .vjs-menu-button ul li.vjs-selected:hover {
|
||||
outline: 0;
|
||||
color: #111;
|
||||
/* background-color-with-alpha */
|
||||
background-color: #ffffff;
|
||||
background-color: rgba(255, 255, 255, 0.75);
|
||||
/* box-shadow */
|
||||
-webkit-box-shadow: 0 0 1em #ffffff;
|
||||
-moz-box-shadow: 0 0 1em #ffffff;
|
||||
box-shadow: 0 0 1em #ffffff;
|
||||
}
|
||||
.vjs-default-skin .vjs-menu-button ul li.vjs-menu-title {
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
font-size: 1em;
|
||||
line-height: 2em;
|
||||
padding: 0;
|
||||
margin: 0 0 0.3em 0;
|
||||
font-weight: bold;
|
||||
cursor: default;
|
||||
}
|
||||
/* Subtitles Button */
|
||||
.vjs-default-skin .vjs-subtitles-button:before {
|
||||
content: "\e00c";
|
||||
}
|
||||
/* Captions Button */
|
||||
.vjs-default-skin .vjs-captions-button:before {
|
||||
content: "\e008";
|
||||
}
|
||||
/* Chapters Button */
|
||||
.vjs-default-skin .vjs-chapters-button:before {
|
||||
content: "\e00c";
|
||||
}
|
||||
.vjs-default-skin .vjs-chapters-button.vjs-menu-button .vjs-menu .vjs-menu-content {
|
||||
width: 24em;
|
||||
left: -12em;
|
||||
}
|
||||
/* Replacement for focus outline */
|
||||
.vjs-default-skin .vjs-captions-button:focus .vjs-control-content:before,
|
||||
.vjs-default-skin .vjs-captions-button:hover .vjs-control-content:before {
|
||||
/* box-shadow */
|
||||
-webkit-box-shadow: 0 0 1em #ffffff;
|
||||
-moz-box-shadow: 0 0 1em #ffffff;
|
||||
box-shadow: 0 0 1em #ffffff;
|
||||
}
|
||||
/*
|
||||
REQUIRED STYLES (be careful overriding)
|
||||
================================================================================
|
||||
When loading the player, the video tag is replaced with a DIV,
|
||||
that will hold the video tag or object tag for other playback methods.
|
||||
The div contains the video playback element (Flash or HTML5) and controls,
|
||||
and sets the width and height of the video.
|
||||
|
||||
** If you want to add some kind of border/padding (e.g. a frame), or special
|
||||
positioning, use another containing element. Otherwise you risk messing up
|
||||
control positioning and full window mode. **
|
||||
*/
|
||||
.video-js {
|
||||
background-color: #000;
|
||||
position: relative;
|
||||
padding: 0;
|
||||
/* Start with 10px for base font size so other dimensions can be em based and
|
||||
easily calculable. */
|
||||
|
||||
font-size: 10px;
|
||||
/* Allow poster to be vertially aligned. */
|
||||
|
||||
vertical-align: middle;
|
||||
/* display: table-cell; */
|
||||
/*This works in Safari but not Firefox.*/
|
||||
|
||||
/* Provide some basic defaults for fonts */
|
||||
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
/* Avoiding helvetica: issue #376 */
|
||||
|
||||
font-family: Arial, sans-serif;
|
||||
/* Turn off user selection (text highlighting) by default.
|
||||
The majority of player components will not be text blocks.
|
||||
Text areas will need to turn user selection back on. */
|
||||
|
||||
/* user-select */
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
/* Playback technology elements expand to the width/height of the containing div
|
||||
<video> or <object> */
|
||||
.video-js .vjs-tech {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
/* Fix for Firefox 9 fullscreen (only if it is enabled). Not needed when
|
||||
checking fullScreenEnabled. */
|
||||
.video-js:-moz-full-screen {
|
||||
position: absolute;
|
||||
}
|
||||
/* Fullscreen Styles */
|
||||
body.vjs-full-window {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
/* Fix for IE6 full-window. http://www.cssplay.co.uk/layouts/fixed.html */
|
||||
overflow-y: auto;
|
||||
}
|
||||
.video-js.vjs-fullscreen {
|
||||
position: fixed;
|
||||
overflow: hidden;
|
||||
z-index: 1000;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
/* IE6 full-window (underscore hack) */
|
||||
_position: absolute;
|
||||
}
|
||||
.video-js:-webkit-full-screen {
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
}
|
||||
.video-js.vjs-fullscreen.vjs-user-inactive {
|
||||
cursor: none;
|
||||
}
|
||||
/* Poster Styles */
|
||||
.vjs-poster {
|
||||
background-repeat: no-repeat;
|
||||
background-position: 50% 50%;
|
||||
background-size: contain;
|
||||
cursor: pointer;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
.vjs-poster img {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
max-height: 100%;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
/* Hide the poster after the video has started playing */
|
||||
.video-js.vjs-has-started .vjs-poster {
|
||||
display: none;
|
||||
}
|
||||
/* Don't hide the poster if we're playing audio */
|
||||
.video-js.vjs-audio.vjs-has-started .vjs-poster {
|
||||
display: block;
|
||||
}
|
||||
/* Hide the poster when controls are disabled because it's clickable
|
||||
and the native poster can take over */
|
||||
.video-js.vjs-controls-disabled .vjs-poster {
|
||||
display: none;
|
||||
}
|
||||
/* Hide the poster when native controls are used otherwise it covers them */
|
||||
.video-js.vjs-using-native-controls .vjs-poster {
|
||||
display: none;
|
||||
}
|
||||
/* Text Track Styles */
|
||||
/* Overall track holder for both captions and subtitles */
|
||||
.video-js .vjs-text-track-display {
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
bottom: 4em;
|
||||
/* Leave padding on left and right */
|
||||
left: 1em;
|
||||
right: 1em;
|
||||
}
|
||||
/* Move captions down when controls aren't being shown */
|
||||
.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display {
|
||||
bottom: 1em;
|
||||
}
|
||||
/* Individual tracks */
|
||||
.video-js .vjs-text-track {
|
||||
display: none;
|
||||
font-size: 1.4em;
|
||||
text-align: center;
|
||||
margin-bottom: 0.1em;
|
||||
/* Transparent black background, or fallback to all black (oldIE) */
|
||||
/* background-color-with-alpha */
|
||||
background-color: #000000;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.video-js .vjs-subtitles {
|
||||
color: #ffffff /* Subtitles are white */;
|
||||
}
|
||||
.video-js .vjs-captions {
|
||||
color: #ffcc66 /* Captions are yellow */;
|
||||
}
|
||||
.vjs-tt-cue {
|
||||
display: block;
|
||||
}
|
||||
/* Increase font-size when fullscreen */
|
||||
.video-js.vjs-fullscreen .vjs-text-track {
|
||||
font-size: 3em;
|
||||
}
|
||||
/* Hide disabled or unsupported controls */
|
||||
.vjs-default-skin .vjs-hidden {
|
||||
display: none;
|
||||
}
|
||||
.vjs-lock-showing {
|
||||
display: block !important;
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
/* In IE8 w/ no JavaScript (no HTML5 shim), the video tag doesn't register.
|
||||
The .video-js classname on the video tag also isn't considered.
|
||||
This optional paragraph inside the video tag can provide a message to users
|
||||
about what's required to play video. */
|
||||
.vjs-no-js {
|
||||
padding: 20px;
|
||||
color: #ccc;
|
||||
background-color: #333;
|
||||
font-size: 18px;
|
||||
font-family: Arial, sans-serif;
|
||||
text-align: center;
|
||||
width: 300px;
|
||||
height: 150px;
|
||||
margin: 0px auto;
|
||||
}
|
||||
.vjs-no-js a,
|
||||
.vjs-no-js a:visited {
|
||||
color: #F4A460;
|
||||
}
|
||||
/* -----------------------------------------------------------------------------
|
||||
The original source of this file lives at
|
||||
https://github.com/videojs/video.js/blob/master/src/css/video-js.less */
|
||||
externo
+1177
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
externo
+5
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
externo
BIN
Arquivo binário não exibido.
externo
+8568
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
externo
+167
@@ -0,0 +1,167 @@
|
||||
/*! Video.js v4.10.0 Copyright 2014 Brightcove, Inc. https://github.com/videojs/video.js/blob/master/LICENSE */
|
||||
(function() {var b=void 0,f=!0,k=null,l=!1;function m(){return function(){}}function p(a){return function(){return this[a]}}function q(a){return function(){return a}}var s;document.createElement("video");document.createElement("audio");document.createElement("track");function t(a,c,d){if("string"===typeof a){0===a.indexOf("#")&&(a=a.slice(1));if(t.Ca[a])return t.Ca[a];a=t.w(a)}if(!a||!a.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");return a.player||new t.Player(a,c,d)}
|
||||
var videojs=window.videojs=t;t.Vb="4.10";t.Vc="https:"==document.location.protocol?"https://":"http://";
|
||||
t.options={techOrder:["html5","flash"],html5:{},flash:{},width:300,height:150,defaultVolume:0,playbackRates:[],inactivityTimeout:2E3,children:{mediaLoader:{},posterImage:{},textTrackDisplay:{},loadingSpinner:{},bigPlayButton:{},controlBar:{},errorDisplay:{}},language:document.getElementsByTagName("html")[0].getAttribute("lang")||navigator.languages&&navigator.languages[0]||navigator.ze||navigator.language||"en",languages:{},notSupportedMessage:"No compatible source was found for this video."};
|
||||
"GENERATED_CDN_VSN"!==t.Vb&&(videojs.options.flash.swf=t.Vc+"vjs.zencdn.net/"+t.Vb+"/video-js.swf");t.hd=function(a,c){t.options.languages[a]=t.options.languages[a]!==b?t.ga.Va(t.options.languages[a],c):c;return t.options.languages};t.Ca={};"function"===typeof define&&define.amd?define([],function(){return videojs}):"object"===typeof exports&&"object"===typeof module&&(module.exports=videojs);t.qa=t.CoreObject=m();
|
||||
t.qa.extend=function(a){var c,d;a=a||{};c=a.init||a.i||this.prototype.init||this.prototype.i||m();d=function(){c.apply(this,arguments)};d.prototype=t.g.create(this.prototype);d.prototype.constructor=d;d.extend=t.qa.extend;d.create=t.qa.create;for(var e in a)a.hasOwnProperty(e)&&(d.prototype[e]=a[e]);return d};t.qa.create=function(){var a=t.g.create(this.prototype);this.apply(a,arguments);return a};
|
||||
t.c=function(a,c,d){if(t.g.isArray(c))return u(t.c,a,c,d);var e=t.getData(a);e.C||(e.C={});e.C[c]||(e.C[c]=[]);d.r||(d.r=t.r++);e.C[c].push(d);e.W||(e.disabled=l,e.W=function(c){if(!e.disabled){c=t.rc(c);var d=e.C[c.type];if(d)for(var d=d.slice(0),j=0,n=d.length;j<n&&!c.zc();j++)d[j].call(a,c)}});1==e.C[c].length&&(a.addEventListener?a.addEventListener(c,e.W,l):a.attachEvent&&a.attachEvent("on"+c,e.W))};
|
||||
t.j=function(a,c,d){if(t.uc(a)){var e=t.getData(a);if(e.C){if(t.g.isArray(c))return u(t.j,a,c,d);if(c){var g=e.C[c];if(g){if(d){if(d.r)for(e=0;e<g.length;e++)g[e].r===d.r&&g.splice(e--,1)}else e.C[c]=[];t.kc(a,c)}}else for(g in e.C)c=g,e.C[c]=[],t.kc(a,c)}}};t.kc=function(a,c){var d=t.getData(a);0===d.C[c].length&&(delete d.C[c],a.removeEventListener?a.removeEventListener(c,d.W,l):a.detachEvent&&a.detachEvent("on"+c,d.W));t.Ib(d.C)&&(delete d.C,delete d.W,delete d.disabled);t.Ib(d)&&t.Ic(a)};
|
||||
t.rc=function(a){function c(){return f}function d(){return l}if(!a||!a.Jb){var e=a||window.event;a={};for(var g in e)"layerX"!==g&&("layerY"!==g&&"keyLocation"!==g)&&("returnValue"==g&&e.preventDefault||(a[g]=e[g]));a.target||(a.target=a.srcElement||document);a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;a.preventDefault=function(){e.preventDefault&&e.preventDefault();a.returnValue=l;a.Cd=c;a.defaultPrevented=f};a.Cd=d;a.defaultPrevented=l;a.stopPropagation=function(){e.stopPropagation&&
|
||||
e.stopPropagation();a.cancelBubble=f;a.Jb=c};a.Jb=d;a.stopImmediatePropagation=function(){e.stopImmediatePropagation&&e.stopImmediatePropagation();a.zc=c;a.stopPropagation()};a.zc=d;if(a.clientX!=k){g=document.documentElement;var h=document.body;a.pageX=a.clientX+(g&&g.scrollLeft||h&&h.scrollLeft||0)-(g&&g.clientLeft||h&&h.clientLeft||0);a.pageY=a.clientY+(g&&g.scrollTop||h&&h.scrollTop||0)-(g&&g.clientTop||h&&h.clientTop||0)}a.which=a.charCode||a.keyCode;a.button!=k&&(a.button=a.button&1?0:a.button&
|
||||
4?1:a.button&2?2:0)}return a};t.l=function(a,c){var d=t.uc(a)?t.getData(a):{},e=a.parentNode||a.ownerDocument;"string"===typeof c&&(c={type:c,target:a});c=t.rc(c);d.W&&d.W.call(a,c);if(e&&!c.Jb()&&c.bubbles!==l)t.l(e,c);else if(!e&&!c.defaultPrevented&&(d=t.getData(c.target),c.target[c.type])){d.disabled=f;if("function"===typeof c.target[c.type])c.target[c.type]();d.disabled=l}return!c.defaultPrevented};
|
||||
t.R=function(a,c,d){function e(){t.j(a,c,e);d.apply(this,arguments)}if(t.g.isArray(c))return u(t.R,a,c,d);e.r=d.r=d.r||t.r++;t.c(a,c,e)};function u(a,c,d,e){t.ic.forEach(d,function(d){a(c,d,e)})}var v=Object.prototype.hasOwnProperty;t.e=function(a,c){var d;c=c||{};d=document.createElement(a||"div");t.g.X(c,function(a,c){-1!==a.indexOf("aria-")||"role"==a?d.setAttribute(a,c):d[a]=c});return d};t.ba=function(a){return a.charAt(0).toUpperCase()+a.slice(1)};t.g={};
|
||||
t.g.create=Object.create||function(a){function c(){}c.prototype=a;return new c};t.g.X=function(a,c,d){for(var e in a)v.call(a,e)&&c.call(d||this,e,a[e])};t.g.z=function(a,c){if(!c)return a;for(var d in c)v.call(c,d)&&(a[d]=c[d]);return a};t.g.qd=function(a,c){var d,e,g;a=t.g.copy(a);for(d in c)v.call(c,d)&&(e=a[d],g=c[d],a[d]=t.g.Ta(e)&&t.g.Ta(g)?t.g.qd(e,g):c[d]);return a};t.g.copy=function(a){return t.g.z({},a)};
|
||||
t.g.Ta=function(a){return!!a&&"object"===typeof a&&"[object Object]"===a.toString()&&a.constructor===Object};t.g.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};t.Ed=function(a){return a!==a};t.bind=function(a,c,d){function e(){return c.apply(a,arguments)}c.r||(c.r=t.r++);e.r=d?d+"_"+c.r:c.r;return e};t.va={};t.r=1;t.expando="vdata"+(new Date).getTime();t.getData=function(a){var c=a[t.expando];c||(c=a[t.expando]=t.r++,t.va[c]={});return t.va[c]};
|
||||
t.uc=function(a){a=a[t.expando];return!(!a||t.Ib(t.va[a]))};t.Ic=function(a){var c=a[t.expando];if(c){delete t.va[c];try{delete a[t.expando]}catch(d){a.removeAttribute?a.removeAttribute(t.expando):a[t.expando]=k}}};t.Ib=function(a){for(var c in a)if(a[c]!==k)return l;return f};t.Sa=function(a,c){return-1!==(" "+a.className+" ").indexOf(" "+c+" ")};t.n=function(a,c){t.Sa(a,c)||(a.className=""===a.className?c:a.className+" "+c)};
|
||||
t.p=function(a,c){var d,e;if(t.Sa(a,c)){d=a.className.split(" ");for(e=d.length-1;0<=e;e--)d[e]===c&&d.splice(e,1);a.className=d.join(" ")}};t.A=t.e("video");t.O=navigator.userAgent;t.bd=/iPhone/i.test(t.O);t.ad=/iPad/i.test(t.O);t.cd=/iPod/i.test(t.O);t.$c=t.bd||t.ad||t.cd;var aa=t,x;var y=t.O.match(/OS (\d+)_/i);x=y&&y[1]?y[1]:b;aa.oe=x;t.Yc=/Android/i.test(t.O);var ba=t,z;var A=t.O.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i),B,C;
|
||||
A?(B=A[1]&&parseFloat(A[1]),C=A[2]&&parseFloat(A[2]),z=B&&C?parseFloat(A[1]+"."+A[2]):B?B:k):z=k;ba.Ub=z;t.dd=t.Yc&&/webkit/i.test(t.O)&&2.3>t.Ub;t.Zc=/Firefox/i.test(t.O);t.pe=/Chrome/i.test(t.O);t.ec=!!("ontouchstart"in window||window.Xc&&document instanceof window.Xc);t.Wc="backgroundSize"in t.A.style;t.Kc=function(a,c){t.g.X(c,function(c,e){e===k||"undefined"===typeof e||e===l?a.removeAttribute(c):a.setAttribute(c,e===f?"":e)})};
|
||||
t.Aa=function(a){var c,d,e,g;c={};if(a&&a.attributes&&0<a.attributes.length){d=a.attributes;for(var h=d.length-1;0<=h;h--){e=d[h].name;g=d[h].value;if("boolean"===typeof a[e]||-1!==",autoplay,controls,loop,muted,default,".indexOf(","+e+","))g=g!==k?f:l;c[e]=g}}return c};
|
||||
t.ve=function(a,c){var d="";document.defaultView&&document.defaultView.getComputedStyle?d=document.defaultView.getComputedStyle(a,"").getPropertyValue(c):a.currentStyle&&(d=a["client"+c.substr(0,1).toUpperCase()+c.substr(1)]+"px");return d};t.Hb=function(a,c){c.firstChild?c.insertBefore(a,c.firstChild):c.appendChild(a)};t.Oa={};t.w=function(a){0===a.indexOf("#")&&(a=a.slice(1));return document.getElementById(a)};
|
||||
t.za=function(a,c){c=c||a;var d=Math.floor(a%60),e=Math.floor(a/60%60),g=Math.floor(a/3600),h=Math.floor(c/60%60),j=Math.floor(c/3600);if(isNaN(a)||Infinity===a)g=e=d="-";g=0<g||0<j?g+":":"";return g+(((g||10<=h)&&10>e?"0"+e:e)+":")+(10>d?"0"+d:d)};t.kd=function(){document.body.focus();document.onselectstart=q(l)};t.ke=function(){document.onselectstart=q(f)};t.trim=function(a){return(a+"").replace(/^\s+|\s+$/g,"")};t.round=function(a,c){c||(c=0);return Math.round(a*Math.pow(10,c))/Math.pow(10,c)};
|
||||
t.zb=function(a,c){return{length:1,start:function(){return a},end:function(){return c}}};
|
||||
t.get=function(a,c,d,e){var g,h,j,n;d=d||m();"undefined"===typeof XMLHttpRequest&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(c){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(d){}throw Error("This browser does not support XMLHttpRequest.");});h=new XMLHttpRequest;j=t.Xd(a);n=window.location;j.protocol+j.host!==n.protocol+n.host&&window.XDomainRequest&&!("withCredentials"in
|
||||
h)?(h=new window.XDomainRequest,h.onload=function(){c(h.responseText)},h.onerror=d,h.onprogress=m(),h.ontimeout=d):(g="file:"==j.protocol||"file:"==n.protocol,h.onreadystatechange=function(){4===h.readyState&&(200===h.status||g&&0===h.status?c(h.responseText):d(h.responseText))});try{h.open("GET",a,f),e&&(h.withCredentials=f)}catch(r){d(r);return}try{h.send()}catch(w){d(w)}};
|
||||
t.ae=function(a){try{var c=window.localStorage||l;c&&(c.volume=a)}catch(d){22==d.code||1014==d.code?t.log("LocalStorage Full (VideoJS)",d):18==d.code?t.log("LocalStorage not allowed (VideoJS)",d):t.log("LocalStorage Error (VideoJS)",d)}};t.tc=function(a){a.match(/^https?:\/\//)||(a=t.e("div",{innerHTML:'<a href="'+a+'">x</a>'}).firstChild.href);return a};
|
||||
t.Xd=function(a){var c,d,e,g;g="protocol hostname port pathname search hash host".split(" ");d=t.e("a",{href:a});if(e=""===d.host&&"file:"!==d.protocol)c=t.e("div"),c.innerHTML='<a href="'+a+'"></a>',d=c.firstChild,c.setAttribute("style","display:none; position:absolute;"),document.body.appendChild(c);a={};for(var h=0;h<g.length;h++)a[g[h]]=d[g[h]];e&&document.body.removeChild(c);return a};
|
||||
function D(a,c){var d,e;d=Array.prototype.slice.call(c);e=m();e=window.console||{log:e,warn:e,error:e};a?d.unshift(a.toUpperCase()+":"):a="log";t.log.history.push(d);d.unshift("VIDEOJS:");if(e[a].apply)e[a].apply(e,d);else e[a](d.join(" "))}t.log=function(){D(k,arguments)};t.log.history=[];t.log.error=function(){D("error",arguments)};t.log.warn=function(){D("warn",arguments)};
|
||||
t.xd=function(a){var c,d;a.getBoundingClientRect&&a.parentNode&&(c=a.getBoundingClientRect());if(!c)return{left:0,top:0};a=document.documentElement;d=document.body;return{left:t.round(c.left+(window.pageXOffset||d.scrollLeft)-(a.clientLeft||d.clientLeft||0)),top:t.round(c.top+(window.pageYOffset||d.scrollTop)-(a.clientTop||d.clientTop||0))}};t.ic={};t.ic.forEach=function(a,c,d){if(t.g.isArray(a)&&c instanceof Function)for(var e=0,g=a.length;e<g;++e)c.call(d||t,a[e],e,a);return a};t.ga={};
|
||||
t.ga.Va=function(a,c){var d,e,g;a=t.g.copy(a);for(d in c)c.hasOwnProperty(d)&&(e=a[d],g=c[d],a[d]=t.g.Ta(e)&&t.g.Ta(g)?t.ga.Va(e,g):c[d]);return a};
|
||||
t.a=t.qa.extend({i:function(a,c,d){this.d=a;this.m=t.g.copy(this.m);c=this.options(c);this.L=c.id||c.el&&c.el.id;this.L||(this.L=(a.id&&a.id()||"no_player")+"_component_"+t.r++);this.Kd=c.name||k;this.b=c.el||this.e();this.P=[];this.Pa={};this.Qa={};this.wc();this.K(d);if(c.Jc!==l){var e,g;this.k().reportUserActivity&&(e=t.bind(this.k(),this.k().reportUserActivity),this.c("touchstart",function(){e();clearInterval(g);g=setInterval(e,250)}),a=function(){e();clearInterval(g)},this.c("touchmove",e),this.c("touchend",
|
||||
a),this.c("touchcancel",a))}}});s=t.a.prototype;s.dispose=function(){this.l({type:"dispose",bubbles:l});if(this.P)for(var a=this.P.length-1;0<=a;a--)this.P[a].dispose&&this.P[a].dispose();this.Qa=this.Pa=this.P=k;this.j();this.b.parentNode&&this.b.parentNode.removeChild(this.b);t.Ic(this.b);this.b=k};s.d=f;s.k=p("d");s.options=function(a){return a===b?this.m:this.m=t.ga.Va(this.m,a)};s.e=function(a,c){return t.e(a,c)};
|
||||
s.t=function(a){var c=this.d.language(),d=this.d.languages();return d&&d[c]&&d[c][a]?d[c][a]:a};s.w=p("b");s.ja=function(){return this.v||this.b};s.id=p("L");s.name=p("Kd");s.children=p("P");s.zd=function(a){return this.Pa[a]};s.ka=function(a){return this.Qa[a]};
|
||||
s.V=function(a,c){var d,e;"string"===typeof a?(e=a,c=c||{},d=c.componentClass||t.ba(e),c.name=e,d=new window.videojs[d](this.d||this,c)):d=a;this.P.push(d);"function"===typeof d.id&&(this.Pa[d.id()]=d);(e=e||d.name&&d.name())&&(this.Qa[e]=d);"function"===typeof d.el&&d.el()&&this.ja().appendChild(d.el());return d};
|
||||
s.removeChild=function(a){"string"===typeof a&&(a=this.ka(a));if(a&&this.P){for(var c=l,d=this.P.length-1;0<=d;d--)if(this.P[d]===a){c=f;this.P.splice(d,1);break}c&&(this.Pa[a.id]=k,this.Qa[a.name]=k,(c=a.w())&&c.parentNode===this.ja()&&this.ja().removeChild(a.w()))}};
|
||||
s.wc=function(){var a,c,d,e,g,h;a=this;c=a.options();if(d=c.children)if(h=function(d,e){c[d]&&(e=c[d]);e!==l&&(a[d]=a.V(d,e))},t.g.isArray(d))for(var j=0;j<d.length;j++)e=d[j],"string"==typeof e?(g=e,e={}):g=e.name,h(g,e);else t.g.X(d,h)};s.T=q("");
|
||||
s.c=function(a,c,d){var e,g,h;"string"===typeof a||t.g.isArray(a)?t.c(this.b,a,t.bind(this,c)):(e=t.bind(this,d),h=this,g=function(){h.j(a,c,e)},g.r=e.r,this.c("dispose",g),d=function(){h.j("dispose",g)},d.r=e.r,a.nodeName?(t.c(a,c,e),t.c(a,"dispose",d)):"function"===typeof a.c&&(a.c(c,e),a.c("dispose",d)));return this};
|
||||
s.j=function(a,c,d){!a||"string"===typeof a||t.g.isArray(a)?t.j(this.b,a,c):(d=t.bind(this,d),this.j("dispose",d),a.nodeName?(t.j(a,c,d),t.j(a,"dispose",d)):(a.j(c,d),a.j("dispose",d)));return this};s.R=function(a,c,d){var e,g,h;"string"===typeof a||t.g.isArray(a)?t.R(this.b,a,t.bind(this,c)):(e=t.bind(this,d),g=this,h=function(){g.j(a,c,h);e.apply(this,arguments)},h.r=e.r,this.c(a,c,h));return this};s.l=function(a){t.l(this.b,a);return this};
|
||||
s.K=function(a){a&&(this.la?a.call(this):(this.ab===b&&(this.ab=[]),this.ab.push(a)));return this};s.Ga=function(){this.la=f;var a=this.ab;if(a&&0<a.length){for(var c=0,d=a.length;c<d;c++)a[c].call(this);this.ab=[];this.l("ready")}};s.Sa=function(a){return t.Sa(this.b,a)};s.n=function(a){t.n(this.b,a);return this};s.p=function(a){t.p(this.b,a);return this};s.show=function(){this.b.style.display="block";return this};s.Y=function(){this.b.style.display="none";return this};
|
||||
function E(a){a.p("vjs-lock-showing")}s.disable=function(){this.Y();this.show=m()};s.width=function(a,c){return F(this,"width",a,c)};s.height=function(a,c){return F(this,"height",a,c)};s.td=function(a,c){return this.width(a,f).height(c)};
|
||||
function F(a,c,d,e){if(d!==b){if(d===k||t.Ed(d))d=0;a.b.style[c]=-1!==(""+d).indexOf("%")||-1!==(""+d).indexOf("px")?d:"auto"===d?"":d+"px";e||a.l("resize");return a}if(!a.b)return 0;d=a.b.style[c];e=d.indexOf("px");return-1!==e?parseInt(d.slice(0,e),10):parseInt(a.b["offset"+t.ba(c)],10)}
|
||||
function G(a){var c,d,e,g,h,j,n,r;c=0;d=k;a.c("touchstart",function(a){1===a.touches.length&&(d=a.touches[0],c=(new Date).getTime(),g=f)});a.c("touchmove",function(a){1<a.touches.length?g=l:d&&(j=a.touches[0].pageX-d.pageX,n=a.touches[0].pageY-d.pageY,r=Math.sqrt(j*j+n*n),22<r&&(g=l))});h=function(){g=l};a.c("touchleave",h);a.c("touchcancel",h);a.c("touchend",function(a){d=k;g===f&&(e=(new Date).getTime()-c,250>e&&(a.preventDefault(),this.l("tap")))})}
|
||||
t.u=t.a.extend({i:function(a,c){t.a.call(this,a,c);G(this);this.c("tap",this.s);this.c("click",this.s);this.c("focus",this.Ya);this.c("blur",this.Xa)}});s=t.u.prototype;
|
||||
s.e=function(a,c){var d;c=t.g.z({className:this.T(),role:"button","aria-live":"polite",tabIndex:0},c);d=t.a.prototype.e.call(this,a,c);c.innerHTML||(this.v=t.e("div",{className:"vjs-control-content"}),this.xb=t.e("span",{className:"vjs-control-text",innerHTML:this.t(this.ua)||"Need Text"}),this.v.appendChild(this.xb),d.appendChild(this.v));return d};s.T=function(){return"vjs-control "+t.a.prototype.T.call(this)};s.s=m();s.Ya=function(){t.c(document,"keydown",t.bind(this,this.Z))};
|
||||
s.Z=function(a){if(32==a.which||13==a.which)a.preventDefault(),this.s()};s.Xa=function(){t.j(document,"keydown",t.bind(this,this.Z))};
|
||||
t.S=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.jd=this.ka(this.m.barName);this.handle=this.ka(this.m.handleName);this.c("mousedown",this.Za);this.c("touchstart",this.Za);this.c("focus",this.Ya);this.c("blur",this.Xa);this.c("click",this.s);this.c(a,"controlsvisible",this.update);this.c(a,this.Ec,this.update);this.F={};this.F.move=t.bind(this,this.$a);this.F.end=t.bind(this,this.Mb)}});s=t.S.prototype;
|
||||
s.dispose=function(){t.j(document,"mousemove",this.F.move,l);t.j(document,"mouseup",this.F.end,l);t.j(document,"touchmove",this.F.move,l);t.j(document,"touchend",this.F.end,l);t.j(document,"keyup",t.bind(this,this.Z));t.a.prototype.dispose.call(this)};s.e=function(a,c){c=c||{};c.className+=" vjs-slider";c=t.g.z({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},c);return t.a.prototype.e.call(this,a,c)};
|
||||
s.Za=function(a){a.preventDefault();t.kd();this.n("vjs-sliding");t.c(document,"mousemove",this.F.move);t.c(document,"mouseup",this.F.end);t.c(document,"touchmove",this.F.move);t.c(document,"touchend",this.F.end);this.$a(a)};s.$a=m();s.Mb=function(){t.ke();this.p("vjs-sliding");t.j(document,"mousemove",this.F.move,l);t.j(document,"mouseup",this.F.end,l);t.j(document,"touchmove",this.F.move,l);t.j(document,"touchend",this.F.end,l);this.update()};
|
||||
s.update=function(){if(this.b){var a,c=this.Gb(),d=this.handle,e=this.jd;isNaN(c)&&(c=0);a=c;if(d){a=this.b.offsetWidth;var g=d.w().offsetWidth;a=g?g/a:0;c*=1-a;a=c+a/2;d.w().style.left=t.round(100*c,2)+"%"}e&&(e.w().style.width=t.round(100*a,2)+"%")}};
|
||||
function H(a,c){var d,e,g,h;d=a.b;e=t.xd(d);h=g=d.offsetWidth;d=a.handle;if(a.options().vertical)return h=e.top,e=c.changedTouches?c.changedTouches[0].pageY:c.pageY,d&&(d=d.w().offsetHeight,h+=d/2,g-=d),Math.max(0,Math.min(1,(h-e+g)/g));g=e.left;e=c.changedTouches?c.changedTouches[0].pageX:c.pageX;d&&(d=d.w().offsetWidth,g+=d/2,h-=d);return Math.max(0,Math.min(1,(e-g)/h))}s.Ya=function(){t.c(document,"keyup",t.bind(this,this.Z))};
|
||||
s.Z=function(a){if(37==a.which||40==a.which)a.preventDefault(),this.Nc();else if(38==a.which||39==a.which)a.preventDefault(),this.Oc()};s.Xa=function(){t.j(document,"keyup",t.bind(this,this.Z))};s.s=function(a){a.stopImmediatePropagation();a.preventDefault()};t.$=t.a.extend();t.$.prototype.defaultValue=0;
|
||||
t.$.prototype.e=function(a,c){c=c||{};c.className+=" vjs-slider-handle";c=t.g.z({innerHTML:'<span class="vjs-control-text">'+this.defaultValue+"</span>"},c);return t.a.prototype.e.call(this,"div",c)};t.ha=t.a.extend();function ca(a,c){a.V(c);c.c("click",t.bind(a,function(){E(this)}))}
|
||||
t.ha.prototype.e=function(){var a=this.options().lc||"ul";this.v=t.e(a,{className:"vjs-menu-content"});a=t.a.prototype.e.call(this,"div",{append:this.v,className:"vjs-menu"});a.appendChild(this.v);t.c(a,"click",function(a){a.preventDefault();a.stopImmediatePropagation()});return a};t.J=t.u.extend({i:function(a,c){t.u.call(this,a,c);this.selected(c.selected)}});t.J.prototype.e=function(a,c){return t.u.prototype.e.call(this,"li",t.g.z({className:"vjs-menu-item",innerHTML:this.m.label},c))};
|
||||
t.J.prototype.s=function(){this.selected(f)};t.J.prototype.selected=function(a){a?(this.n("vjs-selected"),this.b.setAttribute("aria-selected",f)):(this.p("vjs-selected"),this.b.setAttribute("aria-selected",l))};t.N=t.u.extend({i:function(a,c){t.u.call(this,a,c);this.Ba=this.xa();this.V(this.Ba);this.Q&&0===this.Q.length&&this.Y();this.c("keyup",this.Z);this.b.setAttribute("aria-haspopup",f);this.b.setAttribute("role","button")}});s=t.N.prototype;s.ta=l;
|
||||
s.xa=function(){var a=new t.ha(this.d);this.options().title&&a.ja().appendChild(t.e("li",{className:"vjs-menu-title",innerHTML:t.ba(this.options().title),he:-1}));if(this.Q=this.createItems())for(var c=0;c<this.Q.length;c++)ca(a,this.Q[c]);return a};s.wa=m();s.T=function(){return this.className+" vjs-menu-button "+t.u.prototype.T.call(this)};s.Ya=m();s.Xa=m();s.s=function(){this.R("mouseout",t.bind(this,function(){E(this.Ba);this.b.blur()}));this.ta?I(this):J(this)};
|
||||
s.Z=function(a){a.preventDefault();32==a.which||13==a.which?this.ta?I(this):J(this):27==a.which&&this.ta&&I(this)};function J(a){a.ta=f;a.Ba.n("vjs-lock-showing");a.b.setAttribute("aria-pressed",f);a.Q&&0<a.Q.length&&a.Q[0].w().focus()}function I(a){a.ta=l;E(a.Ba);a.b.setAttribute("aria-pressed",l)}t.D=function(a){"number"===typeof a?this.code=a:"string"===typeof a?this.message=a:"object"===typeof a&&t.g.z(this,a);this.message||(this.message=t.D.rd[this.code]||"")};t.D.prototype.code=0;
|
||||
t.D.prototype.message="";t.D.prototype.status=k;t.D.Ra="MEDIA_ERR_CUSTOM MEDIA_ERR_ABORTED MEDIA_ERR_NETWORK MEDIA_ERR_DECODE MEDIA_ERR_SRC_NOT_SUPPORTED MEDIA_ERR_ENCRYPTED".split(" ");
|
||||
t.D.rd={1:"You aborted the video playback",2:"A network error caused the video download to fail part-way.",3:"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.",4:"The video could not be loaded, either because the server or network failed or because the format is not supported.",5:"The video is encrypted and we do not have the keys to decrypt it."};for(var K=0;K<t.D.Ra.length;K++)t.D[t.D.Ra[K]]=K,t.D.prototype[t.D.Ra[K]]=K;
|
||||
var L,M,N,O;
|
||||
L=["requestFullscreen exitFullscreen fullscreenElement fullscreenEnabled fullscreenchange fullscreenerror".split(" "),"webkitRequestFullscreen webkitExitFullscreen webkitFullscreenElement webkitFullscreenEnabled webkitfullscreenchange webkitfullscreenerror".split(" "),"webkitRequestFullScreen webkitCancelFullScreen webkitCurrentFullScreenElement webkitCancelFullScreen webkitfullscreenchange webkitfullscreenerror".split(" "),"mozRequestFullScreen mozCancelFullScreen mozFullScreenElement mozFullScreenEnabled mozfullscreenchange mozfullscreenerror".split(" "),"msRequestFullscreen msExitFullscreen msFullscreenElement msFullscreenEnabled MSFullscreenChange MSFullscreenError".split(" ")];
|
||||
M=L[0];for(O=0;O<L.length;O++)if(L[O][1]in document){N=L[O];break}if(N){t.Oa.Fb={};for(O=0;O<N.length;O++)t.Oa.Fb[M[O]]=N[O]}
|
||||
t.Player=t.a.extend({i:function(a,c,d){this.I=a;a.id=a.id||"vjs_video_"+t.r++;this.ie=a&&t.Aa(a);c=t.g.z(da(a),c);this.Ua=c.language||t.options.language;this.Id=c.languages||t.options.languages;this.G={};this.Fc=c.poster||"";this.yb=!!c.controls;a.controls=l;c.Jc=l;P(this,"audio"===this.I.nodeName.toLowerCase());t.a.call(this,this,c,d);this.controls()?this.n("vjs-controls-enabled"):this.n("vjs-controls-disabled");P(this)&&this.n("vjs-audio");t.Ca[this.L]=this;c.plugins&&t.g.X(c.plugins,function(a,
|
||||
c){this[a](c)},this);var e,g,h,j,n,r;e=t.bind(this,this.reportUserActivity);this.c("mousedown",function(){e();clearInterval(g);g=setInterval(e,250)});this.c("mousemove",function(a){if(a.screenX!=n||a.screenY!=r)n=a.screenX,r=a.screenY,e()});this.c("mouseup",function(){e();clearInterval(g)});this.c("keydown",e);this.c("keyup",e);h=setInterval(t.bind(this,function(){if(this.pa){this.pa=l;this.userActive(f);clearTimeout(j);var a=this.options().inactivityTimeout;0<a&&(j=setTimeout(t.bind(this,function(){this.pa||
|
||||
this.userActive(l)}),a))}}),250);this.c("dispose",function(){clearInterval(h);clearTimeout(j)})}});s=t.Player.prototype;s.language=function(a){if(a===b)return this.Ua;this.Ua=a;return this};s.languages=p("Id");s.m=t.options;s.dispose=function(){this.l("dispose");this.j("dispose");t.Ca[this.L]=k;this.I&&this.I.player&&(this.I.player=k);this.b&&this.b.player&&(this.b.player=k);this.o&&this.o.dispose();t.a.prototype.dispose.call(this)};
|
||||
function da(a){var c,d,e={sources:[],tracks:[]};c=t.Aa(a);d=c["data-setup"];d!==k&&t.g.z(c,t.JSON.parse(d||"{}"));t.g.z(e,c);if(a.hasChildNodes()){var g,h;a=a.childNodes;g=0;for(h=a.length;g<h;g++)c=a[g],d=c.nodeName.toLowerCase(),"source"===d?e.sources.push(t.Aa(c)):"track"===d&&e.tracks.push(t.Aa(c))}return e}
|
||||
s.e=function(){var a=this.b=t.a.prototype.e.call(this,"div"),c=this.I,d;c.removeAttribute("width");c.removeAttribute("height");if(c.hasChildNodes()){var e,g,h,j,n;e=c.childNodes;g=e.length;for(n=[];g--;)h=e[g],j=h.nodeName.toLowerCase(),"track"===j&&n.push(h);for(e=0;e<n.length;e++)c.removeChild(n[e])}d=t.Aa(c);t.g.X(d,function(c){"class"==c?a.className=d[c]:a.setAttribute(c,d[c])});c.id+="_html5_api";c.className="vjs-tech";c.player=a.player=this;this.n("vjs-paused");this.width(this.m.width,f);this.height(this.m.height,
|
||||
f);c.Bd=c.networkState;c.parentNode&&c.parentNode.insertBefore(a,c);t.Hb(c,a);this.b=a;this.c("loadstart",this.Pd);this.c("waiting",this.Vd);this.c(["canplay","canplaythrough","playing","ended"],this.Ud);this.c("seeking",this.Sd);this.c("seeked",this.Rd);this.c("ended",this.Ld);this.c("play",this.Ob);this.c("firstplay",this.Nd);this.c("pause",this.Nb);this.c("progress",this.Qd);this.c("durationchange",this.Cc);this.c("fullscreenchange",this.Od);return a};
|
||||
function Q(a,c,d){a.o&&(a.la=l,a.o.dispose(),a.o=l);"Html5"!==c&&a.I&&(t.h.Bb(a.I),a.I=k);a.eb=c;a.la=l;var e=t.g.z({source:d,parentEl:a.b},a.m[c.toLowerCase()]);d&&(a.nc=d.type,d.src==a.G.src&&0<a.G.currentTime&&(e.startTime=a.G.currentTime),a.G.src=d.src);a.o=new window.videojs[c](a,e);a.o.K(function(){this.d.Ga()})}s.Pd=function(){this.error(k);this.paused()?(R(this,l),this.R("play",function(){R(this,f)})):this.l("firstplay")};s.vc=l;
|
||||
function R(a,c){c!==b&&a.vc!==c&&((a.vc=c)?(a.n("vjs-has-started"),a.l("firstplay")):a.p("vjs-has-started"))}s.Ob=function(){this.p("vjs-paused");this.n("vjs-playing")};s.Vd=function(){this.n("vjs-waiting")};s.Ud=function(){this.p("vjs-waiting")};s.Sd=function(){this.n("vjs-seeking")};s.Rd=function(){this.p("vjs-seeking")};s.Nd=function(){this.m.starttime&&this.currentTime(this.m.starttime);this.n("vjs-has-started")};s.Nb=function(){this.p("vjs-playing");this.n("vjs-paused")};
|
||||
s.Qd=function(){1==this.bufferedPercent()&&this.l("loadedalldata")};s.Ld=function(){this.m.loop?(this.currentTime(0),this.play()):this.paused()||this.pause()};s.Cc=function(){var a=S(this,"duration");a&&(0>a&&(a=Infinity),this.duration(a),Infinity===a?this.n("vjs-live"):this.p("vjs-live"))};s.Od=function(){this.isFullscreen()?this.n("vjs-fullscreen"):this.p("vjs-fullscreen")};function T(a,c,d){if(a.o&&!a.o.la)a.o.K(function(){this[c](d)});else try{a.o[c](d)}catch(e){throw t.log(e),e;}}
|
||||
function S(a,c){if(a.o&&a.o.la)try{return a.o[c]()}catch(d){throw a.o[c]===b?t.log("Video.js: "+c+" method not defined for "+a.eb+" playback technology.",d):"TypeError"==d.name?(t.log("Video.js: "+c+" unavailable on "+a.eb+" playback technology element.",d),a.o.la=l):t.log(d),d;}}s.play=function(){T(this,"play");return this};s.pause=function(){T(this,"pause");return this};s.paused=function(){return S(this,"paused")===l?l:f};
|
||||
s.currentTime=function(a){return a!==b?(T(this,"setCurrentTime",a),this):this.G.currentTime=S(this,"currentTime")||0};s.duration=function(a){if(a!==b)return this.G.duration=parseFloat(a),this;this.G.duration===b&&this.Cc();return this.G.duration||0};s.remainingTime=function(){return this.duration()-this.currentTime()};s.buffered=function(){var a=S(this,"buffered");if(!a||!a.length)a=t.zb(0,0);return a};
|
||||
s.bufferedPercent=function(){var a=this.duration(),c=this.buffered(),d=0,e,g;if(!a)return 0;for(var h=0;h<c.length;h++)e=c.start(h),g=c.end(h),g>a&&(g=a),d+=g-e;return d/a};s.volume=function(a){if(a!==b)return a=Math.max(0,Math.min(1,parseFloat(a))),this.G.volume=a,T(this,"setVolume",a),t.ae(a),this;a=parseFloat(S(this,"volume"));return isNaN(a)?1:a};s.muted=function(a){return a!==b?(T(this,"setMuted",a),this):S(this,"muted")||l};s.Ea=function(){return S(this,"supportsFullScreen")||l};s.yc=l;
|
||||
s.isFullscreen=function(a){return a!==b?(this.yc=!!a,this):this.yc};s.isFullScreen=function(a){t.log.warn('player.isFullScreen() has been deprecated, use player.isFullscreen() with a lowercase "s")');return this.isFullscreen(a)};
|
||||
s.requestFullscreen=function(){var a=t.Oa.Fb;this.isFullscreen(f);a?(t.c(document,a.fullscreenchange,t.bind(this,function(c){this.isFullscreen(document[a.fullscreenElement]);this.isFullscreen()===l&&t.j(document,a.fullscreenchange,arguments.callee);this.l("fullscreenchange")})),this.b[a.requestFullscreen]()):this.o.Ea()?T(this,"enterFullScreen"):(this.qc(),this.l("fullscreenchange"));return this};
|
||||
s.requestFullScreen=function(){t.log.warn('player.requestFullScreen() has been deprecated, use player.requestFullscreen() with a lowercase "s")');return this.requestFullscreen()};s.exitFullscreen=function(){var a=t.Oa.Fb;this.isFullscreen(l);if(a)document[a.exitFullscreen]();else this.o.Ea()?T(this,"exitFullScreen"):(this.Cb(),this.l("fullscreenchange"));return this};s.cancelFullScreen=function(){t.log.warn("player.cancelFullScreen() has been deprecated, use player.exitFullscreen()");return this.exitFullscreen()};
|
||||
s.qc=function(){this.Dd=f;this.ud=document.documentElement.style.overflow;t.c(document,"keydown",t.bind(this,this.sc));document.documentElement.style.overflow="hidden";t.n(document.body,"vjs-full-window");this.l("enterFullWindow")};s.sc=function(a){27===a.keyCode&&(this.isFullscreen()===f?this.exitFullscreen():this.Cb())};s.Cb=function(){this.Dd=l;t.j(document,"keydown",this.sc);document.documentElement.style.overflow=this.ud;t.p(document.body,"vjs-full-window");this.l("exitFullWindow")};
|
||||
s.selectSource=function(a){for(var c=0,d=this.m.techOrder;c<d.length;c++){var e=t.ba(d[c]),g=window.videojs[e];if(g){if(g.isSupported())for(var h=0,j=a;h<j.length;h++){var n=j[h];if(g.canPlaySource(n))return{source:n,o:e}}}else t.log.error('The "'+e+'" tech is undefined. Skipped browser support check for that tech.')}return l};
|
||||
s.src=function(a){if(a===b)return S(this,"src");t.g.isArray(a)?U(this,a):"string"===typeof a?this.src({src:a}):a instanceof Object&&(a.type&&!window.videojs[this.eb].canPlaySource(a)?U(this,[a]):(this.G.src=a.src,this.nc=a.type||"",this.K(function(){T(this,"src",a.src);"auto"==this.m.preload&&this.load();this.m.autoplay&&this.play()})));return this};
|
||||
function U(a,c){var d=a.selectSource(c),e;d?d.o===a.eb?a.src(d.source):Q(a,d.o,d.source):(e=setTimeout(t.bind(a,function(){this.error({code:4,message:this.t(this.options().notSupportedMessage)})}),0),a.Ga(),a.c("dispose",function(){clearTimeout(e)}))}s.load=function(){T(this,"load");return this};s.currentSrc=function(){return S(this,"currentSrc")||this.G.src||""};s.pd=function(){return this.nc||""};s.Da=function(a){return a!==b?(T(this,"setPreload",a),this.m.preload=a,this):S(this,"preload")};
|
||||
s.autoplay=function(a){return a!==b?(T(this,"setAutoplay",a),this.m.autoplay=a,this):S(this,"autoplay")};s.loop=function(a){return a!==b?(T(this,"setLoop",a),this.m.loop=a,this):S(this,"loop")};s.poster=function(a){if(a===b)return this.Fc;a||(a="");this.Fc=a;T(this,"setPoster",a);this.l("posterchange");return this};
|
||||
s.controls=function(a){return a!==b?(a=!!a,this.yb!==a&&((this.yb=a)?(this.p("vjs-controls-disabled"),this.n("vjs-controls-enabled"),this.l("controlsenabled")):(this.p("vjs-controls-enabled"),this.n("vjs-controls-disabled"),this.l("controlsdisabled"))),this):this.yb};t.Player.prototype.Tb;s=t.Player.prototype;
|
||||
s.usingNativeControls=function(a){return a!==b?(a=!!a,this.Tb!==a&&((this.Tb=a)?(this.n("vjs-using-native-controls"),this.l("usingnativecontrols")):(this.p("vjs-using-native-controls"),this.l("usingcustomcontrols"))),this):this.Tb};s.da=k;s.error=function(a){if(a===b)return this.da;if(a===k)return this.da=a,this.p("vjs-error"),this;this.da=a instanceof t.D?a:new t.D(a);this.l("error");this.n("vjs-error");t.log.error("(CODE:"+this.da.code+" "+t.D.Ra[this.da.code]+")",this.da.message,this.da);return this};
|
||||
s.ended=function(){return S(this,"ended")};s.seeking=function(){return S(this,"seeking")};s.pa=f;s.reportUserActivity=function(){this.pa=f};s.Sb=f;s.userActive=function(a){return a!==b?(a=!!a,a!==this.Sb&&((this.Sb=a)?(this.pa=f,this.p("vjs-user-inactive"),this.n("vjs-user-active"),this.l("useractive")):(this.pa=l,this.o&&this.o.R("mousemove",function(a){a.stopPropagation();a.preventDefault()}),this.p("vjs-user-active"),this.n("vjs-user-inactive"),this.l("userinactive"))),this):this.Sb};
|
||||
s.playbackRate=function(a){return a!==b?(T(this,"setPlaybackRate",a),this):this.o&&this.o.featuresPlaybackRate?S(this,"playbackRate"):1};s.xc=l;function P(a,c){return c!==b?(a.xc=!!c,a):a.xc}t.Ja=t.a.extend();t.Ja.prototype.m={we:"play",children:{playToggle:{},currentTimeDisplay:{},timeDivider:{},durationDisplay:{},remainingTimeDisplay:{},liveDisplay:{},progressControl:{},fullscreenToggle:{},volumeControl:{},muteToggle:{},playbackRateMenuButton:{}}};t.Ja.prototype.e=function(){return t.e("div",{className:"vjs-control-bar"})};
|
||||
t.Yb=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});t.Yb.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-live-controls vjs-control"});this.v=t.e("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.t("Stream Type")+"</span>"+this.t("LIVE"),"aria-live":"off"});a.appendChild(this.v);return a};t.ac=t.u.extend({i:function(a,c){t.u.call(this,a,c);this.c(a,"play",this.Ob);this.c(a,"pause",this.Nb)}});s=t.ac.prototype;s.ua="Play";
|
||||
s.T=function(){return"vjs-play-control "+t.u.prototype.T.call(this)};s.s=function(){this.d.paused()?this.d.play():this.d.pause()};s.Ob=function(){this.p("vjs-paused");this.n("vjs-playing");this.b.children[0].children[0].innerHTML=this.t("Pause")};s.Nb=function(){this.p("vjs-playing");this.n("vjs-paused");this.b.children[0].children[0].innerHTML=this.t("Play")};t.hb=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.c(a,"timeupdate",this.fa)}});
|
||||
t.hb.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-current-time vjs-time-controls vjs-control"});this.v=t.e("div",{className:"vjs-current-time-display",innerHTML:'<span class="vjs-control-text">Current Time </span>0:00',"aria-live":"off"});a.appendChild(this.v);return a};t.hb.prototype.fa=function(){var a=this.d.bb?this.d.G.currentTime:this.d.currentTime();this.v.innerHTML='<span class="vjs-control-text">'+this.t("Current Time")+"</span> "+t.za(a,this.d.duration())};
|
||||
t.ib=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.c(a,"timeupdate",this.fa)}});t.ib.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-duration vjs-time-controls vjs-control"});this.v=t.e("div",{className:"vjs-duration-display",innerHTML:'<span class="vjs-control-text">'+this.t("Duration Time")+"</span> 0:00","aria-live":"off"});a.appendChild(this.v);return a};
|
||||
t.ib.prototype.fa=function(){var a=this.d.duration();a&&(this.v.innerHTML='<span class="vjs-control-text">'+this.t("Duration Time")+"</span> "+t.za(a))};t.gc=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});t.gc.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-time-divider",innerHTML:"<div><span>/</span></div>"})};t.pb=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.c(a,"timeupdate",this.fa)}});
|
||||
t.pb.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-remaining-time vjs-time-controls vjs-control"});this.v=t.e("div",{className:"vjs-remaining-time-display",innerHTML:'<span class="vjs-control-text">'+this.t("Remaining Time")+"</span> -0:00","aria-live":"off"});a.appendChild(this.v);return a};t.pb.prototype.fa=function(){this.d.duration()&&(this.v.innerHTML='<span class="vjs-control-text">'+this.t("Remaining Time")+"</span> -"+t.za(this.d.remainingTime()))};
|
||||
t.Ka=t.u.extend({i:function(a,c){t.u.call(this,a,c)}});t.Ka.prototype.ua="Fullscreen";t.Ka.prototype.T=function(){return"vjs-fullscreen-control "+t.u.prototype.T.call(this)};t.Ka.prototype.s=function(){this.d.isFullscreen()?(this.d.exitFullscreen(),this.xb.innerHTML=this.t("Fullscreen")):(this.d.requestFullscreen(),this.xb.innerHTML=this.t("Non-Fullscreen"))};t.ob=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});t.ob.prototype.m={children:{seekBar:{}}};
|
||||
t.ob.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-progress-control vjs-control"})};t.cc=t.S.extend({i:function(a,c){t.S.call(this,a,c);this.c(a,"timeupdate",this.oa);a.K(t.bind(this,this.oa))}});s=t.cc.prototype;s.m={children:{loadProgressBar:{},playProgressBar:{},seekHandle:{}},barName:"playProgressBar",handleName:"seekHandle"};s.Ec="timeupdate";s.e=function(){return t.S.prototype.e.call(this,"div",{className:"vjs-progress-holder","aria-label":"video progress bar"})};
|
||||
s.oa=function(){var a=this.d.bb?this.d.G.currentTime:this.d.currentTime();this.b.setAttribute("aria-valuenow",t.round(100*this.Gb(),2));this.b.setAttribute("aria-valuetext",t.za(a,this.d.duration()))};s.Gb=function(){return this.d.currentTime()/this.d.duration()};s.Za=function(a){t.S.prototype.Za.call(this,a);this.d.bb=f;this.me=!this.d.paused();this.d.pause()};s.$a=function(a){a=H(this,a)*this.d.duration();a==this.d.duration()&&(a-=0.1);this.d.currentTime(a)};
|
||||
s.Mb=function(a){t.S.prototype.Mb.call(this,a);this.d.bb=l;this.me&&this.d.play()};s.Oc=function(){this.d.currentTime(this.d.currentTime()+5)};s.Nc=function(){this.d.currentTime(this.d.currentTime()-5)};t.lb=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.c(a,"progress",this.update)}});t.lb.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.t("Loaded")+"</span>: 0%</span>"})};
|
||||
t.lb.prototype.update=function(){var a,c,d,e,g=this.d.buffered();a=this.d.duration();var h,j=this.d;h=j.buffered();j=j.duration();h=h.end(h.length-1);h>j&&(h=j);j=this.b.children;this.b.style.width=100*(h/a||0)+"%";for(a=0;a<g.length;a++)c=g.start(a),d=g.end(a),(e=j[a])||(e=this.b.appendChild(t.e())),e.style.left=100*(c/h||0)+"%",e.style.width=100*((d-c)/h||0)+"%";for(a=j.length;a>g.length;a--)this.b.removeChild(j[a-1])};t.$b=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});
|
||||
t.$b.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-play-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.t("Progress")+"</span>: 0%</span>"})};t.La=t.$.extend({i:function(a,c){t.$.call(this,a,c);this.c(a,"timeupdate",this.fa)}});t.La.prototype.defaultValue="00:00";t.La.prototype.e=function(){return t.$.prototype.e.call(this,"div",{className:"vjs-seek-handle","aria-live":"off"})};
|
||||
t.La.prototype.fa=function(){var a=this.d.bb?this.d.G.currentTime:this.d.currentTime();this.b.innerHTML='<span class="vjs-control-text">'+t.za(a,this.d.duration())+"</span>"};t.rb=t.a.extend({i:function(a,c){t.a.call(this,a,c);a.o&&a.o.featuresVolumeControl===l&&this.n("vjs-hidden");this.c(a,"loadstart",function(){a.o.featuresVolumeControl===l?this.n("vjs-hidden"):this.p("vjs-hidden")})}});t.rb.prototype.m={children:{volumeBar:{}}};
|
||||
t.rb.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-volume-control vjs-control"})};t.qb=t.S.extend({i:function(a,c){t.S.call(this,a,c);this.c(a,"volumechange",this.oa);a.K(t.bind(this,this.oa))}});s=t.qb.prototype;s.oa=function(){this.b.setAttribute("aria-valuenow",t.round(100*this.d.volume(),2));this.b.setAttribute("aria-valuetext",t.round(100*this.d.volume(),2)+"%")};s.m={children:{volumeLevel:{},volumeHandle:{}},barName:"volumeLevel",handleName:"volumeHandle"};
|
||||
s.Ec="volumechange";s.e=function(){return t.S.prototype.e.call(this,"div",{className:"vjs-volume-bar","aria-label":"volume level"})};s.$a=function(a){this.d.muted()&&this.d.muted(l);this.d.volume(H(this,a))};s.Gb=function(){return this.d.muted()?0:this.d.volume()};s.Oc=function(){this.d.volume(this.d.volume()+0.1)};s.Nc=function(){this.d.volume(this.d.volume()-0.1)};t.hc=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});
|
||||
t.hc.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})};t.sb=t.$.extend();t.sb.prototype.defaultValue="00:00";t.sb.prototype.e=function(){return t.$.prototype.e.call(this,"div",{className:"vjs-volume-handle"})};
|
||||
t.ia=t.u.extend({i:function(a,c){t.u.call(this,a,c);this.c(a,"volumechange",this.update);a.o&&a.o.featuresVolumeControl===l&&this.n("vjs-hidden");this.c(a,"loadstart",function(){a.o.featuresVolumeControl===l?this.n("vjs-hidden"):this.p("vjs-hidden")})}});t.ia.prototype.e=function(){return t.u.prototype.e.call(this,"div",{className:"vjs-mute-control vjs-control",innerHTML:'<div><span class="vjs-control-text">'+this.t("Mute")+"</span></div>"})};
|
||||
t.ia.prototype.s=function(){this.d.muted(this.d.muted()?l:f)};t.ia.prototype.update=function(){var a=this.d.volume(),c=3;0===a||this.d.muted()?c=0:0.33>a?c=1:0.67>a&&(c=2);this.d.muted()?this.b.children[0].children[0].innerHTML!=this.t("Unmute")&&(this.b.children[0].children[0].innerHTML=this.t("Unmute")):this.b.children[0].children[0].innerHTML!=this.t("Mute")&&(this.b.children[0].children[0].innerHTML=this.t("Mute"));for(a=0;4>a;a++)t.p(this.b,"vjs-vol-"+a);t.n(this.b,"vjs-vol-"+c)};
|
||||
t.sa=t.N.extend({i:function(a,c){t.N.call(this,a,c);this.c(a,"volumechange",this.update);a.o&&a.o.featuresVolumeControl===l&&this.n("vjs-hidden");this.c(a,"loadstart",function(){a.o.featuresVolumeControl===l?this.n("vjs-hidden"):this.p("vjs-hidden")});this.n("vjs-menu-button")}});t.sa.prototype.xa=function(){var a=new t.ha(this.d,{lc:"div"}),c=new t.qb(this.d,this.m.Ae);c.c("focus",function(){a.n("vjs-lock-showing")});c.c("blur",function(){E(a)});a.V(c);return a};
|
||||
t.sa.prototype.s=function(){t.ia.prototype.s.call(this);t.N.prototype.s.call(this)};t.sa.prototype.e=function(){return t.u.prototype.e.call(this,"div",{className:"vjs-volume-menu-button vjs-menu-button vjs-control",innerHTML:'<div><span class="vjs-control-text">'+this.t("Mute")+"</span></div>"})};t.sa.prototype.update=t.ia.prototype.update;t.bc=t.N.extend({i:function(a,c){t.N.call(this,a,c);this.Tc();this.Sc();this.c(a,"loadstart",this.Tc);this.c(a,"ratechange",this.Sc)}});s=t.bc.prototype;
|
||||
s.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-playback-rate vjs-menu-button vjs-control",innerHTML:'<div class="vjs-control-content"><span class="vjs-control-text">'+this.t("Playback Rate")+"</span></div>"});this.Ac=t.e("div",{className:"vjs-playback-rate-value",innerHTML:1});a.appendChild(this.Ac);return a};s.xa=function(){var a=new t.ha(this.k()),c=this.k().options().playbackRates;if(c)for(var d=c.length-1;0<=d;d--)a.V(new t.nb(this.k(),{rate:c[d]+"x"}));return a};
|
||||
s.oa=function(){this.w().setAttribute("aria-valuenow",this.k().playbackRate())};s.s=function(){for(var a=this.k().playbackRate(),c=this.k().options().playbackRates,d=c[0],e=0;e<c.length;e++)if(c[e]>a){d=c[e];break}this.k().playbackRate(d)};function ea(a){return a.k().o&&a.k().o.featuresPlaybackRate&&a.k().options().playbackRates&&0<a.k().options().playbackRates.length}s.Tc=function(){ea(this)?this.p("vjs-hidden"):this.n("vjs-hidden")};
|
||||
s.Sc=function(){ea(this)&&(this.Ac.innerHTML=this.k().playbackRate()+"x")};t.nb=t.J.extend({lc:"button",i:function(a,c){var d=this.label=c.rate,e=this.Hc=parseFloat(d,10);c.label=d;c.selected=1===e;t.J.call(this,a,c);this.c(a,"ratechange",this.update)}});t.nb.prototype.s=function(){t.J.prototype.s.call(this);this.k().playbackRate(this.Hc)};t.nb.prototype.update=function(){this.selected(this.k().playbackRate()==this.Hc)};
|
||||
t.ra=t.u.extend({i:function(a,c){t.u.call(this,a,c);this.update();a.c("posterchange",t.bind(this,this.update))}});t.ra.prototype.dispose=function(){this.k().j("posterchange",this.update);t.u.prototype.dispose.call(this)};t.ra.prototype.e=function(){var a=t.e("div",{className:"vjs-poster",tabIndex:-1});t.Wc||(this.Db=t.e("img"),a.appendChild(this.Db));return a};
|
||||
t.ra.prototype.update=function(){var a=this.k().poster(),c;this.Db?this.Db.src=a:(c="",a&&(c='url("'+a+'")'),this.b.style.backgroundImage=c);a?this.b.style.display="":this.Y()};t.ra.prototype.s=function(){this.d.play()};t.Zb=t.a.extend({i:function(a,c){t.a.call(this,a,c)}});t.Zb.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-loading-spinner"})};t.fb=t.u.extend();
|
||||
t.fb.prototype.e=function(){return t.u.prototype.e.call(this,"div",{className:"vjs-big-play-button",innerHTML:'<span aria-hidden="true"></span>',"aria-label":"play video"})};t.fb.prototype.s=function(){this.d.play()};t.jb=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.update();this.c(a,"error",this.update)}});t.jb.prototype.e=function(){var a=t.a.prototype.e.call(this,"div",{className:"vjs-error-display"});this.v=t.e("div");a.appendChild(this.v);return a};
|
||||
t.jb.prototype.update=function(){this.k().error()&&(this.v.innerHTML=this.t(this.k().error().message))};
|
||||
t.q=t.a.extend({i:function(a,c,d){c=c||{};c.Jc=l;t.a.call(this,a,c,d);this.featuresProgressEvents||(this.Bc=f,this.Gc=setInterval(t.bind(this,function(){var a=this.k().bufferedPercent();this.ld!=a&&this.k().l("progress");this.ld=a;1===a&&clearInterval(this.Gc)}),500));this.featuresTimeupdateEvents||(a=this.d,this.Lb=f,this.c(a,"play",this.Rc),this.c(a,"pause",this.cb),this.R("timeupdate",function(){this.featuresTimeupdateEvents=f;fa(this)}));var e;e=this.k();a=function(){if(e.controls()&&!e.usingNativeControls()){var a;
|
||||
this.c("mousedown",this.s);this.c("touchstart",function(){a=this.d.userActive()});this.c("touchmove",function(){a&&this.k().reportUserActivity()});this.c("touchend",function(a){a.preventDefault()});G(this);this.c("tap",this.Td)}};this.K(a);this.c(e,"controlsenabled",a);this.c(e,"controlsdisabled",this.Zd);this.K(function(){this.networkState&&0<this.networkState()&&this.k().l("loadstart")})}});s=t.q.prototype;
|
||||
s.Zd=function(){this.j("tap");this.j("touchstart");this.j("touchmove");this.j("touchleave");this.j("touchcancel");this.j("touchend");this.j("click");this.j("mousedown")};s.s=function(a){0===a.button&&this.k().controls()&&(this.k().paused()?this.k().play():this.k().pause())};s.Td=function(){this.k().userActive(!this.k().userActive())};function fa(a){a.Lb=l;a.cb();a.j("play",a.Rc);a.j("pause",a.cb)}
|
||||
s.Rc=function(){this.mc&&this.cb();this.mc=setInterval(t.bind(this,function(){this.k().l("timeupdate")}),250)};s.cb=function(){clearInterval(this.mc);this.k().l("timeupdate")};s.dispose=function(){this.Bc&&(this.Bc=l,clearInterval(this.Gc));this.Lb&&fa(this);t.a.prototype.dispose.call(this)};s.Qb=function(){this.Lb&&this.k().l("timeupdate")};s.Lc=m();t.q.prototype.featuresVolumeControl=f;t.q.prototype.featuresFullscreenResize=l;t.q.prototype.featuresPlaybackRate=l;
|
||||
t.q.prototype.featuresProgressEvents=l;t.q.prototype.featuresTimeupdateEvents=l;t.media={};
|
||||
t.h=t.q.extend({i:function(a,c,d){this.featuresVolumeControl=t.h.nd();this.featuresPlaybackRate=t.h.md();this.movingMediaElementInDOM=!t.$c;this.featuresProgressEvents=this.featuresFullscreenResize=f;t.q.call(this,a,c,d);for(d=t.h.kb.length-1;0<=d;d--)this.c(t.h.kb[d],this.vd);if((c=c.source)&&this.b.currentSrc!==c.src||a.I&&3===a.I.Bd)this.b.src=c.src;if(t.ec&&a.options().nativeControlsForTouch===f){alert("useNativeControls");var e,g,h,j;e=this;g=this.k();c=g.controls();e.b.controls=!!c;h=function(){e.b.controls=
|
||||
f};j=function(){e.b.controls=l};g.c("controlsenabled",h);g.c("controlsdisabled",j);c=function(){g.j("controlsenabled",h);g.j("controlsdisabled",j)};e.c("dispose",c);g.c("usingcustomcontrols",c);g.usingNativeControls(f)}a.K(function(){this.I&&(this.m.autoplay&&this.paused())&&(delete this.I.poster,this.play())});this.Ga()}});s=t.h.prototype;s.dispose=function(){t.h.Bb(this.b);t.q.prototype.dispose.call(this)};
|
||||
s.e=function(){var a=this.d,c=a.I,d;if(!c||this.movingMediaElementInDOM===l)c?(d=c.cloneNode(l),t.h.Bb(c),c=d,a.I=k):(c=t.e("video"),t.Kc(c,t.g.z(a.ie||{},{id:a.id()+"_html5_api","class":"vjs-tech"}))),c.player=a,t.Hb(c,a.w());d=["autoplay","preload","loop","muted"];for(var e=d.length-1;0<=e;e--){var g=d[e],h={};"undefined"!==typeof a.m[g]&&(h[g]=a.m[g]);t.Kc(c,h)}return c};s.vd=function(a){"error"==a.type&&this.error()?this.k().error(this.error().code):(a.bubbles=l,this.k().l(a))};s.play=function(){this.b.play()};
|
||||
s.pause=function(){this.b.pause()};s.paused=function(){return this.b.paused};s.currentTime=function(){return this.b.currentTime};s.Qb=function(a){try{this.b.currentTime=a}catch(c){t.log(c,"Video is not ready. (Video.js)")}};s.duration=function(){return this.b.duration||0};s.buffered=function(){return this.b.buffered};s.volume=function(){return this.b.volume};s.fe=function(a){this.b.volume=a};s.muted=function(){return this.b.muted};s.ce=function(a){this.b.muted=a};s.width=function(){return this.b.offsetWidth};
|
||||
s.height=function(){return this.b.offsetHeight};s.Ea=function(){return"function"==typeof this.b.webkitEnterFullScreen&&(/Android/.test(t.O)||!/Chrome|Mac OS X 10.5/.test(t.O))?f:l};
|
||||
s.pc=function(){var a=this.b;"webkitDisplayingFullscreen"in a&&this.R("webkitbeginfullscreen",function(){this.d.isFullscreen(f);this.R("webkitendfullscreen",function(){this.d.isFullscreen(l);this.d.l("fullscreenchange")});this.d.l("fullscreenchange")});a.paused&&a.networkState<=a.ne?(this.b.play(),setTimeout(function(){a.pause();a.webkitEnterFullScreen()},0)):a.webkitEnterFullScreen()};s.wd=function(){this.b.webkitExitFullScreen()};s.src=function(a){if(a===b)return this.b.src;this.b.src=a};
|
||||
s.load=function(){this.b.load()};s.currentSrc=function(){return this.b.currentSrc};s.poster=function(){return this.b.poster};s.Lc=function(a){this.b.poster=a};s.Da=function(){return this.b.Da};s.ee=function(a){this.b.Da=a};s.autoplay=function(){return this.b.autoplay};s.$d=function(a){this.b.autoplay=a};s.controls=function(){return this.b.controls};s.loop=function(){return this.b.loop};s.be=function(a){this.b.loop=a};s.error=function(){return this.b.error};s.seeking=function(){return this.b.seeking};
|
||||
s.ended=function(){return this.b.ended};s.playbackRate=function(){return this.b.playbackRate};s.de=function(a){this.b.playbackRate=a};s.networkState=function(){return this.b.networkState};t.h.isSupported=function(){try{t.A.volume=0.5}catch(a){return l}return!!t.A.canPlayType};t.h.vb=function(a){try{return!!t.A.canPlayType(a.type)}catch(c){return""}};t.h.nd=function(){var a=t.A.volume;t.A.volume=a/2+0.1;return a!==t.A.volume};
|
||||
t.h.md=function(){var a=t.A.playbackRate;t.A.playbackRate=a/2+0.1;return a!==t.A.playbackRate};var V,ga=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,ha=/^video\/mp4/i;t.h.Dc=function(){4<=t.Ub&&(V||(V=t.A.constructor.prototype.canPlayType),t.A.constructor.prototype.canPlayType=function(a){return a&&ga.test(a)?"maybe":V.call(this,a)});t.dd&&(V||(V=t.A.constructor.prototype.canPlayType),t.A.constructor.prototype.canPlayType=function(a){return a&&ha.test(a)?"maybe":V.call(this,a)})};
|
||||
t.h.le=function(){var a=t.A.constructor.prototype.canPlayType;t.A.constructor.prototype.canPlayType=V;V=k;return a};t.h.Dc();t.h.kb="loadstart suspend abort error emptied stalled loadedmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate progress play pause ratechange volumechange".split(" ");
|
||||
t.h.Bb=function(a){if(a){a.player=k;for(a.parentNode&&a.parentNode.removeChild(a);a.hasChildNodes();)a.removeChild(a.firstChild);a.removeAttribute("src");if("function"===typeof a.load)try{a.load()}catch(c){}}};
|
||||
t.f=t.q.extend({i:function(a,c,d){t.q.call(this,a,c,d);var e=c.source;d=c.parentEl;var g=this.b=t.e("div",{id:a.id()+"_temp_flash"}),h=a.id()+"_flash_api",j=a.m,j=t.g.z({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:j.autoplay,preload:j.Da,loop:j.loop,muted:j.muted},c.flashVars),n=t.g.z({wmode:"opaque",bgcolor:"#000000"},c.params),h=t.g.z({id:h,name:h,"class":"vjs-tech"},c.attributes);e&&(e.type&&t.f.Gd(e.type)?
|
||||
(e=t.f.Pc(e.src),j.rtmpConnection=encodeURIComponent(e.wb),j.rtmpStream=encodeURIComponent(e.Rb)):j.src=encodeURIComponent(t.tc(e.src)));t.Hb(g,d);c.startTime&&this.K(function(){this.load();this.play();this.currentTime(c.startTime)});t.Zc&&this.K(function(){this.c("mousemove",function(){this.k().l({type:"mousemove",bubbles:l})})});a.c("stageclick",a.reportUserActivity);this.b=t.f.oc(c.swf,g,j,n,h)}});t.f.prototype.dispose=function(){t.q.prototype.dispose.call(this)};t.f.prototype.play=function(){this.b.vjs_play()};
|
||||
t.f.prototype.pause=function(){this.b.vjs_pause()};t.f.prototype.src=function(a){if(a===b)return this.currentSrc();t.f.Fd(a)?(a=t.f.Pc(a),this.xe(a.wb),this.ye(a.Rb)):(a=t.tc(a),this.b.vjs_src(a));if(this.d.autoplay()){var c=this;setTimeout(function(){c.play()},0)}};t.f.prototype.setCurrentTime=function(a){this.Jd=a;this.b.vjs_setProperty("currentTime",a);t.q.prototype.Qb.call(this)};t.f.prototype.currentTime=function(){return this.seeking()?this.Jd||0:this.b.vjs_getProperty("currentTime")};
|
||||
t.f.prototype.currentSrc=function(){var a=this.b.vjs_getProperty("currentSrc");if(a==k){var c=this.rtmpConnection(),d=this.rtmpStream();c&&d&&(a=t.f.ge(c,d))}return a};t.f.prototype.load=function(){this.b.vjs_load()};t.f.prototype.poster=function(){this.b.vjs_getProperty("poster")};t.f.prototype.setPoster=m();t.f.prototype.buffered=function(){return t.zb(0,this.b.vjs_getProperty("buffered"))};t.f.prototype.Ea=q(l);t.f.prototype.pc=q(l);
|
||||
function ia(){var a=W[X],c=a.charAt(0).toUpperCase()+a.slice(1);ja["set"+c]=function(c){return this.b.vjs_setProperty(a,c)}}function ka(a){ja[a]=function(){return this.b.vjs_getProperty(a)}}
|
||||
var ja=t.f.prototype,W="rtmpConnection rtmpStream preload defaultPlaybackRate playbackRate autoplay loop mediaGroup controller controls volume muted defaultMuted".split(" "),la="error networkState readyState seeking initialTime duration startOffsetTime paused played seekable ended videoTracks audioTracks videoWidth videoHeight textTracks".split(" "),X;for(X=0;X<W.length;X++)ka(W[X]),ia();for(X=0;X<la.length;X++)ka(la[X]);t.f.isSupported=function(){return 10<=t.f.version()[0]};
|
||||
t.f.vb=function(a){if(!a.type)return"";a=a.type.replace(/;.*/,"").toLowerCase();if(a in t.f.yd||a in t.f.Qc)return"maybe"};t.f.yd={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"};t.f.Qc={"rtmp/mp4":"MP4","rtmp/flv":"FLV"};t.f.onReady=function(a){var c;if(c=(a=t.w(a))&&a.parentNode&&a.parentNode.player)a.player=c,t.f.checkReady(c.o)};t.f.checkReady=function(a){a.w()&&(a.w().vjs_getProperty?a.Ga():setTimeout(function(){t.f.checkReady(a)},50))};t.f.onEvent=function(a,c){t.w(a).player.l(c)};
|
||||
t.f.onError=function(a,c){var d=t.w(a).player,e="FLASH: "+c;"srcnotfound"==c?d.error({code:4,message:e}):d.error(e)};t.f.version=function(){var a="0,0,0";try{a=(new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(c){try{navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(a=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch(d){}}return a.split(",")};
|
||||
t.f.oc=function(a,c,d,e,g){a=t.f.Ad(a,d,e,g);a=t.e("div",{innerHTML:a}).childNodes[0];d=c.parentNode;c.parentNode.replaceChild(a,c);var h=d.childNodes[0];setTimeout(function(){h.style.display="block"},1E3);return a};
|
||||
t.f.Ad=function(a,c,d,e){var g="",h="",j="";c&&t.g.X(c,function(a,c){g+=a+"="+c+"&"});d=t.g.z({movie:a,flashvars:g,allowScriptAccess:"always",allowNetworking:"all"},d);t.g.X(d,function(a,c){h+='<param name="'+a+'" value="'+c+'" />'});e=t.g.z({data:a,width:"100%",height:"100%"},e);t.g.X(e,function(a,c){j+=a+'="'+c+'" '});return'<object type="application/x-shockwave-flash"'+j+">"+h+"</object>"};t.f.ge=function(a,c){return a+"&"+c};
|
||||
t.f.Pc=function(a){var c={wb:"",Rb:""};if(!a)return c;var d=a.indexOf("&"),e;-1!==d?e=d+1:(d=e=a.lastIndexOf("/")+1,0===d&&(d=e=a.length));c.wb=a.substring(0,d);c.Rb=a.substring(e,a.length);return c};t.f.Gd=function(a){return a in t.f.Qc};t.f.fd=/^rtmp[set]?:\/\//i;t.f.Fd=function(a){return t.f.fd.test(a)};
|
||||
t.ed=t.a.extend({i:function(a,c,d){t.a.call(this,a,c,d);if(!a.m.sources||0===a.m.sources.length){c=0;for(d=a.m.techOrder;c<d.length;c++){var e=t.ba(d[c]),g=window.videojs[e];if(g&&g.isSupported()){Q(a,e);break}}}else a.src(a.m.sources)}});t.Player.prototype.textTracks=function(){return this.Fa=this.Fa||[]};
|
||||
function ma(a,c,d,e,g){var h=a.Fa=a.Fa||[];g=g||{};g.kind=c;g.label=d;g.language=e;c=t.ba(c||"subtitles");var j=new window.videojs[c+"Track"](a,g);h.push(j);j.Ab()&&a.K(function(){setTimeout(function(){Y(j.k(),j.id())},0)})}function Y(a,c,d){for(var e=a.Fa,g=0,h=e.length,j,n;g<h;g++)j=e[g],j.id()===c?(j.show(),n=j):d&&(j.M()==d&&0<j.mode())&&j.disable();(c=n?n.M():d?d:l)&&a.l(c+"trackchange")}
|
||||
t.B=t.a.extend({i:function(a,c){t.a.call(this,a,c);this.L=c.id||"vjs_"+c.kind+"_"+c.language+"_"+t.r++;this.Mc=c.src;this.sd=c["default"]||c.dflt;this.je=c.title;this.Ua=c.srclang;this.Hd=c.label;this.ca=[];this.tb=[];this.ma=this.na=0}});s=t.B.prototype;s.M=p("H");s.src=p("Mc");s.Ab=p("sd");s.title=p("je");s.language=p("Ua");s.label=p("Hd");s.od=p("ca");s.gd=p("tb");s.readyState=p("na");s.mode=p("ma");s.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-"+this.H+" vjs-text-track"})};
|
||||
s.show=function(){na(this);this.ma=2;t.a.prototype.show.call(this)};s.Y=function(){na(this);this.ma=1;t.a.prototype.Y.call(this)};s.disable=function(){2==this.ma&&this.Y();this.d.j("timeupdate",t.bind(this,this.update,this.L));this.d.j("ended",t.bind(this,this.reset,this.L));this.reset();this.d.ka("textTrackDisplay").removeChild(this);this.ma=0};
|
||||
function na(a){0===a.na&&a.load();0===a.ma&&(a.d.c("timeupdate",t.bind(a,a.update,a.L)),a.d.c("ended",t.bind(a,a.reset,a.L)),("captions"===a.H||"subtitles"===a.H)&&a.d.ka("textTrackDisplay").V(a))}s.load=function(){0===this.na&&(this.na=1,t.get(this.Mc,t.bind(this,this.Wd),t.bind(this,this.Md)))};s.Md=function(a){this.error=a;this.na=3;this.l("error")};
|
||||
s.Wd=function(a){var c,d;a=a.split("\n");for(var e="",g=1,h=a.length;g<h;g++)if(e=t.trim(a[g])){-1==e.indexOf("--\x3e")?(c=e,e=t.trim(a[++g])):c=this.ca.length;c={id:c,index:this.ca.length};d=e.split(/[\t ]+/);c.startTime=oa(d[0]);c.ya=oa(d[2]);for(d=[];a[++g]&&(e=t.trim(a[g]));)d.push(e);c.text=d.join("<br/>");this.ca.push(c)}this.na=2;this.l("loaded")};
|
||||
function oa(a){var c=a.split(":");a=0;var d,e,g;3==c.length?(d=c[0],e=c[1],c=c[2]):(d=0,e=c[0],c=c[1]);c=c.split(/\s+/);c=c.splice(0,1)[0];c=c.split(/\.|,/);g=parseFloat(c[1]);c=c[0];a+=3600*parseFloat(d);a+=60*parseFloat(e);a+=parseFloat(c);g&&(a+=g/1E3);return a}
|
||||
s.update=function(){if(0<this.ca.length){var a=this.d.options().trackTimeOffset||0,a=this.d.currentTime()+a;if(this.Pb===b||a<this.Pb||this.Wa<=a){var c=this.ca,d=this.d.duration(),e=0,g=l,h=[],j,n,r,w;a>=this.Wa||this.Wa===b?w=this.Eb!==b?this.Eb:0:(g=f,w=this.Kb!==b?this.Kb:c.length-1);for(;;){r=c[w];if(r.ya<=a)e=Math.max(e,r.ya),r.Na&&(r.Na=l);else if(a<r.startTime){if(d=Math.min(d,r.startTime),r.Na&&(r.Na=l),!g)break}else g?(h.splice(0,0,r),n===b&&(n=w),j=w):(h.push(r),j===b&&(j=w),n=w),d=Math.min(d,
|
||||
r.ya),e=Math.max(e,r.startTime),r.Na=f;if(g)if(0===w)break;else w--;else if(w===c.length-1)break;else w++}this.tb=h;this.Wa=d;this.Pb=e;this.Eb=j;this.Kb=n;j=this.tb;n="";a=0;for(c=j.length;a<c;a++)n+='<span class="vjs-tt-cue">'+j[a].text+"</span>";this.b.innerHTML=n;this.l("cuechange")}}};s.reset=function(){this.Wa=0;this.Pb=this.d.duration();this.Kb=this.Eb=0};t.Wb=t.B.extend();t.Wb.prototype.H="captions";t.dc=t.B.extend();t.dc.prototype.H="subtitles";t.Xb=t.B.extend();t.Xb.prototype.H="chapters";
|
||||
t.fc=t.a.extend({i:function(a,c,d){t.a.call(this,a,c,d);if(a.m.tracks&&0<a.m.tracks.length){c=this.d;a=a.m.tracks;for(var e=0;e<a.length;e++)d=a[e],ma(c,d.kind,d.label,d.language,d)}}});t.fc.prototype.e=function(){return t.a.prototype.e.call(this,"div",{className:"vjs-text-track-display"})};t.aa=t.J.extend({i:function(a,c){var d=this.ea=c.track;c.label=d.label();c.selected=d.Ab();t.J.call(this,a,c);this.c(a,d.M()+"trackchange",this.update)}});
|
||||
t.aa.prototype.s=function(){t.J.prototype.s.call(this);Y(this.d,this.ea.L,this.ea.M())};t.aa.prototype.update=function(){this.selected(2==this.ea.mode())};t.mb=t.aa.extend({i:function(a,c){c.track={M:function(){return c.kind},k:a,label:function(){return c.kind+" off"},Ab:q(l),mode:q(l)};t.aa.call(this,a,c);this.selected(f)}});t.mb.prototype.s=function(){t.aa.prototype.s.call(this);Y(this.d,this.ea.L,this.ea.M())};
|
||||
t.mb.prototype.update=function(){for(var a=this.d.textTracks(),c=0,d=a.length,e,g=f;c<d;c++)e=a[c],e.M()==this.ea.M()&&2==e.mode()&&(g=l);this.selected(g)};t.U=t.N.extend({i:function(a,c){t.N.call(this,a,c);1>=this.Q.length&&this.Y()}});t.U.prototype.wa=function(){var a=[],c;a.push(new t.mb(this.d,{kind:this.H}));for(var d=0;d<this.d.textTracks().length;d++)c=this.d.textTracks()[d],c.M()===this.H&&a.push(new t.aa(this.d,{track:c}));return a};
|
||||
t.Ha=t.U.extend({i:function(a,c,d){t.U.call(this,a,c,d);this.b.setAttribute("aria-label","Captions Menu")}});t.Ha.prototype.H="captions";t.Ha.prototype.ua="Captions";t.Ha.prototype.className="vjs-captions-button";t.Ma=t.U.extend({i:function(a,c,d){t.U.call(this,a,c,d);this.b.setAttribute("aria-label","Subtitles Menu")}});t.Ma.prototype.H="subtitles";t.Ma.prototype.ua="Subtitles";t.Ma.prototype.className="vjs-subtitles-button";
|
||||
t.Ia=t.U.extend({i:function(a,c,d){t.U.call(this,a,c,d);this.b.setAttribute("aria-label","Chapters Menu")}});s=t.Ia.prototype;s.H="chapters";s.ua="Chapters";s.className="vjs-chapters-button";s.wa=function(){for(var a=[],c,d=0;d<this.d.textTracks().length;d++)c=this.d.textTracks()[d],c.M()===this.H&&a.push(new t.aa(this.d,{track:c}));return a};
|
||||
s.xa=function(){for(var a=this.d.textTracks(),c=0,d=a.length,e,g,h=this.Q=[];c<d;c++)if(e=a[c],e.M()==this.H)if(0===e.readyState())e.load(),e.c("loaded",t.bind(this,this.xa));else{g=e;break}a=this.Ba;a===b&&(a=new t.ha(this.d),a.ja().appendChild(t.e("li",{className:"vjs-menu-title",innerHTML:t.ba(this.H),he:-1})));if(g){e=g.ca;for(var j,c=0,d=e.length;c<d;c++)j=e[c],j=new t.gb(this.d,{track:g,cue:j}),h.push(j),a.V(j);this.V(a)}0<this.Q.length&&this.show();return a};
|
||||
t.gb=t.J.extend({i:function(a,c){var d=this.ea=c.track,e=this.cue=c.cue,g=a.currentTime();c.label=e.text;c.selected=e.startTime<=g&&g<e.ya;t.J.call(this,a,c);d.c("cuechange",t.bind(this,this.update))}});t.gb.prototype.s=function(){t.J.prototype.s.call(this);this.d.currentTime(this.cue.startTime);this.update(this.cue.startTime)};t.gb.prototype.update=function(){var a=this.cue,c=this.d.currentTime();this.selected(a.startTime<=c&&c<a.ya)};
|
||||
t.g.z(t.Ja.prototype.m.children,{subtitlesButton:{},captionsButton:{},chaptersButton:{}});
|
||||
if("undefined"!==typeof window.JSON&&"function"===typeof window.JSON.parse)t.JSON=window.JSON;else{t.JSON={};var Z=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;t.JSON.parse=function(a,c){function d(a,e){var j,n,r=a[e];if(r&&"object"===typeof r)for(j in r)Object.prototype.hasOwnProperty.call(r,j)&&(n=d(r,j),n!==b?r[j]=n:delete r[j]);return c.call(a,e,r)}var e;a=String(a);Z.lastIndex=0;Z.test(a)&&(a=a.replace(Z,function(a){return"\\u"+("0000"+
|
||||
a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof c?d({"":e},""):e;throw new SyntaxError("JSON.parse(): invalid or malformed JSON data");}}
|
||||
t.jc=function(){var a,c,d,e;a=document.getElementsByTagName("video");c=document.getElementsByTagName("audio");var g=[];if(a&&0<a.length){d=0;for(e=a.length;d<e;d++)g.push(a[d])}if(c&&0<c.length){d=0;for(e=c.length;d<e;d++)g.push(c[d])}if(g&&0<g.length){d=0;for(e=g.length;d<e;d++)if((c=g[d])&&c.getAttribute)c.player===b&&(a=c.getAttribute("data-setup"),a!==k&&videojs(c));else{t.ub();break}}else t.Uc||t.ub()};t.ub=function(){setTimeout(t.jc,1)};
|
||||
"complete"===document.readyState?t.Uc=f:t.R(window,"load",function(){t.Uc=f});t.ub();t.Yd=function(a,c){t.Player.prototype[a]=c};var pa=this;function $(a,c){var d=a.split("."),e=pa;!(d[0]in e)&&e.execScript&&e.execScript("var "+d[0]);for(var g;d.length&&(g=d.shift());)!d.length&&c!==b?e[g]=c:e=e[g]?e[g]:e[g]={}};$("videojs",t);$("_V_",t);$("videojs.options",t.options);$("videojs.players",t.Ca);$("videojs.TOUCH_ENABLED",t.ec);$("videojs.cache",t.va);$("videojs.Component",t.a);t.a.prototype.player=t.a.prototype.k;t.a.prototype.options=t.a.prototype.options;t.a.prototype.init=t.a.prototype.i;t.a.prototype.dispose=t.a.prototype.dispose;t.a.prototype.createEl=t.a.prototype.e;t.a.prototype.contentEl=t.a.prototype.ja;t.a.prototype.el=t.a.prototype.w;t.a.prototype.addChild=t.a.prototype.V;
|
||||
t.a.prototype.getChild=t.a.prototype.ka;t.a.prototype.getChildById=t.a.prototype.zd;t.a.prototype.children=t.a.prototype.children;t.a.prototype.initChildren=t.a.prototype.wc;t.a.prototype.removeChild=t.a.prototype.removeChild;t.a.prototype.on=t.a.prototype.c;t.a.prototype.off=t.a.prototype.j;t.a.prototype.one=t.a.prototype.R;t.a.prototype.trigger=t.a.prototype.l;t.a.prototype.triggerReady=t.a.prototype.Ga;t.a.prototype.show=t.a.prototype.show;t.a.prototype.hide=t.a.prototype.Y;
|
||||
t.a.prototype.width=t.a.prototype.width;t.a.prototype.height=t.a.prototype.height;t.a.prototype.dimensions=t.a.prototype.td;t.a.prototype.ready=t.a.prototype.K;t.a.prototype.addClass=t.a.prototype.n;t.a.prototype.removeClass=t.a.prototype.p;t.a.prototype.buildCSSClass=t.a.prototype.T;t.a.prototype.localize=t.a.prototype.t;t.Player.prototype.ended=t.Player.prototype.ended;t.Player.prototype.enterFullWindow=t.Player.prototype.qc;t.Player.prototype.exitFullWindow=t.Player.prototype.Cb;
|
||||
t.Player.prototype.preload=t.Player.prototype.Da;t.Player.prototype.remainingTime=t.Player.prototype.remainingTime;t.Player.prototype.supportsFullScreen=t.Player.prototype.Ea;t.Player.prototype.currentType=t.Player.prototype.pd;t.Player.prototype.requestFullScreen=t.Player.prototype.requestFullScreen;t.Player.prototype.requestFullscreen=t.Player.prototype.requestFullscreen;t.Player.prototype.cancelFullScreen=t.Player.prototype.cancelFullScreen;t.Player.prototype.exitFullscreen=t.Player.prototype.exitFullscreen;
|
||||
t.Player.prototype.isFullScreen=t.Player.prototype.isFullScreen;t.Player.prototype.isFullscreen=t.Player.prototype.isFullscreen;$("videojs.MediaLoader",t.ed);$("videojs.TextTrackDisplay",t.fc);$("videojs.ControlBar",t.Ja);$("videojs.Button",t.u);$("videojs.PlayToggle",t.ac);$("videojs.FullscreenToggle",t.Ka);$("videojs.BigPlayButton",t.fb);$("videojs.LoadingSpinner",t.Zb);$("videojs.CurrentTimeDisplay",t.hb);$("videojs.DurationDisplay",t.ib);$("videojs.TimeDivider",t.gc);
|
||||
$("videojs.RemainingTimeDisplay",t.pb);$("videojs.LiveDisplay",t.Yb);$("videojs.ErrorDisplay",t.jb);$("videojs.Slider",t.S);$("videojs.ProgressControl",t.ob);$("videojs.SeekBar",t.cc);$("videojs.LoadProgressBar",t.lb);$("videojs.PlayProgressBar",t.$b);$("videojs.SeekHandle",t.La);$("videojs.VolumeControl",t.rb);$("videojs.VolumeBar",t.qb);$("videojs.VolumeLevel",t.hc);$("videojs.VolumeMenuButton",t.sa);$("videojs.VolumeHandle",t.sb);$("videojs.MuteToggle",t.ia);$("videojs.PosterImage",t.ra);
|
||||
$("videojs.Menu",t.ha);$("videojs.MenuItem",t.J);$("videojs.MenuButton",t.N);$("videojs.PlaybackRateMenuButton",t.bc);t.N.prototype.createItems=t.N.prototype.wa;t.U.prototype.createItems=t.U.prototype.wa;t.Ia.prototype.createItems=t.Ia.prototype.wa;$("videojs.SubtitlesButton",t.Ma);$("videojs.CaptionsButton",t.Ha);$("videojs.ChaptersButton",t.Ia);$("videojs.MediaTechController",t.q);t.q.prototype.featuresVolumeControl=t.q.prototype.ue;t.q.prototype.featuresFullscreenResize=t.q.prototype.qe;
|
||||
t.q.prototype.featuresPlaybackRate=t.q.prototype.re;t.q.prototype.featuresProgressEvents=t.q.prototype.se;t.q.prototype.featuresTimeupdateEvents=t.q.prototype.te;t.q.prototype.setPoster=t.q.prototype.Lc;$("videojs.Html5",t.h);t.h.Events=t.h.kb;t.h.isSupported=t.h.isSupported;t.h.canPlaySource=t.h.vb;t.h.patchCanPlayType=t.h.Dc;t.h.unpatchCanPlayType=t.h.le;t.h.prototype.setCurrentTime=t.h.prototype.Qb;t.h.prototype.setVolume=t.h.prototype.fe;t.h.prototype.setMuted=t.h.prototype.ce;
|
||||
t.h.prototype.setPreload=t.h.prototype.ee;t.h.prototype.setAutoplay=t.h.prototype.$d;t.h.prototype.setLoop=t.h.prototype.be;t.h.prototype.enterFullScreen=t.h.prototype.pc;t.h.prototype.exitFullScreen=t.h.prototype.wd;t.h.prototype.playbackRate=t.h.prototype.playbackRate;t.h.prototype.setPlaybackRate=t.h.prototype.de;$("videojs.Flash",t.f);t.f.isSupported=t.f.isSupported;t.f.canPlaySource=t.f.vb;t.f.onReady=t.f.onReady;t.f.embed=t.f.oc;t.f.version=t.f.version;$("videojs.TextTrack",t.B);
|
||||
t.B.prototype.label=t.B.prototype.label;t.B.prototype.kind=t.B.prototype.M;t.B.prototype.mode=t.B.prototype.mode;t.B.prototype.cues=t.B.prototype.od;t.B.prototype.activeCues=t.B.prototype.gd;$("videojs.CaptionsTrack",t.Wb);$("videojs.SubtitlesTrack",t.dc);$("videojs.ChaptersTrack",t.Xb);$("videojs.autoSetup",t.jc);$("videojs.plugin",t.Yd);$("videojs.createTimeRange",t.zb);$("videojs.util",t.ga);t.ga.mergeOptions=t.ga.Va;t.addLanguage=t.hd;})();
|
||||
+123
-51
@@ -25,22 +25,23 @@ big play button is done via CSS and player states.
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [init](#init-player-options-ready-) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -81,7 +82,7 @@ big play button is done via CSS and player states.
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -94,7 +95,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -104,7 +105,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -116,7 +117,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -127,7 +128,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -141,7 +142,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -155,14 +156,14 @@ _inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -174,7 +175,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -201,7 +202,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -214,7 +215,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -227,7 +228,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -247,7 +261,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -257,7 +271,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -269,7 +283,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -295,8 +309,30 @@ _inherited from_: [src/js/button.js#L15](https://github.com/videojs/video.js/blo
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -308,60 +344,96 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -409,7 +481,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -419,7 +491,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -435,7 +507,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -446,7 +518,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -459,7 +531,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -469,23 +541,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -495,7 +567,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -515,7 +587,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -524,7 +596,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
+123
-51
@@ -25,21 +25,22 @@ Base class for all buttons
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -80,7 +81,7 @@ Base class for all buttons
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -93,7 +94,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -103,7 +104,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -115,7 +116,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -126,7 +127,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -140,7 +141,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -154,14 +155,14 @@ _inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -173,7 +174,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -200,7 +201,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -213,7 +214,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -226,7 +227,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -246,7 +260,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -256,7 +270,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -268,7 +282,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -294,8 +308,30 @@ _defined in_: [src/js/button.js#L15](https://github.com/videojs/video.js/blob/ma
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -307,60 +343,96 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -408,7 +480,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -418,7 +490,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -434,7 +506,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -445,7 +517,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -458,7 +530,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -468,23 +540,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -494,7 +566,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -514,7 +586,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -523,7 +595,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# vjs.CaptionsButton
|
||||
|
||||
__EXTENDS__: [vjs.TextTrackButton](vjs.TextTrackButton.md)
|
||||
__DEFINED IN__: [src/js/tracks.js#L867](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L867)
|
||||
__DEFINED IN__: [src/js/tracks.js#L856](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L856)
|
||||
|
||||
The button component for toggling and selecting captions
|
||||
|
||||
@@ -26,21 +26,22 @@ The button component for toggling and selecting captions
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -81,7 +82,7 @@ The button component for toggling and selecting captions
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -94,7 +95,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -113,7 +114,7 @@ _inherited from_: [src/js/menu.js#L157](https://github.com/videojs/video.js/blob
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -124,7 +125,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -138,7 +139,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -159,14 +160,14 @@ _inherited from_: [src/js/menu.js#L154](https://github.com/videojs/video.js/blob
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -178,7 +179,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -205,7 +206,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -218,7 +219,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -231,7 +232,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -251,7 +265,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -261,7 +275,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -273,7 +287,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -284,7 +298,7 @@ _inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js
|
||||
* __options__
|
||||
* __ready__
|
||||
|
||||
_defined in_: [src/js/tracks.js#L869](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L869)
|
||||
_defined in_: [src/js/tracks.js#L858](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L858)
|
||||
|
||||
---
|
||||
|
||||
@@ -298,8 +312,30 @@ _defined in_: [src/js/tracks.js#L869](https://github.com/videojs/video.js/blob/m
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -311,60 +347,96 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -412,7 +484,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -422,7 +494,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -438,7 +510,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -449,7 +521,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -462,7 +534,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -472,23 +544,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -498,7 +570,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -518,7 +590,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -527,7 +599,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
+138
-75
@@ -3,7 +3,7 @@
|
||||
# vjs.CaptionsTrack
|
||||
|
||||
__EXTENDS__: [vjs.TextTrack](vjs.TextTrack.md)
|
||||
__DEFINED IN__: [src/js/tracks.js#L679](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L679)
|
||||
__DEFINED IN__: [src/js/tracks.js#L668](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L668)
|
||||
|
||||
The track component for managing the hiding and showing of captions
|
||||
|
||||
@@ -16,7 +16,6 @@ The track component for managing the hiding and showing of captions
|
||||
- [activeCues](#activecues) _`inherited`_
|
||||
- [addChild](#addchild-child-options-) _`inherited`_
|
||||
- [addClass](#addclass-classtoadd-) _`inherited`_
|
||||
- [adjustFontSize](#adjustfontsize) _`inherited`_
|
||||
- [buildCSSClass](#buildcssclass) _`inherited`_
|
||||
- [children](#children) _`inherited`_
|
||||
- [contentEl](#contentel) _`inherited`_
|
||||
@@ -31,6 +30,7 @@ The track component for managing the hiding and showing of captions
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
@@ -41,9 +41,9 @@ The track component for managing the hiding and showing of captions
|
||||
- [language](#language) _`inherited`_
|
||||
- [mode](#mode) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
@@ -53,7 +53,7 @@ The track component for managing the hiding and showing of captions
|
||||
- [show](#show) _`inherited`_
|
||||
- [src](#src) _`inherited`_
|
||||
- [title](#title) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -67,7 +67,7 @@ The track component for managing the hiding and showing of captions
|
||||
### activate()
|
||||
> Turn on cue tracking. Tracks that are showing OR hidden are active.
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L385](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L385)
|
||||
_inherited from_: [src/js/tracks.js#L373](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L373)
|
||||
|
||||
---
|
||||
|
||||
@@ -77,7 +77,7 @@ _inherited from_: [src/js/tracks.js#L385](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `Array`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L264](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L264)
|
||||
_inherited from_: [src/js/tracks.js#L268](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L268)
|
||||
|
||||
---
|
||||
|
||||
@@ -111,7 +111,7 @@ _inherited from_: [src/js/tracks.js#L264](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -124,15 +124,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
|
||||
---
|
||||
|
||||
### adjustFontSize()
|
||||
> Change the font size of the text track to make it larger when playing in fullscreen mode
|
||||
> and restore it to its normal size when not in fullscreen mode.
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L309](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L309)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -142,7 +134,7 @@ _inherited from_: [src/js/tracks.js#L309](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -154,7 +146,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -165,7 +157,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -175,7 +167,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L325](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L325)
|
||||
_inherited from_: [src/js/tracks.js#L313](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L313)
|
||||
|
||||
---
|
||||
|
||||
@@ -185,14 +177,14 @@ _inherited from_: [src/js/tracks.js#L325](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `Array`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L249](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L249)
|
||||
_inherited from_: [src/js/tracks.js#L253](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L253)
|
||||
|
||||
---
|
||||
|
||||
### deactivate()
|
||||
> Turn off cue tracking.
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L408](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L408)
|
||||
_inherited from_: [src/js/tracks.js#L396](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L396)
|
||||
|
||||
---
|
||||
|
||||
@@ -202,7 +194,7 @@ _inherited from_: [src/js/tracks.js#L408](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `Boolean`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L190](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L190)
|
||||
_inherited from_: [src/js/tracks.js#L194](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L194)
|
||||
|
||||
---
|
||||
|
||||
@@ -216,7 +208,7 @@ _inherited from_: [src/js/tracks.js#L190](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
@@ -225,14 +217,14 @@ _inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js
|
||||
> Indicates that the text track is not active. Other than for the purposes of exposing the track in the DOM, the user agent is ignoring the text track.
|
||||
> No cues are active, no events are fired, and the user agent will not attempt to obtain the track's cues.
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L371](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L371)
|
||||
_inherited from_: [src/js/tracks.js#L359](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L359)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -244,7 +236,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -271,7 +263,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -284,7 +276,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -297,7 +289,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -317,7 +322,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -327,7 +332,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
> If no attempt has yet been made to obtain the track's cues, the user agent will perform such an attempt momentarily.
|
||||
> The user agent is maintaining a list of which cues are active, and events are being fired accordingly.
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L356](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L356)
|
||||
_inherited from_: [src/js/tracks.js#L344](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L344)
|
||||
|
||||
---
|
||||
|
||||
@@ -339,7 +344,7 @@ _inherited from_: [src/js/tracks.js#L356](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -349,7 +354,7 @@ _inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js
|
||||
* __player__
|
||||
* __options__
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L128](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L128)
|
||||
_inherited from_: [src/js/tracks.js#L134](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L134)
|
||||
|
||||
---
|
||||
|
||||
@@ -363,8 +368,30 @@ _inherited from_: [src/js/tracks.js#L128](https://github.com/videojs/video.js/bl
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -374,7 +401,7 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L161](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L161)
|
||||
_inherited from_: [src/js/tracks.js#L165](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L165)
|
||||
|
||||
---
|
||||
|
||||
@@ -384,7 +411,7 @@ _inherited from_: [src/js/tracks.js#L161](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L234](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L234)
|
||||
_inherited from_: [src/js/tracks.js#L238](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L238)
|
||||
|
||||
---
|
||||
|
||||
@@ -394,7 +421,7 @@ _inherited from_: [src/js/tracks.js#L234](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L219](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L219)
|
||||
_inherited from_: [src/js/tracks.js#L223](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L223)
|
||||
|
||||
---
|
||||
|
||||
@@ -404,7 +431,7 @@ _inherited from_: [src/js/tracks.js#L219](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `Number`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L301](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L301)
|
||||
_inherited from_: [src/js/tracks.js#L305](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L305)
|
||||
|
||||
---
|
||||
|
||||
@@ -416,60 +443,96 @@ _inherited from_: [src/js/tracks.js#L301](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -517,7 +580,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -527,7 +590,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -543,7 +606,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -553,7 +616,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Number`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L283](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L283)
|
||||
_inherited from_: [src/js/tracks.js#L287](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L287)
|
||||
|
||||
---
|
||||
|
||||
@@ -564,7 +627,7 @@ _inherited from_: [src/js/tracks.js#L283](https://github.com/videojs/video.js/bl
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -577,7 +640,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -591,7 +654,7 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
> The showing by default state is used in conjunction with the default attribute on track elements to indicate that the text track was enabled due to that attribute.
|
||||
> This allows the user agent to override the state if a later track is discovered that is more appropriate per the user's preferences.
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L341](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L341)
|
||||
_inherited from_: [src/js/tracks.js#L329](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L329)
|
||||
|
||||
---
|
||||
|
||||
@@ -601,7 +664,7 @@ _inherited from_: [src/js/tracks.js#L341](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L175](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L175)
|
||||
_inherited from_: [src/js/tracks.js#L179](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -611,23 +674,23 @@ _inherited from_: [src/js/tracks.js#L175](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L204](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L204)
|
||||
_inherited from_: [src/js/tracks.js#L208](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L208)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -637,7 +700,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -657,7 +720,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -666,7 +729,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# vjs.ChaptersButton
|
||||
|
||||
__EXTENDS__: [vjs.TextTrackButton](vjs.TextTrackButton.md)
|
||||
__DEFINED IN__: [src/js/tracks.js#L901](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L901)
|
||||
__DEFINED IN__: [src/js/tracks.js#L890](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L890)
|
||||
|
||||
The button component for toggling and selecting chapters
|
||||
|
||||
@@ -26,21 +26,22 @@ The button component for toggling and selecting chapters
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -81,7 +82,7 @@ The button component for toggling and selecting chapters
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -94,7 +95,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -113,7 +114,7 @@ _inherited from_: [src/js/menu.js#L157](https://github.com/videojs/video.js/blob
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -124,7 +125,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -138,7 +139,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -159,14 +160,14 @@ _inherited from_: [src/js/menu.js#L154](https://github.com/videojs/video.js/blob
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -178,7 +179,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -205,7 +206,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -218,7 +219,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -231,7 +232,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -251,7 +265,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -261,7 +275,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -273,7 +287,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -284,7 +298,7 @@ _inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js
|
||||
* __options__
|
||||
* __ready__
|
||||
|
||||
_defined in_: [src/js/tracks.js#L903](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L903)
|
||||
_defined in_: [src/js/tracks.js#L892](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L892)
|
||||
|
||||
---
|
||||
|
||||
@@ -298,8 +312,30 @@ _defined in_: [src/js/tracks.js#L903](https://github.com/videojs/video.js/blob/m
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -311,60 +347,96 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -412,7 +484,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -422,7 +494,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -438,7 +510,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -449,7 +521,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -462,7 +534,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -472,23 +544,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -498,7 +570,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -518,7 +590,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -527,7 +599,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
+138
-75
@@ -3,7 +3,7 @@
|
||||
# vjs.ChaptersTrack
|
||||
|
||||
__EXTENDS__: [vjs.TextTrack](vjs.TextTrack.md)
|
||||
__DEFINED IN__: [src/js/tracks.js#L697](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L697)
|
||||
__DEFINED IN__: [src/js/tracks.js#L686](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L686)
|
||||
|
||||
The track component for managing the hiding and showing of chapters
|
||||
|
||||
@@ -16,7 +16,6 @@ The track component for managing the hiding and showing of chapters
|
||||
- [activeCues](#activecues) _`inherited`_
|
||||
- [addChild](#addchild-child-options-) _`inherited`_
|
||||
- [addClass](#addclass-classtoadd-) _`inherited`_
|
||||
- [adjustFontSize](#adjustfontsize) _`inherited`_
|
||||
- [buildCSSClass](#buildcssclass) _`inherited`_
|
||||
- [children](#children) _`inherited`_
|
||||
- [contentEl](#contentel) _`inherited`_
|
||||
@@ -31,6 +30,7 @@ The track component for managing the hiding and showing of chapters
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
@@ -41,9 +41,9 @@ The track component for managing the hiding and showing of chapters
|
||||
- [language](#language) _`inherited`_
|
||||
- [mode](#mode) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
@@ -53,7 +53,7 @@ The track component for managing the hiding and showing of chapters
|
||||
- [show](#show) _`inherited`_
|
||||
- [src](#src) _`inherited`_
|
||||
- [title](#title) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -67,7 +67,7 @@ The track component for managing the hiding and showing of chapters
|
||||
### activate()
|
||||
> Turn on cue tracking. Tracks that are showing OR hidden are active.
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L385](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L385)
|
||||
_inherited from_: [src/js/tracks.js#L373](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L373)
|
||||
|
||||
---
|
||||
|
||||
@@ -77,7 +77,7 @@ _inherited from_: [src/js/tracks.js#L385](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `Array`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L264](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L264)
|
||||
_inherited from_: [src/js/tracks.js#L268](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L268)
|
||||
|
||||
---
|
||||
|
||||
@@ -111,7 +111,7 @@ _inherited from_: [src/js/tracks.js#L264](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -124,15 +124,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
|
||||
---
|
||||
|
||||
### adjustFontSize()
|
||||
> Change the font size of the text track to make it larger when playing in fullscreen mode
|
||||
> and restore it to its normal size when not in fullscreen mode.
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L309](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L309)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -142,7 +134,7 @@ _inherited from_: [src/js/tracks.js#L309](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -154,7 +146,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -165,7 +157,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -175,7 +167,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L325](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L325)
|
||||
_inherited from_: [src/js/tracks.js#L313](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L313)
|
||||
|
||||
---
|
||||
|
||||
@@ -185,14 +177,14 @@ _inherited from_: [src/js/tracks.js#L325](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `Array`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L249](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L249)
|
||||
_inherited from_: [src/js/tracks.js#L253](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L253)
|
||||
|
||||
---
|
||||
|
||||
### deactivate()
|
||||
> Turn off cue tracking.
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L408](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L408)
|
||||
_inherited from_: [src/js/tracks.js#L396](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L396)
|
||||
|
||||
---
|
||||
|
||||
@@ -202,7 +194,7 @@ _inherited from_: [src/js/tracks.js#L408](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `Boolean`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L190](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L190)
|
||||
_inherited from_: [src/js/tracks.js#L194](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L194)
|
||||
|
||||
---
|
||||
|
||||
@@ -216,7 +208,7 @@ _inherited from_: [src/js/tracks.js#L190](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
@@ -225,14 +217,14 @@ _inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js
|
||||
> Indicates that the text track is not active. Other than for the purposes of exposing the track in the DOM, the user agent is ignoring the text track.
|
||||
> No cues are active, no events are fired, and the user agent will not attempt to obtain the track's cues.
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L371](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L371)
|
||||
_inherited from_: [src/js/tracks.js#L359](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L359)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -244,7 +236,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -271,7 +263,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -284,7 +276,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -297,7 +289,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -317,7 +322,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -327,7 +332,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
> If no attempt has yet been made to obtain the track's cues, the user agent will perform such an attempt momentarily.
|
||||
> The user agent is maintaining a list of which cues are active, and events are being fired accordingly.
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L356](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L356)
|
||||
_inherited from_: [src/js/tracks.js#L344](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L344)
|
||||
|
||||
---
|
||||
|
||||
@@ -339,7 +344,7 @@ _inherited from_: [src/js/tracks.js#L356](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -349,7 +354,7 @@ _inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js
|
||||
* __player__
|
||||
* __options__
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L128](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L128)
|
||||
_inherited from_: [src/js/tracks.js#L134](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L134)
|
||||
|
||||
---
|
||||
|
||||
@@ -363,8 +368,30 @@ _inherited from_: [src/js/tracks.js#L128](https://github.com/videojs/video.js/bl
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -374,7 +401,7 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L161](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L161)
|
||||
_inherited from_: [src/js/tracks.js#L165](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L165)
|
||||
|
||||
---
|
||||
|
||||
@@ -384,7 +411,7 @@ _inherited from_: [src/js/tracks.js#L161](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L234](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L234)
|
||||
_inherited from_: [src/js/tracks.js#L238](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L238)
|
||||
|
||||
---
|
||||
|
||||
@@ -394,7 +421,7 @@ _inherited from_: [src/js/tracks.js#L234](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L219](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L219)
|
||||
_inherited from_: [src/js/tracks.js#L223](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L223)
|
||||
|
||||
---
|
||||
|
||||
@@ -404,7 +431,7 @@ _inherited from_: [src/js/tracks.js#L219](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `Number`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L301](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L301)
|
||||
_inherited from_: [src/js/tracks.js#L305](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L305)
|
||||
|
||||
---
|
||||
|
||||
@@ -416,60 +443,96 @@ _inherited from_: [src/js/tracks.js#L301](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -517,7 +580,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -527,7 +590,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -543,7 +606,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -553,7 +616,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Number`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L283](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L283)
|
||||
_inherited from_: [src/js/tracks.js#L287](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L287)
|
||||
|
||||
---
|
||||
|
||||
@@ -564,7 +627,7 @@ _inherited from_: [src/js/tracks.js#L283](https://github.com/videojs/video.js/bl
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -577,7 +640,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -591,7 +654,7 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
> The showing by default state is used in conjunction with the default attribute on track elements to indicate that the text track was enabled due to that attribute.
|
||||
> This allows the user agent to override the state if a later track is discovered that is more appropriate per the user's preferences.
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L341](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L341)
|
||||
_inherited from_: [src/js/tracks.js#L329](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L329)
|
||||
|
||||
---
|
||||
|
||||
@@ -601,7 +664,7 @@ _inherited from_: [src/js/tracks.js#L341](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L175](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L175)
|
||||
_inherited from_: [src/js/tracks.js#L179](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -611,23 +674,23 @@ _inherited from_: [src/js/tracks.js#L175](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L204](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L204)
|
||||
_inherited from_: [src/js/tracks.js#L208](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L208)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -637,7 +700,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -657,7 +720,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -666,7 +729,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# vjs.ChaptersTrackMenuItem
|
||||
|
||||
__EXTENDS__: [vjs.MenuItem](vjs.MenuItem.md)
|
||||
__DEFINED IN__: [src/js/tracks.js#L987](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L987)
|
||||
__DEFINED IN__: [src/js/tracks.js#L978](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L978)
|
||||
|
||||
---
|
||||
|
||||
@@ -23,15 +23,16 @@ __DEFINED IN__: [src/js/tracks.js#L987](https://github.com/videojs/video.js/blob
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [onClick](#onclick) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
@@ -39,7 +40,7 @@ __DEFINED IN__: [src/js/tracks.js#L987](https://github.com/videojs/video.js/blob
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [selected](#selected-selected-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -80,7 +81,7 @@ __DEFINED IN__: [src/js/tracks.js#L987](https://github.com/videojs/video.js/blob
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -93,7 +94,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -103,7 +104,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -115,7 +116,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -126,7 +127,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -151,14 +152,14 @@ _inherited from_: [src/js/menu.js#L64](https://github.com/videojs/video.js/blob/
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -170,7 +171,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -197,7 +198,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -210,7 +211,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -223,7 +224,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -243,7 +257,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -253,7 +267,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -265,7 +279,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -275,7 +289,7 @@ _inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js
|
||||
* __player__
|
||||
* __options__
|
||||
|
||||
_defined in_: [src/js/tracks.js#L989](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L989)
|
||||
_defined in_: [src/js/tracks.js#L980](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L980)
|
||||
|
||||
---
|
||||
|
||||
@@ -289,8 +303,30 @@ _defined in_: [src/js/tracks.js#L989](https://github.com/videojs/video.js/blob/m
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -302,46 +338,73 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
@@ -352,17 +415,26 @@ _inherited from_: [src/js/menu.js#L74](https://github.com/videojs/video.js/blob/
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -410,7 +482,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -420,7 +492,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -436,7 +508,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -447,7 +519,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -460,7 +532,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -480,23 +552,23 @@ _inherited from_: [src/js/menu.js#L82](https://github.com/videojs/video.js/blob/
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -506,7 +578,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -526,7 +598,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -535,7 +607,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
+123
-51
@@ -44,22 +44,23 @@ Components are also event emitters.
|
||||
- [enableTouchActivity](#enabletouchactivity)
|
||||
- [getChild](#getchild-name-)
|
||||
- [getChildById](#getchildbyid-id-)
|
||||
- [hasClass](#hasclass-classtocheck-)
|
||||
- [height](#height-num-skiplisteners-)
|
||||
- [hide](#hide)
|
||||
- [id](#id)
|
||||
- [init](#init-player-options-ready-)
|
||||
- [initChildren](#initchildren)
|
||||
- [name](#name)
|
||||
- [off](#off-type-fn-)
|
||||
- [on](#on-type-fn-)
|
||||
- [one](#one-type-fn-)
|
||||
- [off](#off-first-second-third-)
|
||||
- [on](#on-first-second-third-)
|
||||
- [one](#one-first-second-third-)
|
||||
- [options](#options-obj-)
|
||||
- [player](#player)
|
||||
- [ready](#ready-fn-)
|
||||
- [removeChild](#removechild-component-)
|
||||
- [removeClass](#removeclass-classtoremove-)
|
||||
- [show](#show)
|
||||
- [trigger](#trigger-type-event-)
|
||||
- [trigger](#trigger-event-)
|
||||
- [triggerReady](#triggerready)
|
||||
- [width](#width-num-skiplisteners-)
|
||||
|
||||
@@ -100,7 +101,7 @@ Components are also event emitters.
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_defined in_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_defined in_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -113,7 +114,7 @@ _defined in_: [src/js/component.js#L347](https://github.com/videojs/video.js/blo
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_defined in_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_defined in_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -123,7 +124,7 @@ _defined in_: [src/js/component.js#L632](https://github.com/videojs/video.js/blo
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_defined in_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_defined in_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -135,7 +136,7 @@ _defined in_: [src/js/component.js#L475](https://github.com/videojs/video.js/blo
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_defined in_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_defined in_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -146,7 +147,7 @@ _defined in_: [src/js/component.js#L281](https://github.com/videojs/video.js/blo
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_defined in_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_defined in_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -160,7 +161,7 @@ _defined in_: [src/js/component.js#L224](https://github.com/videojs/video.js/blo
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_defined in_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_defined in_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -174,14 +175,14 @@ _defined in_: [src/js/component.js#L194](https://github.com/videojs/video.js/blo
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_defined in_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_defined in_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_defined in_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_defined in_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -193,7 +194,7 @@ _defined in_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_defined in_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_defined in_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -220,7 +221,7 @@ _defined in_: [src/js/component.js#L205](https://github.com/videojs/video.js/blo
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_defined in_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_defined in_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -233,7 +234,7 @@ _defined in_: [src/js/component.js#L897](https://github.com/videojs/video.js/blo
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_defined in_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_defined in_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -246,7 +247,20 @@ _defined in_: [src/js/component.js#L315](https://github.com/videojs/video.js/blo
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_defined in_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_defined in_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_defined in_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -266,7 +280,7 @@ _defined in_: [src/js/component.js#L298](https://github.com/videojs/video.js/blo
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_defined in_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_defined in_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -276,7 +290,7 @@ _defined in_: [src/js/component.js#L733](https://github.com/videojs/video.js/blo
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_defined in_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_defined in_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -288,7 +302,7 @@ _defined in_: [src/js/component.js#L663](https://github.com/videojs/video.js/blo
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_defined in_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_defined in_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -314,8 +328,30 @@ _defined in_: [src/js/component.js#L41](https://github.com/videojs/video.js/blob
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_defined in_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_defined in_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -327,60 +363,96 @@ _defined in_: [src/js/component.js#L443](https://github.com/videojs/video.js/blo
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_defined in_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_defined in_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_defined in_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_defined in_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_defined in_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_defined in_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_defined in_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_defined in_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -428,7 +500,7 @@ _defined in_: [src/js/component.js#L526](https://github.com/videojs/video.js/blo
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_defined in_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_defined in_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -438,7 +510,7 @@ _defined in_: [src/js/component.js#L173](https://github.com/videojs/video.js/blo
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_defined in_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_defined in_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -454,7 +526,7 @@ _defined in_: [src/js/component.js#L120](https://github.com/videojs/video.js/blo
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_defined in_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_defined in_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -465,7 +537,7 @@ _defined in_: [src/js/component.js#L585](https://github.com/videojs/video.js/blo
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_defined in_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_defined in_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -478,7 +550,7 @@ _defined in_: [src/js/component.js#L405](https://github.com/videojs/video.js/blo
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_defined in_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_defined in_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -488,23 +560,23 @@ _defined in_: [src/js/component.js#L643](https://github.com/videojs/video.js/blo
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_defined in_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_defined in_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_defined in_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_defined in_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -514,7 +586,7 @@ _defined in_: [src/js/component.js#L540](https://github.com/videojs/video.js/blo
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_defined in_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_defined in_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -534,7 +606,7 @@ _defined in_: [src/js/component.js#L604](https://github.com/videojs/video.js/blo
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_defined in_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_defined in_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -543,7 +615,7 @@ _defined in_: [src/js/component.js#L716](https://github.com/videojs/video.js/blo
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_defined in_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_defined in_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
+123
-51
@@ -24,22 +24,23 @@ Container of main controls
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [init](#init-player-options-ready-) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -80,7 +81,7 @@ Container of main controls
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -93,7 +94,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -103,7 +104,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -115,7 +116,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -126,7 +127,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -140,7 +141,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -154,14 +155,14 @@ _inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -173,7 +174,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -200,7 +201,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -213,7 +214,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -226,7 +227,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -246,7 +260,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -256,7 +270,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -268,7 +282,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -294,8 +308,30 @@ _inherited from_: [src/js/component.js#L41](https://github.com/videojs/video.js/
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -307,60 +343,96 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -408,7 +480,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -418,7 +490,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -434,7 +506,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -445,7 +517,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -458,7 +530,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -468,23 +540,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -494,7 +566,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -514,7 +586,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -523,7 +595,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -25,21 +25,22 @@ Displays the current time
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -80,7 +81,7 @@ Displays the current time
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -93,7 +94,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -103,7 +104,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -115,7 +116,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -126,7 +127,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -140,7 +141,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -154,14 +155,14 @@ _inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -173,7 +174,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -200,7 +201,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -213,7 +214,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -226,7 +227,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -246,7 +260,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -256,7 +270,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -268,7 +282,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -292,8 +306,30 @@ _defined in_: [src/js/control-bar/time-display.js#L9](https://github.com/videojs
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -305,60 +341,96 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -406,7 +478,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -416,7 +488,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -432,7 +504,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -443,7 +515,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -456,7 +528,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -466,23 +538,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -492,7 +564,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -512,7 +584,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -521,7 +593,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -25,21 +25,22 @@ Displays the duration
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -80,7 +81,7 @@ Displays the duration
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -93,7 +94,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -103,7 +104,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -115,7 +116,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -126,7 +127,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -140,7 +141,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -154,14 +155,14 @@ _inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -173,7 +174,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -200,7 +201,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -213,7 +214,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -226,7 +227,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -246,7 +260,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -256,7 +270,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -268,7 +282,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -292,8 +306,30 @@ _defined in_: [src/js/control-bar/time-display.js#L45](https://github.com/videoj
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -305,60 +341,96 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -406,7 +478,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -416,7 +488,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -432,7 +504,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -443,7 +515,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -456,7 +528,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -466,23 +538,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -492,7 +564,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -512,7 +584,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -521,7 +593,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
+128
-56
@@ -25,17 +25,18 @@ Flash Media Controller - Wrapper for fallback SWF API
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [initControlsListeners](#initcontrolslisteners) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [onClick](#onclick-event-) _`inherited`_
|
||||
- [onTap](#ontap) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
@@ -44,7 +45,7 @@ Flash Media Controller - Wrapper for fallback SWF API
|
||||
- [removeControlsListeners](#removecontrolslisteners) _`inherited`_
|
||||
- [setPoster](#setposter) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -85,7 +86,7 @@ Flash Media Controller - Wrapper for fallback SWF API
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -98,7 +99,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -108,7 +109,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -120,7 +121,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -131,7 +132,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -145,7 +146,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -159,14 +160,14 @@ _inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -178,7 +179,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -205,7 +206,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -218,7 +219,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -231,7 +232,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -251,7 +265,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -261,7 +275,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -273,7 +287,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -298,8 +312,30 @@ _defined in_: [src/js/media/flash.js#L17](https://github.com/videojs/video.js/bl
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -323,7 +359,7 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
> keep the controls showing, but that shouldn't be an issue. A touch and hold on
|
||||
> any controls will still keep the user active
|
||||
|
||||
_inherited from_: [src/js/media/media.js#L45](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L45)
|
||||
_inherited from_: [src/js/media/media.js#L55](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L55)
|
||||
|
||||
---
|
||||
|
||||
@@ -335,46 +371,73 @@ _inherited from_: [src/js/media/media.js#L45](https://github.com/videojs/video.j
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
@@ -384,7 +447,7 @@ _inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __event__
|
||||
|
||||
_inherited from_: [src/js/media/media.js#L118](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L118)
|
||||
_inherited from_: [src/js/media/media.js#L139](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L139)
|
||||
|
||||
---
|
||||
|
||||
@@ -392,21 +455,30 @@ _inherited from_: [src/js/media/media.js#L118](https://github.com/videojs/video.
|
||||
> Handle a tap on the media element. By default it will toggle the user
|
||||
> activity state, which hides and shows the controls.
|
||||
|
||||
_inherited from_: [src/js/media/media.js#L138](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L138)
|
||||
_inherited from_: [src/js/media/media.js#L159](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L159)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -454,7 +526,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -464,7 +536,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -480,7 +552,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -491,7 +563,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -504,7 +576,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -512,7 +584,7 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
> Remove the listeners used for click and tap controls. This is needed for
|
||||
> toggling to controls disabled, where a tap/touch should do nothing.
|
||||
|
||||
_inherited from_: [src/js/media/media.js#L102](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L102)
|
||||
_inherited from_: [src/js/media/media.js#L123](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L123)
|
||||
|
||||
---
|
||||
|
||||
@@ -522,7 +594,7 @@ _inherited from_: [src/js/media/media.js#L102](https://github.com/videojs/video.
|
||||
> Poster support for techs should be optional, so we don't want techs to
|
||||
> break if they don't have a way to set a poster.
|
||||
|
||||
_inherited from_: [src/js/media/media.js#L148](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L148)
|
||||
_inherited from_: [src/js/media/media.js#L261](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L261)
|
||||
|
||||
---
|
||||
|
||||
@@ -532,23 +604,23 @@ _inherited from_: [src/js/media/media.js#L148](https://github.com/videojs/video.
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -558,7 +630,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -578,7 +650,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -587,7 +659,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -25,21 +25,22 @@ Toggle fullscreen video
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -80,7 +81,7 @@ Toggle fullscreen video
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -93,7 +94,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -103,7 +104,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -115,7 +116,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -126,7 +127,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -140,7 +141,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -154,14 +155,14 @@ _inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -173,7 +174,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -200,7 +201,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -213,7 +214,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -226,7 +227,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -246,7 +260,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -256,7 +270,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -268,7 +282,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -292,8 +306,30 @@ _defined in_: [src/js/control-bar/fullscreen-toggle.js#L14](https://github.com/v
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -305,60 +341,96 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -406,7 +478,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -416,7 +488,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -432,7 +504,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -443,7 +515,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -456,7 +528,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -466,23 +538,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -492,7 +564,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -512,7 +584,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -521,7 +593,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
+128
-56
@@ -25,17 +25,18 @@ HTML5 Media Controller - Wrapper for HTML5 Media API
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [initControlsListeners](#initcontrolslisteners) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [onClick](#onclick-event-) _`inherited`_
|
||||
- [onTap](#ontap) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
@@ -44,7 +45,7 @@ HTML5 Media Controller - Wrapper for HTML5 Media API
|
||||
- [removeControlsListeners](#removecontrolslisteners) _`inherited`_
|
||||
- [setPoster](#setposter) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -85,7 +86,7 @@ HTML5 Media Controller - Wrapper for HTML5 Media API
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -98,7 +99,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -108,7 +109,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -120,7 +121,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -131,7 +132,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -145,7 +146,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -159,14 +160,14 @@ _inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -178,7 +179,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -205,7 +206,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -218,7 +219,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -231,7 +232,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -251,7 +265,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -261,7 +275,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -273,7 +287,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -298,8 +312,30 @@ _defined in_: [src/js/media/html5.js#L14](https://github.com/videojs/video.js/bl
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -323,7 +359,7 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
> keep the controls showing, but that shouldn't be an issue. A touch and hold on
|
||||
> any controls will still keep the user active
|
||||
|
||||
_inherited from_: [src/js/media/media.js#L45](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L45)
|
||||
_inherited from_: [src/js/media/media.js#L55](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L55)
|
||||
|
||||
---
|
||||
|
||||
@@ -335,46 +371,73 @@ _inherited from_: [src/js/media/media.js#L45](https://github.com/videojs/video.j
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
@@ -384,7 +447,7 @@ _inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __event__
|
||||
|
||||
_inherited from_: [src/js/media/media.js#L118](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L118)
|
||||
_inherited from_: [src/js/media/media.js#L139](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L139)
|
||||
|
||||
---
|
||||
|
||||
@@ -392,21 +455,30 @@ _inherited from_: [src/js/media/media.js#L118](https://github.com/videojs/video.
|
||||
> Handle a tap on the media element. By default it will toggle the user
|
||||
> activity state, which hides and shows the controls.
|
||||
|
||||
_inherited from_: [src/js/media/media.js#L138](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L138)
|
||||
_inherited from_: [src/js/media/media.js#L159](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L159)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -454,7 +526,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -464,7 +536,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -480,7 +552,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -491,7 +563,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -504,7 +576,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -512,7 +584,7 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
> Remove the listeners used for click and tap controls. This is needed for
|
||||
> toggling to controls disabled, where a tap/touch should do nothing.
|
||||
|
||||
_inherited from_: [src/js/media/media.js#L102](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L102)
|
||||
_inherited from_: [src/js/media/media.js#L123](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L123)
|
||||
|
||||
---
|
||||
|
||||
@@ -522,7 +594,7 @@ _inherited from_: [src/js/media/media.js#L102](https://github.com/videojs/video.
|
||||
> Poster support for techs should be optional, so we don't want techs to
|
||||
> break if they don't have a way to set a poster.
|
||||
|
||||
_inherited from_: [src/js/media/media.js#L148](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L148)
|
||||
_inherited from_: [src/js/media/media.js#L261](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L261)
|
||||
|
||||
---
|
||||
|
||||
@@ -532,23 +604,23 @@ _inherited from_: [src/js/media/media.js#L148](https://github.com/videojs/video.
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -558,7 +630,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -578,7 +650,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -587,7 +659,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# vjs.LoadProgressBar
|
||||
|
||||
__EXTENDS__: [vjs.Component](vjs.Component.md)
|
||||
__DEFINED IN__: [src/js/control-bar/progress-control.js#L118](https://github.com/videojs/video.js/blob/master/src/js/control-bar/progress-control.js#L118)
|
||||
__DEFINED IN__: [src/js/control-bar/progress-control.js#L117](https://github.com/videojs/video.js/blob/master/src/js/control-bar/progress-control.js#L117)
|
||||
|
||||
Shows load progress
|
||||
|
||||
@@ -25,21 +25,22 @@ Shows load progress
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -80,7 +81,7 @@ Shows load progress
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -93,7 +94,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -103,7 +104,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -115,7 +116,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -126,7 +127,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -140,7 +141,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -154,14 +155,14 @@ _inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -173,7 +174,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -200,7 +201,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -213,7 +214,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -226,7 +227,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -246,7 +260,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -256,7 +270,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -268,7 +282,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -278,7 +292,7 @@ _inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js
|
||||
* __player__
|
||||
* __options__
|
||||
|
||||
_defined in_: [src/js/control-bar/progress-control.js#L120](https://github.com/videojs/video.js/blob/master/src/js/control-bar/progress-control.js#L120)
|
||||
_defined in_: [src/js/control-bar/progress-control.js#L119](https://github.com/videojs/video.js/blob/master/src/js/control-bar/progress-control.js#L119)
|
||||
|
||||
---
|
||||
|
||||
@@ -292,8 +306,30 @@ _defined in_: [src/js/control-bar/progress-control.js#L120](https://github.com/v
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -305,60 +341,96 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -406,7 +478,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -416,7 +488,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -432,7 +504,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -443,7 +515,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -456,7 +528,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -466,23 +538,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -492,7 +564,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -512,7 +584,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -521,7 +593,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -25,21 +25,22 @@ Loading spinner for waiting events
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -80,7 +81,7 @@ Loading spinner for waiting events
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -93,7 +94,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -103,7 +104,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -115,7 +116,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -126,7 +127,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -140,7 +141,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -154,14 +155,14 @@ _inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -173,7 +174,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -200,7 +201,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -213,7 +214,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -226,7 +227,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -246,7 +260,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -256,7 +270,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -268,7 +282,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -292,8 +306,30 @@ _defined in_: [src/js/loading-spinner.js#L12](https://github.com/videojs/video.j
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -305,60 +341,96 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -406,7 +478,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -416,7 +488,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -432,7 +504,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -443,7 +515,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -456,7 +528,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -466,23 +538,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -492,7 +564,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -512,7 +584,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -521,7 +593,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
+123
-51
@@ -26,21 +26,22 @@ when the player is initialized.
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -81,7 +82,7 @@ when the player is initialized.
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -94,7 +95,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -104,7 +105,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -116,7 +117,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -127,7 +128,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -141,7 +142,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -155,14 +156,14 @@ _inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -174,7 +175,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -201,7 +202,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -214,7 +215,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -227,7 +228,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -247,7 +261,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -257,7 +271,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -269,7 +283,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -294,8 +308,30 @@ _defined in_: [src/js/media/loader.js#L9](https://github.com/videojs/video.js/bl
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -307,60 +343,96 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -408,7 +480,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -418,7 +490,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -434,7 +506,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -445,7 +517,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -458,7 +530,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -468,23 +540,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -494,7 +566,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -514,7 +586,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -523,7 +595,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -30,21 +30,22 @@ Base class for media (HTML5 Video, Flash) controllers
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -85,7 +86,7 @@ Base class for media (HTML5 Video, Flash) controllers
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -98,7 +99,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -108,7 +109,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -120,7 +121,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -131,7 +132,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -145,7 +146,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -159,14 +160,14 @@ _inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -178,7 +179,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -205,7 +206,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -218,7 +219,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -231,7 +232,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -251,7 +265,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -261,7 +275,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -273,7 +287,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -298,8 +312,30 @@ _defined in_: [src/js/media/media.js#L14](https://github.com/videojs/video.js/bl
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -323,7 +359,7 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
> keep the controls showing, but that shouldn't be an issue. A touch and hold on
|
||||
> any controls will still keep the user active
|
||||
|
||||
_defined in_: [src/js/media/media.js#L45](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L45)
|
||||
_defined in_: [src/js/media/media.js#L55](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L55)
|
||||
|
||||
---
|
||||
|
||||
@@ -335,46 +371,73 @@ _defined in_: [src/js/media/media.js#L45](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
@@ -384,7 +447,7 @@ _inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __event__
|
||||
|
||||
_defined in_: [src/js/media/media.js#L118](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L118)
|
||||
_defined in_: [src/js/media/media.js#L139](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L139)
|
||||
|
||||
---
|
||||
|
||||
@@ -392,21 +455,30 @@ _defined in_: [src/js/media/media.js#L118](https://github.com/videojs/video.js/b
|
||||
> Handle a tap on the media element. By default it will toggle the user
|
||||
> activity state, which hides and shows the controls.
|
||||
|
||||
_defined in_: [src/js/media/media.js#L138](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L138)
|
||||
_defined in_: [src/js/media/media.js#L159](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L159)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -454,7 +526,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -464,7 +536,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -480,7 +552,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -491,7 +563,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -504,7 +576,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -512,7 +584,7 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
> Remove the listeners used for click and tap controls. This is needed for
|
||||
> toggling to controls disabled, where a tap/touch should do nothing.
|
||||
|
||||
_defined in_: [src/js/media/media.js#L102](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L102)
|
||||
_defined in_: [src/js/media/media.js#L123](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L123)
|
||||
|
||||
---
|
||||
|
||||
@@ -522,7 +594,7 @@ _defined in_: [src/js/media/media.js#L102](https://github.com/videojs/video.js/b
|
||||
> Poster support for techs should be optional, so we don't want techs to
|
||||
> break if they don't have a way to set a poster.
|
||||
|
||||
_defined in_: [src/js/media/media.js#L148](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L148)
|
||||
_defined in_: [src/js/media/media.js#L261](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L261)
|
||||
|
||||
---
|
||||
|
||||
@@ -532,23 +604,23 @@ _defined in_: [src/js/media/media.js#L148](https://github.com/videojs/video.js/b
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -558,7 +630,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -578,7 +650,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -587,7 +659,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
+122
-50
@@ -26,22 +26,23 @@ captions selection menus.
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [init](#init-player-options-ready-) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -82,7 +83,7 @@ captions selection menus.
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -95,7 +96,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -115,7 +116,7 @@ _defined in_: [src/js/menu.js#L18](https://github.com/videojs/video.js/blob/mast
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -127,7 +128,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -138,7 +139,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -163,14 +164,14 @@ _defined in_: [src/js/menu.js#L26](https://github.com/videojs/video.js/blob/mast
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -182,7 +183,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -209,7 +210,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -222,7 +223,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -235,7 +236,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -255,7 +269,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -265,7 +279,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -277,7 +291,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -303,8 +317,30 @@ _inherited from_: [src/js/component.js#L41](https://github.com/videojs/video.js/
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -316,60 +352,96 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -417,7 +489,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -427,7 +499,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -443,7 +515,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -454,7 +526,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -467,7 +539,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -477,23 +549,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -503,7 +575,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -523,7 +595,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -532,7 +604,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
+122
-50
@@ -26,21 +26,22 @@ A button class with a popup menu
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -81,7 +82,7 @@ A button class with a popup menu
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -94,7 +95,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -113,7 +114,7 @@ _defined in_: [src/js/menu.js#L157](https://github.com/videojs/video.js/blob/mas
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -124,7 +125,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -138,7 +139,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -159,14 +160,14 @@ _defined in_: [src/js/menu.js#L154](https://github.com/videojs/video.js/blob/mas
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -178,7 +179,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -205,7 +206,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -218,7 +219,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -231,7 +232,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -251,7 +265,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -261,7 +275,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -273,7 +287,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -297,8 +311,30 @@ _defined in_: [src/js/menu.js#L101](https://github.com/videojs/video.js/blob/mas
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -310,60 +346,96 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -411,7 +483,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -421,7 +493,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -437,7 +509,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -448,7 +520,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -461,7 +533,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -471,23 +543,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -497,7 +569,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -517,7 +589,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -526,7 +598,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
+122
-50
@@ -27,21 +27,22 @@ The component for a menu item. `<li>`
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -82,7 +83,7 @@ The component for a menu item. `<li>`
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -95,7 +96,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -105,7 +106,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -117,7 +118,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -128,7 +129,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -153,14 +154,14 @@ _defined in_: [src/js/menu.js#L64](https://github.com/videojs/video.js/blob/mast
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -172,7 +173,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -199,7 +200,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -212,7 +213,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -225,7 +226,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -245,7 +259,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -255,7 +269,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -267,7 +281,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -291,8 +305,30 @@ _defined in_: [src/js/menu.js#L57](https://github.com/videojs/video.js/blob/mast
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -304,46 +340,73 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
@@ -354,17 +417,26 @@ _defined in_: [src/js/menu.js#L74](https://github.com/videojs/video.js/blob/mast
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -412,7 +484,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -422,7 +494,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -438,7 +510,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -449,7 +521,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -462,7 +534,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -482,23 +554,23 @@ _defined in_: [src/js/menu.js#L82](https://github.com/videojs/video.js/blob/mast
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -508,7 +580,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -528,7 +600,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -537,7 +609,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
+123
-51
@@ -25,21 +25,22 @@ A button component for muting the audio
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -80,7 +81,7 @@ A button component for muting the audio
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -93,7 +94,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -103,7 +104,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -115,7 +116,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -126,7 +127,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -140,7 +141,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -154,14 +155,14 @@ _inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -173,7 +174,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -200,7 +201,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -213,7 +214,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -226,7 +227,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -246,7 +260,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -256,7 +270,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -268,7 +282,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -292,8 +306,30 @@ _defined in_: [src/js/control-bar/mute-toggle.js#L10](https://github.com/videojs
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -305,60 +341,96 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -406,7 +478,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -416,7 +488,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -432,7 +504,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -443,7 +515,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -456,7 +528,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -466,23 +538,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -492,7 +564,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -512,7 +584,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -521,7 +593,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# vjs.OffTextTrackMenuItem
|
||||
|
||||
__EXTENDS__: [vjs.TextTrackMenuItem](vjs.TextTrackMenuItem.md)
|
||||
__DEFINED IN__: [src/js/tracks.js#L765](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L765)
|
||||
__DEFINED IN__: [src/js/tracks.js#L754](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L754)
|
||||
|
||||
A special menu item for turning of a specific type of text track
|
||||
|
||||
@@ -25,15 +25,16 @@ A special menu item for turning of a specific type of text track
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [onClick](#onclick) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
@@ -41,7 +42,7 @@ A special menu item for turning of a specific type of text track
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [selected](#selected-selected-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -82,7 +83,7 @@ A special menu item for turning of a specific type of text track
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -95,7 +96,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -105,7 +106,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -117,7 +118,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -128,7 +129,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -153,14 +154,14 @@ _inherited from_: [src/js/menu.js#L64](https://github.com/videojs/video.js/blob/
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -172,7 +173,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -199,7 +200,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -212,7 +213,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -225,7 +226,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -245,7 +259,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -255,7 +269,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -267,7 +281,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -277,7 +291,7 @@ _inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js
|
||||
* __player__
|
||||
* __options__
|
||||
|
||||
_defined in_: [src/js/tracks.js#L767](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L767)
|
||||
_defined in_: [src/js/tracks.js#L756](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L756)
|
||||
|
||||
---
|
||||
|
||||
@@ -291,8 +305,30 @@ _defined in_: [src/js/tracks.js#L767](https://github.com/videojs/video.js/blob/m
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -304,46 +340,73 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
@@ -354,17 +417,26 @@ _inherited from_: [src/js/menu.js#L74](https://github.com/videojs/video.js/blob/
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -412,7 +484,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -422,7 +494,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -438,7 +510,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -449,7 +521,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -462,7 +534,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -482,23 +554,23 @@ _inherited from_: [src/js/menu.js#L82](https://github.com/videojs/video.js/blob/
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -508,7 +580,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -528,7 +600,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -537,7 +609,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# vjs.PlayProgressBar
|
||||
|
||||
__EXTENDS__: [vjs.Component](vjs.Component.md)
|
||||
__DEFINED IN__: [src/js/control-bar/progress-control.js#L145](https://github.com/videojs/video.js/blob/master/src/js/control-bar/progress-control.js#L145)
|
||||
__DEFINED IN__: [src/js/control-bar/progress-control.js#L175](https://github.com/videojs/video.js/blob/master/src/js/control-bar/progress-control.js#L175)
|
||||
|
||||
Shows play progress
|
||||
|
||||
@@ -25,21 +25,22 @@ Shows play progress
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -80,7 +81,7 @@ Shows play progress
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -93,7 +94,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -103,7 +104,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -115,7 +116,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -126,7 +127,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -140,7 +141,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -154,14 +155,14 @@ _inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -173,7 +174,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -200,7 +201,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -213,7 +214,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -226,7 +227,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -246,7 +260,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -256,7 +270,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -268,7 +282,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -278,7 +292,7 @@ _inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js
|
||||
* __player__
|
||||
* __options__
|
||||
|
||||
_defined in_: [src/js/control-bar/progress-control.js#L147](https://github.com/videojs/video.js/blob/master/src/js/control-bar/progress-control.js#L147)
|
||||
_defined in_: [src/js/control-bar/progress-control.js#L177](https://github.com/videojs/video.js/blob/master/src/js/control-bar/progress-control.js#L177)
|
||||
|
||||
---
|
||||
|
||||
@@ -292,8 +306,30 @@ _defined in_: [src/js/control-bar/progress-control.js#L147](https://github.com/v
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -305,60 +341,96 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -406,7 +478,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -416,7 +488,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -432,7 +504,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -443,7 +515,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -456,7 +528,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -466,23 +538,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -492,7 +564,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -512,7 +584,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -521,7 +593,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
+123
-51
@@ -25,21 +25,22 @@ Button to toggle between play and pause
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -80,7 +81,7 @@ Button to toggle between play and pause
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -93,7 +94,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -103,7 +104,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -115,7 +116,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -126,7 +127,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -140,7 +141,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -154,14 +155,14 @@ _inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -173,7 +174,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -200,7 +201,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -213,7 +214,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -226,7 +227,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -246,7 +260,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -256,7 +270,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -268,7 +282,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -292,8 +306,30 @@ _defined in_: [src/js/control-bar/play-toggle.js#L10](https://github.com/videojs
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -305,60 +341,96 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -406,7 +478,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -416,7 +488,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -432,7 +504,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -443,7 +515,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -456,7 +528,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -466,23 +538,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -492,7 +564,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -512,7 +584,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -521,7 +593,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
+398
-107
@@ -11,7 +11,7 @@ An instance of the `vjs.Player` class is created when any of the Video.js setup
|
||||
var myPlayer = videojs('example_video_1');
|
||||
```
|
||||
|
||||
In the follwing example, the `data-setup` attribute tells the Video.js library to create a player instance when the library is ready.
|
||||
In the following example, the `data-setup` attribute tells the Video.js library to create a player instance when the library is ready.
|
||||
|
||||
```html
|
||||
<video id="example_video_1" data-setup='{}' controls>
|
||||
@@ -26,21 +26,37 @@ After an instance has been created it can be accessed globally using `Video('exa
|
||||
## INDEX
|
||||
|
||||
- [METHODS](#methods)
|
||||
- [autoplay](#autoplay-value-)
|
||||
- [buffered](#buffered)
|
||||
- [bufferedEnd](#bufferedend)
|
||||
- [bufferedPercent](#bufferedpercent)
|
||||
- [cancelFullScreen](#cancelfullscreen)
|
||||
- [cancelFullScreen](#cancelfullscreen) _`deprecated`_
|
||||
- [controls](#controls-controls-)
|
||||
- [currentSrc](#currentsrc)
|
||||
- [currentTime](#currenttime-seconds-)
|
||||
- [currentType](#currenttype)
|
||||
- [dispose](#dispose)
|
||||
- [duration](#duration-seconds-)
|
||||
- [ended](#ended)
|
||||
- [error](#error-err-)
|
||||
- [exitFullscreen](#exitfullscreen)
|
||||
- [init](#init-tag-options-ready-)
|
||||
- [isFullScreen](#isfullscreen-isfs-)
|
||||
- [isFullScreen](#isfullscreen-isfs-) _`deprecated`_
|
||||
- [isFullscreen](#isfullscreen-isfs-)
|
||||
- [language](#language-languagecode-)
|
||||
- [load](#load)
|
||||
- [loop](#loop-value-)
|
||||
- [muted](#muted-muted-)
|
||||
- [pause](#pause)
|
||||
- [paused](#paused)
|
||||
- [play](#play)
|
||||
- [playbackRate](#playbackrate-rate-)
|
||||
- [poster](#poster-src-)
|
||||
- [requestFullScreen](#requestfullscreen)
|
||||
- [preload](#preload-value-)
|
||||
- [remainingTime](#remainingtime)
|
||||
- [requestFullScreen](#requestfullscreen) _`deprecated`_
|
||||
- [requestFullscreen](#requestfullscreen)
|
||||
- [seeking](#seeking)
|
||||
- [src](#src-source-)
|
||||
- [volume](#volume-percentasdecimal-)
|
||||
- [addChild](#addchild-child-options-) _`inherited`_
|
||||
@@ -54,28 +70,28 @@ After an instance has been created it can be accessed globally using `Video('exa
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
- [EVENTS](#events)
|
||||
- [durationchange](#durationchange-event)
|
||||
- [ended](#ended-event)
|
||||
- [error](#error-event)
|
||||
- [firstplay](#firstplay-event)
|
||||
- [fullscreenchange](#fullscreenchange-event)
|
||||
- [loadedalldata](#loadedalldata-event)
|
||||
@@ -85,8 +101,11 @@ After an instance has been created it can be accessed globally using `Video('exa
|
||||
- [pause](#pause-event)
|
||||
- [play](#play-event)
|
||||
- [progress](#progress-event)
|
||||
- [seeked](#seeked-event)
|
||||
- [seeking](#seeking-event)
|
||||
- [timeupdate](#timeupdate-event)
|
||||
- [volumechange](#volumechange-event)
|
||||
- [waiting](#waiting-event)
|
||||
- [resize](#resize-event) _`inherited`_
|
||||
|
||||
---
|
||||
@@ -123,7 +142,7 @@ After an instance has been created it can be accessed globally using `Video('exa
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -136,7 +155,21 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
### autoplay( value )
|
||||
> Get or set the autoplay attribute.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __value__
|
||||
|
||||
##### RETURNS:
|
||||
* `String` The autoplay attribute value when getting
|
||||
* `vjs.Player` Returns the player when setting
|
||||
|
||||
_defined in_: [src/js/player.js#L1272](https://github.com/videojs/video.js/blob/master/src/js/player.js#L1272)
|
||||
|
||||
---
|
||||
|
||||
@@ -161,7 +194,19 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A mock TimeRange object (following HTML spec)
|
||||
|
||||
_defined in_: [src/js/player.js#L727](https://github.com/videojs/video.js/blob/master/src/js/player.js#L727)
|
||||
_defined in_: [src/js/player.js#L782](https://github.com/videojs/video.js/blob/master/src/js/player.js#L782)
|
||||
|
||||
---
|
||||
|
||||
### bufferedEnd()
|
||||
> Get the ending time of the last buffered time range
|
||||
>
|
||||
> This is used in the progress bar to encapsulate all time ranges.
|
||||
|
||||
##### RETURNS:
|
||||
* `Number` The end of the last buffered time range
|
||||
|
||||
_defined in_: [src/js/player.js#L833](https://github.com/videojs/video.js/blob/master/src/js/player.js#L833)
|
||||
|
||||
---
|
||||
|
||||
@@ -176,7 +221,7 @@ _defined in_: [src/js/player.js#L727](https://github.com/videojs/video.js/blob/m
|
||||
##### RETURNS:
|
||||
* `Number` A decimal between 0 and 1 representing the percent
|
||||
|
||||
_defined in_: [src/js/player.js#L753](https://github.com/videojs/video.js/blob/master/src/js/player.js#L753)
|
||||
_defined in_: [src/js/player.js#L802](https://github.com/videojs/video.js/blob/master/src/js/player.js#L802)
|
||||
|
||||
---
|
||||
|
||||
@@ -186,19 +231,15 @@ _defined in_: [src/js/player.js#L753](https://github.com/videojs/video.js/blob/m
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
### cancelFullScreen()
|
||||
> Return the video to its normal size after having been in full screen mode
|
||||
>
|
||||
> myPlayer.cancelFullScreen();
|
||||
> Old naming for exitFullscreen
|
||||
**Deprecated** true
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Player` self
|
||||
|
||||
_defined in_: [src/js/player.js#L909](https://github.com/videojs/video.js/blob/master/src/js/player.js#L909)
|
||||
_defined in_: [src/js/player.js#L1038](https://github.com/videojs/video.js/blob/master/src/js/player.js#L1038)
|
||||
|
||||
---
|
||||
|
||||
@@ -210,7 +251,7 @@ _defined in_: [src/js/player.js#L909](https://github.com/videojs/video.js/blob/m
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -221,7 +262,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -234,7 +275,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Boolean` Controls are showing
|
||||
|
||||
_defined in_: [src/js/player.js#L1174](https://github.com/videojs/video.js/blob/master/src/js/player.js#L1174)
|
||||
_defined in_: [src/js/player.js#L1352](https://github.com/videojs/video.js/blob/master/src/js/player.js#L1352)
|
||||
|
||||
---
|
||||
|
||||
@@ -248,7 +289,18 @@ _defined in_: [src/js/player.js#L1174](https://github.com/videojs/video.js/blob/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
### currentSrc()
|
||||
> Returns the fully qualified URL of the current source value e.g. http://mysite.com/video.mp4
|
||||
> Can be used in conjuction with `currentType` to assist in rebuilding the current source object.
|
||||
|
||||
##### RETURNS:
|
||||
* `String` The current source
|
||||
|
||||
_defined in_: [src/js/player.js#L1239](https://github.com/videojs/video.js/blob/master/src/js/player.js#L1239)
|
||||
|
||||
---
|
||||
|
||||
@@ -268,7 +320,19 @@ _inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js
|
||||
* `Number` The time in seconds, when not setting
|
||||
* `vjs.Player` self, when the current time is set
|
||||
|
||||
_defined in_: [src/js/player.js#L650](https://github.com/videojs/video.js/blob/master/src/js/player.js#L650)
|
||||
_defined in_: [src/js/player.js#L702](https://github.com/videojs/video.js/blob/master/src/js/player.js#L702)
|
||||
|
||||
---
|
||||
|
||||
### currentType()
|
||||
> Get the current source type e.g. video/mp4
|
||||
> This can allow you rebuild the current source object so that you could load the same
|
||||
> source and tech later
|
||||
|
||||
##### RETURNS:
|
||||
* `String` The source MIME type
|
||||
|
||||
_defined in_: [src/js/player.js#L1249](https://github.com/videojs/video.js/blob/master/src/js/player.js#L1249)
|
||||
|
||||
---
|
||||
|
||||
@@ -282,7 +346,7 @@ _defined in_: [src/js/player.js#L650](https://github.com/videojs/video.js/blob/m
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
@@ -294,7 +358,7 @@ _inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js
|
||||
> This is especially helpful if you are dynamically adding and removing videos
|
||||
> to/from the DOM.
|
||||
|
||||
_defined in_: [src/js/player.js#L135](https://github.com/videojs/video.js/blob/master/src/js/player.js#L135)
|
||||
_defined in_: [src/js/player.js#L164](https://github.com/videojs/video.js/blob/master/src/js/player.js#L164)
|
||||
|
||||
---
|
||||
|
||||
@@ -313,7 +377,7 @@ _defined in_: [src/js/player.js#L135](https://github.com/videojs/video.js/blob/m
|
||||
##### RETURNS:
|
||||
* `Number` The duration of the video in seconds
|
||||
|
||||
_defined in_: [src/js/player.js#L681](https://github.com/videojs/video.js/blob/master/src/js/player.js#L681)
|
||||
_defined in_: [src/js/player.js#L730](https://github.com/videojs/video.js/blob/master/src/js/player.js#L730)
|
||||
|
||||
---
|
||||
|
||||
@@ -325,7 +389,7 @@ _defined in_: [src/js/player.js#L681](https://github.com/videojs/video.js/blob/m
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -352,7 +416,43 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
### ended()
|
||||
> Returns whether or not the player is in the "ended" state.
|
||||
|
||||
##### RETURNS:
|
||||
* `Boolean` True if the player is in the ended state, false if not.
|
||||
|
||||
_defined in_: [src/js/player.js#L1473](https://github.com/videojs/video.js/blob/master/src/js/player.js#L1473)
|
||||
|
||||
---
|
||||
|
||||
### error( err )
|
||||
> Set or get the current MediaError
|
||||
|
||||
##### PARAMETERS:
|
||||
* __err__ `*` A MediaError or a String/Number to be turned into a MediaError
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.MediaError|null` when getting
|
||||
* `vjs.Player` when setting
|
||||
|
||||
_defined in_: [src/js/player.js#L1437](https://github.com/videojs/video.js/blob/master/src/js/player.js#L1437)
|
||||
|
||||
---
|
||||
|
||||
### exitFullscreen()
|
||||
> Return the video to its normal size after having been in full screen mode
|
||||
>
|
||||
> myPlayer.exitFullscreen();
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Player` self
|
||||
|
||||
_defined in_: [src/js/player.js#L1017](https://github.com/videojs/video.js/blob/master/src/js/player.js#L1017)
|
||||
|
||||
---
|
||||
|
||||
@@ -365,7 +465,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -378,7 +478,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -398,7 +511,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -408,7 +521,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -420,7 +533,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -446,22 +559,55 @@ _defined in_: [src/js/player.js#L32](https://github.com/videojs/video.js/blob/ma
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
### isFullScreen( [isFS] )
|
||||
### isFullScreen( isFS )
|
||||
> Old naming for isFullscreen()
|
||||
**Deprecated** true
|
||||
|
||||
##### PARAMETERS:
|
||||
* __isFS__
|
||||
|
||||
_defined in_: [src/js/player.js#L940](https://github.com/videojs/video.js/blob/master/src/js/player.js#L940)
|
||||
|
||||
---
|
||||
|
||||
### isFullscreen( [isFS] )
|
||||
> Check if the player is in fullscreen mode
|
||||
>
|
||||
> // get
|
||||
> var fullscreenOrNot = myPlayer.isFullScreen();
|
||||
> var fullscreenOrNot = myPlayer.isFullscreen();
|
||||
>
|
||||
> // set
|
||||
> myPlayer.isFullScreen(true); // tell the player it's in fullscreen
|
||||
> myPlayer.isFullscreen(true); // tell the player it's in fullscreen
|
||||
>
|
||||
> NOTE: As of the latest HTML5 spec, isFullScreen is no longer an official
|
||||
> property and instead document.fullscreenElement is used. But isFullScreen is
|
||||
> NOTE: As of the latest HTML5 spec, isFullscreen is no longer an official
|
||||
> property and instead document.fullscreenElement is used. But isFullscreen is
|
||||
> still a valuable property for internal player workings.
|
||||
|
||||
##### PARAMETERS:
|
||||
@@ -471,7 +617,45 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
* `Boolean` true if fullscreen, false if not
|
||||
* `vjs.Player` self, when setting
|
||||
|
||||
_defined in_: [src/js/player.js#L840](https://github.com/videojs/video.js/blob/master/src/js/player.js#L840)
|
||||
_defined in_: [src/js/player.js#L928](https://github.com/videojs/video.js/blob/master/src/js/player.js#L928)
|
||||
|
||||
---
|
||||
|
||||
### language( languageCode )
|
||||
> The player's language code
|
||||
|
||||
##### PARAMETERS:
|
||||
* __languageCode__ `String` The locale string
|
||||
|
||||
##### RETURNS:
|
||||
* `String` The locale string when getting
|
||||
* `vjs.Player` self, when setting
|
||||
|
||||
_defined in_: [src/js/player.js#L124](https://github.com/videojs/video.js/blob/master/src/js/player.js#L124)
|
||||
|
||||
---
|
||||
|
||||
### load()
|
||||
> Begin loading the src data.
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Player` Returns the player
|
||||
|
||||
_defined in_: [src/js/player.js#L1229](https://github.com/videojs/video.js/blob/master/src/js/player.js#L1229)
|
||||
|
||||
---
|
||||
|
||||
### loop( value )
|
||||
> Get or set the loop attribute on the video element.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __value__
|
||||
|
||||
##### RETURNS:
|
||||
* `String` The loop attribute value when getting
|
||||
* `vjs.Player` Returns the player when setting
|
||||
|
||||
_defined in_: [src/js/player.js#L1286](https://github.com/videojs/video.js/blob/master/src/js/player.js#L1286)
|
||||
|
||||
---
|
||||
|
||||
@@ -491,7 +675,7 @@ _defined in_: [src/js/player.js#L840](https://github.com/videojs/video.js/blob/m
|
||||
* `Boolean` True if mute is on, false if not, when getting
|
||||
* `vjs.Player` self, when setting mute
|
||||
|
||||
_defined in_: [src/js/player.js#L802](https://github.com/videojs/video.js/blob/master/src/js/player.js#L802)
|
||||
_defined in_: [src/js/player.js#L890](https://github.com/videojs/video.js/blob/master/src/js/player.js#L890)
|
||||
|
||||
---
|
||||
|
||||
@@ -503,60 +687,96 @@ _defined in_: [src/js/player.js#L802](https://github.com/videojs/video.js/blob/m
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -604,7 +824,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -616,7 +836,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player` self
|
||||
|
||||
_defined in_: [src/js/player.js#L619](https://github.com/videojs/video.js/blob/master/src/js/player.js#L619)
|
||||
_defined in_: [src/js/player.js#L671](https://github.com/videojs/video.js/blob/master/src/js/player.js#L671)
|
||||
|
||||
---
|
||||
|
||||
@@ -629,7 +849,7 @@ _defined in_: [src/js/player.js#L619](https://github.com/videojs/video.js/blob/m
|
||||
##### RETURNS:
|
||||
* `Boolean` false if the media is currently playing, or true otherwise
|
||||
|
||||
_defined in_: [src/js/player.js#L632](https://github.com/videojs/video.js/blob/master/src/js/player.js#L632)
|
||||
_defined in_: [src/js/player.js#L684](https://github.com/videojs/video.js/blob/master/src/js/player.js#L684)
|
||||
|
||||
---
|
||||
|
||||
@@ -641,7 +861,21 @@ _defined in_: [src/js/player.js#L632](https://github.com/videojs/video.js/blob/m
|
||||
##### RETURNS:
|
||||
* `vjs.Player` self
|
||||
|
||||
_defined in_: [src/js/player.js#L607](https://github.com/videojs/video.js/blob/master/src/js/player.js#L607)
|
||||
_defined in_: [src/js/player.js#L659](https://github.com/videojs/video.js/blob/master/src/js/player.js#L659)
|
||||
|
||||
---
|
||||
|
||||
### playbackRate( rate )
|
||||
> Gets or sets the current playback rate.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __rate__ `Boolean` New playback rate to set.
|
||||
|
||||
##### RETURNS:
|
||||
* `Number` Returns the new playback rate when setting
|
||||
* `Number` Returns the current playback rate when getting
|
||||
|
||||
_defined in_: [src/js/player.js#L1621](https://github.com/videojs/video.js/blob/master/src/js/player.js#L1621)
|
||||
|
||||
---
|
||||
|
||||
@@ -651,7 +885,7 @@ _defined in_: [src/js/player.js#L607](https://github.com/videojs/video.js/blob/m
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -673,7 +907,21 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
* `String` poster URL when getting
|
||||
* `vjs.Player` self when setting
|
||||
|
||||
_defined in_: [src/js/player.js#L1147](https://github.com/videojs/video.js/blob/master/src/js/player.js#L1147)
|
||||
_defined in_: [src/js/player.js#L1317](https://github.com/videojs/video.js/blob/master/src/js/player.js#L1317)
|
||||
|
||||
---
|
||||
|
||||
### preload( value )
|
||||
> Get or set the preload attribute.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __value__
|
||||
|
||||
##### RETURNS:
|
||||
* `String` The preload attribute value when getting
|
||||
* `vjs.Player` Returns the player when setting
|
||||
|
||||
_defined in_: [src/js/player.js#L1258](https://github.com/videojs/video.js/blob/master/src/js/player.js#L1258)
|
||||
|
||||
---
|
||||
|
||||
@@ -689,7 +937,21 @@ _defined in_: [src/js/player.js#L1147](https://github.com/videojs/video.js/blob/
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
### remainingTime()
|
||||
> Calculates how much time is left.
|
||||
>
|
||||
> var timeLeft = myPlayer.remainingTime();
|
||||
>
|
||||
> Not a native video element function, but useful
|
||||
|
||||
##### RETURNS:
|
||||
* `Number` The time remaining in seconds
|
||||
|
||||
_defined in_: [src/js/player.js#L754](https://github.com/videojs/video.js/blob/master/src/js/player.js#L754)
|
||||
|
||||
---
|
||||
|
||||
@@ -700,7 +962,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -713,14 +975,22 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
### requestFullScreen()
|
||||
> Old naming for requestFullscreen
|
||||
**Deprecated** true
|
||||
|
||||
_defined in_: [src/js/player.js#L1004](https://github.com/videojs/video.js/blob/master/src/js/player.js#L1004)
|
||||
|
||||
---
|
||||
|
||||
### requestFullscreen()
|
||||
> Increase the size of the video to full screen
|
||||
>
|
||||
> myPlayer.requestFullScreen();
|
||||
> myPlayer.requestFullscreen();
|
||||
>
|
||||
> In some browsers, full screen is not supported natively, so it enters
|
||||
> "full window mode", where the video fills the browser window.
|
||||
@@ -732,7 +1002,17 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player` self
|
||||
|
||||
_defined in_: [src/js/player.js#L862](https://github.com/videojs/video.js/blob/master/src/js/player.js#L862)
|
||||
_defined in_: [src/js/player.js#L959](https://github.com/videojs/video.js/blob/master/src/js/player.js#L959)
|
||||
|
||||
---
|
||||
|
||||
### seeking()
|
||||
> Returns whether or not the player is in the "seeking" state.
|
||||
|
||||
##### RETURNS:
|
||||
* `Boolean` True if the player is in the seeking state, false if not.
|
||||
|
||||
_defined in_: [src/js/player.js#L1479](https://github.com/videojs/video.js/blob/master/src/js/player.js#L1479)
|
||||
|
||||
---
|
||||
|
||||
@@ -742,7 +1022,7 @@ _defined in_: [src/js/player.js#L862](https://github.com/videojs/video.js/blob/m
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
@@ -781,23 +1061,23 @@ _inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js
|
||||
* `String` The current video source when getting
|
||||
* `String` The player when setting
|
||||
|
||||
_defined in_: [src/js/player.js#L1025](https://github.com/videojs/video.js/blob/master/src/js/player.js#L1025)
|
||||
_defined in_: [src/js/player.js#L1148](https://github.com/videojs/video.js/blob/master/src/js/player.js#L1148)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -807,7 +1087,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -829,7 +1109,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `Number` The current volume, when getting
|
||||
* `vjs.Player` self, when setting
|
||||
|
||||
_defined in_: [src/js/player.js#L772](https://github.com/videojs/video.js/blob/master/src/js/player.js#L772)
|
||||
_defined in_: [src/js/player.js#L860](https://github.com/videojs/video.js/blob/master/src/js/player.js#L860)
|
||||
|
||||
---
|
||||
|
||||
@@ -849,7 +1129,7 @@ _defined in_: [src/js/player.js#L772](https://github.com/videojs/video.js/blob/m
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -858,24 +1138,14 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### durationchange `EVENT`
|
||||
> Fired when the duration of the media resource is first known or changed
|
||||
|
||||
_defined in_: [src/js/player.js#L502](https://github.com/videojs/video.js/blob/master/src/js/player.js#L502)
|
||||
_defined in_: [src/js/player.js#L554](https://github.com/videojs/video.js/blob/master/src/js/player.js#L554)
|
||||
|
||||
---
|
||||
|
||||
### ended `EVENT`
|
||||
> Fired when the end of the media resource is reached (currentTime == duration)
|
||||
|
||||
_defined in_: [src/js/player.js#L491](https://github.com/videojs/video.js/blob/master/src/js/player.js#L491)
|
||||
|
||||
---
|
||||
|
||||
### error `EVENT`
|
||||
> Fired when there is an error in playback
|
||||
|
||||
##### PARAMETERS:
|
||||
* __e__
|
||||
|
||||
_defined in_: [src/js/player.js#L534](https://github.com/videojs/video.js/blob/master/src/js/player.js#L534)
|
||||
_defined in_: [src/js/player.js#L541](https://github.com/videojs/video.js/blob/master/src/js/player.js#L541)
|
||||
|
||||
---
|
||||
|
||||
@@ -886,87 +1156,108 @@ _defined in_: [src/js/player.js#L534](https://github.com/videojs/video.js/blob/m
|
||||
> implementation yet, so use sparingly. If you don't have a reason to
|
||||
> prevent playback, use `myPlayer.one('play');` instead.
|
||||
|
||||
_defined in_: [src/js/player.js#L448](https://github.com/videojs/video.js/blob/master/src/js/player.js#L448)
|
||||
_defined in_: [src/js/player.js#L498](https://github.com/videojs/video.js/blob/master/src/js/player.js#L498)
|
||||
|
||||
---
|
||||
|
||||
### fullscreenchange `EVENT`
|
||||
> Fired when the player switches in or out of fullscreen mode
|
||||
|
||||
_defined in_: [src/js/player.js#L522](https://github.com/videojs/video.js/blob/master/src/js/player.js#L522)
|
||||
_defined in_: [src/js/player.js#L583](https://github.com/videojs/video.js/blob/master/src/js/player.js#L583)
|
||||
|
||||
---
|
||||
|
||||
### loadedalldata `EVENT`
|
||||
> Fired when the player has finished downloading the source data
|
||||
|
||||
_defined in_: [src/js/player.js#L428](https://github.com/videojs/video.js/blob/master/src/js/player.js#L428)
|
||||
_defined in_: [src/js/player.js#L445](https://github.com/videojs/video.js/blob/master/src/js/player.js#L445)
|
||||
|
||||
---
|
||||
|
||||
### loadeddata `EVENT`
|
||||
> Fired when the player has downloaded data at the current playback position
|
||||
|
||||
_defined in_: [src/js/player.js#L422](https://github.com/videojs/video.js/blob/master/src/js/player.js#L422)
|
||||
_defined in_: [src/js/player.js#L439](https://github.com/videojs/video.js/blob/master/src/js/player.js#L439)
|
||||
|
||||
---
|
||||
|
||||
### loadedmetadata `EVENT`
|
||||
> Fired when the player has initial duration and dimension information
|
||||
|
||||
_defined in_: [src/js/player.js#L416](https://github.com/videojs/video.js/blob/master/src/js/player.js#L416)
|
||||
_defined in_: [src/js/player.js#L433](https://github.com/videojs/video.js/blob/master/src/js/player.js#L433)
|
||||
|
||||
---
|
||||
|
||||
### loadstart `EVENT`
|
||||
> Fired when the user agent begins looking for media data
|
||||
|
||||
_defined in_: [src/js/player.js#L410](https://github.com/videojs/video.js/blob/master/src/js/player.js#L410)
|
||||
_defined in_: [src/js/player.js#L389](https://github.com/videojs/video.js/blob/master/src/js/player.js#L389)
|
||||
|
||||
---
|
||||
|
||||
### pause `EVENT`
|
||||
> Fired whenever the media has been paused
|
||||
|
||||
_defined in_: [src/js/player.js#L462](https://github.com/videojs/video.js/blob/master/src/js/player.js#L462)
|
||||
_defined in_: [src/js/player.js#L512](https://github.com/videojs/video.js/blob/master/src/js/player.js#L512)
|
||||
|
||||
---
|
||||
|
||||
### play `EVENT`
|
||||
> Fired whenever the media begins or resumes playback
|
||||
|
||||
_defined in_: [src/js/player.js#L434](https://github.com/videojs/video.js/blob/master/src/js/player.js#L434)
|
||||
_defined in_: [src/js/player.js#L451](https://github.com/videojs/video.js/blob/master/src/js/player.js#L451)
|
||||
|
||||
---
|
||||
|
||||
### progress `EVENT`
|
||||
> Fired while the user agent is downloading media data
|
||||
|
||||
_defined in_: [src/js/player.js#L480](https://github.com/videojs/video.js/blob/master/src/js/player.js#L480)
|
||||
_defined in_: [src/js/player.js#L530](https://github.com/videojs/video.js/blob/master/src/js/player.js#L530)
|
||||
|
||||
---
|
||||
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
### seeked `EVENT`
|
||||
> Fired when the player has finished jumping to a new time
|
||||
|
||||
_defined in_: [src/js/player.js#L485](https://github.com/videojs/video.js/blob/master/src/js/player.js#L485)
|
||||
|
||||
---
|
||||
|
||||
### seeking `EVENT`
|
||||
> Fired whenever the player is jumping to a new time
|
||||
|
||||
_defined in_: [src/js/player.js#L477](https://github.com/videojs/video.js/blob/master/src/js/player.js#L477)
|
||||
|
||||
---
|
||||
|
||||
### timeupdate `EVENT`
|
||||
> Fired when the current playback position has changed
|
||||
>
|
||||
> During playback this is fired every 15-250 milliseconds, depnding on the
|
||||
> During playback this is fired every 15-250 milliseconds, depending on the
|
||||
> playback technology in use.
|
||||
|
||||
_defined in_: [src/js/player.js#L474](https://github.com/videojs/video.js/blob/master/src/js/player.js#L474)
|
||||
_defined in_: [src/js/player.js#L524](https://github.com/videojs/video.js/blob/master/src/js/player.js#L524)
|
||||
|
||||
---
|
||||
|
||||
### volumechange `EVENT`
|
||||
> Fired when the volume changes
|
||||
|
||||
_defined in_: [src/js/player.js#L516](https://github.com/videojs/video.js/blob/master/src/js/player.js#L516)
|
||||
_defined in_: [src/js/player.js#L577](https://github.com/videojs/video.js/blob/master/src/js/player.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### waiting `EVENT`
|
||||
> Fired whenever the media begins wating
|
||||
|
||||
_defined in_: [src/js/player.js#L460](https://github.com/videojs/video.js/blob/master/src/js/player.js#L460)
|
||||
|
||||
---
|
||||
|
||||
|
||||
+155
-60
@@ -12,34 +12,38 @@ The component that handles showing the poster image.
|
||||
## INDEX
|
||||
|
||||
- [METHODS](#methods)
|
||||
- [createEl](#createel)
|
||||
- [dispose](#dispose)
|
||||
- [init](#init-player-options-)
|
||||
- [onClick](#onclick)
|
||||
- [setSrc](#setsrc-url-)
|
||||
- [update](#update)
|
||||
- [addChild](#addchild-child-options-) _`inherited`_
|
||||
- [addClass](#addclass-classtoadd-) _`inherited`_
|
||||
- [buildCSSClass](#buildcssclass) _`inherited`_
|
||||
- [children](#children) _`inherited`_
|
||||
- [contentEl](#contentel) _`inherited`_
|
||||
- [createEl](#createel-tagname-attributes-) _`inherited`_
|
||||
- [dimensions](#dimensions-width-height-) _`inherited`_
|
||||
- [dispose](#dispose) _`inherited`_
|
||||
- [el](#el) _`inherited`_
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -80,7 +84,7 @@ The component that handles showing the poster image.
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -93,7 +97,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -103,7 +107,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -115,7 +119,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -126,21 +130,17 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
### createEl( [tagName], [attributes] )
|
||||
> Create the component's DOM element
|
||||
|
||||
##### PARAMETERS:
|
||||
* __tagName__ `String` _(OPTIONAL)_ Element's node type. e.g. 'div'
|
||||
* __attributes__ `Object` _(OPTIONAL)_ An object of element attributes that should be set on the element
|
||||
### createEl()
|
||||
> Create the poster image element
|
||||
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_defined in_: [src/js/poster.js#L32](https://github.com/videojs/video.js/blob/master/src/js/poster.js#L32)
|
||||
|
||||
---
|
||||
|
||||
@@ -154,14 +154,14 @@ _inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
> Clean up the poster image
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_defined in_: [src/js/poster.js#L23](https://github.com/videojs/video.js/blob/master/src/js/poster.js#L23)
|
||||
|
||||
---
|
||||
|
||||
@@ -173,7 +173,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -200,7 +200,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -213,7 +213,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -226,7 +226,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -246,7 +259,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -256,7 +269,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -268,7 +281,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -292,8 +305,30 @@ _defined in_: [src/js/poster.js#L12](https://github.com/videojs/video.js/blob/ma
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -305,60 +340,103 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### onClick()
|
||||
> Event handler for clicks on the poster image
|
||||
|
||||
_defined in_: [src/js/poster.js#L95](https://github.com/videojs/video.js/blob/master/src/js/poster.js#L95)
|
||||
|
||||
---
|
||||
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -406,7 +484,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -416,7 +494,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -432,7 +510,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -443,7 +521,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -456,7 +534,17 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
### setSrc( url )
|
||||
> Set the poster source depending on the display method
|
||||
|
||||
##### PARAMETERS:
|
||||
* __url__
|
||||
|
||||
_defined in_: [src/js/poster.js#L75](https://github.com/videojs/video.js/blob/master/src/js/poster.js#L75)
|
||||
|
||||
---
|
||||
|
||||
@@ -466,23 +554,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -492,7 +580,14 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
### update()
|
||||
> Event handler for updates to the player's poster source
|
||||
|
||||
_defined in_: [src/js/poster.js#L55](https://github.com/videojs/video.js/blob/master/src/js/poster.js#L55)
|
||||
|
||||
---
|
||||
|
||||
@@ -512,7 +607,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -521,7 +616,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -26,21 +26,22 @@ and play progress
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -81,7 +82,7 @@ and play progress
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -94,7 +95,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -104,7 +105,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -116,7 +117,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -127,7 +128,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -141,7 +142,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -155,14 +156,14 @@ _inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -174,7 +175,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -201,7 +202,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -214,7 +215,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -227,7 +228,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -247,7 +261,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -257,7 +271,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -269,7 +283,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -293,8 +307,30 @@ _defined in_: [src/js/control-bar/progress-control.js#L11](https://github.com/vi
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -306,60 +342,96 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -407,7 +479,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -417,7 +489,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -433,7 +505,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -444,7 +516,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -457,7 +529,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -467,23 +539,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -493,7 +565,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -513,7 +585,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -522,7 +594,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -25,21 +25,22 @@ Displays the time left in the video
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -80,7 +81,7 @@ Displays the time left in the video
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -93,7 +94,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -103,7 +104,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -115,7 +116,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -126,7 +127,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -140,7 +141,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -154,14 +155,14 @@ _inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -173,7 +174,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -200,7 +201,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -213,7 +214,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -226,7 +227,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -246,7 +260,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -256,7 +270,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -268,7 +282,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -292,8 +306,30 @@ _defined in_: [src/js/control-bar/time-display.js#L110](https://github.com/video
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -305,60 +341,96 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -406,7 +478,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -416,7 +488,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -432,7 +504,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -443,7 +515,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -456,7 +528,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -466,23 +538,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -492,7 +564,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -512,7 +584,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -521,7 +593,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
+124
-52
@@ -25,22 +25,23 @@ Seek Bar and holder for the progress bars
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [onClick](#onclick-event-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -81,7 +82,7 @@ Seek Bar and holder for the progress bars
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -94,7 +95,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -104,7 +105,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -116,7 +117,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -127,7 +128,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -141,7 +142,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -155,14 +156,14 @@ _inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -174,7 +175,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -201,7 +202,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -214,7 +215,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -227,7 +228,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -247,7 +261,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -257,7 +271,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -269,7 +283,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -293,8 +307,30 @@ _defined in_: [src/js/control-bar/progress-control.js#L37](https://github.com/vi
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -306,46 +342,73 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
@@ -356,21 +419,30 @@ _inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __event__ `Object` Event object
|
||||
|
||||
_inherited from_: [src/js/slider.js#L200](https://github.com/videojs/video.js/blob/master/src/js/slider.js#L200)
|
||||
_inherited from_: [src/js/slider.js#L212](https://github.com/videojs/video.js/blob/master/src/js/slider.js#L212)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -418,7 +490,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -428,7 +500,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -444,7 +516,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -455,7 +527,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -468,7 +540,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -478,23 +550,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -504,7 +576,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -524,7 +596,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -533,7 +605,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
+124
-52
@@ -3,7 +3,7 @@
|
||||
# vjs.SeekHandle
|
||||
|
||||
__EXTENDS__: [vjs.SliderHandle](vjs.SliderHandle.md)
|
||||
__DEFINED IN__: [src/js/control-bar/progress-control.js#L167](https://github.com/videojs/video.js/blob/master/src/js/control-bar/progress-control.js#L167)
|
||||
__DEFINED IN__: [src/js/control-bar/progress-control.js#L197](https://github.com/videojs/video.js/blob/master/src/js/control-bar/progress-control.js#L197)
|
||||
|
||||
The Seek Handle shows the current position of the playhead during playback,
|
||||
and can be dragged to adjust the playhead.
|
||||
@@ -25,22 +25,23 @@ and can be dragged to adjust the playhead.
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [init](#init-player-options-ready-) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -81,7 +82,7 @@ and can be dragged to adjust the playhead.
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -94,7 +95,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -104,7 +105,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -116,7 +117,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -127,7 +128,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -138,7 +139,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
* __tagName__ `String` _(OPTIONAL)_ Element's node type. e.g. 'div'
|
||||
* __attributes__ `Object` _(OPTIONAL)_ An object of element attributes that should be set on the element
|
||||
|
||||
_defined in_: [src/js/control-bar/progress-control.js#L183](https://github.com/videojs/video.js/blob/master/src/js/control-bar/progress-control.js#L183)
|
||||
_defined in_: [src/js/control-bar/progress-control.js#L213](https://github.com/videojs/video.js/blob/master/src/js/control-bar/progress-control.js#L213)
|
||||
|
||||
---
|
||||
|
||||
@@ -152,14 +153,14 @@ _defined in_: [src/js/control-bar/progress-control.js#L183](https://github.com/v
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -171,7 +172,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -198,7 +199,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -211,7 +212,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -224,7 +225,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -244,7 +258,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -254,7 +268,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -266,7 +280,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -292,8 +306,30 @@ _inherited from_: [src/js/component.js#L41](https://github.com/videojs/video.js/
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -305,60 +341,96 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -406,7 +478,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -416,7 +488,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -432,7 +504,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -443,7 +515,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -456,7 +528,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -466,23 +538,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -492,7 +564,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -512,7 +584,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -521,7 +593,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
+124
-52
@@ -26,21 +26,22 @@ The base functionality for sliders like the volume bar and seek bar
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -81,7 +82,7 @@ The base functionality for sliders like the volume bar and seek bar
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -94,7 +95,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -104,7 +105,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -116,7 +117,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -127,7 +128,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -141,7 +142,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -155,14 +156,14 @@ _inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -174,7 +175,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -201,7 +202,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -214,7 +215,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -227,7 +228,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -247,7 +261,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -257,7 +271,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -269,7 +283,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -293,8 +307,30 @@ _defined in_: [src/js/slider.js#L12](https://github.com/videojs/video.js/blob/ma
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -306,46 +342,73 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
@@ -356,21 +419,30 @@ _inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __event__ `Object` Event object
|
||||
|
||||
_defined in_: [src/js/slider.js#L200](https://github.com/videojs/video.js/blob/master/src/js/slider.js#L200)
|
||||
_defined in_: [src/js/slider.js#L212](https://github.com/videojs/video.js/blob/master/src/js/slider.js#L212)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -418,7 +490,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -428,7 +500,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -444,7 +516,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -455,7 +527,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -468,7 +540,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -478,23 +550,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -504,7 +576,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -524,7 +596,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -533,7 +605,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
+124
-52
@@ -3,7 +3,7 @@
|
||||
# vjs.SliderHandle
|
||||
|
||||
__EXTENDS__: [vjs.Component](vjs.Component.md)
|
||||
__DEFINED IN__: [src/js/slider.js#L212](https://github.com/videojs/video.js/blob/master/src/js/slider.js#L212)
|
||||
__DEFINED IN__: [src/js/slider.js#L224](https://github.com/videojs/video.js/blob/master/src/js/slider.js#L224)
|
||||
|
||||
SeekBar Behavior includes play progress bar, and seek handle
|
||||
Needed so it can determine seek position based on handle position/size
|
||||
@@ -25,22 +25,23 @@ Needed so it can determine seek position based on handle position/size
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [init](#init-player-options-ready-) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -81,7 +82,7 @@ Needed so it can determine seek position based on handle position/size
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -94,7 +95,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -104,7 +105,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -116,7 +117,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -127,7 +128,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -138,7 +139,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
* __tagName__ `String` _(OPTIONAL)_ Element's node type. e.g. 'div'
|
||||
* __attributes__ `Object` _(OPTIONAL)_ An object of element attributes that should be set on the element
|
||||
|
||||
_defined in_: [src/js/slider.js#L223](https://github.com/videojs/video.js/blob/master/src/js/slider.js#L223)
|
||||
_defined in_: [src/js/slider.js#L235](https://github.com/videojs/video.js/blob/master/src/js/slider.js#L235)
|
||||
|
||||
---
|
||||
|
||||
@@ -152,14 +153,14 @@ _defined in_: [src/js/slider.js#L223](https://github.com/videojs/video.js/blob/m
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -171,7 +172,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -198,7 +199,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -211,7 +212,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -224,7 +225,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -244,7 +258,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -254,7 +268,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -266,7 +280,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -292,8 +306,30 @@ _inherited from_: [src/js/component.js#L41](https://github.com/videojs/video.js/
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -305,60 +341,96 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -406,7 +478,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -416,7 +488,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -432,7 +504,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -443,7 +515,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -456,7 +528,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -466,23 +538,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -492,7 +564,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -512,7 +584,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -521,7 +593,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# vjs.SubtitlesButton
|
||||
|
||||
__EXTENDS__: [vjs.TextTrackButton](vjs.TextTrackButton.md)
|
||||
__DEFINED IN__: [src/js/tracks.js#L883](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L883)
|
||||
__DEFINED IN__: [src/js/tracks.js#L872](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L872)
|
||||
|
||||
The button component for toggling and selecting subtitles
|
||||
|
||||
@@ -26,21 +26,22 @@ The button component for toggling and selecting subtitles
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -81,7 +82,7 @@ The button component for toggling and selecting subtitles
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -94,7 +95,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -113,7 +114,7 @@ _inherited from_: [src/js/menu.js#L157](https://github.com/videojs/video.js/blob
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -124,7 +125,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -138,7 +139,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -159,14 +160,14 @@ _inherited from_: [src/js/menu.js#L154](https://github.com/videojs/video.js/blob
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -178,7 +179,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -205,7 +206,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -218,7 +219,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -231,7 +232,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -251,7 +265,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -261,7 +275,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -273,7 +287,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -284,7 +298,7 @@ _inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js
|
||||
* __options__
|
||||
* __ready__
|
||||
|
||||
_defined in_: [src/js/tracks.js#L885](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L885)
|
||||
_defined in_: [src/js/tracks.js#L874](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L874)
|
||||
|
||||
---
|
||||
|
||||
@@ -298,8 +312,30 @@ _defined in_: [src/js/tracks.js#L885](https://github.com/videojs/video.js/blob/m
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -311,60 +347,96 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -412,7 +484,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -422,7 +494,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -438,7 +510,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -449,7 +521,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -462,7 +534,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -472,23 +544,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -498,7 +570,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -518,7 +590,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -527,7 +599,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# vjs.SubtitlesTrack
|
||||
|
||||
__EXTENDS__: [vjs.TextTrack](vjs.TextTrack.md)
|
||||
__DEFINED IN__: [src/js/tracks.js#L689](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L689)
|
||||
__DEFINED IN__: [src/js/tracks.js#L678](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L678)
|
||||
|
||||
The track component for managing the hiding and showing of subtitles
|
||||
|
||||
@@ -16,7 +16,6 @@ The track component for managing the hiding and showing of subtitles
|
||||
- [activeCues](#activecues) _`inherited`_
|
||||
- [addChild](#addchild-child-options-) _`inherited`_
|
||||
- [addClass](#addclass-classtoadd-) _`inherited`_
|
||||
- [adjustFontSize](#adjustfontsize) _`inherited`_
|
||||
- [buildCSSClass](#buildcssclass) _`inherited`_
|
||||
- [children](#children) _`inherited`_
|
||||
- [contentEl](#contentel) _`inherited`_
|
||||
@@ -31,6 +30,7 @@ The track component for managing the hiding and showing of subtitles
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
@@ -41,9 +41,9 @@ The track component for managing the hiding and showing of subtitles
|
||||
- [language](#language) _`inherited`_
|
||||
- [mode](#mode) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
@@ -53,7 +53,7 @@ The track component for managing the hiding and showing of subtitles
|
||||
- [show](#show) _`inherited`_
|
||||
- [src](#src) _`inherited`_
|
||||
- [title](#title) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -67,7 +67,7 @@ The track component for managing the hiding and showing of subtitles
|
||||
### activate()
|
||||
> Turn on cue tracking. Tracks that are showing OR hidden are active.
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L385](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L385)
|
||||
_inherited from_: [src/js/tracks.js#L373](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L373)
|
||||
|
||||
---
|
||||
|
||||
@@ -77,7 +77,7 @@ _inherited from_: [src/js/tracks.js#L385](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `Array`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L264](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L264)
|
||||
_inherited from_: [src/js/tracks.js#L268](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L268)
|
||||
|
||||
---
|
||||
|
||||
@@ -111,7 +111,7 @@ _inherited from_: [src/js/tracks.js#L264](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -124,15 +124,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
|
||||
---
|
||||
|
||||
### adjustFontSize()
|
||||
> Change the font size of the text track to make it larger when playing in fullscreen mode
|
||||
> and restore it to its normal size when not in fullscreen mode.
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L309](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L309)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -142,7 +134,7 @@ _inherited from_: [src/js/tracks.js#L309](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -154,7 +146,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -165,7 +157,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -175,7 +167,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L325](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L325)
|
||||
_inherited from_: [src/js/tracks.js#L313](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L313)
|
||||
|
||||
---
|
||||
|
||||
@@ -185,14 +177,14 @@ _inherited from_: [src/js/tracks.js#L325](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `Array`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L249](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L249)
|
||||
_inherited from_: [src/js/tracks.js#L253](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L253)
|
||||
|
||||
---
|
||||
|
||||
### deactivate()
|
||||
> Turn off cue tracking.
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L408](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L408)
|
||||
_inherited from_: [src/js/tracks.js#L396](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L396)
|
||||
|
||||
---
|
||||
|
||||
@@ -202,7 +194,7 @@ _inherited from_: [src/js/tracks.js#L408](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `Boolean`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L190](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L190)
|
||||
_inherited from_: [src/js/tracks.js#L194](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L194)
|
||||
|
||||
---
|
||||
|
||||
@@ -216,7 +208,7 @@ _inherited from_: [src/js/tracks.js#L190](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
@@ -225,14 +217,14 @@ _inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js
|
||||
> Indicates that the text track is not active. Other than for the purposes of exposing the track in the DOM, the user agent is ignoring the text track.
|
||||
> No cues are active, no events are fired, and the user agent will not attempt to obtain the track's cues.
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L371](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L371)
|
||||
_inherited from_: [src/js/tracks.js#L359](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L359)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -244,7 +236,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -271,7 +263,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -284,7 +276,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -297,7 +289,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -317,7 +322,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -327,7 +332,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
> If no attempt has yet been made to obtain the track's cues, the user agent will perform such an attempt momentarily.
|
||||
> The user agent is maintaining a list of which cues are active, and events are being fired accordingly.
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L356](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L356)
|
||||
_inherited from_: [src/js/tracks.js#L344](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L344)
|
||||
|
||||
---
|
||||
|
||||
@@ -339,7 +344,7 @@ _inherited from_: [src/js/tracks.js#L356](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -349,7 +354,7 @@ _inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js
|
||||
* __player__
|
||||
* __options__
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L128](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L128)
|
||||
_inherited from_: [src/js/tracks.js#L134](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L134)
|
||||
|
||||
---
|
||||
|
||||
@@ -363,8 +368,30 @@ _inherited from_: [src/js/tracks.js#L128](https://github.com/videojs/video.js/bl
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -374,7 +401,7 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L161](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L161)
|
||||
_inherited from_: [src/js/tracks.js#L165](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L165)
|
||||
|
||||
---
|
||||
|
||||
@@ -384,7 +411,7 @@ _inherited from_: [src/js/tracks.js#L161](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L234](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L234)
|
||||
_inherited from_: [src/js/tracks.js#L238](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L238)
|
||||
|
||||
---
|
||||
|
||||
@@ -394,7 +421,7 @@ _inherited from_: [src/js/tracks.js#L234](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L219](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L219)
|
||||
_inherited from_: [src/js/tracks.js#L223](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L223)
|
||||
|
||||
---
|
||||
|
||||
@@ -404,7 +431,7 @@ _inherited from_: [src/js/tracks.js#L219](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `Number`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L301](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L301)
|
||||
_inherited from_: [src/js/tracks.js#L305](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L305)
|
||||
|
||||
---
|
||||
|
||||
@@ -416,60 +443,96 @@ _inherited from_: [src/js/tracks.js#L301](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -517,7 +580,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -527,7 +590,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -543,7 +606,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -553,7 +616,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Number`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L283](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L283)
|
||||
_inherited from_: [src/js/tracks.js#L287](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L287)
|
||||
|
||||
---
|
||||
|
||||
@@ -564,7 +627,7 @@ _inherited from_: [src/js/tracks.js#L283](https://github.com/videojs/video.js/bl
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -577,7 +640,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -591,7 +654,7 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
> The showing by default state is used in conjunction with the default attribute on track elements to indicate that the text track was enabled due to that attribute.
|
||||
> This allows the user agent to override the state if a later track is discovered that is more appropriate per the user's preferences.
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L341](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L341)
|
||||
_inherited from_: [src/js/tracks.js#L329](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L329)
|
||||
|
||||
---
|
||||
|
||||
@@ -601,7 +664,7 @@ _inherited from_: [src/js/tracks.js#L341](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L175](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L175)
|
||||
_inherited from_: [src/js/tracks.js#L179](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -611,23 +674,23 @@ _inherited from_: [src/js/tracks.js#L175](https://github.com/videojs/video.js/bl
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/tracks.js#L204](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L204)
|
||||
_inherited from_: [src/js/tracks.js#L208](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L208)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -637,7 +700,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -657,7 +720,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -666,7 +729,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
+138
-75
@@ -3,7 +3,7 @@
|
||||
# vjs.TextTrack
|
||||
|
||||
__EXTENDS__: [vjs.Component](vjs.Component.md)
|
||||
__DEFINED IN__: [src/js/tracks.js#L126](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L126)
|
||||
__DEFINED IN__: [src/js/tracks.js#L132](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L132)
|
||||
|
||||
The base class for all text tracks
|
||||
|
||||
@@ -16,7 +16,6 @@ Handles the parsing, hiding, and showing of text track cues
|
||||
- [METHODS](#methods)
|
||||
- [activate](#activate)
|
||||
- [activeCues](#activecues)
|
||||
- [adjustFontSize](#adjustfontsize)
|
||||
- [createEl](#createel)
|
||||
- [cues](#cues)
|
||||
- [deactivate](#deactivate)
|
||||
@@ -43,19 +42,20 @@ Handles the parsing, hiding, and showing of text track cues
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -69,7 +69,7 @@ Handles the parsing, hiding, and showing of text track cues
|
||||
### activate()
|
||||
> Turn on cue tracking. Tracks that are showing OR hidden are active.
|
||||
|
||||
_defined in_: [src/js/tracks.js#L385](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L385)
|
||||
_defined in_: [src/js/tracks.js#L373](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L373)
|
||||
|
||||
---
|
||||
|
||||
@@ -79,7 +79,7 @@ _defined in_: [src/js/tracks.js#L385](https://github.com/videojs/video.js/blob/m
|
||||
##### RETURNS:
|
||||
* `Array`
|
||||
|
||||
_defined in_: [src/js/tracks.js#L264](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L264)
|
||||
_defined in_: [src/js/tracks.js#L268](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L268)
|
||||
|
||||
---
|
||||
|
||||
@@ -113,7 +113,7 @@ _defined in_: [src/js/tracks.js#L264](https://github.com/videojs/video.js/blob/m
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -126,15 +126,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
|
||||
---
|
||||
|
||||
### adjustFontSize()
|
||||
> Change the font size of the text track to make it larger when playing in fullscreen mode
|
||||
> and restore it to its normal size when not in fullscreen mode.
|
||||
|
||||
_defined in_: [src/js/tracks.js#L309](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L309)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -144,7 +136,7 @@ _defined in_: [src/js/tracks.js#L309](https://github.com/videojs/video.js/blob/m
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -156,7 +148,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -167,7 +159,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -177,7 +169,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_defined in_: [src/js/tracks.js#L325](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L325)
|
||||
_defined in_: [src/js/tracks.js#L313](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L313)
|
||||
|
||||
---
|
||||
|
||||
@@ -187,14 +179,14 @@ _defined in_: [src/js/tracks.js#L325](https://github.com/videojs/video.js/blob/m
|
||||
##### RETURNS:
|
||||
* `Array`
|
||||
|
||||
_defined in_: [src/js/tracks.js#L249](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L249)
|
||||
_defined in_: [src/js/tracks.js#L253](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L253)
|
||||
|
||||
---
|
||||
|
||||
### deactivate()
|
||||
> Turn off cue tracking.
|
||||
|
||||
_defined in_: [src/js/tracks.js#L408](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L408)
|
||||
_defined in_: [src/js/tracks.js#L396](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L396)
|
||||
|
||||
---
|
||||
|
||||
@@ -204,7 +196,7 @@ _defined in_: [src/js/tracks.js#L408](https://github.com/videojs/video.js/blob/m
|
||||
##### RETURNS:
|
||||
* `Boolean`
|
||||
|
||||
_defined in_: [src/js/tracks.js#L190](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L190)
|
||||
_defined in_: [src/js/tracks.js#L194](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L194)
|
||||
|
||||
---
|
||||
|
||||
@@ -218,7 +210,7 @@ _defined in_: [src/js/tracks.js#L190](https://github.com/videojs/video.js/blob/m
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
@@ -227,14 +219,14 @@ _inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js
|
||||
> Indicates that the text track is not active. Other than for the purposes of exposing the track in the DOM, the user agent is ignoring the text track.
|
||||
> No cues are active, no events are fired, and the user agent will not attempt to obtain the track's cues.
|
||||
|
||||
_defined in_: [src/js/tracks.js#L371](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L371)
|
||||
_defined in_: [src/js/tracks.js#L359](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L359)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -246,7 +238,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -273,7 +265,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -286,7 +278,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -299,7 +291,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -319,7 +324,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -329,7 +334,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
> If no attempt has yet been made to obtain the track's cues, the user agent will perform such an attempt momentarily.
|
||||
> The user agent is maintaining a list of which cues are active, and events are being fired accordingly.
|
||||
|
||||
_defined in_: [src/js/tracks.js#L356](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L356)
|
||||
_defined in_: [src/js/tracks.js#L344](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L344)
|
||||
|
||||
---
|
||||
|
||||
@@ -341,7 +346,7 @@ _defined in_: [src/js/tracks.js#L356](https://github.com/videojs/video.js/blob/m
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -351,7 +356,7 @@ _inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js
|
||||
* __player__
|
||||
* __options__
|
||||
|
||||
_defined in_: [src/js/tracks.js#L128](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L128)
|
||||
_defined in_: [src/js/tracks.js#L134](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L134)
|
||||
|
||||
---
|
||||
|
||||
@@ -365,8 +370,30 @@ _defined in_: [src/js/tracks.js#L128](https://github.com/videojs/video.js/blob/m
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -376,7 +403,7 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_defined in_: [src/js/tracks.js#L161](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L161)
|
||||
_defined in_: [src/js/tracks.js#L165](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L165)
|
||||
|
||||
---
|
||||
|
||||
@@ -386,7 +413,7 @@ _defined in_: [src/js/tracks.js#L161](https://github.com/videojs/video.js/blob/m
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_defined in_: [src/js/tracks.js#L234](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L234)
|
||||
_defined in_: [src/js/tracks.js#L238](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L238)
|
||||
|
||||
---
|
||||
|
||||
@@ -396,7 +423,7 @@ _defined in_: [src/js/tracks.js#L234](https://github.com/videojs/video.js/blob/m
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_defined in_: [src/js/tracks.js#L219](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L219)
|
||||
_defined in_: [src/js/tracks.js#L223](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L223)
|
||||
|
||||
---
|
||||
|
||||
@@ -406,7 +433,7 @@ _defined in_: [src/js/tracks.js#L219](https://github.com/videojs/video.js/blob/m
|
||||
##### RETURNS:
|
||||
* `Number`
|
||||
|
||||
_defined in_: [src/js/tracks.js#L301](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L301)
|
||||
_defined in_: [src/js/tracks.js#L305](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L305)
|
||||
|
||||
---
|
||||
|
||||
@@ -418,60 +445,96 @@ _defined in_: [src/js/tracks.js#L301](https://github.com/videojs/video.js/blob/m
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -519,7 +582,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -529,7 +592,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -545,7 +608,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -555,7 +618,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Number`
|
||||
|
||||
_defined in_: [src/js/tracks.js#L283](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L283)
|
||||
_defined in_: [src/js/tracks.js#L287](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L287)
|
||||
|
||||
---
|
||||
|
||||
@@ -566,7 +629,7 @@ _defined in_: [src/js/tracks.js#L283](https://github.com/videojs/video.js/blob/m
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -579,7 +642,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -593,7 +656,7 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
> The showing by default state is used in conjunction with the default attribute on track elements to indicate that the text track was enabled due to that attribute.
|
||||
> This allows the user agent to override the state if a later track is discovered that is more appropriate per the user's preferences.
|
||||
|
||||
_defined in_: [src/js/tracks.js#L341](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L341)
|
||||
_defined in_: [src/js/tracks.js#L329](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L329)
|
||||
|
||||
---
|
||||
|
||||
@@ -603,7 +666,7 @@ _defined in_: [src/js/tracks.js#L341](https://github.com/videojs/video.js/blob/m
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_defined in_: [src/js/tracks.js#L175](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L175)
|
||||
_defined in_: [src/js/tracks.js#L179](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -613,23 +676,23 @@ _defined in_: [src/js/tracks.js#L175](https://github.com/videojs/video.js/blob/m
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_defined in_: [src/js/tracks.js#L204](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L204)
|
||||
_defined in_: [src/js/tracks.js#L208](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L208)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -639,7 +702,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -659,7 +722,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -668,7 +731,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# vjs.TextTrackButton
|
||||
|
||||
__EXTENDS__: [vjs.MenuButton](vjs.MenuButton.md)
|
||||
__DEFINED IN__: [src/js/tracks.js#L807](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L807)
|
||||
__DEFINED IN__: [src/js/tracks.js#L796](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L796)
|
||||
|
||||
The base class for buttons that toggle specific text track types (e.g. subtitles)
|
||||
|
||||
@@ -26,21 +26,22 @@ The base class for buttons that toggle specific text track types (e.g. subtitles
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -81,7 +82,7 @@ The base class for buttons that toggle specific text track types (e.g. subtitles
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -94,7 +95,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -113,7 +114,7 @@ _inherited from_: [src/js/menu.js#L157](https://github.com/videojs/video.js/blob
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -124,7 +125,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -138,7 +139,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -159,14 +160,14 @@ _inherited from_: [src/js/menu.js#L154](https://github.com/videojs/video.js/blob
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -178,7 +179,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -205,7 +206,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -218,7 +219,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -231,7 +232,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -251,7 +265,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -261,7 +275,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -273,7 +287,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -283,7 +297,7 @@ _inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js
|
||||
* __player__
|
||||
* __options__
|
||||
|
||||
_defined in_: [src/js/tracks.js#L809](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L809)
|
||||
_defined in_: [src/js/tracks.js#L798](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L798)
|
||||
|
||||
---
|
||||
|
||||
@@ -297,8 +311,30 @@ _defined in_: [src/js/tracks.js#L809](https://github.com/videojs/video.js/blob/m
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -310,60 +346,96 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -411,7 +483,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -421,7 +493,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -437,7 +509,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -448,7 +520,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -461,7 +533,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -471,23 +543,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -497,7 +569,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -517,7 +589,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -526,7 +598,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# vjs.TextTrackDisplay
|
||||
|
||||
__EXTENDS__: [vjs.Component](vjs.Component.md)
|
||||
__DEFINED IN__: [src/js/tracks.js#L710](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L710)
|
||||
__DEFINED IN__: [src/js/tracks.js#L699](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L699)
|
||||
|
||||
The component for displaying text track cues
|
||||
|
||||
@@ -25,21 +25,22 @@ The component for displaying text track cues
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -80,7 +81,7 @@ The component for displaying text track cues
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -93,7 +94,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -103,7 +104,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -115,7 +116,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -126,7 +127,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -140,7 +141,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -154,14 +155,14 @@ _inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -173,7 +174,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -200,7 +201,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -213,7 +214,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -226,7 +227,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -246,7 +260,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -256,7 +270,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -268,7 +282,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -279,7 +293,7 @@ _inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js
|
||||
* __options__
|
||||
* __ready__
|
||||
|
||||
_defined in_: [src/js/tracks.js#L712](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L712)
|
||||
_defined in_: [src/js/tracks.js#L701](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L701)
|
||||
|
||||
---
|
||||
|
||||
@@ -293,8 +307,30 @@ _defined in_: [src/js/tracks.js#L712](https://github.com/videojs/video.js/blob/m
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -306,60 +342,96 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -407,7 +479,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -417,7 +489,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -433,7 +505,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -444,7 +516,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -457,7 +529,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -467,23 +539,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -493,7 +565,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -513,7 +585,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -522,7 +594,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# vjs.TextTrackMenuItem
|
||||
|
||||
__EXTENDS__: [vjs.MenuItem](vjs.MenuItem.md)
|
||||
__DEFINED IN__: [src/js/tracks.js#L737](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L737)
|
||||
__DEFINED IN__: [src/js/tracks.js#L726](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L726)
|
||||
|
||||
The specific menu item type for selecting a language within a text track kind
|
||||
|
||||
@@ -25,15 +25,16 @@ The specific menu item type for selecting a language within a text track kind
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [onClick](#onclick) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
@@ -41,7 +42,7 @@ The specific menu item type for selecting a language within a text track kind
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [selected](#selected-selected-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -82,7 +83,7 @@ The specific menu item type for selecting a language within a text track kind
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -95,7 +96,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -105,7 +106,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -117,7 +118,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -128,7 +129,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -153,14 +154,14 @@ _inherited from_: [src/js/menu.js#L64](https://github.com/videojs/video.js/blob/
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -172,7 +173,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -199,7 +200,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -212,7 +213,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -225,7 +226,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -245,7 +259,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -255,7 +269,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -267,7 +281,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -277,7 +291,7 @@ _inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js
|
||||
* __player__
|
||||
* __options__
|
||||
|
||||
_defined in_: [src/js/tracks.js#L739](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L739)
|
||||
_defined in_: [src/js/tracks.js#L728](https://github.com/videojs/video.js/blob/master/src/js/tracks.js#L728)
|
||||
|
||||
---
|
||||
|
||||
@@ -291,8 +305,30 @@ _defined in_: [src/js/tracks.js#L739](https://github.com/videojs/video.js/blob/m
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -304,46 +340,73 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
@@ -354,17 +417,26 @@ _inherited from_: [src/js/menu.js#L74](https://github.com/videojs/video.js/blob/
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -412,7 +484,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -422,7 +494,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -438,7 +510,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -449,7 +521,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -462,7 +534,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -482,23 +554,23 @@ _inherited from_: [src/js/menu.js#L82](https://github.com/videojs/video.js/blob/
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -508,7 +580,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -528,7 +600,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -537,7 +609,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
+123
-51
@@ -27,21 +27,22 @@ Can be hidden if it's not needed in the design.
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -82,7 +83,7 @@ Can be hidden if it's not needed in the design.
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -95,7 +96,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -105,7 +106,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -117,7 +118,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -128,7 +129,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -142,7 +143,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -156,14 +157,14 @@ _inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -175,7 +176,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -202,7 +203,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -215,7 +216,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -228,7 +229,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -248,7 +262,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -258,7 +272,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -270,7 +284,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -294,8 +308,30 @@ _defined in_: [src/js/control-bar/time-display.js#L90](https://github.com/videoj
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -307,60 +343,96 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -408,7 +480,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -418,7 +490,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -434,7 +506,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -445,7 +517,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -458,7 +530,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -468,23 +540,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -494,7 +566,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -514,7 +586,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -523,7 +595,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
+124
-52
@@ -25,22 +25,23 @@ The bar that contains the volume level and can be clicked on to adjust the level
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [onClick](#onclick-event-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -81,7 +82,7 @@ The bar that contains the volume level and can be clicked on to adjust the level
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -94,7 +95,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -104,7 +105,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -116,7 +117,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -127,7 +128,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -141,7 +142,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -155,14 +156,14 @@ _inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -174,7 +175,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -201,7 +202,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -214,7 +215,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -227,7 +228,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -247,7 +261,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -257,7 +271,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -269,7 +283,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -293,8 +307,30 @@ _defined in_: [src/js/control-bar/volume-control.js#L48](https://github.com/vide
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -306,46 +342,73 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
@@ -356,21 +419,30 @@ _inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __event__ `Object` Event object
|
||||
|
||||
_inherited from_: [src/js/slider.js#L200](https://github.com/videojs/video.js/blob/master/src/js/slider.js#L200)
|
||||
_inherited from_: [src/js/slider.js#L212](https://github.com/videojs/video.js/blob/master/src/js/slider.js#L212)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -418,7 +490,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -428,7 +500,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -444,7 +516,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -455,7 +527,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -468,7 +540,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -478,23 +550,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -504,7 +576,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -524,7 +596,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -533,7 +605,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
+123
-51
@@ -25,21 +25,22 @@ The component for controlling the volume level
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -80,7 +81,7 @@ The component for controlling the volume level
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -93,7 +94,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -103,7 +104,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -115,7 +116,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -126,7 +127,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -140,7 +141,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -154,14 +155,14 @@ _inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -173,7 +174,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -200,7 +201,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -213,7 +214,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -226,7 +227,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -246,7 +260,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -256,7 +270,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -268,7 +282,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -292,8 +306,30 @@ _defined in_: [src/js/control-bar/volume-control.js#L10](https://github.com/vide
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -305,60 +341,96 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -406,7 +478,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -416,7 +488,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -432,7 +504,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -443,7 +515,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -456,7 +528,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -466,23 +538,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -492,7 +564,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -512,7 +584,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -521,7 +593,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
+124
-52
@@ -3,7 +3,7 @@
|
||||
# vjs.VolumeHandle
|
||||
|
||||
__EXTENDS__: [vjs.SliderHandle](vjs.SliderHandle.md)
|
||||
__DEFINED IN__: [src/js/control-bar/volume-control.js#L132](https://github.com/videojs/video.js/blob/master/src/js/control-bar/volume-control.js#L132)
|
||||
__DEFINED IN__: [src/js/control-bar/volume-control.js#L131](https://github.com/videojs/video.js/blob/master/src/js/control-bar/volume-control.js#L131)
|
||||
|
||||
The volume handle can be dragged to adjust the volume level
|
||||
|
||||
@@ -24,22 +24,23 @@ The volume handle can be dragged to adjust the volume level
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [init](#init-player-options-ready-) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -80,7 +81,7 @@ The volume handle can be dragged to adjust the volume level
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -93,7 +94,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -103,7 +104,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -115,7 +116,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -126,7 +127,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -137,7 +138,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
* __tagName__ `String` _(OPTIONAL)_ Element's node type. e.g. 'div'
|
||||
* __attributes__ `Object` _(OPTIONAL)_ An object of element attributes that should be set on the element
|
||||
|
||||
_defined in_: [src/js/control-bar/volume-control.js#L137](https://github.com/videojs/video.js/blob/master/src/js/control-bar/volume-control.js#L137)
|
||||
_defined in_: [src/js/control-bar/volume-control.js#L136](https://github.com/videojs/video.js/blob/master/src/js/control-bar/volume-control.js#L136)
|
||||
|
||||
---
|
||||
|
||||
@@ -151,14 +152,14 @@ _defined in_: [src/js/control-bar/volume-control.js#L137](https://github.com/vid
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -170,7 +171,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -197,7 +198,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -210,7 +211,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -223,7 +224,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -243,7 +257,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -253,7 +267,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -265,7 +279,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -291,8 +305,30 @@ _inherited from_: [src/js/component.js#L41](https://github.com/videojs/video.js/
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -304,60 +340,96 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -405,7 +477,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -415,7 +487,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -431,7 +503,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -442,7 +514,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -455,7 +527,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -465,23 +537,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -491,7 +563,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -511,7 +583,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -520,7 +592,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
+125
-53
@@ -3,7 +3,7 @@
|
||||
# vjs.VolumeLevel
|
||||
|
||||
__EXTENDS__: [vjs.Component](vjs.Component.md)
|
||||
__DEFINED IN__: [src/js/control-bar/volume-control.js#L111](https://github.com/videojs/video.js/blob/master/src/js/control-bar/volume-control.js#L111)
|
||||
__DEFINED IN__: [src/js/control-bar/volume-control.js#L110](https://github.com/videojs/video.js/blob/master/src/js/control-bar/volume-control.js#L110)
|
||||
|
||||
Shows volume level
|
||||
|
||||
@@ -25,21 +25,22 @@ Shows volume level
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -80,7 +81,7 @@ Shows volume level
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -93,7 +94,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -103,7 +104,7 @@ _inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String` The constructed class name
|
||||
|
||||
_inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js/blob/master/src/js/component.js#L475)
|
||||
_inherited from_: [src/js/component.js#L536](https://github.com/videojs/video.js/blob/master/src/js/component.js#L536)
|
||||
|
||||
---
|
||||
|
||||
@@ -115,7 +116,7 @@ _inherited from_: [src/js/component.js#L475](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -126,7 +127,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -140,7 +141,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -154,14 +155,14 @@ _inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -173,7 +174,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -200,7 +201,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -213,7 +214,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -226,7 +227,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -246,7 +260,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -256,7 +270,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -268,7 +282,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -278,7 +292,7 @@ _inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js
|
||||
* __player__
|
||||
* __options__
|
||||
|
||||
_defined in_: [src/js/control-bar/volume-control.js#L113](https://github.com/videojs/video.js/blob/master/src/js/control-bar/volume-control.js#L113)
|
||||
_defined in_: [src/js/control-bar/volume-control.js#L112](https://github.com/videojs/video.js/blob/master/src/js/control-bar/volume-control.js#L112)
|
||||
|
||||
---
|
||||
|
||||
@@ -292,8 +306,30 @@ _defined in_: [src/js/control-bar/volume-control.js#L113](https://github.com/vid
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -305,60 +341,96 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -406,7 +478,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -416,7 +488,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -432,7 +504,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -443,7 +515,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -456,7 +528,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -466,23 +538,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -492,7 +564,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -512,7 +584,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -521,7 +593,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -26,21 +26,22 @@ Menu button with a popup for showing the volume slider.
|
||||
- [enableTouchActivity](#enabletouchactivity) _`inherited`_
|
||||
- [getChild](#getchild-name-) _`inherited`_
|
||||
- [getChildById](#getchildbyid-id-) _`inherited`_
|
||||
- [hasClass](#hasclass-classtocheck-) _`inherited`_
|
||||
- [height](#height-num-skiplisteners-) _`inherited`_
|
||||
- [hide](#hide) _`inherited`_
|
||||
- [id](#id) _`inherited`_
|
||||
- [initChildren](#initchildren) _`inherited`_
|
||||
- [name](#name) _`inherited`_
|
||||
- [off](#off-type-fn-) _`inherited`_
|
||||
- [on](#on-type-fn-) _`inherited`_
|
||||
- [one](#one-type-fn-) _`inherited`_
|
||||
- [off](#off-first-second-third-) _`inherited`_
|
||||
- [on](#on-first-second-third-) _`inherited`_
|
||||
- [one](#one-first-second-third-) _`inherited`_
|
||||
- [options](#options-obj-) _`inherited`_
|
||||
- [player](#player) _`inherited`_
|
||||
- [ready](#ready-fn-) _`inherited`_
|
||||
- [removeChild](#removechild-component-) _`inherited`_
|
||||
- [removeClass](#removeclass-classtoremove-) _`inherited`_
|
||||
- [show](#show) _`inherited`_
|
||||
- [trigger](#trigger-type-event-) _`inherited`_
|
||||
- [trigger](#trigger-event-) _`inherited`_
|
||||
- [triggerReady](#triggerready) _`inherited`_
|
||||
- [width](#width-num-skiplisteners-) _`inherited`_
|
||||
|
||||
@@ -81,7 +82,7 @@ Menu button with a popup for showing the volume slider.
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The child component (created by this process if a string was used)
|
||||
|
||||
_inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js/blob/master/src/js/component.js#L347)
|
||||
_inherited from_: [src/js/component.js#L362](https://github.com/videojs/video.js/blob/master/src/js/component.js#L362)
|
||||
|
||||
---
|
||||
|
||||
@@ -94,7 +95,7 @@ _inherited from_: [src/js/component.js#L347](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L632](https://github.com/videojs/video.js/blob/master/src/js/component.js#L632)
|
||||
_inherited from_: [src/js/component.js#L826](https://github.com/videojs/video.js/blob/master/src/js/component.js#L826)
|
||||
|
||||
---
|
||||
|
||||
@@ -113,7 +114,7 @@ _inherited from_: [src/js/menu.js#L157](https://github.com/videojs/video.js/blob
|
||||
##### RETURNS:
|
||||
* `Array` The children
|
||||
|
||||
_inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js/blob/master/src/js/component.js#L281)
|
||||
_inherited from_: [src/js/component.js#L296](https://github.com/videojs/video.js/blob/master/src/js/component.js#L296)
|
||||
|
||||
---
|
||||
|
||||
@@ -124,7 +125,7 @@ _inherited from_: [src/js/component.js#L281](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js/blob/master/src/js/component.js#L224)
|
||||
_inherited from_: [src/js/component.js#L239](https://github.com/videojs/video.js/blob/master/src/js/component.js#L239)
|
||||
|
||||
---
|
||||
|
||||
@@ -138,7 +139,7 @@ _inherited from_: [src/js/component.js#L224](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L194](https://github.com/videojs/video.js/blob/master/src/js/component.js#L194)
|
||||
_inherited from_: [src/js/component.js#L200](https://github.com/videojs/video.js/blob/master/src/js/component.js#L200)
|
||||
|
||||
---
|
||||
|
||||
@@ -159,14 +160,14 @@ _inherited from_: [src/js/menu.js#L154](https://github.com/videojs/video.js/blob
|
||||
##### RETURNS:
|
||||
* `vjs.Component` The component
|
||||
|
||||
_inherited from_: [src/js/component.js#L744](https://github.com/videojs/video.js/blob/master/src/js/component.js#L744)
|
||||
_inherited from_: [src/js/component.js#L938](https://github.com/videojs/video.js/blob/master/src/js/component.js#L938)
|
||||
|
||||
---
|
||||
|
||||
### dispose()
|
||||
> Dispose of the component and all child components
|
||||
|
||||
_inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/blob/master/src/js/component.js#L78)
|
||||
_inherited from_: [src/js/component.js#L84](https://github.com/videojs/video.js/blob/master/src/js/component.js#L84)
|
||||
|
||||
---
|
||||
|
||||
@@ -178,7 +179,7 @@ _inherited from_: [src/js/component.js#L78](https://github.com/videojs/video.js/
|
||||
##### RETURNS:
|
||||
* `Element`
|
||||
|
||||
_inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js/blob/master/src/js/component.js#L205)
|
||||
_inherited from_: [src/js/component.js#L220](https://github.com/videojs/video.js/blob/master/src/js/component.js#L220)
|
||||
|
||||
---
|
||||
|
||||
@@ -205,7 +206,7 @@ _inherited from_: [src/js/component.js#L205](https://github.com/videojs/video.js
|
||||
> whenever touch events happen, and this can be turned off by components that
|
||||
> want touch events to act differently.
|
||||
|
||||
_inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js/blob/master/src/js/component.js#L897)
|
||||
_inherited from_: [src/js/component.js#L1120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1120)
|
||||
|
||||
---
|
||||
|
||||
@@ -218,7 +219,7 @@ _inherited from_: [src/js/component.js#L897](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js/blob/master/src/js/component.js#L315)
|
||||
_inherited from_: [src/js/component.js#L330](https://github.com/videojs/video.js/blob/master/src/js/component.js#L330)
|
||||
|
||||
---
|
||||
|
||||
@@ -231,7 +232,20 @@ _inherited from_: [src/js/component.js#L315](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js/blob/master/src/js/component.js#L298)
|
||||
_inherited from_: [src/js/component.js#L313](https://github.com/videojs/video.js/blob/master/src/js/component.js#L313)
|
||||
|
||||
---
|
||||
|
||||
### hasClass( classToCheck )
|
||||
> Check if a component's element has a CSS class name
|
||||
|
||||
##### PARAMETERS:
|
||||
* __classToCheck__ `String` Classname to check
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L816](https://github.com/videojs/video.js/blob/master/src/js/component.js#L816)
|
||||
|
||||
---
|
||||
|
||||
@@ -251,7 +265,7 @@ _inherited from_: [src/js/component.js#L298](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the height
|
||||
* `Number|String` The height, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js/blob/master/src/js/component.js#L733)
|
||||
_inherited from_: [src/js/component.js#L927](https://github.com/videojs/video.js/blob/master/src/js/component.js#L927)
|
||||
|
||||
---
|
||||
|
||||
@@ -261,7 +275,7 @@ _inherited from_: [src/js/component.js#L733](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js/blob/master/src/js/component.js#L663)
|
||||
_inherited from_: [src/js/component.js#L857](https://github.com/videojs/video.js/blob/master/src/js/component.js#L857)
|
||||
|
||||
---
|
||||
|
||||
@@ -273,7 +287,7 @@ _inherited from_: [src/js/component.js#L663](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L243](https://github.com/videojs/video.js/blob/master/src/js/component.js#L243)
|
||||
_inherited from_: [src/js/component.js#L258](https://github.com/videojs/video.js/blob/master/src/js/component.js#L258)
|
||||
|
||||
---
|
||||
|
||||
@@ -297,8 +311,30 @@ _defined in_: [src/js/control-bar/volume-menu-button.js#L7](https://github.com/v
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
>
|
||||
> // Or when creating the component
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: {
|
||||
> myChildComponent: {
|
||||
> myChildOption: true
|
||||
> }
|
||||
> }
|
||||
> });
|
||||
>
|
||||
> The children option can also be an Array of child names or
|
||||
> child options objects (that also include a 'name' key).
|
||||
>
|
||||
> var myComp = new MyComponent(player, {
|
||||
> children: [
|
||||
> 'button',
|
||||
> {
|
||||
> name: 'button',
|
||||
> someOtherOption: true
|
||||
> }
|
||||
> ]
|
||||
> });
|
||||
|
||||
_inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js/blob/master/src/js/component.js#L443)
|
||||
_inherited from_: [src/js/component.js#L481](https://github.com/videojs/video.js/blob/master/src/js/component.js#L481)
|
||||
|
||||
---
|
||||
|
||||
@@ -310,60 +346,96 @@ _inherited from_: [src/js/component.js#L443](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `String`
|
||||
|
||||
_inherited from_: [src/js/component.js#L262](https://github.com/videojs/video.js/blob/master/src/js/component.js#L262)
|
||||
_inherited from_: [src/js/component.js#L277](https://github.com/videojs/video.js/blob/master/src/js/component.js#L277)
|
||||
|
||||
---
|
||||
|
||||
### off( [type], [fn] )
|
||||
> Remove an event listener from the component's element
|
||||
### off( [first], [second], [third] )
|
||||
> Remove an event listener from this component's element
|
||||
>
|
||||
> myComponent.off("eventName", myFunc);
|
||||
> myComponent.off('eventType', myFunc);
|
||||
>
|
||||
> If myFunc is excluded, ALL listeners for the event type will be removed.
|
||||
> If eventType is excluded, ALL listeners will be removed from the component.
|
||||
>
|
||||
> Alternatively you can use `off` to remove listeners that were added to other
|
||||
> elements or components using `myComponent.on(otherComponent...`.
|
||||
> In this case both the event type and listener function are REQUIRED.
|
||||
>
|
||||
> myComponent.off(otherElement, 'eventType', myFunc);
|
||||
> myComponent.off(otherComponent, 'eventType', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` _(OPTIONAL)_ Event type. Without type it will remove all listeners.
|
||||
* __fn__ `Function` _(OPTIONAL)_ Event listener. Without fn it will remove all listeners for a type.
|
||||
* __first__ `String|vjs.Component` _(OPTIONAL)_ The event type or other component
|
||||
* __second__ `Function|String` _(OPTIONAL)_ The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L514](https://github.com/videojs/video.js/blob/master/src/js/component.js#L514)
|
||||
_inherited from_: [src/js/component.js#L646](https://github.com/videojs/video.js/blob/master/src/js/component.js#L646)
|
||||
|
||||
---
|
||||
|
||||
### on( type, fn )
|
||||
### on( first, second, third )
|
||||
> Add an event listener to this component's element
|
||||
>
|
||||
> var myFunc = function(){
|
||||
> var myPlayer = this;
|
||||
> var myComponent = this;
|
||||
> // Do something when the event is fired
|
||||
> };
|
||||
>
|
||||
> myPlayer.on("eventName", myFunc);
|
||||
> myComponent.on('eventType', myFunc);
|
||||
>
|
||||
> The context will be the component.
|
||||
> The context of myFunc will be myComponent unless previously bound.
|
||||
>
|
||||
> Alternatively, you can add a listener to another element or component.
|
||||
>
|
||||
> myComponent.on(otherElement, 'eventName', myFunc);
|
||||
> myComponent.on(otherComponent, 'eventName', myFunc);
|
||||
>
|
||||
> The benefit of using this over `vjs.on(otherElement, 'eventName', myFunc)`
|
||||
> and `otherComponent.on('eventName', myFunc)` is that this way the listeners
|
||||
> will be automatically cleaned up when either component is diposed.
|
||||
> It will also bind myComponent as the context of myFunc.
|
||||
>
|
||||
> **NOTE**: When using this on elements in the page other than window
|
||||
> and document (both permanent), if you remove the element from the DOM
|
||||
> you need to call `vjs.trigger(el, 'dispose')` on it to clean up
|
||||
> references to it and allow the browser to garbage collect it.
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type e.g. 'click'
|
||||
* __fn__ `Function` The event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The event handler or event type
|
||||
* __third__ `Function` The event handler
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L500](https://github.com/videojs/video.js/blob/master/src/js/component.js#L500)
|
||||
_inherited from_: [src/js/component.js#L577](https://github.com/videojs/video.js/blob/master/src/js/component.js#L577)
|
||||
|
||||
---
|
||||
|
||||
### one( type, fn )
|
||||
### one( first, second, [third] )
|
||||
> Add an event listener to be triggered only once and then removed
|
||||
>
|
||||
> myComponent.one('eventName', myFunc);
|
||||
>
|
||||
> Alternatively you can add a listener to another element or component
|
||||
> that will be triggered only once.
|
||||
>
|
||||
> myComponent.one(otherElement, 'eventName', myFunc);
|
||||
> myComponent.one(otherComponent, 'eventName', myFunc);
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` Event type
|
||||
* __fn__ `Function` Event listener
|
||||
* __first__ `String|vjs.Component` The event type or other component
|
||||
* __second__ `Function|String` The listener function or event type
|
||||
* __third__ `Function` _(OPTIONAL)_ The listener function for other component
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js/blob/master/src/js/component.js#L526)
|
||||
_inherited from_: [src/js/component.js#L691](https://github.com/videojs/video.js/blob/master/src/js/component.js#L691)
|
||||
|
||||
---
|
||||
|
||||
@@ -411,7 +483,7 @@ _inherited from_: [src/js/component.js#L526](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `Object` A NEW object of this.options_ and obj merged
|
||||
|
||||
_inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js/blob/master/src/js/component.js#L173)
|
||||
_inherited from_: [src/js/component.js#L179](https://github.com/videojs/video.js/blob/master/src/js/component.js#L179)
|
||||
|
||||
---
|
||||
|
||||
@@ -421,7 +493,7 @@ _inherited from_: [src/js/component.js#L173](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Player`
|
||||
|
||||
_inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js/blob/master/src/js/component.js#L120)
|
||||
_inherited from_: [src/js/component.js#L126](https://github.com/videojs/video.js/blob/master/src/js/component.js#L126)
|
||||
|
||||
---
|
||||
|
||||
@@ -437,7 +509,7 @@ _inherited from_: [src/js/component.js#L120](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js/blob/master/src/js/component.js#L585)
|
||||
_inherited from_: [src/js/component.js#L769](https://github.com/videojs/video.js/blob/master/src/js/component.js#L769)
|
||||
|
||||
---
|
||||
|
||||
@@ -448,7 +520,7 @@ _inherited from_: [src/js/component.js#L585](https://github.com/videojs/video.js
|
||||
##### PARAMETERS:
|
||||
* __component__ `vjs.Component` Component to remove
|
||||
|
||||
_inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js/blob/master/src/js/component.js#L405)
|
||||
_inherited from_: [src/js/component.js#L420](https://github.com/videojs/video.js/blob/master/src/js/component.js#L420)
|
||||
|
||||
---
|
||||
|
||||
@@ -461,7 +533,7 @@ _inherited from_: [src/js/component.js#L405](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js/blob/master/src/js/component.js#L643)
|
||||
_inherited from_: [src/js/component.js#L837](https://github.com/videojs/video.js/blob/master/src/js/component.js#L837)
|
||||
|
||||
---
|
||||
|
||||
@@ -471,23 +543,23 @@ _inherited from_: [src/js/component.js#L643](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L653](https://github.com/videojs/video.js/blob/master/src/js/component.js#L653)
|
||||
_inherited from_: [src/js/component.js#L847](https://github.com/videojs/video.js/blob/master/src/js/component.js#L847)
|
||||
|
||||
---
|
||||
|
||||
### trigger( type, event )
|
||||
### trigger( event )
|
||||
> Trigger an event on an element
|
||||
>
|
||||
> myComponent.trigger('eventName');
|
||||
> myComponent.trigger({'type':'eventName'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __type__ `String` The event type to trigger, e.g. 'click'
|
||||
* __event__ `Event|Object` The event object to be passed to the listener
|
||||
* __event__ `Event|Object|String` A string (the type) or an event object with a type attribute
|
||||
|
||||
##### RETURNS:
|
||||
* `vjs.Component` self
|
||||
|
||||
_inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js/blob/master/src/js/component.js#L540)
|
||||
_inherited from_: [src/js/component.js#L724](https://github.com/videojs/video.js/blob/master/src/js/component.js#L724)
|
||||
|
||||
---
|
||||
|
||||
@@ -497,7 +569,7 @@ _inherited from_: [src/js/component.js#L540](https://github.com/videojs/video.js
|
||||
##### RETURNS:
|
||||
* `vjs.Component`
|
||||
|
||||
_inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js/blob/master/src/js/component.js#L604)
|
||||
_inherited from_: [src/js/component.js#L788](https://github.com/videojs/video.js/blob/master/src/js/component.js#L788)
|
||||
|
||||
---
|
||||
|
||||
@@ -517,7 +589,7 @@ _inherited from_: [src/js/component.js#L604](https://github.com/videojs/video.js
|
||||
* `vjs.Component` This component, when setting the width
|
||||
* `Number|String` The width, when getting
|
||||
|
||||
_inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js/blob/master/src/js/component.js#L716)
|
||||
_inherited from_: [src/js/component.js#L910](https://github.com/videojs/video.js/blob/master/src/js/component.js#L910)
|
||||
|
||||
---
|
||||
|
||||
@@ -526,7 +598,7 @@ _inherited from_: [src/js/component.js#L716](https://github.com/videojs/video.js
|
||||
### resize `EVENT`
|
||||
> Fired when the width and/or height of the component changes
|
||||
|
||||
_inherited from_: [src/js/component.js#L823](https://github.com/videojs/video.js/blob/master/src/js/component.js#L823)
|
||||
_inherited from_: [src/js/component.js#L1020](https://github.com/videojs/video.js/blob/master/src/js/component.js#L1020)
|
||||
|
||||
---
|
||||
|
||||
|
||||
+43
-5
@@ -21,6 +21,11 @@ The `vjs` function can be used to initialize or retrieve a player.
|
||||
- [options](#options)
|
||||
- [players](#players)
|
||||
|
||||
- [METHODS](#methods)
|
||||
- [addLanguage](#addlanguage-code-data-)
|
||||
- [parseUrl](#parseurl-url-)
|
||||
- [plugin](#plugin-name-init-)
|
||||
|
||||
- CLASSES
|
||||
- [BigPlayButton](vjs.BigPlayButton.md)
|
||||
- [Button](vjs.Button.md)
|
||||
@@ -34,11 +39,14 @@ The `vjs` function can be used to initialize or retrieve a player.
|
||||
- [CoreObject](vjs.CoreObject.md)
|
||||
- [CurrentTimeDisplay](vjs.CurrentTimeDisplay.md)
|
||||
- [DurationDisplay](vjs.DurationDisplay.md)
|
||||
- [ErrorDisplay](vjs.ErrorDisplay.md)
|
||||
- [Flash](vjs.Flash.md)
|
||||
- [FullscreenToggle](vjs.FullscreenToggle.md)
|
||||
- [Html5](vjs.Html5.md)
|
||||
- [LiveDisplay](vjs.LiveDisplay.md)
|
||||
- [LoadProgressBar](vjs.LoadProgressBar.md)
|
||||
- [LoadingSpinner](vjs.LoadingSpinner.md)
|
||||
- [MediaError](vjs.MediaError.md)
|
||||
- [MediaLoader](vjs.MediaLoader.md)
|
||||
- [MediaTechController](vjs.MediaTechController.md)
|
||||
- [Menu](vjs.Menu.md)
|
||||
@@ -48,6 +56,8 @@ The `vjs` function can be used to initialize or retrieve a player.
|
||||
- [OffTextTrackMenuItem](vjs.OffTextTrackMenuItem.md)
|
||||
- [PlayProgressBar](vjs.PlayProgressBar.md)
|
||||
- [PlayToggle](vjs.PlayToggle.md)
|
||||
- [PlaybackRateMenuButton](vjs.PlaybackRateMenuButton.md)
|
||||
- [PlaybackRateMenuItem](vjs.PlaybackRateMenuItem.md)
|
||||
- [Player](vjs.Player.md)
|
||||
- [PosterImage](vjs.PosterImage.md)
|
||||
- [ProgressControl](vjs.ProgressControl.md)
|
||||
@@ -70,11 +80,9 @@ The `vjs` function can be used to initialize or retrieve a player.
|
||||
- [VolumeMenuButton](vjs.VolumeMenuButton.md)
|
||||
|
||||
- NAMESPACES
|
||||
- [log](vjs.log.md)
|
||||
- [util](vjs.util.md)
|
||||
|
||||
- [METHODS](#methods)
|
||||
- [plugin](#plugin-name-init-)
|
||||
|
||||
---
|
||||
|
||||
## PROPERTIES
|
||||
@@ -85,19 +93,49 @@ The `vjs` function can be used to initialize or retrieve a player.
|
||||
> All options should use string keys so they avoid
|
||||
> renaming by closure compiler
|
||||
|
||||
_defined in_: [src/js/core.js#L77](https://github.com/videojs/video.js/blob/master/src/js/core.js#L77)
|
||||
_defined in_: [src/js/core.js#L76](https://github.com/videojs/video.js/blob/master/src/js/core.js#L76)
|
||||
|
||||
---
|
||||
|
||||
### players
|
||||
> Global player list
|
||||
|
||||
_defined in_: [src/js/core.js#L118](https://github.com/videojs/video.js/blob/master/src/js/core.js#L118)
|
||||
_defined in_: [src/js/core.js#L147](https://github.com/videojs/video.js/blob/master/src/js/core.js#L147)
|
||||
|
||||
---
|
||||
|
||||
## METHODS
|
||||
|
||||
### addLanguage( code, data )
|
||||
> Utility function for adding languages to the default options. Useful for
|
||||
> amending multiple language support at runtime.
|
||||
>
|
||||
> Example: vjs.addLanguage('es', {'Hello':'Hola'});
|
||||
|
||||
##### PARAMETERS:
|
||||
* __code__ `String` The language code or dictionary property
|
||||
* __data__ `Object` The data values to be translated
|
||||
|
||||
##### RETURNS:
|
||||
* `Object` The resulting global languages dictionary object
|
||||
|
||||
_defined in_: [src/js/core.js#L134](https://github.com/videojs/video.js/blob/master/src/js/core.js#L134)
|
||||
|
||||
---
|
||||
|
||||
### parseUrl( url )
|
||||
> Resolve and parse the elements of a URL
|
||||
|
||||
##### PARAMETERS:
|
||||
* __url__ `String` The url to parse
|
||||
|
||||
##### RETURNS:
|
||||
* `Object` An object of url details
|
||||
|
||||
_defined in_: [src/js/lib.js#L746](https://github.com/videojs/video.js/blob/master/src/js/lib.js#L746)
|
||||
|
||||
---
|
||||
|
||||
### plugin( name, init )
|
||||
> the method for registering a video.js plugin
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
### ApiMethods
|
||||
> List of default API methods for any MediaTechController
|
||||
|
||||
_defined in_: [src/js/media/media.js#L168](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L168)
|
||||
_defined in_: [src/js/media/media.js#L169](https://github.com/videojs/video.js/blob/master/src/js/media/media.js#L169)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -0,0 +1,304 @@
|
||||
Languages
|
||||
=========
|
||||
|
||||
Multiple language support allows for users of non-English locales to natively interact with the displayed player. Video.js will compile multiple langauge files (see below) and instantiate with a global dictionary of language key/value support. Video.js player instances can be created with per-player language support that amends/overrides this default values. Player instances can also hard-set default languges to values other than English as of version 4.7.
|
||||
|
||||
Creating the Language File
|
||||
--------------------------
|
||||
Video.js uses key/value object dictionaries in JSON form. A sample dictionary for Spanish ['es'] would look as follows;
|
||||
|
||||
```JSON
|
||||
{
|
||||
"Play": "Reproducción",
|
||||
"Pause": "Pausa",
|
||||
"Current Time": "Tiempo reproducido",
|
||||
"Duration Time": "Duración total",
|
||||
"Remaining Time": "Tiempo restante",
|
||||
"Stream Type": "Tipo de secuencia",
|
||||
"LIVE": "DIRECTO",
|
||||
"Loaded": "Cargado",
|
||||
"Progress": "Progreso",
|
||||
"Fullscreen": "Pantalla completa",
|
||||
"Non-Fullscreen": "Pantalla no completa",
|
||||
"Mute": "Silenciar",
|
||||
"Unmuted": "No silenciado",
|
||||
"Playback Rate": "Velocidad de reproducción",
|
||||
"Subtitles": "Subtítulos",
|
||||
"subtitles off": "Subtítulos desactivados",
|
||||
"Captions": "Subtítulos especiales",
|
||||
"captions off": "Subtítulos especiales desactivados",
|
||||
"Chapters": "Capítulos",
|
||||
"You aborted the video playback": "Ha interrumpido la reproducción del vídeo.",
|
||||
"A network error caused the video download to fail part-way.": "Un error de red ha interrumpido la descarga del vídeo.",
|
||||
"The video could not be loaded, either because the server or network failed or because the format is not supported.": "No se ha podido cargar el vídeo debido a un fallo de red o del servidor o porque el formato es incompatible.",
|
||||
"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "La reproducción de vídeo se ha interrumpido por un problema de corrupción de datos o porque el vídeo precisa funciones que su navegador no ofrece.",
|
||||
"No compatible source was found for this video.": "No se ha encontrado ninguna fuente compatible con este vídeo."
|
||||
}
|
||||
```
|
||||
|
||||
Notes:
|
||||
|
||||
- The file name should always be in the format XX.json, where XX is the two letter value of the language reported to the browser (for options see the bottom of this document).
|
||||
- For automatic inclusion at build time, add your language file to the /lang directory (see 'Adding Languages to Video.js below').
|
||||
|
||||
Adding Languages to Video.js
|
||||
----------------------------
|
||||
Additional language support can be added to Video.js in multiple ways.
|
||||
|
||||
1. Create language scripts out of your JSON objects by using our custom grunt task `vjslanguages`. This task is automatically run as part of the default grunt task in Video.JS, but can be configured to match your src/dist directories if different. Once these scripts are created, just add them to your DOM like any other script.
|
||||
|
||||
NOTE: These need to be added after the core Video.js script.
|
||||
|
||||
|
||||
2. Add your JSON objects via the videojs.addLanguage API. Preferably in the HEAD element of your DOM or otherwise prior to player instantiation.
|
||||
|
||||
```html
|
||||
<head>
|
||||
<script>
|
||||
videojs.options.flash.swf = '../node_modules/videojs-swf/dist/video-js.swf';
|
||||
videojs.addLanguage('es', {
|
||||
"Play": "Reproducción",
|
||||
"Pause": "Pausa",
|
||||
"Current Time": "Tiempo reproducido",
|
||||
"Duration Time": "Duración total",
|
||||
"Remaining Time": "Tiempo restante",
|
||||
"Stream Type": "Tipo de secuencia",
|
||||
"LIVE": "DIRECTO",
|
||||
"Loaded": "Cargado",
|
||||
"Progress": "Progreso",
|
||||
"Fullscreen": "Pantalla completa",
|
||||
"Non-Fullscreen": "Pantalla no completa",
|
||||
"Mute": "Silenciar",
|
||||
"Unmuted": "No silenciado",
|
||||
"Playback Rate": "Velocidad de reproducción",
|
||||
"Subtitles": "Subtítulos",
|
||||
"subtitles off": "Subtítulos desactivados",
|
||||
"Captions": "Subtítulos especiales",
|
||||
"captions off": "Subtítulos especiales desactivados",
|
||||
"Chapters": "Capítulos",
|
||||
"You aborted the video playback": "Ha interrumpido la reproducción del vídeo.",
|
||||
"A network error caused the video download to fail part-way.": "Un error de red ha interrumpido la descarga del vídeo.",
|
||||
"The video could not be loaded, either because the server or network failed or because the format is not supported.": "No se ha podido cargar el vídeo debido a un fallo de red o del servidor o porque el formato es incompatible.",
|
||||
"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "La reproducción de vídeo se ha interrumpido por un problema de corrupción de datos o porque el vídeo precisa funciones que su navegador no ofrece.",
|
||||
"No compatible source was found for this video.": "No se ha encontrado ninguna fuente compatible con este vídeo."
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
```
|
||||
|
||||
3. During a Video.js player instantiation. Adding the languages to the configuration object provided in the data-setup attribute.
|
||||
|
||||
```html
|
||||
<video id="example_video_1" class="video-js vjs-default-skin"
|
||||
controls preload="auto" width="640" height="264"
|
||||
data-setup='{"languages":{"es":{"Play":"Juego"}}}'>
|
||||
<source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4' />
|
||||
<source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm' />
|
||||
<source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg' />
|
||||
|
||||
<track kind="captions" src="http://example.com/path/to/captions.vtt" srclang="en" label="English" default>
|
||||
|
||||
</video>
|
||||
```
|
||||
|
||||
Notes:
|
||||
- This will add your language key/values to the videojs player instances individually. If these values already exist in the global dictionary via the process above, those will be overridden for the player instance in question.
|
||||
|
||||
|
||||
Setting Default Language in a Video.js Player
|
||||
---------------------------------------------
|
||||
During a Video.js player instantiation you can force it to localize to a specific language by including the locale value into the configuration object via the data-setup attribute. Valid options listed at the bottom of the page for reference.
|
||||
|
||||
```html
|
||||
<video id="example_video_1" class="video-js vjs-default-skin"
|
||||
controls preload="auto" width="640" height="264"
|
||||
data-setup='{"language":"es"}'>
|
||||
<source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4' />
|
||||
<source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm' />
|
||||
<source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg' />
|
||||
|
||||
<track kind="captions" src="http://example.com/path/to/captions.vtt" srclang="en" label="English" default>
|
||||
|
||||
</video>
|
||||
```
|
||||
|
||||
Language Codes
|
||||
--------------
|
||||
The following is a list of official language codes.
|
||||
|
||||
**NOTE:** For supported language translations, please see the [Languages Folder (/lang)](../../lang) folder located in the project root.
|
||||
|
||||
<table border="0" cellspacing="5" cellpadding="5">
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<table>
|
||||
<tr><th>ab<th><td>Abkhazian</td></tr>
|
||||
<tr><th>aa<th><td>Afar</td></tr>
|
||||
<tr><th>af<th><td>Afrikaans</td></tr>
|
||||
<tr><th>sq<th><td>Albanian</td></tr>
|
||||
<tr><th>am<th><td>Amharic</td></tr>
|
||||
<tr><th>ar<th><td>Arabic</td></tr>
|
||||
<tr><th>an<th><td>Aragonese</td></tr>
|
||||
<tr><th>hy<th><td>Armenian</td></tr>
|
||||
<tr><th>as<th><td>Assamese</td></tr>
|
||||
<tr><th>ay<th><td>Aymara</td></tr>
|
||||
<tr><th>az<th><td>Azerbaijani</td></tr>
|
||||
<tr><th>ba<th><td>Bashkir</td></tr>
|
||||
<tr><th>eu<th><td>Basque</td></tr>
|
||||
<tr><th>bn<th><td>Bengali (Bangla)</td></tr>
|
||||
<tr><th>dz<th><td>Bhutani</td></tr>
|
||||
<tr><th>bh<th><td>Bihari</td></tr>
|
||||
<tr><th>bi<th><td>Bislama</td></tr>
|
||||
<tr><th>br<th><td>Breton</td></tr>
|
||||
<tr><th>bg<th><td>Bulgarian</td></tr>
|
||||
<tr><th>my<th><td>Burmese</td></tr>
|
||||
<tr><th>be<th><td>Byelorussian (Belarusian)</td></tr>
|
||||
<tr><th>km<th><td>Cambodian</td></tr>
|
||||
<tr><th>ca<th><td>Catalan</td></tr>
|
||||
<tr><th>zh<th><td>Chinese (Simplified)</td></tr>
|
||||
<tr><th>zh<th><td>Chinese (Traditional)</td></tr>
|
||||
<tr><th>co<th><td>Corsican</td></tr>
|
||||
<tr><th>hr<th><td>Croatian</td></tr>
|
||||
<tr><th>cs<th><td>Czech</td></tr>
|
||||
<tr><th>da<th><td>Danish</td></tr>
|
||||
<tr><th>nl<th><td>Dutch</td></tr>
|
||||
<tr><th>en<th><td>English</td></tr>
|
||||
<tr><th>eo<th><td>Esperanto</td></tr>
|
||||
<tr><th>et<th><td>Estonian</td></tr>
|
||||
<tr><th>fo<th><td>Faeroese</td></tr>
|
||||
<tr><th>fa<th><td>Farsi</td></tr>
|
||||
<tr><th>fj<th><td>Fiji</td></tr>
|
||||
<tr><th>fi<th><td>Finnish</td></tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<table>
|
||||
<tr><th>fr<th><td>French</td></tr>
|
||||
<tr><th>fy<th><td>Frisian</td></tr>
|
||||
<tr><th>gl<th><td>Galician</td></tr>
|
||||
<tr><th>gd<th><td>Gaelic (Scottish)</td></tr>
|
||||
<tr><th>gv<th><td>Gaelic (Manx)</td></tr>
|
||||
<tr><th>ka<th><td>Georgian</td></tr>
|
||||
<tr><th>de<th><td>German</td></tr>
|
||||
<tr><th>el<th><td>Greek</td></tr>
|
||||
<tr><th>kl<th><td>Greenlandic</td></tr>
|
||||
<tr><th>gn<th><td>Guarani</td></tr>
|
||||
<tr><th>gu<th><td>Gujarati</td></tr>
|
||||
<tr><th>ht<th><td>Haitian Creole</td></tr>
|
||||
<tr><th>ha<th><td>Hausa</td></tr>
|
||||
<tr><th>he<th><td>Hebrew</td></tr>
|
||||
<tr><th>hi<th><td>Hindi</td></tr>
|
||||
<tr><th>hu<th><td>Hungarian</td></tr>
|
||||
<tr><th>is<th><td>Icelandic</td></tr>
|
||||
<tr><th>io<th><td>Ido</td></tr>
|
||||
<tr><th>id<th><td>Indonesian</td></tr>
|
||||
<tr><th>ia<th><td>Interlingua</td></tr>
|
||||
<tr><th>ie<th><td>Interlingue</td></tr>
|
||||
<tr><th>iu<th><td>Inuktitut</td></tr>
|
||||
<tr><th>ik<th><td>Inupiak</td></tr>
|
||||
<tr><th>ga<th><td>Irish</td></tr>
|
||||
<tr><th>it<th><td>Italian</td></tr>
|
||||
<tr><th>ja<th><td>Japanese</td></tr>
|
||||
<tr><th>jv<th><td>Javanese</td></tr>
|
||||
<tr><th>kn<th><td>Kannada</td></tr>
|
||||
<tr><th>ks<th><td>Kashmiri</td></tr>
|
||||
<tr><th>kk<th><td>Kazakh</td></tr>
|
||||
<tr><th>rw<th><td>Kinyarwanda (Ruanda)</td></tr>
|
||||
<tr><th>ky<th><td>Kirghiz</td></tr>
|
||||
<tr><th>rn<th><td>Kirundi (Rundi)</td></tr>
|
||||
<tr><th>ko<th><td>Korean</td></tr>
|
||||
<tr><th>ku<th><td>Kurdish</td></tr>
|
||||
<tr><th>lo<th><td>Laothian</td></tr>
|
||||
<tr><th>la<th><td>Latin</td></tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<table>
|
||||
<tr><th>lv<th><td>Latvian (Lettish)</td></tr>
|
||||
<tr><th>li<th><td>Limburgish ( Limburger)</td></tr>
|
||||
<tr><th>ln<th><td>Lingala</td></tr>
|
||||
<tr><th>lt<th><td>Lithuanian</td></tr>
|
||||
<tr><th>mk<th><td>Macedonian</td></tr>
|
||||
<tr><th>mg<th><td>Malagasy</td></tr>
|
||||
<tr><th>ms<th><td>Malay</td></tr>
|
||||
<tr><th>ml<th><td>Malayalam</td></tr>
|
||||
<tr><th>mt<th><td>Maltese</td></tr>
|
||||
<tr><th>mi<th><td>Maori</td></tr>
|
||||
<tr><th>mr<th><td>Marathi</td></tr>
|
||||
<tr><th>mo<th><td>Moldavian</td></tr>
|
||||
<tr><th>mn<th><td>Mongolian</td></tr>
|
||||
<tr><th>na<th><td>Nauru</td></tr>
|
||||
<tr><th>ne<th><td>Nepali</td></tr>
|
||||
<tr><th>no<th><td>Norwegian</td></tr>
|
||||
<tr><th>oc<th><td>Occitan</td></tr>
|
||||
<tr><th>or<th><td>Oriya</td></tr>
|
||||
<tr><th>om<th><td>Oromo (Afan, Galla)</td></tr>
|
||||
<tr><th>ps<th><td>Pashto (Pushto)</td></tr>
|
||||
<tr><th>pl<th><td>Polish</td></tr>
|
||||
<tr><th>pt<th><td>Portuguese</td></tr>
|
||||
<tr><th>pa<th><td>Punjabi</td></tr>
|
||||
<tr><th>qu<th><td>Quechua</td></tr>
|
||||
<tr><th>rm<th><td>Rhaeto-Romance</td></tr>
|
||||
<tr><th>ro<th><td>Romanian</td></tr>
|
||||
<tr><th>ru<th><td>Russian</td></tr>
|
||||
<tr><th>sm<th><td>Samoan</td></tr>
|
||||
<tr><th>sg<th><td>Sangro</td></tr>
|
||||
<tr><th>sa<th><td>Sanskrit</td></tr>
|
||||
<tr><th>sr<th><td>Serbian</td></tr>
|
||||
<tr><th>sh<th><td>Serbo-Croatian</td></tr>
|
||||
<tr><th>st<th><td>Sesotho</td></tr>
|
||||
<tr><th>tn<th><td>Setswana</td></tr>
|
||||
<tr><th>sn<th><td>Shona</td></tr>
|
||||
<tr><th>ii<th><td>Sichuan Yi</td></tr>
|
||||
<tr><th>sd<th><td>Sindhi</td></tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<table>
|
||||
<tr><th>si<th><td>Sinhalese</td></tr>
|
||||
<tr><th>ss<th><td>Siswati</td></tr>
|
||||
<tr><th>sk<th><td>Slovak</td></tr>
|
||||
<tr><th>sl<th><td>Slovenian</td></tr>
|
||||
<tr><th>so<th><td>Somali</td></tr>
|
||||
<tr><th>es<th><td>Spanish</td></tr>
|
||||
<tr><th>su<th><td>Sundanese</td></tr>
|
||||
<tr><th>sw<th><td>Swahili (Kiswahili)</td></tr>
|
||||
<tr><th>sv<th><td>Swedish</td></tr>
|
||||
<tr><th>tl<th><td>Tagalog</td></tr>
|
||||
<tr><th>tg<th><td>Tajik</td></tr>
|
||||
<tr><th>ta<th><td>Tamil</td></tr>
|
||||
<tr><th>tt<th><td>Tatar</td></tr>
|
||||
<tr><th>te<th><td>Telugu</td></tr>
|
||||
<tr><th>th<th><td>Thai</td></tr>
|
||||
<tr><th>bo<th><td>Tibetan</td></tr>
|
||||
<tr><th>ti<th><td>Tigrinya</td></tr>
|
||||
<tr><th>to<th><td>Tonga</td></tr>
|
||||
<tr><th>ts<th><td>Tsonga</td></tr>
|
||||
<tr><th>tr<th><td>Turkish</td></tr>
|
||||
<tr><th>tk<th><td>Turkmen</td></tr>
|
||||
<tr><th>tw<th><td>Twi</td></tr>
|
||||
<tr><th>ug<th><td>Uighur</td></tr>
|
||||
<tr><th>uk<th><td>Ukrainian</td></tr>
|
||||
<tr><th>ur<th><td>Urdu</td></tr>
|
||||
<tr><th>uz<th><td>Uzbek</td></tr>
|
||||
<tr><th>vi<th><td>Vietnamese</td></tr>
|
||||
<tr><th>vo<th><td>Volapük</td></tr>
|
||||
<tr><th>wa<th><td>Wallon</td></tr>
|
||||
<tr><th>cy<th><td>Welsh</td></tr>
|
||||
<tr><th>wo<th><td>Wolof</td></tr>
|
||||
<tr><th>xh<th><td>Xhosa</td></tr>
|
||||
<tr><th>yi<th><td>Yiddish</td></tr>
|
||||
<tr><th>yo<th><td>Yoruba</td></tr>
|
||||
<tr><th>zu<th><td>Zulu</td></tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -112,3 +112,42 @@ The height attribute sets the display height of the video.
|
||||
or
|
||||
{ "height": 480 }
|
||||
```
|
||||
|
||||
Component Options
|
||||
-----------------
|
||||
|
||||
You can set the options for any single player component. For instance, if you wanted to remove the `muteToggle` button, which
|
||||
is a child of `controlBar`, you can just set that component to false:
|
||||
|
||||
```javascript
|
||||
var player = videojs('video-id', {
|
||||
children: {
|
||||
controlBar: {
|
||||
children: {
|
||||
muteToggle: false
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
All the children can start getting a little verbose, so to simplify things, you can also set options for child components directly on the parent options.
|
||||
This is functionally the exact same as the above, for instance.
|
||||
|
||||
```javascript
|
||||
var player = videojs('video-id', {
|
||||
controlBar: {
|
||||
muteToggle: false
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
This also works using the `data-setup` attribute on the video element, just remember the options need to use proper JSON
|
||||
notation.
|
||||
|
||||
```html
|
||||
<video ... data-setup='{ "children": { "controlBar": { "children": { "muteToggle": false } } } }'></video>
|
||||
```
|
||||
|
||||
The [components guide](/blob/master/docs/guides/components.md) has an excellent breakdown of the structure of a player, you
|
||||
just need to remember to nest child components in a `children` object for each level.
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
Plugins
|
||||
=======
|
||||
If you've built something cool with Video.js, you can easily share it with the rest of the world by creating a plugin.
|
||||
If you've built something cool with Video.js, you can easily share it with the rest of the world by creating a plugin. Although, you can roll your own, you can also use [generator-videojs-plugin](https://github.com/dmlap/generator-videojs-plugin), a [Yeoman](http://yeoman.io) generator that provides scaffolding for video.js plugins including:
|
||||
* [Grunt](http://gruntjs.com) for build management
|
||||
* [npm](https://www.npmjs.org) for dependency management
|
||||
* [QUnit](http://qunitjs.com) for testing
|
||||
|
||||
|
||||
|
||||
Step 1: Write Some Javascript
|
||||
-----------------------------
|
||||
@@ -38,4 +43,4 @@ If you've already initialized your video tag, you can activate a plugin at any t
|
||||
|
||||
video.examplePlugin({ exampleOption: true });
|
||||
|
||||
That's it. Head on over to the Video.js wiki and add your plugin to the list so everyone else can check it out.
|
||||
That's it. Head on over to the Video.js wiki and add your plugin to the list so everyone else can check it out.
|
||||
|
||||
@@ -20,12 +20,14 @@ You can download the Video.js source and host it on your own servers, or use the
|
||||
|
||||
### CDN Version ###
|
||||
```html
|
||||
<link href="//vjs.zencdn.net/4.5/video-js.css" rel="stylesheet">
|
||||
<script src="//vjs.zencdn.net/4.5/video.js"></script>
|
||||
<link href="//vjs.zencdn.net/4.10.0/video-js.css" rel="stylesheet">
|
||||
<script src="//vjs.zencdn.net/4.10.0/video.js"></script>
|
||||
```
|
||||
|
||||
### Self Hosted. ###
|
||||
With the self hosted option you'll also want to update the location of the video-js.swf file.
|
||||
To entirely self-host, you'll need to pull in the font files and let Video.js know where the swf is located. If you simply copy the dist folder or zip file contents into your project everything
|
||||
should Just Work™, but the paths can easily be changed by editing the LESS file and re-building, or by modifying the generated CSS file.
|
||||
|
||||
```html
|
||||
<link href="//example.com/path/to/video-js.css" rel="stylesheet">
|
||||
<script src="//example.com/path/to/video.js"></script>
|
||||
|
||||
+14
-9
@@ -13,11 +13,11 @@ Creating the Text File
|
||||
----------------------
|
||||
Timed text requires a text file in [WebVTT](http://dev.w3.org/html5/webvtt/) format. This format defines a list of "cues" that have a start time, and end time, and text to display. [Microsoft has a builder](http://ie.microsoft.com/testdrive/Graphics/CaptionMaker/) that can help you get started on the file.
|
||||
|
||||
When creating captions, there's also additional [caption formatting techniques](http://www.theneitherworld.com/mcpoodle/SCC_TOOLS/DOCS/SCC_FORMAT.HTML#style) that would be good to use, like brackets around sound effects. [ sound effect ]
|
||||
When creating captions, there's also additional [caption formatting techniques] (http://www.theneitherworld.com/mcpoodle/SCC_TOOLS/DOCS/SCC_FORMAT.HTML#style) that would be good to use, like brackets around sound effects: [ sound effect ]. If you'd like a more in depth style guide for captioning, you can reference the [Captioning Key](http://www.dcmp.org/captioningkey/), but keep in mind not all features are supported by WebVTT or (more likely) the Video.js WebVTT implementation.
|
||||
|
||||
Adding to Video.js
|
||||
------------------
|
||||
Once you have your WebVTT file created, you can add it to Video.js using the track trag. Put your track track tag after all the source elements, and before any fallback content.
|
||||
Once you have your WebVTT file created, you can add it to Video.js using the track tag. Put your track tag after all the source elements, and before any fallback content.
|
||||
|
||||
```html
|
||||
<video id="example_video_1" class="video-js vjs-default-skin"
|
||||
@@ -32,6 +32,11 @@ Once you have your WebVTT file created, you can add it to Video.js using the tra
|
||||
</video>
|
||||
```
|
||||
|
||||
Subtitles from Another Domain
|
||||
-----------------------------
|
||||
Because we're pulling in the text track file via Javascript, the [same-origin policy](http://en.wikipedia.org/wiki/Same_origin_policy) applies. If you'd like to have a player served from one domain,
|
||||
but the text track served from another, you'll need to [enable CORS](http://enable-cors.org/) in order to do so.
|
||||
|
||||
Track Attributes
|
||||
----------------
|
||||
Additional settings for track tags.
|
||||
@@ -92,10 +97,10 @@ The two-letter code (valid BCP 47 language tag) for the language of the text tra
|
||||
<tr><th>fj<th><td>Fiji</td></tr>
|
||||
<tr><th>fi<th><td>Finnish</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
|
||||
<table>
|
||||
<tr><th>fr<th><td>French</td></tr>
|
||||
<tr><th>fy<th><td>Frisian</td></tr>
|
||||
@@ -135,10 +140,10 @@ The two-letter code (valid BCP 47 language tag) for the language of the text tra
|
||||
<tr><th>lo<th><td>Laothian</td></tr>
|
||||
<tr><th>la<th><td>Latin</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
|
||||
<table>
|
||||
<tr><th>lv<th><td>Latvian (Lettish)</td></tr>
|
||||
<tr><th>li<th><td>Limburgish ( Limburger)</td></tr>
|
||||
@@ -178,10 +183,10 @@ The two-letter code (valid BCP 47 language tag) for the language of the text tra
|
||||
<tr><th>ii<th><td>Sichuan Yi</td></tr>
|
||||
<tr><th>sd<th><td>Sindhi</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
|
||||
<table>
|
||||
<tr><th>si<th><td>Sinhalese</td></tr>
|
||||
<tr><th>ss<th><td>Siswati</td></tr>
|
||||
@@ -219,7 +224,7 @@ The two-letter code (valid BCP 47 language tag) for the language of the text tra
|
||||
<tr><th>yo<th><td>Yoruba</td></tr>
|
||||
<tr><th>zu<th><td>Zulu</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ There are two categories of docs: [Guides](./guides/) and [API docs](./api/). Gu
|
||||
|
||||
### Getting Started
|
||||
|
||||
* [Setup](./guides/setup.md) - Check out the [5 second setup](http://videojs.com/#section5) if you're just getting started. The setup documentation gives a deeper view of the additional methods you can use to trigger the player setup.
|
||||
* [Setup](./guides/setup.md) - The setup documentation gives a deeper view of the additional methods you can use to trigger the player setup.
|
||||
|
||||
* [Options](./guides/options.md) - There are a number of options that can be used to change how the player behaves, starting with the HTML5 media options like autoplay and preload, and expanding to Video.JS specific options.
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"Play": "Wiedergabe",
|
||||
"Pause": "Pause",
|
||||
"Current Time": "Aktueller Zeitpunkt",
|
||||
"Duration Time": "Dauer",
|
||||
"Remaining Time": "Verbleibende Zeit",
|
||||
"Stream Type": "Streamtyp",
|
||||
"LIVE": "LIVE",
|
||||
"Loaded": "Geladen",
|
||||
"Progress": "Status",
|
||||
"Fullscreen": "Vollbild",
|
||||
"Non-Fullscreen": "Kein Vollbild",
|
||||
"Mute": "Ton aus",
|
||||
"Unmuted": "Ton ein",
|
||||
"Playback Rate": "Wiedergabegeschwindigkeit",
|
||||
"Subtitles": "Untertitel",
|
||||
"subtitles off": "Untertitel aus",
|
||||
"Captions": "Untertitel",
|
||||
"captions off": "Untertitel aus",
|
||||
"Chapters": "Kapitel",
|
||||
"You aborted the video playback": "Sie haben die Videowiedergabe abgebrochen.",
|
||||
"A network error caused the video download to fail part-way.": "Der Videodownload ist aufgrund eines Netzwerkfehlers fehlgeschlagen.",
|
||||
"The video could not be loaded, either because the server or network failed or because the format is not supported.": "Das Video konnte nicht geladen werden, da entweder ein Server- oder Netzwerkfehler auftrat oder das Format nicht unterstützt wird.",
|
||||
"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "Die Videowiedergabe wurde entweder wegen eines Problems mit einem beschädigten Video oder wegen verwendeten Funktionen, die vom Browser nicht unterstützt werden, abgebrochen.",
|
||||
"No compatible source was found for this video.": "Für dieses Video wurde keine kompatible Quelle gefunden."
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"Play": "Reproducción",
|
||||
"Pause": "Pausa",
|
||||
"Current Time": "Tiempo reproducido",
|
||||
"Duration Time": "Duración total",
|
||||
"Remaining Time": "Tiempo restante",
|
||||
"Stream Type": "Tipo de secuencia",
|
||||
"LIVE": "DIRECTO",
|
||||
"Loaded": "Cargado",
|
||||
"Progress": "Progreso",
|
||||
"Fullscreen": "Pantalla completa",
|
||||
"Non-Fullscreen": "Pantalla no completa",
|
||||
"Mute": "Silenciar",
|
||||
"Unmuted": "No silenciado",
|
||||
"Playback Rate": "Velocidad de reproducción",
|
||||
"Subtitles": "Subtítulos",
|
||||
"subtitles off": "Subtítulos desactivados",
|
||||
"Captions": "Subtítulos especiales",
|
||||
"captions off": "Subtítulos especiales desactivados",
|
||||
"Chapters": "Capítulos",
|
||||
"You aborted the video playback": "Ha interrumpido la reproducción del vídeo.",
|
||||
"A network error caused the video download to fail part-way.": "Un error de red ha interrumpido la descarga del vídeo.",
|
||||
"The video could not be loaded, either because the server or network failed or because the format is not supported.": "No se ha podido cargar el vídeo debido a un fallo de red o del servidor o porque el formato es incompatible.",
|
||||
"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "La reproducción de vídeo se ha interrumpido por un problema de corrupción de datos o porque el vídeo precisa funciones que su navegador no ofrece.",
|
||||
"No compatible source was found for this video.": "No se ha encontrado ninguna fuente compatible con este vídeo."
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"Play": "Lecture",
|
||||
"Pause": "Pause",
|
||||
"Current Time": "Temps actuel",
|
||||
"Duration Time": "Durée",
|
||||
"Remaining Time": "Temps restant",
|
||||
"Stream Type": "Type de flux",
|
||||
"LIVE": "EN DIRECT",
|
||||
"Loaded": "Chargé",
|
||||
"Progress": "Progression",
|
||||
"Fullscreen": "Plein écran",
|
||||
"Non-Fullscreen": "Fenêtré",
|
||||
"Mute": "Sourdine",
|
||||
"Unmuted": "Son activé",
|
||||
"Playback Rate": "Vitesse de lecture",
|
||||
"Subtitles": "Sous-titres",
|
||||
"subtitles off": "Sous-titres désactivés",
|
||||
"Captions": "Sous-titres",
|
||||
"captions off": "Sous-titres désactivés",
|
||||
"Chapters": "Chapitres",
|
||||
"You aborted the video playback": "Vous avez interrompu la lecture de la vidéo.",
|
||||
"A network error caused the video download to fail part-way.": "Une erreur de réseau a interrompu le téléchargement de la vidéo.",
|
||||
"The video could not be loaded, either because the server or network failed or because the format is not supported.": "Cette vidéo n'a pas pu être chargée, soit parce que le serveur ou le réseau a échoué ou parce que le format n'est pas reconnu.",
|
||||
"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "La lecture de la vidéo a été interrompue à cause d'un problème de corruption ou parce que la vidéo utilise des fonctionnalités non prises en charge par votre navigateur.",
|
||||
"No compatible source was found for this video.": "Aucune source compatible n'a été trouvée pour cette vidéo."
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"Play": "Play",
|
||||
"Pause": "Pausa",
|
||||
"Current Time": "Orario attuale",
|
||||
"Duration Time": "Durata",
|
||||
"Remaining Time": "Tempo rimanente",
|
||||
"Stream Type": "Tipo del Streaming",
|
||||
"LIVE": "LIVE",
|
||||
"Loaded": "Caricato",
|
||||
"Progress": "Stato",
|
||||
"Fullscreen": "Schermo intero",
|
||||
"Non-Fullscreen": "Chiudi schermo intero",
|
||||
"Mute": "Muto",
|
||||
"Unmuted": "Audio",
|
||||
"Playback Rate": "Tasso di riproduzione",
|
||||
"Subtitles": "Sottotitoli",
|
||||
"subtitles off": "Senza sottotitoli",
|
||||
"Captions": "Sottotitoli non udenti",
|
||||
"captions off": "Senza sottotitoli non udenti",
|
||||
"Chapters": "Capitolo",
|
||||
"You aborted the video playback": "La riproduzione del filmato è stata interrotta.",
|
||||
"A network error caused the video download to fail part-way.": "Il download del filmato è stato interrotto a causa di un problema rete.",
|
||||
"The video could not be loaded, either because the server or network failed or because the format is not supported.": "Il filmato non può essere caricato a causa di un errore nel server o nella rete o perché il formato non viene supportato.",
|
||||
"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "La riproduzione del filmato è stata interrotta a causa di un file danneggiato o per l’utilizzo di impostazioni non supportate dal browser.",
|
||||
"No compatible source was found for this video.": "Non ci sono fonti compatibili per questo filmato."
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"Play": "再生",
|
||||
"Pause": "一時停止",
|
||||
"Current Time": "現在の時間",
|
||||
"Duration Time": "長さ",
|
||||
"Remaining Time": "残りの時間",
|
||||
"Stream Type": "ストリームの種類",
|
||||
"LIVE": "ライブ",
|
||||
"Loaded": "ロード済み",
|
||||
"Progress": "進行状況",
|
||||
"Fullscreen": "フルスクリーン",
|
||||
"Non-Fullscreen": "フルスクリーン以外",
|
||||
"Mute": "ミュート",
|
||||
"Unmuted": "ミュート解除",
|
||||
"Playback Rate": "再生レート",
|
||||
"Subtitles": "サブタイトル",
|
||||
"subtitles off": "サブタイトル オフ",
|
||||
"Captions": "キャプション",
|
||||
"captions off": "キャプション オフ",
|
||||
"Chapters": "チャプター",
|
||||
"You aborted the video playback": "動画再生を中止しました",
|
||||
"A network error caused the video download to fail part-way.": "ネットワーク エラーにより動画のダウンロードが途中で失敗しました",
|
||||
"The video could not be loaded, either because the server or network failed or because the format is not supported.": "サーバーまたはネットワークのエラー、またはフォーマットがサポートされていないため、動画をロードできませんでした",
|
||||
"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "破損の問題、またはお使いのブラウザがサポートしていない機能が動画に使用されていたため、動画の再生が中止されました",
|
||||
"No compatible source was found for this video.": "この動画に対して互換性のあるソースが見つかりませんでした"
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"Play": "재생",
|
||||
"Pause": "일시중지",
|
||||
"Current Time": "현재 시간",
|
||||
"Duration Time": "지정 기간",
|
||||
"Remaining Time": "남은 시간",
|
||||
"Stream Type": "스트리밍 유형",
|
||||
"LIVE": "라이브",
|
||||
"Loaded": "로드됨",
|
||||
"Progress": "진행",
|
||||
"Fullscreen": "전체 화면",
|
||||
"Non-Fullscreen": "전체 화면 해제",
|
||||
"Mute": "음소거",
|
||||
"Unmuted": "음소거 해제",
|
||||
"Playback Rate": "재생 비율",
|
||||
"Subtitles": "서브타이틀",
|
||||
"subtitles off": "서브타이틀 끄기",
|
||||
"Captions": "자막",
|
||||
"captions off": "자막 끄기",
|
||||
"Chapters": "챕터",
|
||||
"You aborted the video playback": "비디오 재생을 취소했습니다.",
|
||||
"A network error caused the video download to fail part-way.": "네트워크 오류로 인하여 비디오 일부를 다운로드하지 못 했습니다.",
|
||||
"The video could not be loaded, either because the server or network failed or because the format is not supported.": "비디오를 로드할 수 없습니다. 서버 혹은 네트워크 오류 때문이거나 지원되지 않는 형식 때문일 수 있습니다.",
|
||||
"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "비디오 재생이 취소됐습니다. 비디오가 손상되었거나 비디오가 사용하는 기능을 브라우저에서 지원하지 않는 것 같습니다.",
|
||||
"No compatible source was found for this video.": "비디오에 호환되지 않는 소스가 있습니다."
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"Play": "Afspelen",
|
||||
"Pause": "Pauze",
|
||||
"Current Time": "Huidige Tijd",
|
||||
"Duration Time": "Looptijd",
|
||||
"Remaining Time": "Resterende Tijd",
|
||||
"Stream Type": "Stream Type",
|
||||
"LIVE": "LIVE",
|
||||
"Loaded": "Geladen",
|
||||
"Progress": "Status",
|
||||
"Fullscreen": "Volledig scherm",
|
||||
"Non-Fullscreen": "Geen volledig scherm",
|
||||
"Mute": "Geluid Uit",
|
||||
"Unmuted": "Geluid Aan",
|
||||
"Playback Rate": "Weergave Rate",
|
||||
"Subtitles": "Ondertiteling",
|
||||
"subtitles off": "Ondertiteling uit",
|
||||
"Captions": "Onderschriften",
|
||||
"captions off": "Onderschriften uit",
|
||||
"Chapters": "Hoofdstukken",
|
||||
"You aborted the video playback": "Je hebt de video weergave afgebroken.",
|
||||
"A network error caused the video download to fail part-way.": "De video download is mislukt door een netwerkfout.",
|
||||
"The video could not be loaded, either because the server or network failed or because the format is not supported.": "De video kon niet worden geladen, veroorzaakt door een server of netwerkfout of het formaat word niet ondersteund.",
|
||||
"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "De video weergave is afgebroken omdat deze beschadigd is of de video gebruikt functionaliteit die niet door je browser word ondersteund.",
|
||||
"No compatible source was found for this video.": "Voor deze video is geen ondersteunde bron gevonden."
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"Play": "Tocar",
|
||||
"Pause": "Pause",
|
||||
"Current Time": "Tempo",
|
||||
"Duration Time": "Duração",
|
||||
"Remaining Time": "Tempo Restante",
|
||||
"Stream Type": "Tipo de Stream",
|
||||
"LIVE": "AO VIVO",
|
||||
"Loaded": "Carregado",
|
||||
"Progress": "Progressão",
|
||||
"Fullscreen": "Tela Cheia",
|
||||
"Non-Fullscreen": "Tela Normal",
|
||||
"Mute": "Mudo",
|
||||
"Unmuted": "Habilitar Som",
|
||||
"Playback Rate": "Velocidade",
|
||||
"Subtitles": "Legendas",
|
||||
"subtitles off": "Sem Legendas",
|
||||
"Captions": "Anotações",
|
||||
"captions off": "Sem Anotações",
|
||||
"Chapters": "Capítulos",
|
||||
"You aborted the video playback": "Você parou a execução de vídeo.",
|
||||
"A network error caused the video download to fail part-way.": "Um erro na rede fez o vídeo parar parcialmente.",
|
||||
"The video could not be loaded, either because the server or network failed or because the format is not supported.": "O vídeo não pode ser carregado, ou porque houve um problema com sua rede ou pelo formato do vídeo não ser suportado.",
|
||||
"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "A Execução foi interrompida por um problema com o vídeo ou por seu navegador não dar suporte ao seu formato.",
|
||||
"No compatible source was found for this video.": "Não foi encontrada fonte de vídeo compatível."
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"Play": "Воспроизвести",
|
||||
"Pause": "Приостановить",
|
||||
"Current Time": "Текущее время",
|
||||
"Duration Time": "Продолжительность",
|
||||
"Remaining Time": "Оставшееся время",
|
||||
"Stream Type": "Тип потока",
|
||||
"LIVE": "ОНЛАЙН",
|
||||
"Loaded": "Загрузка",
|
||||
"Progress": "Прогресс",
|
||||
"Fullscreen": "Полноэкранный режим",
|
||||
"Non-Fullscreen": "Неполноэкранный режим",
|
||||
"Mute": "Без звука",
|
||||
"Unmuted": "Со звуком",
|
||||
"Playback Rate": "Скорость воспроизведения",
|
||||
"Subtitles": "Субтитры",
|
||||
"subtitles off": "Субтитры выкл.",
|
||||
"Captions": "Подписи",
|
||||
"captions off": "Подписи выкл.",
|
||||
"Chapters": "Главы",
|
||||
"You aborted the video playback": "Вы прервали воспроизведение видео",
|
||||
"A network error caused the video download to fail part-way.": "Ошибка сети вызвала сбой во время загрузки видео.",
|
||||
"The video could not be loaded, either because the server or network failed or because the format is not supported.": "Невозможно загрузить видео из-за сетевого или серверного сбоя либо формат не поддерживается.",
|
||||
"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "Воспроизведение видео было приостановлено из-за повреждения либо в связи с тем, что видео использует функции, неподдерживаемые вашим браузером.",
|
||||
"No compatible source was found for this video.": "Совместимые источники для этого видео отсутствуют."
|
||||
}
|
||||
Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais
Referência em uma Nova Issue
Bloquear um usuário