Comparar commits
1356 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| 2b57ada7df | |||
| d43831d6d0 | |||
| 72cb71c3a5 | |||
| ded72386ca | |||
| ae04900c54 | |||
| 518614ca57 | |||
| 0ef6b4af73 | |||
| ee7c962494 | |||
| 05c18b7049 | |||
| 53ea60cd06 | |||
| 18965bb8d7 | |||
| 3a1239df1e | |||
| 49197e4f0e | |||
| 08da4c889f | |||
| 1ff1d76a8c | |||
| 5abff360cc | |||
| 18be3ef9ac | |||
| 864432d7d3 | |||
| 6c2efbf999 | |||
| eec1fc13fe | |||
| 54b175d988 | |||
| b9181ee55b | |||
| d385f8257f | |||
| 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 | |||
| d7f840a969 | |||
| 01567428b0 | |||
| 4235a3d8c1 | |||
| 4bb3a23331 | |||
| 7782eda524 | |||
| 92eac13caa | |||
| bcb69a0b23 | |||
| 3fd0c92c95 | |||
| a6718913be | |||
| 1df28ff311 | |||
| dbff62e3f0 | |||
| ef25557577 | |||
| 269f7b15c0 | |||
| adf4e507c1 | |||
| a5bc6884e2 | |||
| e7617bfdd4 | |||
| 27f0f789e0 | |||
| 3e5ef19212 | |||
| d96e008978 | |||
| 227700a236 | |||
| 923ce038f7 | |||
| 16eea0a1df | |||
| f4704ee74f | |||
| 8c9a4cc434 | |||
| f98012a471 | |||
| 65833f5231 | |||
| e8722ff522 | |||
| c1029eab16 | |||
| 46605739e2 | |||
| 31918fc46d | |||
| 3bafdeef51 | |||
| 2473d5bf7a | |||
| 4242fe3857 | |||
| da45dad831 | |||
| 2fca84435d | |||
| d8f721abf5 | |||
| 9d258742c5 | |||
| 35d7258973 | |||
| 4e0c2b366d | |||
| aa8d50b219 | |||
| 95c29e684f | |||
| c7e35e51de | |||
| d784f9d0d9 | |||
| 6a097c0236 | |||
| efe25c0b13 | |||
| 06e141df58 | |||
| 848cfd6620 | |||
| d3af3e0e07 | |||
| af50b8ee29 | |||
| aeb4aa3ada | |||
| 825de43819 | |||
| 066438670f | |||
| e8d36e0fab | |||
| a9ad77aa00 | |||
| b3b42e3822 | |||
| 88403221a9 | |||
| 2079af7320 | |||
| c8bd862e3e | |||
| 74c73969cd | |||
| c286c826db | |||
| 33f388366d | |||
| f363523551 | |||
| e87fe460cc | |||
| 2c12ed98a7 | |||
| 87ee28e6cb | |||
| e39557e790 | |||
| e2a1cac136 | |||
| d21019ad78 | |||
| 94ec725a66 | |||
| 75bd76f55c | |||
| fef6282d55 | |||
| f1d2aef048 | |||
| d1d97bfe9b | |||
| 0a1d4b2645 | |||
| 0c856ce9a4 | |||
| 817253b74f | |||
| f86e073f03 | |||
| 86c3f94c87 | |||
| d48d6cf99d | |||
| 0f2aadcfcd | |||
| 4daf1f173c | |||
| 61eb54afa8 | |||
| 799f1762ff | |||
| 416ee1b2a0 | |||
| 204bb84ecb | |||
| 5381f70d1c | |||
| 252ad3f466 | |||
| 80d7b5014a | |||
| 32e4d4c9d0 | |||
| d289a336b8 | |||
| e35083bc28 | |||
| 4051a9cbee | |||
| 26f6f4b0ea | |||
| cbefd37acf | |||
| 378d6ef482 | |||
| 02155c6b13 | |||
| 7a4c602be0 | |||
| b7cc2a8a4c | |||
| e7b1098563 | |||
| a64a5e27cf | |||
| bdeaae1c92 | |||
| e2b2d14f48 | |||
| 96c274de63 | |||
| 6244c39129 | |||
| e4b269e294 | |||
| f3166ad082 | |||
| 54609dc3f5 | |||
| 2005fe2136 | |||
| efd4822c6b | |||
| d538debb1d | |||
| 48230ea1a1 | |||
| 661cbd1eb0 | |||
| fe2b702e32 | |||
| d47435a18f | |||
| 7c772fbf3e | |||
| 4116d9ec14 | |||
| f155814cd9 | |||
| a0f929dd57 | |||
| cc5e515360 | |||
| 2e26703162 | |||
| 0ad8abfef1 | |||
| 61883ab4e2 | |||
| 0f854c751b | |||
| 5b133823e5 | |||
| 3e19d7621a | |||
| b0a6cf335a | |||
| ed78764379 | |||
| 7f44942c9b | |||
| e9da3350d4 | |||
| c6c49ac580 | |||
| 4b0db76d77 | |||
| 6b28ba268a | |||
| 5146c1fa4a | |||
| b98d719564 | |||
| 7aefee5d7d | |||
| c1e623bed7 | |||
| 333db84510 | |||
| 8f40fa4548 | |||
| 9c282811e1 | |||
| d68f5a93a5 | |||
| 1dd8a15655 | |||
| 3336f1fe02 | |||
| 4fe74d52a9 | |||
| 0d58df8edb | |||
| f135b97ce0 | |||
| 051657334f | |||
| 7be94c3882 | |||
| 4f66e09595 | |||
| 1bb2c7ed57 | |||
| 1e781d14df | |||
| ee9a18d5ac | |||
| ce0c4b12d2 | |||
| 9e5dce5c14 | |||
| 88dca0a2e2 | |||
| 8aa2eb4719 | |||
| ecaf748e4f | |||
| c9cad9ca1e | |||
| 956aaa0425 | |||
| e062dec423 | |||
| 8b720ce45a | |||
| 5ab2504e90 | |||
| 310a0630c9 | |||
| 468b07c651 | |||
| 12c830049e | |||
| fe4c477da6 | |||
| 24125bbb63 | |||
| e73bb869ce | |||
| 5c907e1ce2 | |||
| 8c59405d86 | |||
| 7ade43d91d | |||
| 49656ab013 | |||
| 6f83d0b00e | |||
| 71ba5bb062 | |||
| 11e7028c25 | |||
| 7926c2d9a6 | |||
| 2b1291816f | |||
| 4d9d06e1c9 | |||
| 0fc76451f9 | |||
| 3cb41c7786 | |||
| 2d5ca1ebc2 | |||
| 1b45195f9d | |||
| 04c893208e | |||
| 453402a912 | |||
| 849521ee66 | |||
| ef1b239b2a | |||
| 4521c70173 | |||
| 28a4d29934 | |||
| 9975ed407a | |||
| 75a23135e6 | |||
| 4d2267c1bc | |||
| 44d6cac1b7 | |||
| e5294848f9 | |||
| 26c8d3f92c | |||
| a7d624affe | |||
| 4b254a07df | |||
| 07cd9800e8 | |||
| b23eba7c8c | |||
| 70ed4fcbb2 | |||
| d0f8b3e87e | |||
| 7184cb4b49 | |||
| c597605afd | |||
| d73bfb80b7 | |||
| 0dd210dcf3 | |||
| e25a9f3207 | |||
| e4b4906198 | |||
| 4dd776c334 | |||
| a8afe9c673 | |||
| 6a1c0bdd0c | |||
| 65767f77f8 | |||
| f5acb89d70 | |||
| f152c6a4be | |||
| cb78815e80 | |||
| ff1c9c5cf0 | |||
| dd8c25e8d5 | |||
| 1cd81ad258 | |||
| bf7dd32ff6 | |||
| 9088dfffc9 | |||
| a54d9cdae6 | |||
| 51b836d6be | |||
| 0a2167468c | |||
| 02eb2d3ee3 | |||
| 2825f74ba8 | |||
| 59a733f14e | |||
| 0dae44988e | |||
| dfe4543a0d | |||
| 0f38d27dcc | |||
| 024b031646 | |||
| ec1bea41a5 | |||
| b1f9450bb3 | |||
| 950072ad97 | |||
| 491b9b232b | |||
| a106924e6d | |||
| 6b73df950e | |||
| 7b23576afc | |||
| 166cc9c1ef | |||
| 81e49d4361 | |||
| 090bc0d12a | |||
| beb329ad71 | |||
| 2066474096 | |||
| 432b60f22c | |||
| 15a0d7dbb6 | |||
| c23ca5200c | |||
| 522f45f458 | |||
| df57b302da | |||
| 2aa09fd15a | |||
| 09f81c0c6c | |||
| 75b2171051 | |||
| 3248bc1258 | |||
| 1cab78347d | |||
| 0cbe95d615 | |||
| dcc19dcf04 | |||
| f3fcf9b5b8 | |||
| ef0d63b5ba | |||
| 7efcbd5e19 | |||
| c69290c39f | |||
| cb9447b2c3 | |||
| 875fc2ff32 | |||
| 1f06a0c6b3 | |||
| 2f716cddf4 | |||
| d653c25025 | |||
| c2abbb7568 | |||
| 9662736766 | |||
| b6c902a7b3 | |||
| 5308dd41d2 | |||
| 4e216cdddb | |||
| 847472f286 | |||
| df7c91ad92 | |||
| 10c3e46e95 | |||
| 48f6332f78 | |||
| d9bb81018b | |||
| 4e0128bb3d | |||
| 6c1adb79d2 | |||
| 7ee2f864b3 | |||
| c85d94a2ce | |||
| 4c6a12898b | |||
| 6e3eb5075e | |||
| f318eb9f1f | |||
| 9bfbceb047 | |||
| c56e6ed37c | |||
| 7a8d808b0e | |||
| 124c62fe24 | |||
| ba20239147 | |||
| 0c4ab0b449 | |||
| e0794cf4b4 | |||
| 3203c2c5ed | |||
| 9ec2556a7c | |||
| d3efe4b04c | |||
| f35ae5c44f | |||
| 14193c4308 | |||
| 1bef68a60b | |||
| e37e870d42 | |||
| c5a8cff129 | |||
| 61bc016637 | |||
| acf41c4882 | |||
| da3550a6d8 | |||
| 3640623147 | |||
| a6198efaca | |||
| f07caa2b97 | |||
| 2662ad9c96 | |||
| 13dbf23c3c | |||
| b2098e0efe | |||
| faea65a44e | |||
| 50adf355af | |||
| 1d05177627 | |||
| a94259cc73 | |||
| a49213e20c | |||
| 7b73c2725e | |||
| 8f53e514de | |||
| c39dd5567e | |||
| 8e9db2d662 | |||
| 52c577995c | |||
| efe7a12ccb | |||
| f146ebb179 | |||
| 72bf48cf36 | |||
| e6ecbfe824 | |||
| 0ccb6dd156 | |||
| 62b4f799b9 | |||
| bd789b8613 | |||
| 4772e4680b | |||
| 26cc24c59d | |||
| 4bc269992e | |||
| 07351ada80 | |||
| acb4a43d8a | |||
| 75dd7c5a3c | |||
| f515ac0236 | |||
| 6418531d0c | |||
| a04932eaf9 | |||
| 96f6c2388a | |||
| 8721202ec1 | |||
| 92d16d6409 | |||
| 7c2ae3f68c | |||
| 7ab3d190f2 | |||
| 29668ec45b | |||
| bd18f5b25f | |||
| 5a6fa37623 | |||
| e520e1eba4 | |||
| 2f68bfc7c1 | |||
| 57c576f96c | |||
| acf6d67e0d | |||
| d47f78f5d1 | |||
| 02de927043 | |||
| 20e2d4e984 | |||
| ff9165b7da | |||
| f7a72b1f20 | |||
| 9030a5655e | |||
| 699c476575 | |||
| b5b0f42888 | |||
| 15544c3d05 | |||
| 8010b77eb3 | |||
| 15fab6df81 | |||
| 89fb86bff7 | |||
| 75ff27307d | |||
| 1d972a0686 | |||
| 334ff59ff0 | |||
| a809954495 | |||
| 7936d7967d | |||
| aa64669ca3 | |||
| a726b07538 | |||
| ca96297ef9 | |||
| a38ce63474 | |||
| c8ee76b80e | |||
| 1eca8add85 | |||
| 2b1bb60f7e | |||
| 5aa1ff59b3 | |||
| 59af460ad4 | |||
| a449cb043a | |||
| 9d424c61f4 | |||
| 91da153c02 | |||
| 150facab44 | |||
| 3716f3b1f0 | |||
| 918ee040e1 | |||
| 1c606779c3 | |||
| fdf7f4f228 | |||
| c82611d506 | |||
| ed8ed4dd94 | |||
| 9f647ef081 | |||
| c616695e4d | |||
| 52751a0d67 | |||
| ffd308e305 | |||
| b4a07a3d9d | |||
| db97df69dc | |||
| 8f45f93c84 | |||
| b6667dfaf6 | |||
| 23fc4cca35 | |||
| 00a043f1e1 | |||
| 9abe53a32e | |||
| 8e5cf7a69d | |||
| fd39878f8b | |||
| 1ddef27903 | |||
| 19a33cc7c7 | |||
| 02a1057ff4 | |||
| a040ce61ad | |||
| 042076043b | |||
| 38d119e75d | |||
| 93c6645744 | |||
| 85c6b46ec8 | |||
| 1e199da117 | |||
| 3a40dcd883 | |||
| afc39f711f | |||
| 8a728a80ac | |||
| d932cffd50 | |||
| 6fe5513f30 | |||
| 138b1381c2 | |||
| 60d389e1f8 | |||
| 93e3b38132 | |||
| b02f879bf3 | |||
| 9997d0a7ef | |||
| 3dd0b1d234 | |||
| d27c3102e9 | |||
| d5d97bd64f | |||
| 0ddf8af452 | |||
| f6bd819c5c | |||
| 21cd77358a | |||
| 847e392e0c | |||
| 8799984a8c | |||
| 0c4c30a3bd | |||
| 4db3dba068 | |||
| 46731c40c3 | |||
| 5bc5c40f8a | |||
| d5fe1c40d8 | |||
| 6251acdf56 | |||
| 0f21f86521 | |||
| ed5ac285c3 | |||
| 880be64f48 | |||
| 753ce48e21 | |||
| 6b4d811b2f | |||
| baac2af4ab | |||
| 731ec4fa0b | |||
| 8dd88d1626 | |||
| 0fe7348456 | |||
| a7dd81f82f | |||
| d4168cd2b6 | |||
| 36c92404c3 | |||
| 1f23529cf0 | |||
| 68d5cb996a | |||
| fe36ae172d | |||
| a6a443bac3 | |||
| b3d4ed6459 | |||
| f4ac570297 | |||
| 8c31278c2f | |||
| 623ea7bb0f | |||
| 9e65eb3618 | |||
| 0e4f3cfa08 | |||
| c6c8cd1bd2 | |||
| 07000db77d | |||
| 94c07756dc | |||
| 18c3853039 | |||
| c59275583c | |||
| 65f4f1da96 | |||
| 3acdb497d1 | |||
| 6c75c5ea34 | |||
| d40bcc617d | |||
| 32519181c8 | |||
| 6eac0a44c4 | |||
| 55e2c99899 | |||
| 199b8f29da | |||
| c02e1a4a99 | |||
| d1def0bcca | |||
| 90ac799d57 | |||
| 7cc733a8df | |||
| a799a506f4 | |||
| d395f6e684 | |||
| 886d555a47 | |||
| 05ab972a1a | |||
| 997b327fcd | |||
| 64f7729b72 | |||
| d54f473670 | |||
| 4f319a2174 | |||
| 0f115df0b6 | |||
| 6d1afd059f | |||
| 78ec7f0f16 | |||
| 5dc9c0f2ae | |||
| 89b6f42e99 | |||
| b2539cb1ea | |||
| beb3a94135 | |||
| f42c96e012 | |||
| 9c6dbea344 | |||
| fa79564802 | |||
| e21dd3649c | |||
| c2f8930e99 | |||
| fb603745dc | |||
| 4faa411ece | |||
| 7ea76951c6 | |||
| 5172875afb | |||
| 0633a93837 | |||
| c548229e73 | |||
| e47850a152 | |||
| ae49f1efc8 | |||
| fc96ef68ac | |||
| b36665ebcd | |||
| 9acacaac37 | |||
| c92991e2fc | |||
| 99373ce4b6 | |||
| 9c6c384704 | |||
| e7fa682976 | |||
| d270a16b32 | |||
| f0d3680fe4 | |||
| ff56061853 | |||
| 0154d04535 | |||
| 22bbd00ac9 | |||
| 04feef9303 | |||
| c7823ceb68 | |||
| 85cf34017a | |||
| a681d172f2 | |||
| 8c52d02c21 | |||
| 7fab906843 | |||
| 90f975c20e | |||
| 247a725cad | |||
| 016e94f889 | |||
| 8524ad9817 | |||
| 01104ef2a4 | |||
| 7199b91f4d | |||
| 623bb75267 | |||
| 83b007504f | |||
| 9576710b2f | |||
| 07d90fb6e0 | |||
| 7d67abdae8 | |||
| c4d07c402d | |||
| c0726d20f0 | |||
| f81b369955 | |||
| 229f5028e1 | |||
| 8494080c90 | |||
| ea792587d5 | |||
| a8e87f80ed | |||
| b1b0ac0377 | |||
| 953ae8abec | |||
| 23c647eecb | |||
| 99c982c103 | |||
| 5ff2b1d061 | |||
| c172ed715b | |||
| fd798f3dac | |||
| 7a0155aa03 | |||
| a73f0ab6f0 | |||
| bdb4456c62 | |||
| 83553b6540 | |||
| 3b48be921e | |||
| 2138d4f2a0 | |||
| 3a32f44f23 | |||
| c74f39318f | |||
| 0aa814fae7 | |||
| 896d0333c7 | |||
| dbd02fb05a | |||
| bafaf49e7e | |||
| 78a74536e5 | |||
| a59822065d | |||
| 6e5407596e | |||
| 2ff8a2bba2 | |||
| 496fa982e0 | |||
| 6f5e49fc16 | |||
| a9352922d9 | |||
| 1faa39db5b | |||
| 143e53febc | |||
| 99a973e529 | |||
| 6bd4651767 | |||
| ece4f7e5e9 | |||
| baeff8030d | |||
| 65687aa3d0 | |||
| f1d957929c | |||
| be63a06f54 | |||
| 7b7452ff9f | |||
| 1e640b9790 | |||
| 22c3f47546 | |||
| e08851a2cc | |||
| e41472f0e5 | |||
| a703294275 | |||
| e0b2e470f4 | |||
| cf52750a57 | |||
| e55e5a7313 | |||
| 9b25484a92 | |||
| c9bba46846 | |||
| d40c33cf65 | |||
| 30949a3c83 | |||
| 5dbb9aabc7 | |||
| 1bf4502766 | |||
| 7c8af82c07 | |||
| a6578d5a5d | |||
| 37c463d37a | |||
| bae6fa1ab4 | |||
| c71203bd56 | |||
| dc9934b765 | |||
| bf804d5571 | |||
| c17d5890d0 | |||
| 5b324c05e1 | |||
| 452f9b3971 | |||
| da4400f437 | |||
| 9555b80cc0 | |||
| f8706bbffe | |||
| 85df20d736 | |||
| cbcff6a168 | |||
| c94ceca337 | |||
| 57c5cefe0f | |||
| 95e87be2d2 | |||
| 4d74fb3b7c | |||
| 80802e68d8 | |||
| ff957fa9f5 | |||
| 610974854c | |||
| 59cdd4edcd | |||
| 32755ca855 | |||
| f3af77e985 | |||
| 8c6138797a | |||
| 8bc5fb055e | |||
| d147b1ae2f | |||
| a3b9b50e8b | |||
| de5acf4fe7 | |||
| 7e0ee0c799 | |||
| 0ba7166636 | |||
| bc723acb06 | |||
| dcc66cb14c | |||
| e1409f8972 | |||
| 264e3aeb38 | |||
| 696097ca38 | |||
| cf2fd9cbe8 | |||
| 93f8737fc7 | |||
| f11c5d3ca9 | |||
| eb3f1aca8a | |||
| 253c510da0 | |||
| 888f04484a | |||
| f1e90d65f2 | |||
| 1bceadf094 | |||
| 2de8ad6f63 | |||
| ad98bebf55 | |||
| e4c9588048 | |||
| 9b52edea07 | |||
| 29297bd37b | |||
| 754f590778 | |||
| b662139708 | |||
| f72a90f4a8 | |||
| ab25a823b7 | |||
| f8385f06d0 | |||
| 6a6b46cbcf | |||
| 3d617476a5 | |||
| 50e7fac830 | |||
| e005f1a505 | |||
| b681af9cf8 | |||
| 34dfaec5ca | |||
| 496c699298 | |||
| c647b436aa | |||
| fa29d9ac86 | |||
| 60f9b505f1 | |||
| 191a9d671d | |||
| 4f18a6bd97 | |||
| 6fffd7e77b | |||
| eda21b7b22 | |||
| dd9f1603a4 | |||
| f5b4980718 | |||
| 4e5a85a24a | |||
| 0373d15c2f | |||
| aa0ea90ee2 | |||
| 7adede7b68 | |||
| 1905e59bdb | |||
| 2f3ef4099e | |||
| 1da6396102 | |||
| 6c9e17dce2 | |||
| 07cda9583f | |||
| c6338728d8 | |||
| f0f7c8917b | |||
| deb28e63d9 | |||
| 2539f81bda | |||
| 13327ce875 | |||
| 0771e86338 | |||
| 9fed9241d0 | |||
| d21df1bc12 | |||
| 6df5d30dff | |||
| 41d4641cea | |||
| b3f6aa0078 | |||
| 964e50a9ee | |||
| a2d4262c56 | |||
| d096a7d33e | |||
| 1636677995 | |||
| 24ff4b1321 | |||
| eadaa2f800 | |||
| f4cba1649d | |||
| c6d3481470 | |||
| 1579e623b0 | |||
| e23cf4a1c0 | |||
| 103adfc1a5 | |||
| b52cf5889e | |||
| 31f76092f8 | |||
| c13b96acbb | |||
| e6478e96de | |||
| 8f6d408802 | |||
| e1d4b2c827 | |||
| 5f2b8fb831 | |||
| 51a22adc6a | |||
| 4cefbf6bac | |||
| b8b23d00de | |||
| c6a855cf74 | |||
| 730b4723b0 | |||
| 701c1d210c | |||
| 3353b75327 | |||
| bce339c405 | |||
| 3865d44b0e | |||
| ba110169f5 | |||
| 0206ba9469 | |||
| 4b960849c7 | |||
| 3e555d77ea | |||
| 9f2b869135 | |||
| 7954af0ba3 | |||
| 042b81e566 | |||
| ecb7fb6b3e | |||
| a84d1f85b8 | |||
| 4c2b129947 | |||
| d38620bc7e | |||
| 6d90be9967 | |||
| 1d79a1fa26 | |||
| 1f3a9f117d | |||
| cb77fb337f | |||
| 6f2597cc8d | |||
| 120790a34a | |||
| ab5f977d62 | |||
| 8671f1ff91 | |||
| 2aaff4bf88 | |||
| dc18f475f8 | |||
| c7d3b9ebf9 | |||
| e284c88afa | |||
| 20e9a9feb5 | |||
| b0f1a8404c | |||
| c74c4e2c3a | |||
| 00a508508e | |||
| 1d6e93d990 | |||
| 56ebe98386 | |||
| 4fe808dcbc | |||
| ef260fca72 | |||
| 803e2da691 | |||
| 1c6bcb0a5e | |||
| b6ea80b67e | |||
| 0364e281d1 | |||
| 9f566c0742 | |||
| 273ec899a5 | |||
| fc97d6ece4 | |||
| 07d03e1a27 | |||
| 2c28d44f92 | |||
| ddb016e5b0 | |||
| f82296b4c1 | |||
| 2effe5a8cc | |||
| e840a27409 | |||
| 67c96304f2 | |||
| aece38716d | |||
| c6e23d772a | |||
| df2fc221e3 | |||
| 54737a8af2 | |||
| 487fdc8511 | |||
| 70fbf7fc8a | |||
| b208d63367 | |||
| 38e19282fd | |||
| 1189bbaa95 | |||
| 0b3e240999 | |||
| e17d1a2d85 | |||
| fd7d53cb5a | |||
| e4eb0d5ffe | |||
| a6f2161ca8 | |||
| 7f8acd2850 | |||
| 6623919429 | |||
| 6ad5e0dada | |||
| 3e7289f244 | |||
| 921b783e40 | |||
| 4c0d74b6c2 | |||
| 0f0fccc312 | |||
| e7c146bc1f | |||
| 675147645c | |||
| 06e3ec9dce | |||
| 77d9d34f91 | |||
| 92855aaf8f | |||
| 68441c7141 | |||
| f267e27e36 | |||
| 428203c466 | |||
| e125ee878e | |||
| 688b5053ee | |||
| 90febd2bcf | |||
| 74f055d125 | |||
| a34259860f | |||
| 21d2b2086f | |||
| d5e52b554c | |||
| f7f7cb475e | |||
| 55d02cf6d8 | |||
| e77dd302e5 | |||
| 53774c2f74 | |||
| b18bc876b0 | |||
| 6bb2a8cdda | |||
| 60a70f94b2 | |||
| 4d7da6cb8a | |||
| be0febaad9 | |||
| 0a8d967a3e | |||
| d8ec3cbc87 | |||
| 9293076b75 | |||
| e07f9172fa | |||
| 76740d93f1 | |||
| ef65237774 | |||
| 409b1936c9 | |||
| b4b4d55767 | |||
| a177931d71 | |||
| 2a8a4342e0 | |||
| 72b9203c8c | |||
| 0fe46d6c89 | |||
| b2ad563545 | |||
| d91afcf987 | |||
| 34b104cfd2 | |||
| 50d1bcb4ce | |||
| 5a697478f9 | |||
| c01676d2bb | |||
| c9d91f1d61 | |||
| caa4740b69 | |||
| 31033659bc | |||
| 2c3f7f7177 | |||
| dfbd21f111 | |||
| fc6d1b1229 | |||
| 54ef0a7758 | |||
| efb357f841 | |||
| a3038226f1 | |||
| a722498191 | |||
| 180c75b3a2 | |||
| 609ecf1f10 | |||
| 8eba022c0c | |||
| fffa9ddcab | |||
| 0edfae58eb | |||
| d71b0858d4 | |||
| 9343610596 | |||
| 5e8b6c8455 | |||
| f18cbffaa5 | |||
| 9d49f1487d | |||
| 8827b4c9cb | |||
| 51181f6a5d | |||
| 5758472d2f | |||
| c9fa0be0e0 | |||
| 94044afe74 | |||
| 448a70d2cc | |||
| 7502785062 | |||
| b98ecb7fbc | |||
| c189332ca3 | |||
| 11a9e88d42 | |||
| 3540fcfee8 | |||
| f82312e5fb | |||
| aa7d5a2839 | |||
| a787b5ca3a | |||
| 290d1c1ba4 | |||
| 048b808153 | |||
| 8bd70b6060 | |||
| 8c73d8f62c | |||
| b0061f0e30 | |||
| 2ee7ae0448 | |||
| 610ad964d0 | |||
| 452669e80a | |||
| cfd6b4d670 | |||
| dd8c2a2140 | |||
| 7d9b0e2629 | |||
| 6658c51474 | |||
| 7839f2e427 | |||
| 4fb7af6b53 | |||
| 937b52d9bf | |||
| b3d16d1437 | |||
| ec07398114 | |||
| 1a6c5ffcb9 | |||
| 980b4738f4 | |||
| 9321a54cee | |||
| 2d2e7117b3 | |||
| 5fc725c088 | |||
| 2ef7617c66 | |||
| c222eb1381 | |||
| dca5644878 | |||
| 1d680a9135 | |||
| a671e6b9d8 | |||
| b52b9a1faf | |||
| 82e2322493 | |||
| eff300cebb | |||
| 9cad8bff38 | |||
| d907f4aac2 | |||
| f8b43676ba | |||
| 7bf9b5936f | |||
| e1995350fe | |||
| 15c360cd26 | |||
| b1da28fe18 | |||
| 00567cff6c | |||
| 79cec32401 | |||
| f96f63acca | |||
| be48f1dd2e | |||
| 3875321d9e | |||
| b01ca8e805 | |||
| 43fc61f74d | |||
| 09ed8b3b6a | |||
| a9567e2574 | |||
| c17df5ab61 | |||
| 352bd386c3 | |||
| 8e50338da3 | |||
| 150a1796b6 | |||
| 4518fb0cef | |||
| 1ed4c36412 | |||
| 0ad74d53f6 | |||
| 1fe7855ec7 | |||
| 83dbc92a59 | |||
| df72cc6eb1 | |||
| 0657d3d118 | |||
| bf16a832ef | |||
| 83ed670dc3 | |||
| 10ec069e71 | |||
| d06badf061 | |||
| 393973775c | |||
| 4df3d84358 | |||
| 5c2a3cbbf8 | |||
| 10c4ef87a3 | |||
| d0b9903395 | |||
| 71a7e5f68a | |||
| 2fe90f9c5c | |||
| 8d09420b6a | |||
| 9943405289 | |||
| 6c44a19fba | |||
| fd1e8e9edf | |||
| cae79a9fe0 | |||
| 7aa70fe7be | |||
| 2aa5a2ee09 | |||
| 72a423237c | |||
| aeecc92194 | |||
| 12816b8409 | |||
| 96a3b03fd7 | |||
| 043203781e | |||
| 5702380c16 | |||
| 4d8316676f | |||
| 4da9ae8d07 | |||
| b0ac995f26 | |||
| 765ef8e93e | |||
| 168ae2cbe8 | |||
| 6932c64a18 | |||
| e4723240b6 | |||
| c714781aef | |||
| 6afb6d8e75 | |||
| ca6a04acfe | |||
| 842d761a37 | |||
| df6d6647f7 | |||
| 20ec85189c | |||
| cc2d1e136c | |||
| c762accb39 | |||
| 2751be7e0f | |||
| 0f45812b71 | |||
| 4fdbf91222 | |||
| 45f519820a | |||
| 5c4c2d30f2 | |||
| a839c89f0b | |||
| 4bc04c2e45 | |||
| 56355e572a | |||
| 32c9ecf242 | |||
| 35eb539d00 | |||
| 62feb5ad5f | |||
| c4fbc914cb | |||
| 1eda892c86 | |||
| 3fb6a14bbd | |||
| 5337efb0e7 | |||
| 05338dc704 | |||
| c3da40b3d8 | |||
| c84f0386bb | |||
| e9e1eeae63 | |||
| 2ecee69838 | |||
| 69088f3c20 | |||
| 4e6c5bc539 | |||
| 43f10ab655 | |||
| 234f7acf84 | |||
| c40cd9b03c | |||
| f5681765fd | |||
| a0f06a5908 | |||
| f67c5d951c | |||
| f5ab5d5c43 | |||
| 8719371e21 | |||
| 372ec827a3 | |||
| b994a177f9 | |||
| 9bea1b768f | |||
| 52975871e1 | |||
| ca9d044ae9 | |||
| 84e1f508e7 | |||
| 79d5694c99 | |||
| fbadb72eb1 | |||
| a4213763be | |||
| cd4f7e1945 | |||
| 58aaa100aa | |||
| 8437f704c7 | |||
| 375a201303 | |||
| ecd8fcc46e | |||
| 304921128c | |||
| 20d5342da2 | |||
| 14e250cdf4 | |||
| 66068858d7 | |||
| 17cec68bbb | |||
| 740fca702c | |||
| c4fb8b6fb4 | |||
| e967754c27 | |||
| 2b59be792d | |||
| c0c6db7071 | |||
| e14909468a | |||
| 865f914dad | |||
| 7631edae24 | |||
| 24bda85d73 | |||
| 528fa52b29 | |||
| c6c63df7fd | |||
| fa9e97bb56 | |||
| 0c2e3f5f5a | |||
| 7106c005ed | |||
| fb446cd059 | |||
| b9af34b33d | |||
| baab54c560 | |||
| 244159d9e9 | |||
| 61aad619a8 | |||
| a2249ddf3e | |||
| 23c219d0ce | |||
| a6b549813e | |||
| 4f34034c51 | |||
| 9b881cdf13 | |||
| 219f83e1f2 | |||
| e6967528cc | |||
| 3c21510d72 | |||
| 24e6e72dc4 | |||
| 34896d1f2c | |||
| 18ef75afbb | |||
| 16d9525fa8 | |||
| 0deba6e673 | |||
| 3708b1b6a5 | |||
| 386161c5b9 | |||
| aa72d9b050 | |||
| c345889535 | |||
| b7e7da427f | |||
| c6153f7556 | |||
| 11a75fe74f | |||
| 8a5f667159 | |||
| a2651b9ab5 | |||
| 1fedf3c1b9 | |||
| 2dc3de9de1 | |||
| d1824d7c28 | |||
| a9c9722647 | |||
| 534fb39e89 | |||
| 35dfa99e59 | |||
| ff2d59fcf8 | |||
| 855f513d5f | |||
| 62bb873ddd | |||
| 55ac829fb1 | |||
| a4986cd5f9 | |||
| 2d8f283680 | |||
| f9c1905840 | |||
| 6def502496 | |||
| dff355dda9 | |||
| 1d65860227 | |||
| ee740c619f | |||
| a1a0e351c1 | |||
| aca861a190 | |||
| 44b02529ba | |||
| a83433f655 | |||
| d80e3e328a | |||
| 166bd0b44f | |||
| 7b7c8a497f | |||
| 42c9e43736 | |||
| 90956059f6 | |||
| ab07612c05 | |||
| 7ef5b15ae2 | |||
| 9678c7717f | |||
| 8dd38fc747 | |||
| 242ff4c68b | |||
| 38cc63c530 | |||
| 41b93513a2 | |||
| 359cde31c2 | |||
| 1fba4f4b88 | |||
| 16f6c229f3 | |||
| accdfcb02c | |||
| ee1a7dae99 | |||
| b31eba988b | |||
| 20b36faf11 | |||
| 82142e2f54 | |||
| 1c18578466 | |||
| 0e81c6b059 | |||
| 99fa329bc5 | |||
| f13a2bf733 | |||
| 6945be3d6e | |||
| d1fb95ecbf | |||
| 176eb1f559 | |||
| 8babbb412c | |||
| f4e68d1a47 | |||
| e0516a4c83 | |||
| 1972528df7 | |||
| 39f7bead50 | |||
| e4f6bbb0b2 | |||
| afc9369849 | |||
| 325084c6a1 | |||
| 2f99215f8d | |||
| d90cee588a | |||
| 00a38f76a7 | |||
| b329dfd107 | |||
| 11286190fa | |||
| 05d7a81885 | |||
| 1dd70d1c77 | |||
| 437566740f | |||
| 7e747e95ab | |||
| de6230644e | |||
| 08aa73ccf6 | |||
| 2607e82aaf | |||
| ec145f6d4d | |||
| 78a3b16e9c | |||
| 58cf933091 | |||
| f8fc9a8d7b | |||
| 5f4369e188 | |||
| 4593421adb | |||
| f0154eeab7 | |||
| 1e284827d7 | |||
| 3e99e630ea | |||
| 0c7334c861 | |||
| 82d55c45e7 | |||
| 7538241008 | |||
| 6193e01004 | |||
| ef321a8072 | |||
| e5a44eef58 | |||
| 5488570745 | |||
| a314c0a242 | |||
| 53e1d0eb65 | |||
| 193172498c | |||
| 7da9bdd073 | |||
| df3718cd55 | |||
| c5a22081b4 | |||
| 3fc71d098d | |||
| 34c187cd9a | |||
| 3243b01e6c | |||
| cc27d630c6 | |||
| db0033ebe5 | |||
| c2b43903ab | |||
| 2ea9c99f34 | |||
| 449c7014fb | |||
| 6d59836b76 | |||
| e703e1591e | |||
| c4f87649e4 | |||
| 6cccf594ad | |||
| df41661f47 | |||
| 3daa81f87e | |||
| 4f60eb896c | |||
| ee7318f6ae | |||
| d7aa9f9558 |
@@ -0,0 +1,11 @@
|
||||
# editorconfig.org - unify code style
|
||||
# plugins for text editors: editorconfig.org/#download
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
@@ -0,0 +1,24 @@
|
||||
.DS_Store
|
||||
dist/*
|
||||
build/files/*
|
||||
docs/api/*
|
||||
dev.html
|
||||
projects
|
||||
.zenflow-log
|
||||
test/*.map
|
||||
.bunyipconfig.js
|
||||
.s3config.json
|
||||
|
||||
node_modules
|
||||
npm-debug.log
|
||||
|
||||
sandbox/*
|
||||
!sandbox/*.example
|
||||
|
||||
*.swp
|
||||
*.swo
|
||||
|
||||
*.orig
|
||||
|
||||
*results.xml
|
||||
*.log
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"evil" : true,
|
||||
"validthis": true,
|
||||
"browser" : true,
|
||||
"debug" : true,
|
||||
"boss" : true,
|
||||
"expr" : true,
|
||||
"eqnull" : true,
|
||||
"quotmark" : "single",
|
||||
"sub" : true,
|
||||
"trailing" : true,
|
||||
"undef" : true,
|
||||
"laxbreak" : true,
|
||||
"predef" : [
|
||||
"_V_",
|
||||
"videojs",
|
||||
"vjs",
|
||||
"goog",
|
||||
"console",
|
||||
|
||||
"require",
|
||||
"define",
|
||||
"module",
|
||||
"exports",
|
||||
"process",
|
||||
|
||||
"PlayerTest",
|
||||
"asyncTest",
|
||||
"deepEqual",
|
||||
"equal",
|
||||
"expect",
|
||||
"module",
|
||||
"notDeepEqual",
|
||||
"notEqual",
|
||||
"notStrictEqual",
|
||||
"ok",
|
||||
"QUnit",
|
||||
"raises",
|
||||
"start",
|
||||
"stop",
|
||||
"strictEqual",
|
||||
"test",
|
||||
"sinon"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
# Exclude everything but the contents of the dist directory.
|
||||
**/*
|
||||
!dist/**
|
||||
@@ -0,0 +1,14 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- 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
|
||||
env:
|
||||
global:
|
||||
- secure: K6JpKwMkfNaJix3Bb0tLjVMzHMJgtBXdd/dvfw1BMb9DCBpd81PqXbDs7yXCddUxnUPTBPxZCrQgWsw71Wn+qEoIG5MU3uOT5A2rBbx/yZonVAGv5ed/9w0xk0OzO383CmPMFqwqtp9YmdmqGjQBkYXVXJjTvNTOAExFSdhO+3U=
|
||||
- secure: GIbhjUJapvC70nIZVlhVyK+3KAD2TVKpiY/q412OO7V2izbvcM1tvU3LBoMZbROzrt5TT84tCoJDvHnrpL0OvxPwrzL5CUU7h4UTxhTOyQkEinbYAnWlW9wdrvtdczsEvANkFPqBZ53B3hVHZHMLOG8QRWaTBicF68vSHEJFqb4=
|
||||
+279
@@ -0,0 +1,279 @@
|
||||
CHANGELOG
|
||||
=========
|
||||
|
||||
## HEAD (Unreleased)
|
||||
_(none)_
|
||||
|
||||
--------------------
|
||||
|
||||
## 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))
|
||||
* Fixed the title element placement in menus [[view](https://github.com/videojs/video.js/pull/1114)]
|
||||
* Fixed title support for menu buttons ([view](https://github.com/videojs/video.js/pull/1128))
|
||||
* Fixed extra mousemove events on Windows caused by certain apps, not users [[view](https://github.com/videojs/video.js/pull/1068)]
|
||||
* Fixed error due to undefined tech when no source is supported [[view](https://github.com/videojs/video.js/pull/1172)]
|
||||
* Fixed the progress bar not finishing when manual timeupdate events are used [[view](https://github.com/videojs/video.js/pull/1173)]
|
||||
* Added a more informative and styled fallback message for non-html5 browsers [[view](https://github.com/videojs/video.js/pull/1181)]
|
||||
* Added the option to provide an array of child components instead of an object [[view](https://github.com/videojs/video.js/pull/1093)]
|
||||
* Fixed casing on webkitRequestFullscreen [[view](https://github.com/videojs/video.js/pull/1101)]
|
||||
* Made tap events on mobile less sensitive to touch moves [[view](https://github.com/videojs/video.js/pull/1111)]
|
||||
* 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
|
||||
|
||||
## 4.5.1 (2014-03-27)
|
||||
* Fixed a bug from the last release where canPlaySource was no longer exported
|
||||
|
||||
## 4.5.0 (2014-03-27)
|
||||
* Added component(1) support ([view](https://github.com/videojs/video.js/pull/1032))
|
||||
* Captions now move down when controls are hidden ([view](https://github.com/videojs/video.js/pull/1053))
|
||||
* Added the .less source file to the distribution files ([view](https://github.com/videojs/video.js/pull/1056))
|
||||
* Changed src() to return the current selected source ([view](https://github.com/videojs/video.js/pull/968))
|
||||
* Added a grunt task for opening the next issue that needs addressing ([view](https://github.com/videojs/video.js/pull/1059))
|
||||
* Fixed Android 4.0+ devices' check for HLS support ([view](https://github.com/videojs/video.js/pull/1084))
|
||||
|
||||
## 4.4.3 (2014-03-06)
|
||||
* Fixed bugs in IE9 Windows 7N with no Media Player ([view](https://github.com/videojs/video.js/pull/1060))
|
||||
* Fixed a bug with setPoster() in the minified version ([view](https://github.com/videojs/video.js/pull/1062))
|
||||
|
||||
## 4.4.2 (2014-02-24)
|
||||
* Fixed module.exports in minified version ([view](https://github.com/videojs/video.js/pull/1038))
|
||||
|
||||
## 4.4.1 (2014-02-18)
|
||||
* Added .npmignore so dist files wouldn't be ignored in packages
|
||||
|
||||
## 4.4.0 (2014-02-18)
|
||||
* Made the poster updateable after initialization ([view](https://github.com/videojs/video.js/pull/838))
|
||||
* Exported more textTrack functions ([view](https://github.com/videojs/video.js/pull/815))
|
||||
* Moved player ID generation to support video tags with no IDs ([view](https://github.com/videojs/video.js/pull/845))
|
||||
* Moved to using QUnit as a dependency ([view](https://github.com/videojs/video.js/pull/850))
|
||||
* Added the util namespace for public utility functions ([view](https://github.com/videojs/video.js/pull/862))
|
||||
* Fixed an issue with calling duration before Flash is loaded ([view](https://github.com/videojs/video.js/pull/861))
|
||||
* Added player methods to externs so they can be overridden ([view](https://github.com/videojs/video.js/pull/878))
|
||||
* Fixed html5 playback when switching between media techs ([view](https://github.com/videojs/video.js/pull/887))
|
||||
* Fixed Firefox+Flash mousemove events so controls don't hide permanently ([view](https://github.com/videojs/video.js/pull/899))
|
||||
* Fixed a test for touch detection ([view](https://github.com/videojs/video.js/pull/962))
|
||||
* Updated the src file list for karma tests ([view](https://github.com/videojs/video.js/pull/948))
|
||||
* Added more tests for API properties after minification ([view](https://github.com/videojs/video.js/pull/906))
|
||||
* Updated projet to use npm version of videojs-swf ([view](https://github.com/videojs/video.js/pull/930))
|
||||
* Added support for dist zipping on windows ([view](https://github.com/videojs/video.js/pull/944))
|
||||
* Fixed iOS fullscreen issue ([view](https://github.com/videojs/video.js/pull/977))
|
||||
* Fixed touch event bubbling ([view](https://github.com/videojs/video.js/pull/992))
|
||||
* Fixed ARIA role attribute for button and slider ([view](https://github.com/videojs/video.js/pull/988))
|
||||
* Fixed an issue where a component's dispose event would bubble up ([view](https://github.com/videojs/video.js/pull/981))
|
||||
* Quieted down deprecation warnings ([view](https://github.com/videojs/video.js/pull/971))
|
||||
* Updated the seek handle to contain the current time ([view](https://github.com/videojs/video.js/pull/902))
|
||||
* Added requirejs and browserify support (UMD) ([view](https://github.com/videojs/video.js/pull/998))
|
||||
|
||||
## 4.3.0 (2013-11-04)
|
||||
* Added Karma for cross-browser unit testing ([view](https://github.com/videojs/video.js/pull/714))
|
||||
* Unmuting when the volume is changed ([view](https://github.com/videojs/video.js/pull/720))
|
||||
* Fixed an accessibility issue with the big play button ([view](https://github.com/videojs/video.js/pull/777))
|
||||
* Exported user activity methods ([view](https://github.com/videojs/video.js/pull/783))
|
||||
* Added a classname to center the play button and new spinner options ([view](https://github.com/videojs/video.js/pull/784))
|
||||
* Added API doc generation ([view](https://github.com/videojs/video.js/pull/801))
|
||||
* Added support for codecs in Flash mime types ([view](https://github.com/videojs/video.js/pull/805))
|
||||
|
||||
## 4.2.2 (2013-10-15)
|
||||
* Fixed a race condition that would cause videos to fail in Firefox ([view](https://github.com/videojs/video.js/pull/776))
|
||||
|
||||
## 4.2.1 (2013-09-09)
|
||||
* Fixed an infinite loop caused by loading the library asynchronously ([view](https://github.com/videojs/video.js/pull/727))
|
||||
|
||||
## 4.2.0 (2013-09-04)
|
||||
* Added LESS as a CSS preprocessor for the default skin ([view](https://github.com/videojs/video.js/pull/644))
|
||||
* Exported MenuButtons for use in the API ([view](https://github.com/videojs/video.js/pull/648))
|
||||
* Fixed ability to remove listeners added with one() ([view](https://github.com/videojs/video.js/pull/659))
|
||||
* Updated buffered() to account for multiple loaded ranges ([view](https://github.com/videojs/video.js/pull/643))
|
||||
* Exported createItems() for custom menus ([view](https://github.com/videojs/video.js/pull/654))
|
||||
* Preventing media events from bubbling up the DOM ([view](https://github.com/videojs/video.js/pull/630))
|
||||
* Major reworking of the control bar and many issues fixed ([view](https://github.com/videojs/video.js/pull/672))
|
||||
* Fixed an issue with minifiying the code on Windows systems ([view](https://github.com/videojs/video.js/pull/683))
|
||||
* Added support for RTMP streaming through Flash ([view](https://github.com/videojs/video.js/pull/605))
|
||||
* Made tech.features available to external techs ([view](https://github.com/videojs/video.js/pull/705))
|
||||
* Minor code improvements ([view](https://github.com/videojs/video.js/pull/706))
|
||||
* Updated time formatting to support NaN and Infinity ([view](https://github.com/videojs/video.js/pull/627))
|
||||
* Fixed an `undefined` error in cases where no tech is loaded ([view](https://github.com/videojs/video.js/pull/632))
|
||||
* Exported addClass and removeClass for player components ([view](https://github.com/videojs/video.js/pull/661))
|
||||
* Made the fallback message customizable ([view](https://github.com/videojs/video.js/pull/638))
|
||||
* Fixed an issue with the loading spinner placement and rotation ([view](https://github.com/videojs/video.js/pull/694))
|
||||
* Fixed an issue with fonts being flaky in IE8
|
||||
|
||||
## 4.1.0 (2013-06-28)
|
||||
* Turned on method queuing for unready playback technologies (flash) [view](https://github.com/videojs/video.js/pull/553)
|
||||
* Blocking user text selection on player components [view](https://github.com/videojs/video.js/pull/524)
|
||||
* Exported requestFullScreen() and cancelFullScreen() in the minified version [view](https://github.com/videojs/video.js/pull/555)
|
||||
* Exported the global players reference, videojs.players [view](https://github.com/videojs/video.js/pull/560)
|
||||
* Added google analytics to the CDN version ([view](https://github.com/videojs/video.js/pull/568))
|
||||
* Exported fadeIn/fadeOut for the Component API ([view](https://github.com/videojs/video.js/pull/581))
|
||||
* Fixed an IE poster error when autoplaying ([view](https://github.com/videojs/video.js/pull/593))
|
||||
* Exported bufferedPercent for the API ([view](https://github.com/videojs/video.js/pull/588))
|
||||
* Augmented user agent detection, specifically for Android versions ([view](https://github.com/videojs/video.js/pull/470))
|
||||
* Fixed IE9 canPlayType error ([view](https://github.com/videojs/video.js/pull/606))
|
||||
* Fixed various issues with captions ([view](https://github.com/videojs/video.js/pull/609))
|
||||
|
||||
## 4.0.4 (2013-06-11)
|
||||
* Added google analytics to current CDN version. ([view](https://github.com/videojs/video.js/pull/571))
|
||||
|
||||
## 4.0.3 (2013-05-28)
|
||||
* Fixed an bug with exiting fullscreen. [view](https://github.com/videojs/video.js/pull/546)
|
||||
|
||||
## 4.0.2 (2013-05-23)
|
||||
* Correct version number for CDN swf url. Minify CSS. [view](https://github.com/videojs/video.js/pull/535)
|
||||
|
||||
## 4.0.1 (2013-05-22)
|
||||
* Fixed old IE font loading [view](https://github.com/videojs/video.js/pull/532)
|
||||
|
||||
## 4.0.0 (2013-05-09)
|
||||
* Improved performance through an 18% size reduction using Google Closure Compiler in advanced mode
|
||||
* Greater stability through an automated cross-browser/device test suite using TravisCI, Bunyip, and Browserstack.
|
||||
* New plugin interface and plugin listing for extending Video.js
|
||||
* New default skin design that uses font icons for greater customization
|
||||
* Responsive design and retina display support
|
||||
* Improved accessibility through better ARIA support
|
||||
* Moved to Apache 2.0 license
|
||||
* 100% JavaScript development tool set including Grunt
|
||||
* Updated docs to use Github markdown
|
||||
* Allow disabling of default components
|
||||
* Duration is now setable (need ed for HLS m3u8 files)
|
||||
* Event binders (on/off/one) now return the player instance
|
||||
* Stopped player from going back to beginning on ended event
|
||||
* Added support for percent width/height and fluid layouts
|
||||
* Improved load order of elements to reduce reflow
|
||||
* Changed addEvent function name to 'on'
|
||||
* Removed conflicting array.indexOf function
|
||||
* Added exitFullScreen to support BlackBerry devices (pull/143)
|
||||
|
||||
## 3.2.0 (2012-03-20)
|
||||
* Updated docs with more options.
|
||||
* Overhauled HTML5 Track support.
|
||||
* Fixed Flash always autoplaying when setting source.
|
||||
* Fixed localStorage context
|
||||
* Updated 'fullscreenchange' event to be called even if the user presses escape to exit fullscreen.
|
||||
* Automatically converting URsource URL to absolute for Flash fallback.
|
||||
* Created new 'loadedalldata' event for when the source is completely downloaded
|
||||
* Improved player.destroy(). Now removes elements and references.
|
||||
* Refactored API to be more immediately available.
|
||||
|
||||
### Patches
|
||||
* 3.2.1 (2012-04-06) Fixed setting width/height with javascript options
|
||||
* 3.2.2 (2012-05-02) Fixed error with multiple controls fading listeners
|
||||
* 3.2.3 (2012-11-12) Fixed chrome spinner continuing on seek
|
||||
|
||||
## 3.1.0 (2012-01-30)
|
||||
* Added CSS fix for Firefox 9 fullscreen (in the rare case that it's enabled)
|
||||
* Replaced swfobject with custom embed to save file size.
|
||||
* Added flash iframe-mode, an experimental method for getting around flash reloading issues.
|
||||
* Fixed issue with volume knob position. Improved controls fading.
|
||||
* Fixed ian issue with triggering fullscreen a second time.
|
||||
* Fixed issue with getting attributes in Firefox 3.0
|
||||
* Escaping special characters in source URL for Flash
|
||||
* Added a check for if Firefox is enabled which fixes a Firefox 9 issue
|
||||
* Stopped spinner from showing on 'stalled' events since browsers sometimes don't show that they've recovered.
|
||||
* Fixed CDN Version which was breaking dev.html
|
||||
* Made full-window mode more independent
|
||||
* Added rakefile for release generation
|
||||
|
||||
## 3.0.0 (2012-01-10)
|
||||
* Same HTML/CSS Skin for both HTML5 and Flash video
|
||||
* Super lightweight Flash fallback player for browsers that don’t support HTML5 video
|
||||
* Free CDN hosting
|
||||
|
||||
### Patches
|
||||
* 3.0.2 (2012-01-12) Started tracking changes with zenflow
|
||||
* 3.0.3 (2012-01-12) Added line to docs to test zenflow
|
||||
* 3.0.4 (2012-01-12) Fixing an undefined source when no sources exist on load
|
||||
* 3.0.5 (2012-01-12) Removed deprecated event.layerX and layerY
|
||||
* 3.0.6 (2012-01-12) Fixed wrong URL for CDN in docs
|
||||
* 3.0.7 (2012-01-12) Fixed an ie8 breaking bug with the poster
|
||||
* 3.0.8 (2012-01-23) Fixed issue with controls not hiding in IE due to no opacity support
|
||||
@@ -0,0 +1,275 @@
|
||||
CONTRIBUTING
|
||||
============
|
||||
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)
|
||||
* [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)
|
||||
|
||||
* [Videojs.com](https://github.com/videojs/videojs.com)
|
||||
* [Video.js flash player](https://github.com/videojs/video-js-swf)
|
||||
* [Player skin designer](https://github.com/videojs/designer)
|
||||
* [Contribflow](https://github.com/zencoder/contribflow)
|
||||
|
||||
Filing issues
|
||||
-------------
|
||||
[GitHub Issues](https://github.com/videojs/video.js/issues) are used for all discussions around the codebase, including **bugs**, **features**, and other **enhancements**.
|
||||
|
||||
### Reporting a Bug
|
||||
|
||||
**A bug is a demonstrable problem** that is caused by the code in the repository. Good bug reports are extremely helpful. Thank You!
|
||||
|
||||
Guidelines for bug reports:
|
||||
|
||||
1. Use the [GitHub issue search](https://github.com/videojs/video.js/issues) — check if the issue has already been reported.
|
||||
|
||||
2. Check if the issue has already been fixed — try to reproduce it using the latest `master` branch in the repository.
|
||||
|
||||
3. Isolate the problem — **create a [reduced test case](http://css-tricks.com/6263-reduced-test-cases/)** with a live example. You can possibly use [this JSBin example](http://jsbin.com/axedog/7/edit) as a starting point.
|
||||
|
||||
A good bug report should be as detailed as possible, so that others won't have to follow up for the essential details.
|
||||
|
||||
Here's an example:
|
||||
|
||||
> Short yet concise Bug Summary
|
||||
>
|
||||
> Description:
|
||||
> Happens on Windows 7 and OSX. Seen with IE9, Firefox 19 OSX, Chrome 21, Flash 11.6 and 11.2
|
||||
>
|
||||
> 1. This is the first step
|
||||
> 2. This is the second step
|
||||
> 3. Further steps, etc.
|
||||
>
|
||||
> Expected:
|
||||
> (describe the expected outcome of the steps above)
|
||||
>
|
||||
> Actual:
|
||||
> (describe what actually happens)
|
||||
>
|
||||
> `<url>` (a link to the reduced test case, if it exists)
|
||||
>
|
||||
> Any other information you want to share that is relevant to the issue being
|
||||
> reported. This might include the lines of code that you have identified as
|
||||
> causing the bug, and potential solutions (and your opinions on their
|
||||
> merits).
|
||||
|
||||
**[File a bug report](https://github.com/videojs/video.js/issues/new)**
|
||||
|
||||
### Requesting a Feature
|
||||
|
||||
1. [Check the plugin list](https://github.com/videojs/video.js/wiki/Plugins) for any plugins that may already support the feature.
|
||||
|
||||
2. [Search the issues](https://github.com/videojs/video.js/issues) for any previous requests for the same feature, and give a thumbs up or +1 on existing requests.
|
||||
|
||||
2. If no previous requests exist, create a new issue. Please be as clear as possible about why the feautre is needed and the intended use case.
|
||||
|
||||
**[Request a feature](https://github.com/videojs/video.js/issues/new)**
|
||||
|
||||
Contributing code
|
||||
-----------------
|
||||
|
||||
To contibute code you'll need to be able to build a copy of Video.js and run tests locally. There are a few requirements before getting started.
|
||||
|
||||
- Node.js -- Video.js uses Node for build and test automation. Node is available for Windows, Mac OS X, Linux, and SunOS, as well as source code if that doesn't scare you. [Download and install Node.js](http://nodejs.org/download/)
|
||||
|
||||
- grunt-cli -- Install grunt-cli globally so that you will have the correct version of grunt available for any project that needs it.
|
||||
|
||||
On Unix-based systems, you'll have to do this as a superuser:
|
||||
|
||||
```bash
|
||||
sudo npm install -g grunt-cli
|
||||
```
|
||||
On Windows, you can just run:
|
||||
|
||||
```bash
|
||||
npm install -g grunt-cli
|
||||
```
|
||||
|
||||
- Contribflow -- A homegrown git workflow tool for managing feature/hotfix branches and submitting pull requests. If you have your own preferred git workflow, contribflow isn't required, but the following instructions will assume you're using it.
|
||||
|
||||
On Unix-based systems, you'll have to do this as a superuser:
|
||||
|
||||
```bash
|
||||
sudo npm install -g contribflow
|
||||
```
|
||||
|
||||
On Windows, you can just run:
|
||||
|
||||
```bash
|
||||
npm install -g contribflow
|
||||
```
|
||||
|
||||
### Building your own copy of Video.js
|
||||
|
||||
First, [fork](http://help.github.com/fork-a-repo/) the video.js git repository. At the top of every github page, there is a Fork button. Click it, and the forking process will copy Video.js into your own GitHub account.
|
||||
|
||||
Clone your fork of the repo into your code directory
|
||||
|
||||
```bash
|
||||
git clone https://github.com/<your-username>/video.js.git
|
||||
```
|
||||
|
||||
Navigate to the newly cloned directory
|
||||
|
||||
```bash
|
||||
cd video.js
|
||||
```
|
||||
|
||||
Assign the original repo to a remote called "upstream"
|
||||
|
||||
```
|
||||
git remote add upstream https://github.com/videojs/video.js.git
|
||||
```
|
||||
|
||||
>In the future, if you want to pull in updates to video.js that happened after you cloned the main repo, you can run:
|
||||
>
|
||||
> ```bash
|
||||
> git checkout master
|
||||
> git pull upstream master
|
||||
> ```
|
||||
|
||||
Install the required node.js modules using node package manager
|
||||
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
> A note to Windows developers: If you run npm commands, and you find that your command prompt colors have suddenly reversed, you can configure npm to set color to false to prevent this from happening.
|
||||
> `npm config set color false`
|
||||
> Note that this change takes effect when a new command prompt window is opened; the current window will not be affected.
|
||||
|
||||
Build a local copy of video.js and run tests
|
||||
|
||||
```bash
|
||||
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. To run the tests with Karma:
|
||||
|
||||
```bash
|
||||
grunt karma:dev
|
||||
```
|
||||
|
||||
At this point you should have a built copy of video.js in a directory named `dist`, and all tests should be passing.
|
||||
|
||||
### Making Changes
|
||||
|
||||
Whether you're adding something new, making something better, or fixing a bug, you'll first want to search the [GitHub issues](https://github.com/videojs/video.js/issues) and [plugins list](https://github.com/videojs/video.js/wiki/Plugins) to make sure you're aware of any previous discussion or work. If an unclaimed issue exists, claim it via a comment. If no issue exists for your change, submit one, follwing the [issue filing guidelines](#filing-issues).
|
||||
|
||||
There are two categories of changes in video.js land, features and hotfixes (Video.js follows a branching model similar to [gitflow](http://nvie.com/posts/a-successful-git-branching-model/)). Hotfixes are for urgent fixes that need to be released immediately as a patch. Features are for everything else (including non-urgent fixes). If you think you have a hotfix scenario, verify that (via comment) before starting the work. We'll focus on features here, but you can swap `hotfix` for `feature` in any command.
|
||||
|
||||
Start a new development branch
|
||||
|
||||
```bash
|
||||
contrib feature start
|
||||
```
|
||||
|
||||
You'll be prompted to name the branch. After that, contrib will create the branch locally, and use git to push it up to your origin, and track it. You're now ready to start building your feature or fixing that bug! Be sure to read the [Code Style Guide](#code-style-guide).
|
||||
|
||||
While you're developing, you can ensure your changes are working by writing tests (in the `test` directory) and running `grunt test`.
|
||||
|
||||
There's also a sandbox directory where you can add any file and it won't get tracked as a change. To start you can copy the example index file and see a working version of a player (using the local source code) by loading it in a browser.
|
||||
|
||||
```bash
|
||||
cp sandbox/index.html.example sandbox/index.html
|
||||
open sandbox/index.html
|
||||
```
|
||||
|
||||
|
||||
### Testing Locally
|
||||
A simple Connect server is available via the Grunt plugin. The commands below will allow you to setup a test sandbox and begin development.
|
||||
|
||||
```bash
|
||||
cp sandbox/index.html.example sandbox/index.html
|
||||
grunt connect
|
||||
open http://localhost:9999/sandbox/index.html
|
||||
```
|
||||
|
||||
> NOTES regarding local testing in Chrome 21+ (as of 2013/01/01)
|
||||
> Flash files that are local and loaded into a locally accessed page (file:///) will NOT run.
|
||||
> To get around this you can do either of the following:
|
||||
>
|
||||
> 1. Do your development and testing using a local HTTP server. See Grunt commands above.
|
||||
>
|
||||
> 2. [Disable the version of Flash included with Chrome](http://helpx.adobe.com/flash-player/kb/flash-player-google-chrome.html#How_can_I_run_debugger_or_alternate_versions_of_Flash_Player_in_Google_Chrome) and enable a system-wide version of Flash instead.
|
||||
|
||||
Commit and push changes as you go (using git directly). Write thorough descriptions of your changes in your commit messages.
|
||||
|
||||
```bash
|
||||
git add .
|
||||
git commit -av
|
||||
git push
|
||||
```
|
||||
|
||||
> GitHub allows you to close an issue through your commit message using the [fixes](https://github.com/blog/831-issues-2-0-the-next-generation) keyword.
|
||||
>
|
||||
> ```bash
|
||||
> My commit message. fixes #123
|
||||
> Testing: (briefly describe any testing here, for example, 'unit tests and cross-browser manual tests around playback and network interruption')
|
||||
> ```
|
||||
|
||||
### Submitting your changes
|
||||
|
||||
First, thoroughly test your feature or fix, including writing tests to make sure your change doesn't get regressed in a future update. If you're fixing a bug, we recommend in addition to testing the fix itself, to do some testing around the areas that your fix has touched. For example, a brief smoketest of the player never hurts.
|
||||
|
||||
Make sure your changes are pushed to origin
|
||||
|
||||
```bash
|
||||
git push
|
||||
```
|
||||
|
||||
Use contrib to submit a a pull request (make sure you're in your feature branch)
|
||||
|
||||
```bash
|
||||
contrib feature submit
|
||||
```
|
||||
|
||||
You'll be prompted for title and description for the Pull Request. After that, contrib will use Git to submit your pull request to video.js.
|
||||
|
||||
You're Done! (except for cleanup.) To clean up your feature or hotfix branch:
|
||||
|
||||
First, checkout your feature or issue branch:
|
||||
|
||||
```bash
|
||||
git checkout (branchname)
|
||||
```
|
||||
|
||||
Run this command to clean up your feature:
|
||||
|
||||
```bash
|
||||
contrib feature delete
|
||||
```
|
||||
|
||||
Run this command to clean up your bug fix:
|
||||
|
||||
```bash
|
||||
contrib hotfix delete
|
||||
```
|
||||
> PLEASE NOTE: THIS WILL DELETE YOUR LOCAL AND REMOTE COPIES OF THE FEATURE.
|
||||
> This is meant to clean up your local and remote branches, so make sure any changes you don't want to lose have been pulled into the parent project or another branch first.
|
||||
|
||||
Code Style Guide
|
||||
----------------
|
||||
Please follow [Google's JavaScript Style Guide](http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml) to the letter. If your editor supports [.editorconfig](http://editorconfig.org/#download) it will make it easier to manage differences from your own coding style.
|
||||
|
||||
### Style examples include:
|
||||
* Two space indents.
|
||||
* Delimit strings with single-quotes `'`, not double-quotes `"`.
|
||||
* No trailing whitespace, except in markdown files where a linebreak must be forced.
|
||||
* No more than [one assignment](http://benalman.com/news/2012/05/multiple-var-statements-javascript/) per `var` statement.
|
||||
* Prefer `if` and `else` to ["clever"](http://programmers.stackexchange.com/a/25281) uses of `? :` conditional or `||`, `&&` logical operators.
|
||||
* **When in doubt, follow the conventions you see used in the source already.**
|
||||
|
||||
If you happen to find something in the codebase that does not follow the style guide, that's a good opportunity to make your first contribution!
|
||||
|
||||
---
|
||||
### Doc Credit
|
||||
This doc was inspired by some great contribution guide examples including [contribute.md template](https://github.com/contribute-md/contribute-md-template),
|
||||
[grunt](https://github.com/gruntjs/grunt/wiki/Contributing),
|
||||
[html5 boilerplate](https://github.com/h5bp/html5-boilerplate/blob/master/CONTRIBUTING.md),
|
||||
[jquery](https://github.com/jquery/jquery/blob/master/CONTRIBUTING.md),
|
||||
and [node.js](https://github.com/joyent/node/wiki/Contributing).
|
||||
+678
@@ -0,0 +1,678 @@
|
||||
module.exports = function(grunt) {
|
||||
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');
|
||||
} catch(e) {
|
||||
s3 = {};
|
||||
}
|
||||
|
||||
verParts = pkg.version.split('.');
|
||||
version = {
|
||||
full: pkg.version,
|
||||
major: verParts[0],
|
||||
minor: verParts[1],
|
||||
patch: verParts[2]
|
||||
};
|
||||
version.majorMinor = version.major + '.' + version.minor;
|
||||
|
||||
// loading predefined source order from source-loader.js
|
||||
// trust me, this is the easist way to do it so far
|
||||
/*jshint undef:false, evil:true */
|
||||
var blockSourceLoading = true;
|
||||
var sourceFiles; // Needed to satisfy jshint
|
||||
eval(grunt.file.read('./build/source-loader.js'));
|
||||
|
||||
// Project configuration.
|
||||
grunt.initConfig({
|
||||
pkg: pkg,
|
||||
build: {
|
||||
src: 'src/js/dependencies.js',
|
||||
options: {
|
||||
baseDir: 'src/js/'
|
||||
}
|
||||
},
|
||||
clean: {
|
||||
build: ['build/files/*'],
|
||||
dist: ['dist/*']
|
||||
},
|
||||
jshint: {
|
||||
src: {
|
||||
src: ['src/js/*.js', 'Gruntfile.js', 'test/unit/*.js'],
|
||||
options: {
|
||||
jshintrc: '.jshintrc'
|
||||
}
|
||||
}
|
||||
},
|
||||
minify: {
|
||||
source:{
|
||||
src: ['build/files/combined.video.js', 'build/compiler/goog.base.js', 'src/js/exports.js'],
|
||||
externs: ['src/js/player.externs.js', 'src/js/media/flash.externs.js'],
|
||||
dest: 'build/files/minified.video.js'
|
||||
},
|
||||
tests: {
|
||||
src: ['build/files/combined.video.js', 'build/compiler/goog.base.js', 'src/js/exports.js', 'test/unit/*.js'],
|
||||
externs: ['src/js/player.externs.js', 'src/js/media/flash.externs.js', 'test/qunit-externs.js', 'test/sinon-externs.js'],
|
||||
dest: 'build/files/test.minified.video.js'
|
||||
}
|
||||
},
|
||||
dist: {},
|
||||
qunit: {
|
||||
source: ['test/index.html'],
|
||||
minified: ['test/minified.html'],
|
||||
minified_api: ['test/minified-api.html']
|
||||
},
|
||||
watch: {
|
||||
files: [ 'src/**/*', 'test/unit/*.js', 'Gruntfile.js' ],
|
||||
tasks: 'dev'
|
||||
},
|
||||
connect: {
|
||||
dev: {
|
||||
options: {
|
||||
port: 9999,
|
||||
keepalive: true
|
||||
}
|
||||
}
|
||||
},
|
||||
copy: {
|
||||
minor: {
|
||||
files: [
|
||||
{expand: true, cwd: 'build/files/', src: ['*'], dest: 'dist/'+version.majorMinor+'/', filter: 'isFile'} // includes files in path
|
||||
]
|
||||
},
|
||||
patch: {
|
||||
files: [
|
||||
{expand: true, cwd: 'build/files/', src: ['*'], dest: 'dist/'+version.full+'/', filter: 'isFile'} // includes files in path
|
||||
]
|
||||
}
|
||||
},
|
||||
s3: {
|
||||
options: s3,
|
||||
minor: {
|
||||
upload: [
|
||||
{
|
||||
src: 'dist/cdn/*',
|
||||
dest: 'vjs/'+version.majorMinor+'/',
|
||||
rel: 'dist/cdn/',
|
||||
headers: {
|
||||
'Cache-Control': 'public, max-age=2628000'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
patch: {
|
||||
upload: [
|
||||
{
|
||||
src: 'dist/cdn/*',
|
||||
dest: 'vjs/'+version.full+'/',
|
||||
rel: 'dist/cdn/',
|
||||
headers: {
|
||||
'Cache-Control': 'public, max-age=31536000'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
cssmin: {
|
||||
minify: {
|
||||
expand: true,
|
||||
cwd: 'build/files/',
|
||||
src: ['video-js.css'],
|
||||
dest: 'build/files/',
|
||||
ext: '.min.css'
|
||||
}
|
||||
},
|
||||
less: {
|
||||
dev: {
|
||||
files: {
|
||||
'build/files/video-js.css': 'src/css/video-js.less'
|
||||
}
|
||||
}
|
||||
},
|
||||
karma: {
|
||||
// this config file applies to all following configs except if overwritten
|
||||
options: {
|
||||
configFile: 'test/karma.conf.js'
|
||||
},
|
||||
|
||||
// this only runs on PRs from the mainrepo on saucelabs
|
||||
saucelabs: {
|
||||
browsers: ['chrome_sl']
|
||||
},
|
||||
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: {
|
||||
all: {
|
||||
src: sourceFiles,
|
||||
dest: 'docs/api',
|
||||
options: {
|
||||
baseURL: 'https://github.com/videojs/video.js/blob/master/'
|
||||
}
|
||||
}
|
||||
},
|
||||
vjslanguages: {
|
||||
defaults: {
|
||||
files: {
|
||||
'build/files/lang': ['lang/*.json']
|
||||
}
|
||||
}
|
||||
},
|
||||
zip: {
|
||||
dist: {
|
||||
router: function (filepath) {
|
||||
var path = require('path');
|
||||
return path.relative('dist', filepath);
|
||||
},
|
||||
// compression: 'DEFLATE',
|
||||
src: ['dist/video-js/**/*'],
|
||||
dest: 'dist/video-js-' + version.full + '.zip'
|
||||
}
|
||||
},
|
||||
usebanner: {
|
||||
dist: {
|
||||
options: {
|
||||
position: 'top',
|
||||
banner: '/*! Video.js v' + version.full + ' <%= pkg.copyright %> */ ',
|
||||
linebreak: true
|
||||
},
|
||||
files: {
|
||||
src: [ 'build/files/minified.video.js']
|
||||
}
|
||||
}
|
||||
},
|
||||
version: {
|
||||
options: {
|
||||
pkg: 'package.json'
|
||||
},
|
||||
major: {
|
||||
options: {
|
||||
release: 'major'
|
||||
},
|
||||
src: ['package.json', 'bower.json', 'component.json']
|
||||
},
|
||||
minor: {
|
||||
options: {
|
||||
release: 'minor'
|
||||
},
|
||||
src: ['package.json', 'bower.json', 'component.json']
|
||||
},
|
||||
patch: {
|
||||
options: {
|
||||
release: 'patch'
|
||||
},
|
||||
src: ['package.json', 'bower.json', 'component.json']
|
||||
}
|
||||
},
|
||||
tagrelease: {
|
||||
file: 'package.json',
|
||||
commit: true,
|
||||
message: 'Release %version%',
|
||||
prefix: 'v'
|
||||
}
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks('grunt-videojs-languages');
|
||||
grunt.loadNpmTasks('grunt-contrib-connect');
|
||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||
grunt.loadNpmTasks('grunt-contrib-qunit');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
||||
grunt.loadNpmTasks('grunt-contrib-copy');
|
||||
grunt.loadNpmTasks('grunt-contrib-cssmin');
|
||||
grunt.loadNpmTasks('grunt-contrib-less');
|
||||
grunt.loadNpmTasks('grunt-s3');
|
||||
grunt.loadNpmTasks('contribflow');
|
||||
grunt.loadNpmTasks('grunt-karma');
|
||||
grunt.loadNpmTasks('videojs-doc-generator');
|
||||
grunt.loadNpmTasks('grunt-zip');
|
||||
grunt.loadNpmTasks('grunt-banner');
|
||||
grunt.loadNpmTasks('grunt-version');
|
||||
grunt.loadNpmTasks('grunt-tagrelease');
|
||||
grunt.loadNpmTasks('chg');
|
||||
|
||||
// grunt.loadTasks('./docs/tasks/');
|
||||
// grunt.loadTasks('../videojs-doc-generator/tasks/');
|
||||
|
||||
grunt.registerTask('pretask', ['jshint', 'less', 'vjslanguages', 'build', 'minify', 'usebanner']);
|
||||
// Default task.
|
||||
grunt.registerTask('default', ['pretask', 'dist']);
|
||||
// Development watch task
|
||||
grunt.registerTask('dev', ['jshint', 'less', 'vjslanguages', 'build', 'qunit:source']);
|
||||
grunt.registerTask('test-qunit', ['pretask', 'qunit']);
|
||||
|
||||
// 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--) {
|
||||
sourceFiles[i] = sourceFiles[i].replace(/\\/g, '/');
|
||||
}
|
||||
|
||||
// Create a combined sources file. https://github.com/zencoder/video-js/issues/287
|
||||
var combined = '';
|
||||
sourceFiles.forEach(function(result){
|
||||
combined += grunt.file.read(result);
|
||||
});
|
||||
// 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
|
||||
// grunt.file.copy('src/css/video-js.png', 'build/files/video-js.png');
|
||||
grunt.file.copy('node_modules/videojs-swf/dist/video-js.swf', 'build/files/video-js.swf');
|
||||
|
||||
// Inject version number into css file
|
||||
var css = grunt.file.read('build/files/video-js.css');
|
||||
css = css.replace(/GENERATED_AT_BUILD/g, version.full);
|
||||
grunt.file.write('build/files/video-js.css', css);
|
||||
|
||||
// Copy over font files
|
||||
grunt.file.recurse('src/css/font', function(absdir, rootdir, subdir, filename) {
|
||||
// Block .DS_Store files
|
||||
if ('filename'.substring(0,1) !== '.') {
|
||||
grunt.file.copy(absdir, 'build/files/font/' + filename);
|
||||
}
|
||||
});
|
||||
|
||||
// Minify CSS
|
||||
grunt.task.run(['cssmin']);
|
||||
});
|
||||
|
||||
grunt.registerMultiTask('minify', 'Minify JS files using Closure Compiler.', function() {
|
||||
var done = this.async();
|
||||
var exec = require('child_process').exec;
|
||||
|
||||
var externs = this.data.externs || [];
|
||||
var dest = this.data.dest;
|
||||
var filePatterns = [];
|
||||
|
||||
// Make sure deeper directories exist for compiler
|
||||
grunt.file.write(dest, '');
|
||||
|
||||
if (this.data.sourcelist) {
|
||||
filePatterns = filePatterns.concat(grunt.file.read(this.data.sourcelist).split(','));
|
||||
}
|
||||
if (this.data.src) {
|
||||
filePatterns = filePatterns.concat(this.data.src);
|
||||
}
|
||||
|
||||
// Build closure compiler shell command
|
||||
var command = 'java -jar build/compiler/compiler.jar'
|
||||
+ ' --compilation_level ADVANCED_OPTIMIZATIONS'
|
||||
// + ' --formatting=pretty_print'
|
||||
+ ' --js_output_file=' + dest
|
||||
+ ' --create_source_map ' + dest + '.map --source_map_format=V3'
|
||||
+ ' --jscomp_warning=checkTypes --warning_level=VERBOSE'
|
||||
+ ' --output_wrapper "(function() {%output%})();"';
|
||||
//@ sourceMappingURL=video.js.map
|
||||
|
||||
// Add each js file
|
||||
grunt.file.expand(filePatterns).forEach(function(file){
|
||||
command += ' --js='+file;
|
||||
});
|
||||
|
||||
// Add externs
|
||||
externs.forEach(function(extern){
|
||||
command += ' --externs='+extern;
|
||||
});
|
||||
|
||||
// Run command
|
||||
exec(command, { maxBuffer: 500*1024 }, function(err, stdout, stderr){
|
||||
|
||||
if (err) {
|
||||
grunt.warn(err);
|
||||
done(false);
|
||||
}
|
||||
|
||||
if (stdout) {
|
||||
grunt.log.writeln(stdout);
|
||||
}
|
||||
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
grunt.registerTask('dist-copy', 'Assembling distribution', function(){
|
||||
var css, jsmin, jsdev, cdnjs;
|
||||
|
||||
// Manually copy each source file
|
||||
grunt.file.copy('build/files/minified.video.js', 'dist/video-js/video.js');
|
||||
grunt.file.copy('build/files/combined.video.js', 'dist/video-js/video.dev.js');
|
||||
grunt.file.copy('build/files/video-js.css', 'dist/video-js/video-js.css');
|
||||
grunt.file.copy('build/files/video-js.min.css', 'dist/video-js/video-js.min.css');
|
||||
grunt.file.copy('node_modules/videojs-swf/dist/video-js.swf', 'dist/video-js/video-js.swf');
|
||||
grunt.file.copy('build/demo-files/demo.html', 'dist/video-js/demo.html');
|
||||
grunt.file.copy('build/demo-files/demo.captions.vtt', 'dist/video-js/demo.captions.vtt');
|
||||
grunt.file.copy('src/css/video-js.less', 'dist/video-js/video-js.less');
|
||||
|
||||
|
||||
// Copy over font files
|
||||
grunt.file.recurse('build/files/font', function(absdir, rootdir, subdir, filename) {
|
||||
// Block .DS_Store files
|
||||
if ('filename'.substring(0,1) !== '.') {
|
||||
grunt.file.copy(absdir, 'dist/video-js/font/' + filename);
|
||||
}
|
||||
});
|
||||
|
||||
// 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');
|
||||
}
|
||||
|
||||
// CDN version uses already hosted font files
|
||||
// Minified version only, doesn't need demo files
|
||||
grunt.file.copy('build/files/minified.video.js', 'dist/cdn/video.js');
|
||||
grunt.file.copy('build/files/video-js.min.css', 'dist/cdn/video-js.css');
|
||||
grunt.file.copy('node_modules/videojs-swf/dist/video-js.swf', 'dist/cdn/video-js.swf');
|
||||
grunt.file.copy('build/demo-files/demo.captions.vtt', 'dist/cdn/demo.captions.vtt');
|
||||
grunt.file.copy('build/demo-files/demo.html', 'dist/cdn/demo.html');
|
||||
|
||||
// Replace font urls with CDN versions
|
||||
css = grunt.file.read('dist/cdn/video-js.css');
|
||||
css = css.replace(/font\//g, '../f/3/');
|
||||
grunt.file.write('dist/cdn/video-js.css', css);
|
||||
|
||||
// Add CDN-specfic JS
|
||||
jsmin = grunt.file.read('dist/cdn/video.js');
|
||||
// GA Tracking Pixel (manually building the pixel URL)
|
||||
cdnjs = uglify.minify('src/js/cdn.js').code.replace('v0.0.0', 'v'+version.full);
|
||||
grunt.file.write('dist/cdn/video.js', jsmin + cdnjs);
|
||||
});
|
||||
|
||||
grunt.registerTask('cdn-links', 'Update the version of CDN links in docs', function(){
|
||||
var doc = grunt.file.read('docs/guides/setup.md');
|
||||
var version = pkg.version;
|
||||
|
||||
// remove the patch version to point to the latest patch
|
||||
version = version.replace(/(\d\.\d)\.\d/, '$1');
|
||||
|
||||
// update the version in http://vjs.zencdn.net/4.3/video.js
|
||||
doc = doc.replace(/(\/\/vjs\.zencdn\.net\/)\d\.\d(\.\d)?/g, '$1'+version);
|
||||
grunt.file.write('docs/guides/setup.md', doc);
|
||||
});
|
||||
|
||||
grunt.registerTask('dist', 'Creating distribution', ['dist-copy', 'zip:dist']);
|
||||
|
||||
grunt.registerTask('next-issue', 'Get the next issue that needs a response', function(){
|
||||
var done = this.async();
|
||||
var GitHubApi = require('github');
|
||||
var open = require('open');
|
||||
|
||||
var github = new GitHubApi({
|
||||
// required
|
||||
version: '3.0.0',
|
||||
// optional
|
||||
debug: true,
|
||||
protocol: 'https',
|
||||
// host: 'github.my-GHE-enabled-company.com',
|
||||
// pathPrefix: '/api/v3', // for some GHEs
|
||||
timeout: 5000
|
||||
});
|
||||
|
||||
github.issues.repoIssues({
|
||||
// optional:
|
||||
// headers: {
|
||||
// 'cookie': 'blahblah'
|
||||
// },
|
||||
user: 'videojs',
|
||||
repo: 'video.js',
|
||||
sort: 'updated',
|
||||
direction: 'asc',
|
||||
state: 'open',
|
||||
per_page: 100
|
||||
}, function(err, res) {
|
||||
var issueToOpen;
|
||||
var usersWithWrite = ['heff', 'mmcc'];
|
||||
var categoryLabels = ['enhancement', 'bug', 'question', 'feature'];
|
||||
|
||||
console.log('Number of issues: '+res.length);
|
||||
|
||||
// TODO: Find the best way to exclude an issue where a question has been asked of the
|
||||
// issue owner/submitter that hasn't been answerd yet.
|
||||
// A stupid simple first step would be to check for the needs: more info label
|
||||
// and exactly one comment (the question)
|
||||
|
||||
// find issues that need categorizing, no category labels
|
||||
res.some(function(issue){
|
||||
if (issue.labels.length === 0) {
|
||||
return issueToOpen = issue; // break
|
||||
}
|
||||
// look for category labels
|
||||
var categorized = issue.labels.some(function(label){
|
||||
return categoryLabels.indexOf(label.name) >= 0;
|
||||
});
|
||||
if (!categorized) {
|
||||
return issueToOpen = issue; // break
|
||||
}
|
||||
});
|
||||
if (issueToOpen) {
|
||||
open(issueToOpen.html_url);
|
||||
return done();
|
||||
}
|
||||
|
||||
// find issues that need confirming or answering
|
||||
res.some(function(issue){
|
||||
// look for confirmed label
|
||||
var confirmed = issue.labels.some(function(label){
|
||||
return label.name === 'confirmed';
|
||||
});
|
||||
// Was exluding questions, but that might leave a lot of people hanging
|
||||
// var question = issue.labels.some(function(label){
|
||||
// return label.name === 'question';
|
||||
// });
|
||||
if (!confirmed) { // && !question
|
||||
return issueToOpen = issue; // break
|
||||
}
|
||||
});
|
||||
if (issueToOpen) {
|
||||
open(issueToOpen.html_url);
|
||||
return done();
|
||||
}
|
||||
|
||||
grunt.log.writeln('No next issue found');
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
};
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
Copyright 2013 Brightcove, Inc.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-165
@@ -1,165 +0,0 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
+10
-146
@@ -1,153 +1,17 @@
|
||||
VideoJS - [HTML5 Video Player](http://videojs.com)
|
||||
==================================================
|
||||
Version 3.0 BETA
|
||||
# [Video.js - HTML5 Video Player](http://videojs.com) [](https://travis-ci.org/videojs/video.js)
|
||||
|
||||
---
|
||||
BETA NOTES
|
||||
Version 3 is almost a complete rewrite of the previous versions of VideoJS. New features includes:
|
||||
> 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.
|
||||
|
||||
- HTML/CSS Controls and API now work for both the HTML5 and Flash versions.
|
||||
- Custom Super-lightweight Flash Fallback
|
||||
- Embed Code is much simpler.
|
||||
- No more "vjs-box" div required, just use the video tag.
|
||||
- No more embedding of Flash fallback within the video tag HTML.
|
||||
Visit [videojs.com](http://videojs.com) for an overview, download options, and instructions on how to use the player on your site.
|
||||
|
||||
---
|
||||
## 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).
|
||||
|
||||
View [VideoJS.com](http://videojs.com) for a demo and overview.
|
||||
## Building your own Video.js from source
|
||||
To build your own custom version read the section on [contributing code](CONTRIBUTING.md#contributing-code) and ["Building your own copy"](CONTRIBUTING.md#building-your-own-copy-of-videojs) in the contributing guide.
|
||||
|
||||
VideoJS is an HTML5 video player that uses the HTML5 video tag built into modern browsers, and uses javascript to add custom controls, new functionality, and to fix cross browser bugs. For browsers that don't support HTML5, it will fallback to a Flash player.
|
||||
## License
|
||||
|
||||
View demo.html for an example of how to use it.
|
||||
Video.js is licensed under the Apache License, Version 2.0. [View the license file](LICENSE)
|
||||
|
||||
Originally based on [this tutorial](http://blog.steveheffernan.com/2010/04/how-to-build-an-html5-video-player/).
|
||||
|
||||
Contributors (Github Username)
|
||||
------------------------------
|
||||
heff, dz0ny, sentientbit, tvdeyen, brandonarbini, gordonbrander, Shraymonks, albertogasparin, sandaru1, nicholasbs, majornista, Fredust85, @wonderboymusic, ellis-, emirpprime, eirikb, mbrubeck
|
||||
|
||||
|
||||
Getting Started
|
||||
---------------
|
||||
|
||||
### Step 1: Include the VideoJS Javascript and CSS files in the head of your page.
|
||||
Change the file urls to point to the files on your server.
|
||||
|
||||
<script src="video.js"></script>
|
||||
<link href="video-js.css" rel="stylesheet">
|
||||
|
||||
|
||||
### Step 2: Add an HTML5 video tag to your page.
|
||||
Use the video tag as normal, with a few extra pieces for VideoJS:
|
||||
|
||||
1. The 'data-setup' Atrribute tells VideoJS to automatically set up the video when the page is ready, and read any options (in JSON format) from the attribute.
|
||||
2. The 'id' Attribute: Should be used and unique for every video on the same page.
|
||||
3. The 'class' attribute contains two classes:
|
||||
- 'video-js' applies styles that are required for VideoJS functionality, like fullscreen and subtitles.
|
||||
- 'vjs-default-skin' applies the default skin to the HTML controls, and can be removed or overridden to create your own controls design.
|
||||
|
||||
Otherwise include/exclude attributes, settings, sources, and tracks exactly as you would for HTML5 video.
|
||||
|
||||
<video id="example_video_1" class="video-js vjs-default-skin" controls preload="auto" width="640" height="264"
|
||||
poster="http://video-js.zencoder.com/oceans-clip.png"
|
||||
data-setup='{"example_option":true}'>
|
||||
<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' />
|
||||
</video>
|
||||
|
||||
|
||||
### Step 3: Nada!
|
||||
That's all it take to get started. See the docs for more advanced uses.
|
||||
|
||||
|
||||
Coming Next
|
||||
-----------
|
||||
- Stable Release
|
||||
|
||||
Changelog
|
||||
---------
|
||||
3.0b
|
||||
|
||||
- Complete rewrite in progress
|
||||
|
||||
2.0.3
|
||||
|
||||
- Feature: Made returning to the start at the end of the movie an option ("returnToStart").
|
||||
- Feature: Added loop option to loop movie ("loop").
|
||||
- Feature: Reorganized player API and listeners.
|
||||
- Feature: Added option to disable controls. controlsEnabled: false
|
||||
- Feature: Setup method now has a callback, so you can more easily work with the player after setup
|
||||
- Feature: Added listeners for enter/exit full screen/window.
|
||||
- Feature: Added a VideoJS.player(id) function for getting the player for a video ID
|
||||
- Changes: setupAllWhenReady is now just setupAll (backward compatible)
|
||||
- Fix: Check for Android browser now excludes firefox and opera
|
||||
|
||||
2.0.2 (2010-12-10)
|
||||
|
||||
- Feature: Rewrote and optimized subtitle code.
|
||||
- Feature: Protecting against volume ranges outside of 1 and 0.
|
||||
- Fix: Bug in Safari for Mac OS 10.5 (Leopard) that was breaking fullscreen.
|
||||
|
||||
2.0.1 (2010-11-22)
|
||||
|
||||
- Fix: Issue with big play button when multiple videos are on the page.
|
||||
- Fix: Optimized play progress tracking.
|
||||
- Fix: Optimized buffer progress checking.
|
||||
- Fix: Firefox not showing Flash fallback object.
|
||||
|
||||
2.0.0 (2010-11-21)
|
||||
|
||||
- Feature: Created "behaviors" concept for adding behaviors to elements
|
||||
- Feature: Switched back to divs for controls, for more portable styles
|
||||
- Feature: Created playerFallbackOrder array option. ["html5", "flash", "links"]
|
||||
- Feature: Created playerType concept, for initializing different platforms
|
||||
- Feature: Added play button for Android
|
||||
- Feature: Added spinner for iPad (non-fullscreen)
|
||||
- Feature: Split into multiple files for easier development
|
||||
- Feature: Combined VideoJS & _V_ into the same variable to reduce confusion
|
||||
- Fix: Checking for m3u8 files (Apple HTTP Streaming)
|
||||
- Fix: Catching error on localStorage full that safari seems to randomly throw
|
||||
- Fix: Scrubbing to end doesn't trigger onEnded
|
||||
|
||||
1.1.5 (2010-11-09)
|
||||
|
||||
- Feature: Switched to track method for setting subtitles. Now works like spec.
|
||||
- Feature: Created "players" concept for defining fallbacks and fallback order
|
||||
- Fix: Android playback bug.
|
||||
- Fix: Massive reorganization of code to make easier to navigate
|
||||
|
||||
1.1.4 (2010-11-06)
|
||||
|
||||
- Feature: Added loading spinner.
|
||||
- Feature: Improved styles loaded checking.
|
||||
- Feature: Added volume() function to get and set volume through the player.
|
||||
- Fix: Fix issue where FF would loop video in background when ended.
|
||||
- Fix: Bug in Chrome that shows poster & plays audio if you set currentTime too quickly.
|
||||
- Fix: Bug in Safari where waiting is triggered and shows spinner when not needed
|
||||
- Fix: Updated to show links if only unplayable sources and no Flash.
|
||||
- Fix: Issue where if play button was loaded after play, it wouldn't hide.
|
||||
|
||||
1.1.3 (2010-10-19)
|
||||
|
||||
- Feature: Width/Height functions for resizing the player
|
||||
- Feature: Made initial click & hold trigger new value on progress and volume
|
||||
- Feature: Made controls not hide when hovering over them
|
||||
- Feature: Added big play button as default starting control.
|
||||
- Fix: Removed trailing comma that was breaking IE7
|
||||
- Fix: Removed some vars from global scope
|
||||
- Fix: Changed a document.onmousemove to an eventListener to prevent conflicts
|
||||
- Fix: Added a unique ID to FlowPlayer demo object to fix a FlowPlayer bug. Thanks @emirpprime.
|
||||
- Fix: Safari error on unloaded video
|
||||
|
||||
1.1.2 (2010-09-20)
|
||||
|
||||
- Added a fix for the poster bug in iPad/iPhone
|
||||
- Added more specificity to styles
|
||||
|
||||
1.1.1 (2010-09-14)
|
||||
|
||||
- First Formally Versioned Release
|
||||
|
||||
1.0.0 (2010-05-18)
|
||||
|
||||
- First released
|
||||
Copyright 2014 Brightcove, Inc.
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "video.js",
|
||||
"description": "An HTML5 and Flash video player with a common API and skin for both.",
|
||||
"version": "4.8.4",
|
||||
"main": [
|
||||
"dist/video-js/video.js",
|
||||
"dist/video-js/video-js.css"
|
||||
],
|
||||
"keywords": [
|
||||
"videojs",
|
||||
"html5",
|
||||
"flash",
|
||||
"video",
|
||||
"player"
|
||||
],
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"test",
|
||||
"tests",
|
||||
"build"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1,292 @@
|
||||
/*
|
||||
* Copyright 2009 The Closure Compiler Authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
//
|
||||
// Contents
|
||||
//
|
||||
|
||||
The Closure Compiler performs checking, instrumentation, and
|
||||
optimizations on JavaScript code. The purpose of this README is to
|
||||
explain how to build and run the Closure Compiler.
|
||||
|
||||
The Closure Compiler requires Java 6 or higher.
|
||||
http://www.java.com/
|
||||
|
||||
|
||||
//
|
||||
// Building The Closure Compiler
|
||||
//
|
||||
|
||||
There are three ways to get a Closure Compiler executable.
|
||||
|
||||
1) Use one we built for you.
|
||||
|
||||
Pre-built Closure binaries can be found at
|
||||
http://code.google.com/p/closure-compiler/downloads/list
|
||||
|
||||
|
||||
2) Check out the source and build it with Apache Ant.
|
||||
|
||||
First, check out the full source tree of the Closure Compiler. There
|
||||
are instructions on how to do this at the project site.
|
||||
http://code.google.com/p/closure-compiler/source/checkout
|
||||
|
||||
Apache Ant is a cross-platform build tool.
|
||||
http://ant.apache.org/
|
||||
|
||||
At the root of the source tree, there is an Ant file named
|
||||
build.xml. To use it, navigate to the same directory and type the
|
||||
command
|
||||
|
||||
ant jar
|
||||
|
||||
This will produce a jar file called "build/compiler.jar".
|
||||
|
||||
|
||||
3) Check out the source and build it with Eclipse.
|
||||
|
||||
Eclipse is a cross-platform IDE.
|
||||
http://www.eclipse.org/
|
||||
|
||||
Under Eclipse's File menu, click "New > Project ..." and create a
|
||||
"Java Project." You will see an options screen. Give the project a
|
||||
name, select "Create project from existing source," and choose the
|
||||
root of the checked-out source tree as the existing directory. Verify
|
||||
that you are using JRE version 6 or higher.
|
||||
|
||||
Eclipse can use the build.xml file to discover rules. When you
|
||||
navigate to the build.xml file, you will see all the build rules in
|
||||
the "Outline" pane. Run the "jar" rule to build the compiler in
|
||||
build/compiler.jar.
|
||||
|
||||
|
||||
//
|
||||
// Running The Closure Compiler
|
||||
//
|
||||
|
||||
Once you have the jar binary, running the Closure Compiler is straightforward.
|
||||
|
||||
On the command line, type
|
||||
|
||||
java -jar compiler.jar
|
||||
|
||||
This starts the compiler in interactive mode. Type
|
||||
|
||||
var x = 17 + 25;
|
||||
|
||||
then hit "Enter", then hit "Ctrl-Z" (on Windows) or "Ctrl-D" (on Mac or Linux)
|
||||
and "Enter" again. The Compiler will respond:
|
||||
|
||||
var x=42;
|
||||
|
||||
The Closure Compiler has many options for reading input from a file,
|
||||
writing output to a file, checking your code, and running
|
||||
optimizations. To learn more, type
|
||||
|
||||
java -jar compiler.jar --help
|
||||
|
||||
You can read more detailed documentation about the many flags at
|
||||
http://code.google.com/closure/compiler/docs/gettingstarted_app.html
|
||||
|
||||
|
||||
//
|
||||
// Compiling Multiple Scripts
|
||||
//
|
||||
|
||||
If you have multiple scripts, you should compile them all together with
|
||||
one compile command.
|
||||
|
||||
java -jar compiler.jar --js=in1.js --js=in2.js ... --js_output_file=out.js
|
||||
|
||||
The Closure Compiler will concatenate the files in the order they're
|
||||
passed at the command line.
|
||||
|
||||
If you need to compile many, many scripts together, you may start to
|
||||
run into problems with managing dependencies between scripts. You
|
||||
should check out the Closure Library. It contains functions for
|
||||
enforcing dependencies between scripts, and a tool called calcdeps.py
|
||||
that knows how to give scripts to the Closure Compiler in the right
|
||||
order.
|
||||
|
||||
http://code.google.com/p/closure-library/
|
||||
|
||||
//
|
||||
// Licensing
|
||||
//
|
||||
|
||||
Unless otherwise stated, all source files are licensed under
|
||||
the Apache License, Version 2.0.
|
||||
|
||||
|
||||
-----
|
||||
Code under:
|
||||
src/com/google/javascript/rhino
|
||||
test/com/google/javascript/rhino
|
||||
|
||||
URL: http://www.mozilla.org/rhino
|
||||
Version: 1.5R3, with heavy modifications
|
||||
License: Netscape Public License and MPL / GPL dual license
|
||||
|
||||
Description: A partial copy of Mozilla Rhino. Mozilla Rhino is an
|
||||
implementation of JavaScript for the JVM. The JavaScript parser and
|
||||
the parse tree data structures were extracted and modified
|
||||
significantly for use by Google's JavaScript compiler.
|
||||
|
||||
Local Modifications: The packages have been renamespaced. All code not
|
||||
relevant to parsing has been removed. A JsDoc parser and static typing
|
||||
system have been added.
|
||||
|
||||
|
||||
-----
|
||||
Code in:
|
||||
lib/rhino
|
||||
|
||||
Rhino
|
||||
URL: http://www.mozilla.org/rhino
|
||||
Version: Trunk
|
||||
License: Netscape Public License and MPL / GPL dual license
|
||||
|
||||
Description: Mozilla Rhino is an implementation of JavaScript for the JVM.
|
||||
|
||||
Local Modifications: Minor changes to parsing JSDoc that usually get pushed
|
||||
up-stream to Rhino trunk.
|
||||
|
||||
|
||||
-----
|
||||
Code in:
|
||||
lib/args4j.jar
|
||||
|
||||
Args4j
|
||||
URL: https://args4j.dev.java.net/
|
||||
Version: 2.0.16
|
||||
License: MIT
|
||||
|
||||
Description:
|
||||
args4j is a small Java class library that makes it easy to parse command line
|
||||
options/arguments in your CUI application.
|
||||
|
||||
Local Modifications: None.
|
||||
|
||||
|
||||
-----
|
||||
Code in:
|
||||
lib/guava.jar
|
||||
|
||||
Guava Libraries
|
||||
URL: http://code.google.com/p/guava-libraries/
|
||||
Version: 13.0.1
|
||||
License: Apache License 2.0
|
||||
|
||||
Description: Google's core Java libraries.
|
||||
|
||||
Local Modifications: None.
|
||||
|
||||
|
||||
-----
|
||||
Code in:
|
||||
lib/jsr305.jar
|
||||
|
||||
Annotations for software defect detection
|
||||
URL: http://code.google.com/p/jsr-305/
|
||||
Version: svn revision 47
|
||||
License: BSD License
|
||||
|
||||
Description: Annotations for software defect detection.
|
||||
|
||||
Local Modifications: None.
|
||||
|
||||
|
||||
-----
|
||||
Code in:
|
||||
lib/jarjar.jar
|
||||
|
||||
Jar Jar Links
|
||||
URL: http://jarjar.googlecode.com/
|
||||
Version: 1.1
|
||||
License: Apache License 2.0
|
||||
|
||||
Description:
|
||||
A utility for repackaging Java libraries.
|
||||
|
||||
Local Modifications: None.
|
||||
|
||||
|
||||
----
|
||||
Code in:
|
||||
lib/junit.jar
|
||||
|
||||
JUnit
|
||||
URL: http://sourceforge.net/projects/junit/
|
||||
Version: 4.10
|
||||
License: Common Public License 1.0
|
||||
|
||||
Description: A framework for writing and running automated tests in Java.
|
||||
|
||||
Local Modifications: None.
|
||||
|
||||
|
||||
---
|
||||
Code in:
|
||||
lib/protobuf-java.jar
|
||||
|
||||
Protocol Buffers
|
||||
URL: http://code.google.com/p/protobuf/
|
||||
Version: 2.4.1
|
||||
License: New BSD License
|
||||
|
||||
Description: Supporting libraries for protocol buffers,
|
||||
an encoding of structured data.
|
||||
|
||||
Local Modifications: None
|
||||
|
||||
|
||||
---
|
||||
Code in:
|
||||
lib/ant.jar
|
||||
lib/ant-launcher.jar
|
||||
|
||||
URL: http://ant.apache.org/bindownload.cgi
|
||||
Version: 1.8.1
|
||||
License: Apache License 2.0
|
||||
Description:
|
||||
Ant is a Java based build tool. In theory it is kind of like "make"
|
||||
without make's wrinkles and with the full portability of pure java code.
|
||||
|
||||
Local Modifications: None
|
||||
|
||||
|
||||
---
|
||||
Code in:
|
||||
lib/json.jar
|
||||
URL: http://json.org/java/index.html
|
||||
Version: JSON version 20090211
|
||||
License: MIT license
|
||||
Description:
|
||||
JSON is a set of java files for use in transmitting data in JSON format.
|
||||
|
||||
Local Modifications: None
|
||||
|
||||
---
|
||||
Code in:
|
||||
tools/maven-ant-tasks-2.1.3.jar
|
||||
URL: http://maven.apache.org
|
||||
Version 2.1.3
|
||||
License: Apache License 2.0
|
||||
Description:
|
||||
Maven Ant tasks are used to manage dependencies and to install/deploy to
|
||||
maven repositories.
|
||||
|
||||
Local Modifications: None
|
||||
Arquivo binário não exibido.
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
@@ -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 ]
|
||||
@@ -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>
|
||||
@@ -0,0 +1,78 @@
|
||||
// This file is used to load the video.js source files into a page
|
||||
// in the correct order based on dependencies.
|
||||
// When you create a new source file you will need to add
|
||||
// it to the list below to use it in sandbox/index.html and
|
||||
// test/index.html
|
||||
|
||||
// You can use the projectRoot variable to adjust relative urls
|
||||
// that this script loads. By default it's "../", which is what /sandbox
|
||||
// and /test need. If you had sandbox/newDir/index.html, in index.html you
|
||||
// would set projectRoot = "../../"
|
||||
|
||||
// We could use somehting like requireJS to load files, and at one point
|
||||
// we used goog.require/provide to load dependencies, but that seems like
|
||||
// overkill with the small number of files we actually have.
|
||||
|
||||
// ADD NEW SOURCE FILES HERE
|
||||
var sourceFiles = [
|
||||
"src/js/core.js",
|
||||
"src/js/core-object.js",
|
||||
"src/js/events.js",
|
||||
"src/js/lib.js",
|
||||
"src/js/util.js",
|
||||
"src/js/component.js",
|
||||
"src/js/button.js",
|
||||
"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",
|
||||
"src/js/control-bar/play-toggle.js",
|
||||
"src/js/control-bar/time-display.js",
|
||||
"src/js/control-bar/fullscreen-toggle.js",
|
||||
"src/js/control-bar/progress-control.js",
|
||||
"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",
|
||||
"src/js/error-display.js",
|
||||
"src/js/media/media.js",
|
||||
"src/js/media/html5.js",
|
||||
"src/js/media/flash.js",
|
||||
"src/js/media/loader.js",
|
||||
"src/js/tracks.js",
|
||||
"src/js/json.js",
|
||||
"src/js/setup.js",
|
||||
"src/js/plugins.js"
|
||||
];
|
||||
|
||||
// Allow overriding the default project root
|
||||
var projectRoot = projectRoot || '../';
|
||||
|
||||
function loadScripts(scriptsArr){
|
||||
for (var i = 0; i < scriptsArr.length; i++) {
|
||||
// Using document.write because that's the easiest way to avoid triggering
|
||||
// asynchrnous script loading
|
||||
document.write( "<script src='" + projectRoot + scriptsArr[i] + "'><\/script>" );
|
||||
}
|
||||
}
|
||||
|
||||
// We use this file in the grunt build script to load the same source file list
|
||||
// and don't want to load the scripts there.
|
||||
if (typeof blockSourceLoading === 'undefined') {
|
||||
loadScripts(sourceFiles);
|
||||
|
||||
// Allow for making Flash first
|
||||
if (window.location.href.indexOf("?flash") !== -1) {
|
||||
// Using doc.write to load this script to, otherwise when it runs videojs
|
||||
// is undefined
|
||||
document.write('<script>videojs.options.techOrder = ["flash"];videojs.options.flash.swf = "../src/swf/video-js.swf";</script>')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "video.js",
|
||||
"description": "An HTML5 and Flash video player with a common API and skin for both.",
|
||||
"version": "4.8.4",
|
||||
"keywords": [
|
||||
"videojs",
|
||||
"html5",
|
||||
"flash",
|
||||
"video",
|
||||
"player"
|
||||
],
|
||||
"scripts": ["dist/video-js/video.dev.js"],
|
||||
"styles": ["dist/video-js/video-js.css"],
|
||||
"files": ["dist/video-js/video-js.swf"],
|
||||
"fonts": [
|
||||
"dist/video-js/font/vjs.eot",
|
||||
"dist/video-js/font/vjs.svg",
|
||||
"dist/video-js/font/vjs.ttf",
|
||||
"dist/video-js/font/vjs.woff"
|
||||
],
|
||||
"main": "dist/video-js/video.dev.js"
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
+270
@@ -0,0 +1,270 @@
|
||||
{
|
||||
"project": {
|
||||
"owner": "videojs",
|
||||
"name": "video.js",
|
||||
"requirements": [
|
||||
{
|
||||
"name": "git",
|
||||
"info": "http://git-scm.com"
|
||||
},
|
||||
{
|
||||
"name": "node.js",
|
||||
"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": [
|
||||
[ "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",
|
||||
"new": {
|
||||
"alias": "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": [
|
||||
{ "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" ]
|
||||
]
|
||||
},
|
||||
|
||||
"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" }
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
"pull_request": {
|
||||
"private": true,
|
||||
|
||||
"review": {
|
||||
"steps": [
|
||||
{ "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" ]
|
||||
]
|
||||
},
|
||||
|
||||
"modify": {
|
||||
"desc": "Submit a modification to an existing pull request",
|
||||
"steps": [
|
||||
{ "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" }
|
||||
]
|
||||
},
|
||||
|
||||
"accept": {
|
||||
"steps": [
|
||||
{ "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" ]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>VideoJS | HTML5 Video Player</title>
|
||||
|
||||
<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>
|
||||
|
||||
</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'>
|
||||
</video>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,36 +0,0 @@
|
||||
#! /bin/csh
|
||||
# Combines Source Files. In terminal, sh combine_sources.sh
|
||||
# It will put a new video.js file under dist/
|
||||
|
||||
cat ../src/_begin.js > ../dist/video.js
|
||||
|
||||
cat ../src/core.js >> ../dist/video.js
|
||||
cat ../src/api.js >> ../dist/video.js
|
||||
|
||||
cat ../src/lib.js >> ../dist/video.js
|
||||
cat ../src/log.js >> ../dist/video.js
|
||||
|
||||
cat ../src/ecma.js >> ../dist/video.js
|
||||
cat ../src/json.js >> ../dist/video.js
|
||||
cat ../src/events.js >> ../dist/video.js
|
||||
cat ../src/tracks.js >> ../dist/video.js
|
||||
|
||||
cat ../src/tech/html5.js >> ../dist/video.js
|
||||
cat ../src/tech/flowplayer.js >> ../dist/video.js
|
||||
|
||||
# h5swf temporarily requires swfobject
|
||||
cat ../src/tech/h5swf.js >> ../dist/video.js
|
||||
cat ../flash/swfobject.js >> ../dist/video.js
|
||||
|
||||
cat ../src/behaviors/behaviors.js >> ../dist/video.js
|
||||
cat ../src/behaviors/seekBar.js >> ../dist/video.js
|
||||
cat ../src/behaviors/texttrackdisplays.js >> ../dist/video.js
|
||||
cat ../src/behaviors/volume.js >> ../dist/video.js
|
||||
|
||||
cat ../src/controls/bar.js >> ../dist/video.js
|
||||
cat ../src/controls/bigPlay.js >> ../dist/video.js
|
||||
cat ../src/controls/subtitlesBox.js >> ../dist/video.js
|
||||
|
||||
cat ../src/autoload.js >> ../dist/video.js
|
||||
|
||||
cat ../src/_end.js >> ../dist/video.js
|
||||
@@ -1,6 +0,0 @@
|
||||
body { font-size: 11px; font-family: 'Helvetica Neue', helvetica, arial; }
|
||||
td, th { text-align: left; vertical-align: top; }
|
||||
td.info-col { width: 240px; }
|
||||
td.data { text-align: right; }
|
||||
span.na { color: red; }
|
||||
span.undefined { color: #999; }
|
||||
@@ -1,102 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>HTML5 Video Player</title>
|
||||
|
||||
<link rel="stylesheet" href="../design/video-js.css" type="text/css">
|
||||
<!--[if lt IE 9]>
|
||||
<script>
|
||||
document.createElement("video"); // HTML5 Shiv. Must be in <head>.
|
||||
</script>
|
||||
<![endif]-->
|
||||
|
||||
<!--[if IE]>
|
||||
<script src="https://getfirebug.com/firebug-lite.js" type="text/javascript" charset="utf-8"></script>
|
||||
<![endif]-->
|
||||
|
||||
<script src="../src/core.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../src/lib.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../src/ecma.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../src/json.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
<script src="../src/api.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../src/events.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
<script src="../src/tracks.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
<script src="../src/behaviors/behaviors.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../src/behaviors/seekBar.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../src/behaviors/volume.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../src/behaviors/texttrackdisplays.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
<script src="../src/controls/bigPlay.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../src/controls/bar.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../src/controls/subtitlesBox.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
<script src="../src/tech/html5.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../src/tech/flowplayer.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
<script src="../src/autoload.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
<script src="../src/log.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
|
||||
<script src="../src/tech/h5swf.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
|
||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../flash/swfobject.js"></script>
|
||||
|
||||
|
||||
<link rel="stylesheet" href="compare.css" type="text/css">
|
||||
<script type="text/javascript" src="compare.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<table border="0" cellspacing="5" cellpadding="5">
|
||||
<tr><th colspan="2">HTML5</th><th colspan="2">H5Swf</th><th colspan="2">Flowplayer</th></tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<video id="vid1" class="video-js vjs-default-skin" preload="auto" width="480" height="198">
|
||||
<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'>
|
||||
</video>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<video id="vid2" class="video-js vjs-default-skin" preload="auto" width="480" height="198">
|
||||
<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'>
|
||||
</video>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<video id="vid3" class="video-js vjs-default-skin" preload="auto" width="480" height="198">
|
||||
<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'>
|
||||
</video>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="info-col">
|
||||
<table id="html5_props" border="0" cellspacing="0" cellpadding="0"></table>
|
||||
</td>
|
||||
<td class="info-col">
|
||||
<div id="html5_events"></div>
|
||||
</td>
|
||||
<td class="info-col">
|
||||
<table id="h5swf_props" border="0" cellspacing="0" cellpadding="0"></table>
|
||||
</td>
|
||||
<td class="info-col">
|
||||
<div id="h5swf_events"></div>
|
||||
</td>
|
||||
<td class="info-col">
|
||||
<table id="flowplayer_props" border="0" cellspacing="0" cellpadding="0"></table>
|
||||
</td>
|
||||
<td class="info-col">
|
||||
<div id="flowplayer_events"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,55 +0,0 @@
|
||||
$(function(){
|
||||
var tech, i,
|
||||
techList = ["html5","h5swf","flowplayer"],
|
||||
props = "error,currentSrc,networkState,buffered,readyState,seeking,initialTime,duration,startOffsetTime,paused,played,seekable,ended,videoWidth,videoHeight,textTracks,preload,currentTime,playbackRate,autoplay,loop,controls,volume,muted,defaultMuted".split(","),
|
||||
methods = "play,pause,src,load,canPlayType,addTextTrack",
|
||||
notUsed = "mediaGroup,controller,videoTracks,audioTracks,defaultPlaybackRate";
|
||||
|
||||
|
||||
for (i=0; i < techList.length; i++) {
|
||||
tech = techList[i];
|
||||
|
||||
var player = _V_("vid"+(i+1), { "techOrder":[tech] });
|
||||
|
||||
_V_.each(_V_.html5Events, function(evt){
|
||||
player.addEvent(evt, _V_.proxy(tech, function(evt){
|
||||
var eventsId = "#"+this+"_events",
|
||||
type = evt.type,
|
||||
prev = $(eventsId+" div").first();
|
||||
|
||||
if (prev && prev.html() && prev.html().indexOf(type + " ") === 0) {
|
||||
var countSpan = prev.children(".count");
|
||||
countSpan.html(parseInt(countSpan.html() || 1) + 1);
|
||||
} else {
|
||||
$("#"+this+"_events").prepend("<div>" + evt.type + " <span class='count'></span></div>");
|
||||
}
|
||||
}));
|
||||
});
|
||||
|
||||
var propTable = $("#"+tech+"_props");
|
||||
_V_.each(props, function(prop){
|
||||
propTable.append("<tr><th>"+prop+"</th><td id='"+tech+prop+"' class='data'></td></tr>")
|
||||
});
|
||||
|
||||
setInterval(_V_.proxy(player, function(){
|
||||
_V_.each(props, _V_.proxy(this, function(prop){
|
||||
var result = ""
|
||||
try {
|
||||
result = this[prop]();
|
||||
if (result === false) result = "false";
|
||||
if (result === true) result = "true";
|
||||
if (result === "") result = "''";
|
||||
if (result === null) result = "<span class='undefined'>null</span>";
|
||||
if (result === undefined) result = "<span class='undefined'>undefined</span>";
|
||||
if (typeof result.start == "function") {
|
||||
result = (result.length > 0) ? "s:"+result.start(0)+" e:"+result.end(0) : "-";
|
||||
}
|
||||
} catch(e) {
|
||||
result = "<span class='na'>N/A</span>";
|
||||
}
|
||||
$("#"+this.currentTechName+prop).html(result);
|
||||
}));
|
||||
}), 500);
|
||||
|
||||
};
|
||||
});
|
||||
@@ -1,8 +0,0 @@
|
||||
Tracking/Polling CurrentTime Manually
|
||||
-------------------------------------
|
||||
- Necessary for most flash players and browsers that don't trigger timeupdate events.
|
||||
- In VJS 1-2, we always tracked time because timeupdate was rare.
|
||||
- Now most browsers support it well. There is a delay bug in the current Chrome.
|
||||
http://code.google.com/p/chromium/issues/detail?id=92251
|
||||
Andrew from Chrome told me it would be fix in an upcoming release.
|
||||
Going to rely on browsers timeupdates when available now.
|
||||
@@ -1,13 +0,0 @@
|
||||
1
|
||||
00:00:00,000 --> 00:00:07,200
|
||||
[Background Music Playing]
|
||||
|
||||
2
|
||||
00:00:16,000 --> 00:00:17,200
|
||||
Welcome to this week's episode
|
||||
|
||||
3
|
||||
00:00:17,400 --> 00:00:19,000
|
||||
of explore California
|
||||
|
||||
|
||||
Arquivo binário não exibido.
|
Antes Largura: | Altura: | Tamanho: 85 KiB |
@@ -1,190 +0,0 @@
|
||||
/* DEFAULT SKIN (override in another file)
|
||||
================================================================================
|
||||
Using all CSS to draw the controls. Images could be used if desired.
|
||||
Instead of editing this file, I recommend creating your own skin CSS file to be included after this file,
|
||||
so you can upgrade to newer versions easier. */
|
||||
|
||||
.vjs-original-skin .vjs-controls {
|
||||
position: absolute; margin: 0; opacity: 0.85; color: #fff;
|
||||
display: block; /* Start hidden */
|
||||
left: 0; right: 0; /* 100% width of video-js-box */
|
||||
width: 100%;
|
||||
bottom: 0px; /* Distance from the bottom of the box/video. Keep 0. Use height to add more bottom margin. */
|
||||
height: 35px; /* Including any margin you want above or below control items */
|
||||
padding: 0; /* Controls are absolutely position, so no padding necessary */
|
||||
-webkit-transition: opacity 0.5s linear;
|
||||
-moz-transition: opacity 0.5s linear;
|
||||
-o-transition: opacity 0.5s linear;
|
||||
-ms-transition: opacity 0.5s linear;
|
||||
transition: opacity 0.5s linear;
|
||||
}
|
||||
|
||||
.vjs-original-skin .vjs-control {
|
||||
position: absolute; /* Use top, bottom, left, and right to specifically position the control. */
|
||||
text-align: center; margin: 0; padding: 0;
|
||||
height: 25px; /* Default height of individual controls */
|
||||
top: 5px; /* Top margin to put space between video and controls when controls are below */
|
||||
|
||||
/* CSS Background Gradients
|
||||
Using to give the aqua-ish look. */
|
||||
/* Default */ background-color: #0B151A;
|
||||
/* Webkit */ background: #1F3744 -webkit-gradient(linear, left top, left bottom, from(#0B151A), to(#1F3744)) left 12px;
|
||||
/* Firefox */ background: #1F3744 -moz-linear-gradient(top, #0B151A, #1F3744) left 12px;
|
||||
|
||||
/* CSS Curved Corners */
|
||||
-webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px;
|
||||
|
||||
/* CSS Shadows */
|
||||
-webkit-box-shadow: 1px 1px 2px #000; -moz-box-shadow: 1px 1px 2px #000; box-shadow: 1px 1px 2px #000;
|
||||
}
|
||||
|
||||
/* Placement of Control Items
|
||||
- Left side of pogress bar, use left & width
|
||||
- Rigth side of progress bar, use right & width
|
||||
- Expand with the video (like progress bar) use left & right
|
||||
(using div.x to make more specific than vjs-control style)
|
||||
*/
|
||||
.vjs-original-skin div.vjs-play-control { left: 5px; width: 25px; }
|
||||
.vjs-original-skin div.vjs-progress-control { left: 35px; right: 165px; } /* Using left & right so it expands with the width of the video */
|
||||
.vjs-original-skin div.vjs-time-control { width: 75px; right: 90px; } /* Time control and progress bar are combined to look like one */
|
||||
.vjs-original-skin div.vjs-volume-control { width: 50px; right: 35px; }
|
||||
.vjs-original-skin div.vjs-fullscreen-control { width: 25px; right: 5px; }
|
||||
|
||||
/* Removing curved corners on progress control and time control to join them. */
|
||||
.vjs-original-skin div.vjs-progress-control {
|
||||
-webkit-border-top-right-radius: 0; -moz-border-radius-topright: 0; border-top-right-radius: 0;
|
||||
-webkit-border-bottom-right-radius: 0; -moz-border-radius-bottomright: 0; border-bottom-right-radius: 0;
|
||||
}
|
||||
.vjs-original-skin div.vjs-time-control {
|
||||
-webkit-border-top-left-radius: 0; -moz-border-radius-topleft: 0; border-top-left-radius: 0;
|
||||
-webkit-border-bottom-left-radius: 0; -moz-border-radius-bottomleft: 0; border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
/* Play/Pause
|
||||
-------------------------------------------------------------------------------- */
|
||||
.vjs-original-skin .vjs-play-control { cursor: pointer !important; }
|
||||
/* Play Icon */
|
||||
.vjs-original-skin .vjs-play-control span { display: block; font-size: 0; line-height: 0; }
|
||||
.vjs-original-skin.vjs-paused .vjs-play-control span {
|
||||
width: 0; height: 0; margin: 8px 0 0 8px;
|
||||
/* Drawing the play triangle with borders - http://www.infimum.dk/HTML/slantinfo.html */
|
||||
border-left: 10px solid #fff; /* Width & Color of play icon */
|
||||
/* Height of play icon is total top & bottom border widths. Color is transparent. */
|
||||
border-top: 5px solid rgba(0,0,0,0); border-bottom: 5px solid rgba(0,0,0,0);
|
||||
}
|
||||
.vjs-original-skin.vjs-playing .vjs-play-control span {
|
||||
width: 3px; height: 10px; margin: 8px auto 0;
|
||||
/* Drawing the pause bars with borders */
|
||||
border-top: 0px; border-left: 3px solid #fff; border-bottom: 0px; border-right: 3px solid #fff;
|
||||
}
|
||||
|
||||
/* Progress
|
||||
-------------------------------------------------------------------------------- */
|
||||
.vjs-original-skin .vjs-progress-holder { /* Box containing play and load progresses */
|
||||
position: relative; padding: 0; overflow:hidden; cursor: pointer !important;
|
||||
height: 9px; border: 1px solid #777;
|
||||
margin: 7px 1px 0 5px; /* Placement within the progress control item */
|
||||
-webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px;
|
||||
}
|
||||
.vjs-original-skin .vjs-progress-holder div { /* Progress Bars */
|
||||
position: absolute; display: block; width: 0; height: 9px; margin: 0; padding: 0;
|
||||
left: 0; top: 0; /*Needed for IE6*/
|
||||
-webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px;
|
||||
}
|
||||
.vjs-original-skin .vjs-play-progress {
|
||||
/* CSS Gradient */
|
||||
/* Default */ background: #fff;
|
||||
/* Webkit */ background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#777));
|
||||
/* Firefox */ background: -moz-linear-gradient(top, #fff, #777);
|
||||
}
|
||||
.vjs-original-skin .vjs-load-progress {
|
||||
opacity: 0.8;
|
||||
/* CSS Gradient */
|
||||
/* Default */ background-color: #555;
|
||||
/* Webkit */ background: -webkit-gradient(linear, left top, left bottom, from(#555), to(#aaa));
|
||||
/* Firefox */ background: -moz-linear-gradient(top, #555, #aaa);
|
||||
}
|
||||
|
||||
/* Time Display
|
||||
-------------------------------------------------------------------------------- */
|
||||
.vjs-original-skin .vjs-time-control { font-size: 10px; line-height: 1; font-weight: normal; font-family: Helvetica, Arial, sans-serif; }
|
||||
.vjs-original-skin .vjs-time-control span { line-height: 25px; /* Centering vertically */ }
|
||||
|
||||
/* Volume
|
||||
-------------------------------------------------------------------------------- */
|
||||
.vjs-original-skin .vjs-volume-control { cursor: pointer !important; }
|
||||
.vjs-original-skin .vjs-volume-control div { display: block; margin: 0 5px 0 5px; padding: 4px 0 0 0; }
|
||||
/* Drawing the volume icon using 6 span elements */
|
||||
.vjs-original-skin .vjs-volume-control div span { /* Individual volume bars */
|
||||
float: left; padding: 0; font-size: 0; line-height: 0;
|
||||
margin: 0 2px 0 0; /* Space between */
|
||||
width: 5px; height: 0px; /* Total height is height + bottom border */
|
||||
border-bottom: 18px solid #555; /* Default (off) color and height of visible portion */
|
||||
}
|
||||
.vjs-original-skin .vjs-volume-control div span.vjs-volume-level-on { border-color: #fff; /* Volume on bar color */ }
|
||||
/* Creating differnt bar heights through height (transparent) and bottom border (visible). */
|
||||
.vjs-original-skin .vjs-volume-control div span.vjs-vc-1 { border-bottom-width: 2px; height: 16px; }
|
||||
.vjs-original-skin .vjs-volume-control div span.vjs-vc-2 { border-bottom-width: 4px; height: 14px; }
|
||||
.vjs-original-skin .vjs-volume-control div span.vjs-vc-3 { border-bottom-width: 7px; height: 11px; }
|
||||
.vjs-original-skin .vjs-volume-control div span.vjs-vc-4 { border-bottom-width: 10px; height: 8px; }
|
||||
.vjs-original-skin .vjs-volume-control div span.vjs-vc-5 { border-bottom-width: 14px; height: 4px; }
|
||||
.vjs-original-skin .vjs-volume-control div span.vjs-vc-6 { margin-right: 0; }
|
||||
|
||||
/* Fullscreen
|
||||
-------------------------------------------------------------------------------- */
|
||||
.vjs-original-skin .vjs-fullscreen-control { cursor: pointer !important; }
|
||||
.vjs-original-skin .vjs-fullscreen-control div {
|
||||
padding: 0; text-align: left; vertical-align: top; cursor: pointer !important;
|
||||
margin: 5px 0 0 5px; /* Placement within the fullscreen control item */
|
||||
width: 20px; height: 20px;
|
||||
}
|
||||
/* Drawing the fullscreen icon using 4 span elements */
|
||||
.vjs-original-skin .vjs-fullscreen-control div span { float: left; margin: 0; padding: 0; font-size: 0; line-height: 0; width: 0; text-align: left; vertical-align: top; }
|
||||
.vjs-original-skin .vjs-fullscreen-control div span.vjs-fc-1 { /* Top-left triangle */
|
||||
margin-right: 3px; /* Space between top-left and top-right */
|
||||
margin-bottom: 3px; /* Space between top-left and bottom-left */
|
||||
border-top: 6px solid #fff; /* Height and color */
|
||||
border-right: 6px solid rgba(0,0,0,0); /* Width */
|
||||
}
|
||||
.vjs-original-skin .vjs-fullscreen-control div span.vjs-fc-2 { border-top: 6px solid #fff; border-left: 6px solid rgba(0,0,0,0); }
|
||||
.vjs-original-skin .vjs-fullscreen-control div span.vjs-fc-3 { clear: both; margin: 0 3px 0 0; border-bottom: 6px solid #fff; border-right: 6px solid rgba(0,0,0,0); }
|
||||
.vjs-original-skin .vjs-fullscreen-control div span.vjs-fc-4 { border-bottom: 6px solid #fff; border-left: 6px solid rgba(0,0,0,0); }
|
||||
/* Icon when video is in fullscreen mode */
|
||||
.vjs-original-skin.vjs-fullscreen .vjs-fullscreen-control div span.vjs-fc-1 { border: none; border-bottom: 6px solid #fff; border-left: 6px solid rgba(0,0,0,0); }
|
||||
.vjs-original-skin.vjs-fullscreen .vjs-fullscreen-control div span.vjs-fc-2 { border: none; border-bottom: 6px solid #fff; border-right: 6px solid rgba(0,0,0,0); }
|
||||
.vjs-original-skin.vjs-fullscreen .vjs-fullscreen-control div span.vjs-fc-3 { border: none; border-top: 6px solid #fff; border-left: 6px solid rgba(0,0,0,0); }
|
||||
.vjs-original-skin.vjs-fullscreen .vjs-fullscreen-control div span.vjs-fc-4 { border: none; border-top: 6px solid #fff; border-right: 6px solid rgba(0,0,0,0); }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Big Play Button (at start)
|
||||
---------------------------------------------------------*/
|
||||
.vjs-original-skin .vjs-big-play-button {
|
||||
display: block; /* Start hidden */ z-index: 2;
|
||||
position: absolute; top: 50%; left: 50%; width: 80px; height: 80px; margin: -43px 0 0 -43px; text-align: center; vertical-align: center; cursor: pointer !important;
|
||||
border: 3px solid #fff; opacity: 0.9;
|
||||
-webkit-border-radius: 20px; -moz-border-radius: 20px; border-radius: 20px;
|
||||
|
||||
/* CSS Background Gradients */
|
||||
/* Default */ background-color: #0B151A;
|
||||
/* Webkit */ background: #1F3744 -webkit-gradient(linear, left top, left bottom, from(#0B151A), to(#1F3744)) left 40px;
|
||||
/* Firefox */ background: #1F3744 -moz-linear-gradient(top, #0B151A, #1F3744) left 40px;
|
||||
|
||||
/* CSS Shadows */
|
||||
-webkit-box-shadow: 4px 4px 8px #000; -moz-box-shadow: 4px 4px 8px #000; box-shadow: 4px 4px 8px #000;
|
||||
}
|
||||
|
||||
.vjs-original-skin div.vjs-big-play-button:hover {
|
||||
-webkit-box-shadow: 0px 0px 80px #fff; -moz-box-shadow: 0px 0px 80px #fff; box-shadow: 0px 0px 80px #fff;
|
||||
}
|
||||
|
||||
.vjs-original-skin div.vjs-big-play-button span {
|
||||
display: block; font-size: 0; line-height: 0;
|
||||
width: 0; height: 0; margin: 20px 0 0 23px;
|
||||
/* Drawing the play triangle with borders - http://www.infimum.dk/HTML/slantinfo.html */
|
||||
border-left: 40px solid #fff; /* Width & Color of play icon */
|
||||
/* Height of play icon is total top & bottom border widths. Color is transparent. */
|
||||
border-top: 20px solid rgba(0,0,0,0); border-bottom: 20px solid rgba(0,0,0,0);
|
||||
}
|
||||
@@ -1,307 +0,0 @@
|
||||
/*
|
||||
VideoJS Default Styles (http://videojs.com)
|
||||
Version 3.0
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/* 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%; }
|
||||
|
||||
/* Fullscreen Styles */
|
||||
body.vjs-full-window {
|
||||
padding: 0; margin: 0;
|
||||
height: 100%; overflow-y: auto; /* Fix for IE6 full-window. http://www.cssplay.co.uk/layouts/fixed.html */
|
||||
}
|
||||
.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;
|
||||
_position: absolute; /* IE6 Full-window (underscore hack) */
|
||||
}
|
||||
|
||||
/* Subtiles Style */
|
||||
.video-js .vjs-subtitles { color: #fff; font-size: 20px; text-align: center; position: absolute; bottom: 40px; left: 0; right: 0; }
|
||||
|
||||
/* DEFAULT SKIN (override in another file)
|
||||
================================================================================
|
||||
Instead of editing this file, I recommend creating your own skin CSS file to be included after this file,
|
||||
so you can upgrade to newer versions easier. You can remove all these styles by removing the 'vjs-default-skin' class from the tag. */
|
||||
|
||||
/* The default control bar. Created by bar.js */
|
||||
.vjs-default-skin .vjs-controls {
|
||||
position: absolute;
|
||||
bottom: 0; /* Distance from the bottom of the box/video. Keep 0. Use height to add more bottom margin. */
|
||||
left: 0; right: 0; /* 100% width of div */
|
||||
opacity: 0.85; display: block; /* Start hidden */
|
||||
margin: 0; padding: 0; /* Controls are absolutely position, so no padding necessary */
|
||||
height: 2.6em; /* Including any margin you want above or below control items */
|
||||
color: #fff; border-top: 1px solid #404040;
|
||||
|
||||
/* CSS Gradient */
|
||||
/* Can use the Ultimate CSS Gradient Generator: http://www.colorzilla.com/gradient-editor/ */
|
||||
background: #242424; /* Old browsers */
|
||||
background: -moz-linear-gradient(top, #242424 50%, #1f1f1f 50%, #171717 100%); /* FF3.6+ */
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(50%,#242424), color-stop(50%,#1f1f1f), color-stop(100%,#171717)); /* Chrome,Safari4+ */
|
||||
background: -webkit-linear-gradient(top, #242424 50%,#1f1f1f 50%,#171717 100%); /* Chrome10+,Safari5.1+ */
|
||||
background: -o-linear-gradient(top, #242424 50%,#1f1f1f 50%,#171717 100%); /* Opera11.10+ */
|
||||
background: -ms-linear-gradient(top, #242424 50%,#1f1f1f 50%,#171717 100%); /* IE10+ */
|
||||
/* Filter was causing a lot of weird issues in IE. Elements would stop showing up, or other styles would break. */
|
||||
/*filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#242424', endColorstr='#171717',GradientType=0 );*/ /* IE6-9 */
|
||||
background: linear-gradient(top, #242424 50%,#1f1f1f 50%,#171717 100%); /* W3C */
|
||||
|
||||
/* Fade-in using CSS Transitions */
|
||||
-webkit-transition: opacity 0.3s linear;
|
||||
-moz-transition: opacity 0.3s linear;
|
||||
-o-transition: opacity 0.3s linear;
|
||||
-ms-transition: opacity 0.3s linear;
|
||||
transition: opacity 0.3s linear;
|
||||
}
|
||||
|
||||
/* General styles for individual controls. */
|
||||
.vjs-default-skin .vjs-control {
|
||||
position: relative; float: left;
|
||||
text-align: center; margin: 0; padding: 0;
|
||||
height: 2.6em; width: 2.6em;
|
||||
}
|
||||
|
||||
.vjs-default-skin .vjs-control:focus {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
/* Hide control text visually, but have it available for screenreaders: h5bp.com/v */
|
||||
.vjs-default-skin .vjs-control-text { 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 !important; }
|
||||
/* Play Icon */
|
||||
.vjs-default-skin.vjs-paused .vjs-play-control div { width: 15px; height: 17px; background: url('video-js.png'); margin: 0.5em auto 0; }
|
||||
.vjs-default-skin.vjs-playing .vjs-play-control div { width: 15px; height: 17px; background: url('video-js.png') -25px 0; margin: 0.5em auto 0; }
|
||||
|
||||
/* Rewind
|
||||
-------------------------------------------------------------------------------- */
|
||||
.vjs-default-skin .vjs-rewind-control { width: 5em; cursor: pointer !important; }
|
||||
.vjs-default-skin .vjs-rewind-control div { width: 19px; height: 16px; background: url('video-js.png'); margin: 0.5em auto 0; }
|
||||
|
||||
/* Volume/Mute
|
||||
-------------------------------------------------------------------------------- */
|
||||
.vjs-default-skin .vjs-mute-control { width: 3.8em; cursor: pointer !important; float: right; }
|
||||
.vjs-default-skin .vjs-mute-control div { width: 22px; height: 16px; background: url('video-js.png') -75px -25px; margin: 0.5em auto 0; }
|
||||
.vjs-default-skin .vjs-mute-control.vjs-vol-0 div { background: url('video-js.png') 0 -25px; }
|
||||
.vjs-default-skin .vjs-mute-control.vjs-vol-1 div { background: url('video-js.png') -25px -25px; }
|
||||
.vjs-default-skin .vjs-mute-control.vjs-vol-2 div { background: url('video-js.png') -50px -25px; }
|
||||
|
||||
|
||||
.vjs-default-skin .vjs-volume-control { width: 5em; float: right; }
|
||||
.vjs-default-skin .vjs-volume-bar {
|
||||
position: relative; width: 5em; height: 0.6em; margin: 1em auto 0; background: #666; cursor: pointer !important;
|
||||
|
||||
-moz-border-radius: 0.3em; -webkit-border-radius: 0.3em; border-radius: 0.3em;
|
||||
|
||||
background: #333;
|
||||
background: -moz-linear-gradient(top, #333 0%, #666 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#333), color-stop(100%,#666));
|
||||
background: -webkit-linear-gradient(top, #333 0%,#666 100%);
|
||||
background: -o-linear-gradient(top, #333 0%,#666 100%);
|
||||
background: -ms-linear-gradient(top, #333 0%,#666 100%);
|
||||
background: linear-gradient(top, #333 0%,#666 100%);
|
||||
}
|
||||
.vjs-default-skin .vjs-volume-level {
|
||||
position: absolute; top: 0; left: 0; height: 0.6em; background: #fff;
|
||||
|
||||
-moz-border-radius: 0.3em; -webkit-border-radius: 0.3em; border-radius: 0.3em;
|
||||
|
||||
background: #ffffff;
|
||||
background: -moz-linear-gradient(top, #ffffff 0%, #cccccc 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#cccccc));
|
||||
background: -webkit-linear-gradient(top, #ffffff 0%,#cccccc 100%);
|
||||
background: -o-linear-gradient(top, #ffffff 0%,#cccccc 100%);
|
||||
background: -ms-linear-gradient(top, #ffffff 0%,#cccccc 100%);
|
||||
background: linear-gradient(top, #ffffff 0%,#cccccc 100%);
|
||||
}
|
||||
.vjs-default-skin .vjs-volume-handle {
|
||||
position: absolute; top: -0.2em; width: 0.8em; height: 0.8em; background: #ccc; left: 0;
|
||||
border: 1px solid #fff;
|
||||
-moz-border-radius: 0.6em; -webkit-border-radius: 0.6em; border-radius: 0.6em;
|
||||
}
|
||||
|
||||
/* Progress
|
||||
-------------------------------------------------------------------------------- */
|
||||
.vjs-default-skin div.vjs-progress-control {
|
||||
position: absolute;
|
||||
left: 4.8em; right: 4.8em; /* Leave room for time displays. */
|
||||
height: 1.0em; width: auto;
|
||||
top: -1.3em; /* Set above the rest of the controls. And leave room for 2px of borders (progress bottom and controls top). */
|
||||
border-bottom: 1px solid #1F1F1F;
|
||||
border-top: 1px solid #222;
|
||||
|
||||
/* CSS Gradient */
|
||||
background: #333;
|
||||
background: -moz-linear-gradient(top, #333 0%, #222 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#222), color-stop(100%,#333));
|
||||
background: -webkit-linear-gradient(top, #222 0%,#333 100%);
|
||||
background: -o-linear-gradient(top, #333 0%,#222 100%);
|
||||
background: -ms-linear-gradient(top, #333 0%,#222 100%);
|
||||
background: linear-gradient(top, #333 0%,#222 100%);
|
||||
|
||||
/* 1px top shadow */
|
||||
/* -webkit-box-shadow: 0px -1px 0px 0px rgba(0, 0, 0, 0.15); -moz-box-shadow: 0px -1px 0px 0px rgba(0, 0, 0, 0.15); box-shadow: 0px -1px 0px 0px rgba(0, 0, 0, 0.15);*/
|
||||
}
|
||||
|
||||
/* Box containing play and load progresses. Also acts as seek scrubber. */
|
||||
.vjs-default-skin .vjs-progress-holder {
|
||||
position: relative; cursor: pointer !important; /*overflow: hidden;*/
|
||||
padding: 0; margin: 0; /* Placement within the progress control item */
|
||||
height: 1.0em;
|
||||
-moz-border-radius: 0.6em; -webkit-border-radius: 0.6em; border-radius: 0.6em;
|
||||
|
||||
/* CSS Gradient */
|
||||
background: #111;
|
||||
background: -moz-linear-gradient(top, #111 0%, #262626 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#111), color-stop(100%,#262626));
|
||||
background: -webkit-linear-gradient(top, #111 0%,#262626 100%);
|
||||
background: -o-linear-gradient(top, #111 0%,#262626 100%);
|
||||
background: -ms-linear-gradient(top, #111 0%,#262626 100%);
|
||||
background: linear-gradient(top, #111 0%,#262626 100%);
|
||||
}
|
||||
.vjs-default-skin .vjs-progress-holder .vjs-play-progress,
|
||||
.vjs-default-skin .vjs-progress-holder .vjs-load-progress { /* Progress Bars */
|
||||
position: absolute; display: block; height: 1.0em; margin: 0; padding: 0;
|
||||
left: 0; top: 0; /*Needed for IE6*/
|
||||
-moz-border-radius: 0.6em; -webkit-border-radius: 0.6em; border-radius: 0.6em;
|
||||
|
||||
/*width: 0;*/
|
||||
}
|
||||
|
||||
.vjs-default-skin .vjs-play-progress {
|
||||
/* CSS Gradient. */
|
||||
background: #fff; /* Old browsers */
|
||||
background: -moz-linear-gradient(top, #fff 0%, #d6d6d6 50%, #fff 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fff), color-stop(50%,#d6d6d6), color-stop(100%,#fff));
|
||||
background: -webkit-linear-gradient(top, #fff 0%,#d6d6d6 50%,#fff 100%);
|
||||
background: -o-linear-gradient(top, #fff 0%,#d6d6d6 50%,#fff 100%);
|
||||
background: -ms-linear-gradient(top, #fff 0%,#d6d6d6 50%,#fff 100%);
|
||||
background: linear-gradient(top, #fff 0%,#d6d6d6 50%,#fff 100%);
|
||||
|
||||
background: #efefef;
|
||||
background: -moz-linear-gradient(top, #efefef 0%, #f5f5f5 50%, #dbdbdb 50%, #f1f1f1 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#efefef), color-stop(50%,#f5f5f5), color-stop(50%,#dbdbdb), color-stop(100%,#f1f1f1));
|
||||
background: -webkit-linear-gradient(top, #efefef 0%,#f5f5f5 50%,#dbdbdb 50%,#f1f1f1 100%);
|
||||
background: -o-linear-gradient(top, #efefef 0%,#f5f5f5 50%,#dbdbdb 50%,#f1f1f1 100%);
|
||||
background: -ms-linear-gradient(top, #efefef 0%,#f5f5f5 50%,#dbdbdb 50%,#f1f1f1 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#efefef', endColorstr='#f1f1f1',GradientType=0 );
|
||||
background: linear-gradient(top, #efefef 0%,#f5f5f5 50%,#dbdbdb 50%,#f1f1f1 100%);
|
||||
}
|
||||
.vjs-default-skin .vjs-load-progress {
|
||||
opacity: 0.8;
|
||||
|
||||
/* CSS Gradient */
|
||||
background: #666;
|
||||
background: -moz-linear-gradient(top, #666 0%, #333 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#666), color-stop(100%,#333));
|
||||
background: -webkit-linear-gradient(top, #666 0%,#333 100%);
|
||||
background: -o-linear-gradient(top, #666 0%,#333 100%);
|
||||
background: -ms-linear-gradient(top, #666 0%,#333 100%);
|
||||
background: linear-gradient(top, #666 0%,#333 100%);
|
||||
}
|
||||
|
||||
.vjs-default-skin div.vjs-seek-handle {
|
||||
position: absolute;
|
||||
width: 16px; height: 16px; /* Match img pixles */
|
||||
margin-top: -0.3em;
|
||||
left: 0; top: 0; /*Needed for IE6*/
|
||||
|
||||
background: url('video-js.png') 0px -50px;
|
||||
/* CSS Curved Corners. Needed to make shadows curved. */
|
||||
-moz-border-radius: 0.8em; -webkit-border-radius: 0.8em; border-radius: 0.8em;
|
||||
/* CSS Shadows */
|
||||
-webkit-box-shadow: 0px 2px 4px 0px #000; -moz-box-shadow: 0px 2px 4px 0px #000; box-shadow: 0px 2px 4px 0px #000;
|
||||
}
|
||||
/* Time Display
|
||||
-------------------------------------------------------------------------------- */
|
||||
.vjs-default-skin .vjs-time-controls {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
height: 1.0em; width: 4.8em;
|
||||
top: -1.3em;
|
||||
border-bottom: 1px solid #1F1F1F;
|
||||
border-top: 1px solid #222;
|
||||
background-color: #333;
|
||||
|
||||
font-size: 1em; line-height: 1.0em; font-weight: normal; font-family: Helvetica, Arial, sans-serif;
|
||||
|
||||
background: #333;
|
||||
background: -moz-linear-gradient(top, #222 0%, #333 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#222), color-stop(100%,#333));
|
||||
background: -webkit-linear-gradient(top, #222 0%,#333 100%);
|
||||
background: -o-linear-gradient(top, #333 0%,#222 100%);
|
||||
background: -ms-linear-gradient(top, #333 0%,#222 100%);
|
||||
background: linear-gradient(top, #333 0%,#222 100%);
|
||||
|
||||
/* 1px top shadow */
|
||||
/* -webkit-box-shadow: 0px -1px 0px 0px rgba(0, 0, 0, 0.15); -moz-box-shadow: 0px -1px 0px 0px rgba(0, 0, 0, 0.15); box-shadow: 0px -1px 0px 0px rgba(0, 0, 0, 0.15);*/
|
||||
}
|
||||
|
||||
.vjs-default-skin .vjs-current-time { left: 0; }
|
||||
|
||||
.vjs-default-skin .vjs-duration { right: 0; display: none; }
|
||||
.vjs-default-skin .vjs-remaining-time { right: 0; }
|
||||
|
||||
.vjs-time-divider { display:none; }
|
||||
|
||||
.vjs-default-skin .vjs-time-control { font-size: 1em; line-height: 1; font-weight: normal; font-family: Helvetica, Arial, sans-serif; }
|
||||
.vjs-default-skin .vjs-time-control span { line-height: 25px; /* Centering vertically */ }
|
||||
|
||||
/* Fullscreen
|
||||
-------------------------------------------------------------------------------- */
|
||||
.vjs-secondary-controls { float: right; }
|
||||
|
||||
.vjs-default-skin .vjs-fullscreen-control { width: 3.8em; cursor: pointer !important; float: right; }
|
||||
.vjs-default-skin .vjs-fullscreen-control div { width: 16px; height: 16px; background: url('video-js.png') -50px 0; margin: 0.5em auto 0; }
|
||||
|
||||
.vjs-default-skin.vjs-fullscreen .vjs-fullscreen-control div { background: url('video-js.png') -75px 0; }
|
||||
|
||||
|
||||
/* Big Play Button (at start)
|
||||
---------------------------------------------------------*/
|
||||
.vjs-default-skin .vjs-big-play-button {
|
||||
display: block; /* Start hidden */ z-index: 2;
|
||||
position: absolute; top: 50%; left: 50%; width: 8.0em; height: 8.0em; margin: -43px 0 0 -43px; text-align: center; vertical-align: center; cursor: pointer !important;
|
||||
border: 0.3em solid #fff; opacity: 0.95;
|
||||
-webkit-border-radius: 25px; -moz-border-radius: 25px; border-radius: 25px;
|
||||
|
||||
background: #454545;
|
||||
background: -moz-linear-gradient(top, #454545 0%, #232323 50%, #161616 50%, #3f3f3f 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#454545), color-stop(50%,#232323), color-stop(50%,#161616), color-stop(100%,#3f3f3f));
|
||||
background: -webkit-linear-gradient(top, #454545 0%,#232323 50%,#161616 50%,#3f3f3f 100%);
|
||||
background: -o-linear-gradient(top, #454545 0%,#232323 50%,#161616 50%,#3f3f3f 100%);
|
||||
background: -ms-linear-gradient(top, #454545 0%,#232323 50%,#161616 50%,#3f3f3f 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#454545', endColorstr='#3f3f3f',GradientType=0 );
|
||||
background: linear-gradient(top, #454545 0%,#232323 50%,#161616 50%,#3f3f3f 100%);
|
||||
|
||||
/* CSS Shadows */
|
||||
-webkit-box-shadow: 4px 4px 8px #000; -moz-box-shadow: 4px 4px 8px #000; box-shadow: 4px 4px 8px #000;
|
||||
}
|
||||
|
||||
.vjs-default-skin div.vjs-big-play-button:hover {
|
||||
-webkit-box-shadow: 0px 0px 80px #fff; -moz-box-shadow: 0px 0px 80px #fff; box-shadow: 0px 0px 80px #fff;
|
||||
}
|
||||
|
||||
.vjs-default-skin div.vjs-big-play-button span {
|
||||
position: absolute; top: 50%; left: 50%;
|
||||
display: block; width: 35px; height: 42px;
|
||||
margin: -20px 0 0 -15px; /* Using negative margin to center image. */
|
||||
background: url('video-js.png') -100px 0;
|
||||
}
|
||||
Arquivo binário não exibido.
|
Antes Largura: | Altura: | Tamanho: 7.3 KiB |
@@ -1,62 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>HTML5 Video Player</title>
|
||||
|
||||
<link href="design/video-js.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<!--[if IE]>
|
||||
<script src="https://getfirebug.com/releases/lite/1.3/firebug-lite.js"></script>
|
||||
<!--<![endif]-->
|
||||
|
||||
<!-- <script src="dist/video.js"></script> -->
|
||||
|
||||
<script src="src/core.js"></script>
|
||||
<script src="src/lib.js"></script>
|
||||
<script src="src/ecma.js"></script>
|
||||
<script src="src/json.js"></script>
|
||||
|
||||
<script src="src/log.js"></script>
|
||||
|
||||
<script src="src/api.js"></script>
|
||||
<script src="src/events.js"></script>
|
||||
|
||||
<script src="src/tracks.js"></script>
|
||||
|
||||
<script src="src/behaviors/behaviors.js"></script>
|
||||
<script src="src/behaviors/seekBar.js"></script>
|
||||
<script src="src/behaviors/volume.js"></script>
|
||||
<script src="src/behaviors/texttrackdisplays.js"></script>
|
||||
|
||||
<script src="src/controls/bigPlay.js"></script>
|
||||
<script src="src/controls/bar.js"></script>
|
||||
<script src="src/controls/subtitlesBox.js"></script>
|
||||
|
||||
<script src="src/tech/html5.js"></script>
|
||||
<script src="src/tech/flowplayer.js"></script>
|
||||
|
||||
<script src="src/tech/h5swf.js"></script>
|
||||
|
||||
<script src="src/autoload.js"></script>
|
||||
|
||||
<script type="text/javascript" src="flash/swfobject.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<video id="vid1" class="video-js vjs-default-skin" controls preload="none" width="640" height="264" data-setup='{"example_option":true}' poster="http://video-js.zencoder.com/oceans-clip.png">
|
||||
<!-- <source src="http://pseudo01.hddn.com/vod/demo.flowplayervod/flowplayer-700.flv" type='video/flv'> -->
|
||||
<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://stg.video.howcookingworks.com/video/posts/e110d95f6770c62e8d3ba52ff221e7f7907683ac266939/e110d95f6770c62e8d3ba52ff221e7f7907683ac266939_high.webm" type='video/webm'> -->
|
||||
<source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg; codecs="theora, vorbis"'>
|
||||
<!-- <track kind="subtitles" src="http://videojs.com/subtitles/demo-subtitles.srt" srclang="en-US" label="English"></track> -->
|
||||
<!-- <track kind="subtitles" src="demo-subtitles.srt" srclang="en-US" label="English"></track> -->
|
||||
</video>
|
||||
|
||||
<script>
|
||||
// vid = document.getElementById("vid2");
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Arquivo binário não exibido.
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
@@ -1,4 +0,0 @@
|
||||
// Self-executing function to prevent global vars and help with minification
|
||||
;(function(window, undefined){
|
||||
var document = window.document;
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
|
||||
// Expose to global
|
||||
window.VideoJS = window._V_ = VideoJS;
|
||||
|
||||
// End self-executing function
|
||||
})(window);
|
||||
@@ -1,294 +0,0 @@
|
||||
/* Player API
|
||||
================================================================================ */
|
||||
VideoJS.fn.extend({
|
||||
|
||||
apiCall: function(method, arg){
|
||||
if (this.isReady) {
|
||||
if (this.api[method]) {
|
||||
return this.api[method].call(this, arg);
|
||||
} else {
|
||||
throw new Error("The '"+method+"' method is not available on the playback technology's API");
|
||||
}
|
||||
} else {
|
||||
throw new Error("The playback technology API is not ready yet. Use player.ready(myFunction).");
|
||||
}
|
||||
},
|
||||
|
||||
/* Listener types: play, pause, timeupdate, bufferedupdate, ended, volumechange, error */
|
||||
addEvent: function(type, fn){
|
||||
return _V_.addEvent(this.box, type, _V_.proxy(this, fn));
|
||||
},
|
||||
removeEvent: function(type, fn){
|
||||
return _V_.removeEvent(this.box, type, fn);
|
||||
},
|
||||
triggerEvent: function(type, e){
|
||||
return _V_.triggerEvent(this.box, type, e);
|
||||
},
|
||||
|
||||
play: function(){
|
||||
this.apiCall("play"); return this;
|
||||
},
|
||||
pause: function(){
|
||||
this.apiCall("pause"); return this;
|
||||
},
|
||||
paused: function(){
|
||||
return this.apiCall("paused");
|
||||
},
|
||||
|
||||
currentTime: function(seconds){
|
||||
if (seconds !== undefined) {
|
||||
this.values.currentTime = seconds; // Cache the last set value for smoother scrubbing.
|
||||
this.apiCall("setCurrentTime", seconds);
|
||||
if (this.manualTimeUpdates) { this.triggerEvent("timeupdate"); }
|
||||
return this;
|
||||
}
|
||||
return this.apiCall("currentTime");
|
||||
},
|
||||
duration: function(){
|
||||
return this.apiCall("duration");
|
||||
},
|
||||
remainingTime: function(){
|
||||
return this.duration() - this.currentTime();
|
||||
},
|
||||
|
||||
buffered: function(){
|
||||
var buffered = this.apiCall("buffered"),
|
||||
start = 0, end = this.values.bufferEnd = this.values.bufferEnd || 0,
|
||||
timeRange;
|
||||
|
||||
if (buffered && buffered.length > 0 && buffered.end(0) > end) {
|
||||
end = buffered.end(0);
|
||||
// Storing values allows them be overridden by setBufferedFromProgress
|
||||
this.values.bufferEnd = end;
|
||||
}
|
||||
|
||||
return _V_.createTimeRange(start, end);
|
||||
},
|
||||
|
||||
// Calculates amount of buffer is full
|
||||
bufferedPercent: function(){
|
||||
return (this.duration()) ? this.buffered().end(0) / this.duration() : 0;
|
||||
},
|
||||
|
||||
volume: function(percentAsDecimal){
|
||||
if (percentAsDecimal !== undefined) {
|
||||
var vol = Math.max(0, Math.min(1, parseFloat(percentAsDecimal))); // Force value to between 0 and 1
|
||||
this.values.volume = vol;
|
||||
this.apiCall("setVolume", vol);
|
||||
this.setLocalStorage("volume", vol);
|
||||
return this;
|
||||
}
|
||||
// if (this.values.volume) { return this.values.volume; }
|
||||
return this.apiCall("volume");
|
||||
},
|
||||
muted: function(muted){
|
||||
if (muted !== undefined) {
|
||||
this.apiCall("setMuted", muted);
|
||||
return this;
|
||||
}
|
||||
return this.apiCall("muted");
|
||||
},
|
||||
|
||||
width: function(width, skipListeners){
|
||||
if (width !== undefined) {
|
||||
this.box.width = width;
|
||||
this.box.style.width = width+"px";
|
||||
if (!skipListeners) { this.triggerEvent("resize"); }
|
||||
return this;
|
||||
}
|
||||
return parseInt(this.box.getAttribute("width"));
|
||||
},
|
||||
height: function(height){
|
||||
if (height !== undefined) {
|
||||
this.box.height = height;
|
||||
this.box.style.height = height+"px";
|
||||
this.triggerEvent("resize");
|
||||
return this;
|
||||
}
|
||||
return parseInt(this.box.getAttribute("height"));
|
||||
},
|
||||
size: function(width, height){
|
||||
// Skip resize listeners on width for optimization
|
||||
return this.width(width, true).height(height);
|
||||
},
|
||||
|
||||
supportsFullScreen: function(){ return this.apiCall("supportsFullScreen"); },
|
||||
|
||||
// Turn on fullscreen (or window) mode
|
||||
enterFullScreen: function(){
|
||||
if (false && this.supportsFullScreen()) {
|
||||
this.api("enterFullScreen");
|
||||
} else {
|
||||
this.enterFullWindow();
|
||||
}
|
||||
this.triggerEvent("enterFullScreen");
|
||||
return this;
|
||||
},
|
||||
|
||||
exitFullScreen: function(){
|
||||
if (true || !this.supportsFullScreen()) {
|
||||
this.exitFullWindow();
|
||||
}
|
||||
this.triggerEvent("exitFullScreen");
|
||||
|
||||
// Otherwise Shouldn't be called since native fullscreen uses own controls.
|
||||
return this;
|
||||
},
|
||||
|
||||
enterFullWindow: function(){
|
||||
this.videoIsFullScreen = true;
|
||||
|
||||
// Storing original doc overflow value to return to when fullscreen is off
|
||||
this.docOrigOverflow = document.documentElement.style.overflow;
|
||||
|
||||
// Add listener for esc key to exit fullscreen
|
||||
_V_.addEvent(document, "keydown", _V_.proxy(this, this.fullscreenOnEscKey));
|
||||
|
||||
// Add listener for a window resize
|
||||
_V_.addEvent(window, "resize", _V_.proxy(this, this.fullscreenOnWindowResize));
|
||||
|
||||
// Hide any scroll bars
|
||||
document.documentElement.style.overflow = 'hidden';
|
||||
|
||||
// Apply fullscreen styles
|
||||
_V_.addClass(document.body, "vjs-full-window");
|
||||
_V_.addClass(this.box, "vjs-fullscreen");
|
||||
|
||||
this.triggerEvent("enterFullWindow");
|
||||
},
|
||||
|
||||
exitFullWindow: function(){
|
||||
this.videoIsFullScreen = false;
|
||||
_V_.removeEvent(document, "keydown", this.fullscreenOnEscKey);
|
||||
_V_.removeEvent(window, "resize", this.fullscreenOnWindowResize);
|
||||
|
||||
// Unhide scroll bars.
|
||||
document.documentElement.style.overflow = this.docOrigOverflow;
|
||||
|
||||
// Remove fullscreen styles
|
||||
_V_.removeClass(document.body, "vjs-full-window");
|
||||
_V_.removeClass(this.box, "vjs-fullscreen");
|
||||
|
||||
// Resize the box, controller, and poster to original sizes
|
||||
this.positionAll();
|
||||
this.triggerEvent("exitFullWindow");
|
||||
},
|
||||
|
||||
// src is a pretty powerful function
|
||||
// If you pass it an array of source objects, it will find the best source to play and use that object.src
|
||||
// If the new source requires a new playback technology, it will switch to that.
|
||||
// If you pass it an object, it will set the source to object.src
|
||||
// If you pass it anything else (url string) it will set the video source to that
|
||||
src: function(source){
|
||||
// Case: Array of source objects to choose from and pick the best to play
|
||||
if (source instanceof Array) {
|
||||
techLoop: // Named loop for breaking both loops
|
||||
// Loop through each playback technology in the options order
|
||||
for (var i=0,j=this.options.techOrder;i<j.length;i++) {
|
||||
var techName = j[i],
|
||||
tech = _V_.tech[techName];
|
||||
|
||||
// Check if the browser supports this technology
|
||||
if (tech.supported()) {
|
||||
|
||||
// Loop through each source object
|
||||
for (var a=0,b=this.options.sources;a<b.length;a++) {
|
||||
var source = b[a];
|
||||
|
||||
// Check if source can be played with this technology
|
||||
if (tech.canPlaySource.call(this, source)) {
|
||||
|
||||
// If this technology is already loaded, set source
|
||||
if (techName == this.currentTechName) {
|
||||
this.src(source); // Passing the source object
|
||||
|
||||
// Otherwise load this technology with chosen source
|
||||
} else {
|
||||
this.loadTech(techName, source);
|
||||
}
|
||||
|
||||
break techLoop; // Break both loops
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Case: Source object { src: "", type: "" ... }
|
||||
} else if (source instanceof Object) {
|
||||
this.src(source.src);
|
||||
|
||||
// Case: URL String (http://myvideo...)
|
||||
} else {
|
||||
this.apiCall("src", source);
|
||||
this.load();
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
||||
// Begin loading the src data
|
||||
load: function(){
|
||||
this.apiCall("load");
|
||||
return this;
|
||||
},
|
||||
currentSrc: function(){
|
||||
return this.apiCall("currentSrc");
|
||||
},
|
||||
|
||||
textTrackValue: function(kind, value){
|
||||
if (value !== undefined) {
|
||||
this.values[kind] = value;
|
||||
this.triggerEvent(kind+"update");
|
||||
return this;
|
||||
}
|
||||
return this.values[kind];
|
||||
},
|
||||
|
||||
// Attributes/Options
|
||||
preload: function(value){
|
||||
if (value !== undefined) {
|
||||
this.apiCall("setPreload", value);
|
||||
this.options.preload = value;
|
||||
return this;
|
||||
}
|
||||
return this.apiCall("preload", value);
|
||||
},
|
||||
autoplay: function(value){
|
||||
if (value !== undefined) {
|
||||
this.apiCall("setAutoplay", value);
|
||||
this.options.autoplay = value;
|
||||
return this;
|
||||
}
|
||||
return this.apiCall("autoplay", value);
|
||||
},
|
||||
loop: function(value){
|
||||
if (value !== undefined) {
|
||||
this.apiCall("setLoop", value);
|
||||
this.options.loop = value;
|
||||
return this;
|
||||
}
|
||||
return this.apiCall("loop", value);
|
||||
},
|
||||
|
||||
controls: function(){ return this.options.controls; },
|
||||
textTracks: function(){ return this.options.tracks; },
|
||||
|
||||
error: function(){ return this.apiCall("error"); },
|
||||
networkState: function(){ return this.apiCall("networkState"); },
|
||||
readyState: function(){ return this.apiCall("readyState"); },
|
||||
seeking: function(){ return this.apiCall("seeking"); },
|
||||
initialTime: function(){ return this.apiCall("initialTime"); },
|
||||
startOffsetTime: function(){ return this.apiCall("startOffsetTime"); },
|
||||
played: function(){ return this.apiCall("played"); },
|
||||
seekable: function(){ return this.apiCall("seekable"); },
|
||||
ended: function(){ return this.apiCall("ended"); },
|
||||
videoTracks: function(){ return this.apiCall("videoTracks"); },
|
||||
audioTracks: function(){ return this.apiCall("audioTracks"); },
|
||||
videoWidth: function(){ return this.apiCall("videoWidth"); },
|
||||
videoHeight: function(){ return this.apiCall("videoHeight"); },
|
||||
defaultPlaybackRate: function(){ return this.apiCall("defaultPlaybackRate"); },
|
||||
playbackRate: function(){ return this.apiCall("playbackRate"); },
|
||||
mediaGroup: function(){ return this.apiCall("mediaGroup"); },
|
||||
controller: function(){ return this.apiCall("controller"); },
|
||||
controls: function(){ return this.apiCall("controls"); },
|
||||
defaultMuted: function(){ return this.apiCall("defaultMuted"); }
|
||||
});
|
||||
@@ -1,37 +0,0 @@
|
||||
_V_.loadPlayers = function(){
|
||||
var vids = document.getElementsByTagName("video"),
|
||||
options, vid;
|
||||
if (vids && vids.length > 0) {
|
||||
for (var i=0,j=vids.length; i<j; i++) {
|
||||
vid = vids[i];
|
||||
// Check if element exists, has getAttribute func.
|
||||
// IE seems to consider typeof el.getAttribute == "object" instead of "function" like expected, at least when loading the player immediately.
|
||||
if (vid && vid.getAttribute) {
|
||||
// Check if this video has already been set up by video.js.
|
||||
if (vid.player === undefined) {
|
||||
options = vid.getAttribute("data-setup");
|
||||
// Check if data-setup attr exists.
|
||||
// We only auto-setup if they've added the data-setup attr.
|
||||
if (options !== null) {
|
||||
// Parse options JSON
|
||||
// If empty string, make it a parsable json object.
|
||||
options = JSON.parse(options || "{}");
|
||||
// Create new video.js instance.
|
||||
VideoJS.players[vid.id] = new VideoJS(vid, options);
|
||||
}
|
||||
}
|
||||
|
||||
// If getAttribute isn't defined, we need to wait for the DOM.
|
||||
} else {
|
||||
_V_.loadPlayerTimeout(1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
_V_.loadPlayerTimeout(1);
|
||||
}
|
||||
};
|
||||
_V_.loadPlayerTimeout = function(wait){
|
||||
setTimeout(_V_.loadPlayers, wait);
|
||||
};
|
||||
_V_.loadPlayerTimeout(1); // Let vjs javascript finish executing
|
||||
@@ -1,310 +0,0 @@
|
||||
/* Box Behaviors - The primary container element
|
||||
================================================================================ */
|
||||
VideoJS.fn.newBehavior("box",
|
||||
function(element){
|
||||
_V_.addClass(element, "vjs-paused");
|
||||
this.addEvent("play", this.boxOnVideoPlay);
|
||||
this.addEvent("pause", this.boxOnVideoPause);
|
||||
},
|
||||
function(){},
|
||||
{
|
||||
boxOnVideoPlay: function(){
|
||||
_V_.removeClass(this.box, "vjs-paused");
|
||||
_V_.addClass(this.box, "vjs-playing");
|
||||
},
|
||||
boxOnVideoPause: function(){
|
||||
_V_.removeClass(this.box, "vjs-playing");
|
||||
_V_.addClass(this.box, "vjs-paused");
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
/* Playback Technology Element Behaviors
|
||||
================================================================================ */
|
||||
VideoJS.fn.newBehavior("tech",
|
||||
function(element){
|
||||
_V_.addEvent(element, "click", _V_.proxy(this, this.onPlayToggleClick));
|
||||
},
|
||||
function(element){
|
||||
_V_.removeEvent(element, "click", this.onPlayToggleClick);
|
||||
},
|
||||
{}
|
||||
);
|
||||
|
||||
/* Control Bar Behaviors
|
||||
================================================================================ */
|
||||
VideoJS.fn.newBehavior("controlBar",
|
||||
function(element){
|
||||
if (!this.bels.controlBars) {
|
||||
this.bels.controlBars = [];
|
||||
// this.addEvent("mouseover", this.showControlBars);
|
||||
// this.addEvent("mouseout", this.hideControlBars);
|
||||
}
|
||||
this.bels.controlBars.push(element);
|
||||
},
|
||||
function(element){},
|
||||
{
|
||||
showControlBars: function(){
|
||||
this.each(this.bels.controlBars, function(bar){
|
||||
bar.style.opacity = 1;
|
||||
// bar.style.display = "block";
|
||||
});
|
||||
},
|
||||
hideControlBars: function(){
|
||||
this.each(this.bels.controlBars, function(bar){
|
||||
bar.style.opacity = 0;
|
||||
// bar.style.display = "none";
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
/* PlayToggle, PlayButton, PauseButton Behaviors
|
||||
================================================================================ */
|
||||
// Play Toggle
|
||||
VideoJS.fn.newBehavior("playToggle", function(element){
|
||||
if (!this.bels.playToggles) {
|
||||
this.bels.playToggles = [];
|
||||
this.addEvent("play", this.playTogglesOnPlay);
|
||||
this.addEvent("pause", this.playTogglesOnPause);
|
||||
}
|
||||
this.bels.playToggles.push(element);
|
||||
_V_.addEvent(element, "click", _V_.proxy(this, this.onPlayToggleClick));
|
||||
_V_.addEvent(element, "focus", _V_.proxy(this, this.onPlayToggleFocus));
|
||||
_V_.addEvent(element, "blur", _V_.proxy(this, this.onPlayToggleBlur));
|
||||
},
|
||||
function(){},
|
||||
{
|
||||
onPlayToggleClick: function(event){
|
||||
if (this.paused()) {
|
||||
this.play();
|
||||
} else {
|
||||
this.pause();
|
||||
}
|
||||
},
|
||||
playTogglesOnPlay: function(event){
|
||||
this.each(this.bels.playToggles, function(toggle){
|
||||
_V_.removeClass(toggle, "vjs-paused");
|
||||
_V_.addClass(toggle, "vjs-playing");
|
||||
});
|
||||
},
|
||||
playTogglesOnPause: function(event){
|
||||
this.each(this.bels.playToggles, function(toggle){
|
||||
_V_.removeClass(toggle, "vjs-playing");
|
||||
_V_.addClass(toggle, "vjs-paused");
|
||||
});
|
||||
},
|
||||
onPlayToggleFocus: function(event){
|
||||
_V_.addEvent(document, "keyup", _V_.proxy(this, this.onPlayToggleKey));
|
||||
},
|
||||
onPlayToggleKey: function(event){
|
||||
if (event.which == 32 || event.which == 13) {
|
||||
event.preventDefault();
|
||||
this.onPlayToggleClick();
|
||||
}
|
||||
},
|
||||
onPlayToggleBlur: function(event){
|
||||
_V_.removeEvent(document, "keyup", _V_.proxy(this, this.onPlayToggleKey));
|
||||
}
|
||||
}
|
||||
);
|
||||
// Play
|
||||
VideoJS.fn.newBehavior("playButton", function(element){
|
||||
_V_.addEvent(element, "click", _V_.proxy(this, this.onPlayButtonClick));
|
||||
},
|
||||
function(){},
|
||||
{
|
||||
onPlayButtonClick: function(event){ this.play(); }
|
||||
}
|
||||
);
|
||||
// Pause
|
||||
VideoJS.fn.newBehavior("pauseButton", function(element){
|
||||
_V_.addEvent(element, "click", _V_.proxy(this, this.onPauseButtonClick));
|
||||
},
|
||||
function(){},
|
||||
{
|
||||
onPauseButtonClick: function(event){ this.pause(); }
|
||||
}
|
||||
);
|
||||
|
||||
/* Current Time Display Behaviors
|
||||
================================================================================ */
|
||||
VideoJS.fn.newBehavior("currentTimeDisplay", function(element){
|
||||
if (!this.bels.currentTimeDisplays) {
|
||||
this.bels.currentTimeDisplays = [];
|
||||
this.addEvent("timeupdate", this.updateCurrentTimeDisplays);
|
||||
}
|
||||
this.bels.currentTimeDisplays.push(element);
|
||||
},
|
||||
function(){},
|
||||
{
|
||||
// Update the displayed time (00:00)
|
||||
updateCurrentTimeDisplays: function(newTime){
|
||||
// Allows for smooth scrubbing, when player can't keep up.
|
||||
var time = (this.scrubbing) ? this.values.currentTime : this.currentTime();
|
||||
this.each(this.bels.currentTimeDisplays, function(dis){
|
||||
dis.innerHTML = _V_.formatTime(time, this.duration());
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
/* Duration Display Behaviors
|
||||
================================================================================ */
|
||||
VideoJS.fn.newBehavior("durationDisplay", function(element){
|
||||
if (!this.bels.durationDisplays) {
|
||||
this.bels.durationDisplays = [];
|
||||
this.addEvent("timeupdate", this.updateDurationDisplays);
|
||||
}
|
||||
this.bels.durationDisplays.push(element);
|
||||
},
|
||||
function(){},
|
||||
{
|
||||
updateDurationDisplays: function(){
|
||||
this.each(this.bels.durationDisplays, function(dis){
|
||||
if (this.duration()) { dis.innerHTML = _V_.formatTime(this.duration()); }
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
/* Duration Display Behaviors
|
||||
================================================================================ */
|
||||
VideoJS.fn.newBehavior("remainingTimeDisplay", function(element){
|
||||
if (!this.bels.remainingTimeDisplays) {
|
||||
this.bels.remainingTimeDisplays = [];
|
||||
this.addEvent("timeupdate", this.updateRemainingTimeDisplays);
|
||||
}
|
||||
this.bels.remainingTimeDisplays.push(element);
|
||||
},
|
||||
function(){},
|
||||
{
|
||||
updateRemainingTimeDisplays: function(){
|
||||
this.each(this.bels.remainingTimeDisplays, function(dis){
|
||||
if (this.duration()) { dis.innerHTML = "-"+_V_.formatTime(this.remainingTime()); }
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
/* Time Left (remaining) Display Behaviors
|
||||
================================================================================ */
|
||||
VideoJS.fn.newBehavior("timeLeftDisplay", function(element){
|
||||
if (!this.bels.timeLeftDisplays) {
|
||||
this.bels.timeLeftDisplays = [];
|
||||
this.addEvent("timeupdate", this.updateTimeLeftDisplays);
|
||||
}
|
||||
this.bels.timeLeftDisplays.push(element);
|
||||
},
|
||||
function(){
|
||||
this.removeEvent("timeupdate", this.updateTimeLeftDisplays);
|
||||
delete this.bels.timeLeftDisplays;
|
||||
},
|
||||
{
|
||||
updateTimeLeftDisplays: function(){
|
||||
// Allows for smooth scrubbing, when player can't keep up.
|
||||
var time = (this.scrubbing) ? this.values.currentTime : this.currentTime();
|
||||
this.each(this.bels.timeLeftDisplays, function(dis){
|
||||
dis.innerHTML = "-" + _V_.formatTime(this.duration() - time);
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
/* Volume Scrubber Behaviors
|
||||
================================================================================ */
|
||||
VideoJS.fn.newBehavior("volumeScrubber", function(element){
|
||||
// Binding with element as 'this' so the progress holder element can be retrieved in IE.
|
||||
// IE doesn't support the currentTarget event attr.
|
||||
var player = this;
|
||||
_V_.addEvent(element, "mousedown", _V_.proxy(element, function(e){
|
||||
player.onVolumeScrubberMouseDown(e, this);
|
||||
}));
|
||||
},
|
||||
function(){},
|
||||
{
|
||||
// Adjust the volume when the user drags on the volume control
|
||||
onVolumeScrubberMouseDown: function(event, scrubber){
|
||||
// event.preventDefault();
|
||||
_V_.blockTextSelection();
|
||||
this.currentScrubber = scrubber;
|
||||
this.setVolumeWithScrubber(event);
|
||||
_V_.addEvent(document, "mousemove", _V_.proxy(this, this.onVolumeScrubberMouseMove));
|
||||
_V_.addEvent(document, "mouseup", _V_.proxy(this, this.onVolumeScrubberMouseUp));
|
||||
},
|
||||
onVolumeScrubberMouseMove: function(event){
|
||||
this.setVolumeWithScrubber(event);
|
||||
},
|
||||
onVolumeScrubberMouseUp: function(event){
|
||||
this.setVolumeWithScrubber(event);
|
||||
_V_.unblockTextSelection();
|
||||
_V_.removeEvent(document, "mousemove", this.onVolumeScrubberMouseMove, false);
|
||||
_V_.removeEvent(document, "mouseup", this.onVolumeScrubberMouseUp, false);
|
||||
},
|
||||
setVolumeWithScrubber: function(event){
|
||||
var newVol = _V_.getRelativePosition(event.pageX, this.currentScrubber);
|
||||
this.volume(newVol);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
/* Volume Display Behaviors
|
||||
================================================================================ */
|
||||
VideoJS.fn.newBehavior("volumeDisplay", function(element){
|
||||
if (!this.bels.volumeDisplays) {
|
||||
this.bels.volumeDisplays = [];
|
||||
this.addEvent("volumechange", this.updateVolumeDisplays);
|
||||
}
|
||||
this.bels.volumeDisplays.push(element);
|
||||
this.updateVolumeDisplay(element); // Set the display to the initial volume
|
||||
},
|
||||
function(){},
|
||||
{
|
||||
// Update the volume control display
|
||||
// Unique to these default controls. Uses borders to create the look of bars.
|
||||
updateVolumeDisplays: function(){
|
||||
if (!this.bels.volumeDisplays) { return; }
|
||||
this.each(this.bels.volumeDisplays, function(dis){
|
||||
this.updateVolumeDisplay(dis);
|
||||
});
|
||||
},
|
||||
updateVolumeDisplay: function(display){
|
||||
var volNum = Math.ceil(this.volume() * 6);
|
||||
this.each(display.children, function(child, num){
|
||||
if (num < volNum) {
|
||||
_V_.addClass(child, "vjs-volume-level-on");
|
||||
} else {
|
||||
_V_.removeClass(child, "vjs-volume-level-on");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
/* Fullscreen Toggle Behaviors
|
||||
================================================================================ */
|
||||
VideoJS.fn.newBehavior("fullscreenToggle", function(element){
|
||||
_V_.addEvent(element, "click", _V_.proxy(this, this.onFullscreenToggleClick));
|
||||
},
|
||||
function(){},
|
||||
{
|
||||
// When the user clicks on the fullscreen button, update fullscreen setting
|
||||
onFullscreenToggleClick: function(event){
|
||||
if (!this.videoIsFullScreen) {
|
||||
this.enterFullScreen();
|
||||
} else {
|
||||
this.exitFullScreen();
|
||||
}
|
||||
},
|
||||
|
||||
fullscreenOnWindowResize: function(event){ // Removeable
|
||||
// this.positionControlBars();
|
||||
},
|
||||
// Create listener for esc key while in full screen mode
|
||||
fullscreenOnEscKey: function(event){ // Removeable
|
||||
if (event.keyCode == 27) {
|
||||
this.exitFullScreen();
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -1,213 +0,0 @@
|
||||
/* Seek Bar Behaviors (Current Time Scrubber)
|
||||
================================================================================ */
|
||||
VideoJS.fn.newBehavior("seekBar",
|
||||
function(element){
|
||||
if (!this.bels.seekBars) {
|
||||
this.bels.seekBars = [];
|
||||
this.addEvent("timeupdate", this.updateSeekBars);
|
||||
}
|
||||
this.bels.seekBars.push(element);
|
||||
|
||||
// Get and store related child objects (progress bar & handle)
|
||||
var data = _V_.getData(element);
|
||||
this.each(element.childNodes, function(c){
|
||||
if (c.className) {
|
||||
if (c.className.indexOf("seek-handle") != -1) {
|
||||
data.seekHandle = c;
|
||||
} else if (c.className.indexOf("play-progress") != -1) {
|
||||
data.playProgress = c;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Binding with element as 'this' so the progress holder element can be retrieved in IE.
|
||||
// IE doesn't support the currentTarget event attr.
|
||||
var player = this;
|
||||
_V_.addEvent(element, "mousedown", _V_.proxy(element, function(event){
|
||||
player.onSeekBarMouseDown(event, this);
|
||||
}));
|
||||
_V_.addEvent(element, "focus", _V_.proxy(this, this.onSeekBarFocus));
|
||||
_V_.addEvent(element, "blur", _V_.proxy(this, this.onSeekBarBlur));
|
||||
},
|
||||
function(){},
|
||||
{
|
||||
// Adjust the play position when the user drags on the progress bar
|
||||
onSeekBarMouseDown: function(event, currentTarget){
|
||||
event.preventDefault();
|
||||
_V_.blockTextSelection();
|
||||
|
||||
this.currSeekBar = currentTarget;
|
||||
this.currHandle = _V_.getData(currentTarget).seekHandle || false;
|
||||
|
||||
this.scrubbing = true;
|
||||
|
||||
this.videoWasPlaying = !this.paused();
|
||||
this.pause();
|
||||
|
||||
this.setCurrentTimeWithScrubber(event);
|
||||
_V_.addEvent(document, "mousemove", _V_.proxy(this, this.onSeekBarMouseMove));
|
||||
_V_.addEvent(document, "mouseup", _V_.proxy(this, this.onSeekBarMouseUp));
|
||||
},
|
||||
onSeekBarMouseMove: function(event){ // Removeable
|
||||
this.setCurrentTimeWithScrubber(event);
|
||||
},
|
||||
onSeekBarMouseUp: function(event){ // Removeable
|
||||
_V_.unblockTextSelection();
|
||||
_V_.removeEvent(document, "mousemove", this.onSeekBarMouseMove, false);
|
||||
_V_.removeEvent(document, "mouseup", this.onSeekBarMouseUp, false);
|
||||
this.scrubbing = false;
|
||||
if (this.videoWasPlaying) {
|
||||
this.play();
|
||||
}
|
||||
},
|
||||
setCurrentTimeWithScrubber: function(event){
|
||||
var bar = this.currSeekBar,
|
||||
barX = _V_.findPosX(bar),
|
||||
barW = bar.offsetWidth,
|
||||
handle = this.currHandle,
|
||||
handleW = (handle) ? handle.offsetWidth : 0;
|
||||
|
||||
// Adjusted X and Width, so handle doesn't go outside the bar
|
||||
barAX = barX + (handleW / 2),
|
||||
barAW = barW - handleW,
|
||||
// Percent that the click is through the adjusted area
|
||||
percent = Math.max(0, Math.min(1, (event.pageX - barAX) / barAW)),
|
||||
// Percent translated to pixels
|
||||
percentPix = percent * barAW,
|
||||
// Percent translated to seconds
|
||||
newTime = percent * this.duration();
|
||||
|
||||
// Don't let video end while scrubbing.
|
||||
if (newTime == this.duration()) { newTime = newTime - 0.1; }
|
||||
|
||||
// Set new time (tell player to seek to new time)
|
||||
this.currentTime(newTime);
|
||||
},
|
||||
getSeekBarAdjustedWidth: function(bar, handle){
|
||||
var bar = this.currSeekBar,
|
||||
barX = _V_.findPosX(bar),
|
||||
barW = bar.offsetWidth,
|
||||
handle = this.currHandle,
|
||||
handleW = (handle) ? handle.offsetWidth : 0;
|
||||
|
||||
// Adjusted X and Width, so handle doesn't go outside the bar
|
||||
barAX = barX + (handleW / 2),
|
||||
barAW = barW - handleW;
|
||||
},
|
||||
updateSeekBars: function(){
|
||||
// If scrubbing, use the cached currentTime value for speed
|
||||
var progress = /* (this.scrubbing) ? this.scrubTime / this.duration() : */ this.currentTime() / this.duration();
|
||||
// Protect against no duration and other division issues
|
||||
if (isNaN(progress)) { progress = 0; }
|
||||
|
||||
this.each(this.bels.seekBars, function(bar){
|
||||
var barData = _V_.getData(bar),
|
||||
barX = _V_.findPosX(bar),
|
||||
barW = bar.offsetWidth,
|
||||
handle = barData.seekHandle,
|
||||
progBar = barData.playProgress,
|
||||
handleW = (handle) ? handle.offsetWidth : 0;
|
||||
|
||||
// Adjusted X and Width, so handle doesn't go outside the bar
|
||||
barAX = barX + (handleW / 2),
|
||||
barAW = barW - handleW;
|
||||
// Percent that the click is through the adjusted area
|
||||
// percent = Math.max(0, Math.min(1, (event.pageX - barAX) / barAW)),
|
||||
// Percent translated to pixels
|
||||
// percentPix = percent * barAW,
|
||||
// Percent translated to seconds
|
||||
// newTime = percent * this.duration();
|
||||
|
||||
|
||||
progBarProgress = _V_.round(progress * barAW + handleW / 2) + "px";
|
||||
if (progBar && progBar.style) { progBar.style.width = progBarProgress; }
|
||||
|
||||
handle.style.left = _V_.round(progress * barAW)+"px";
|
||||
});
|
||||
|
||||
|
||||
// Update bar length
|
||||
// this.each(this.bels.playProgressBars, function(bar){
|
||||
// if (bar.style) { bar.style.width = _V_.round(progress * 100, 2) + "%"; }
|
||||
// });
|
||||
|
||||
// Move Handle
|
||||
},
|
||||
onSeekBarFocus: function(event){
|
||||
_V_.addEvent(document, "keyup", _V_.proxy(this, this.onSeekBarKey));
|
||||
},
|
||||
onSeekBarKey: function(event){
|
||||
if (event.which == 37) {
|
||||
event.preventDefault();
|
||||
this.currentTime(this.currentTime() - 1);
|
||||
} else if (event.which == 39) {
|
||||
event.preventDefault();
|
||||
this.currentTime(this.currentTime() + 1);
|
||||
}
|
||||
},
|
||||
onSeekBarBlur: function(event){
|
||||
_V_.removeEvent(document, "keyup", _V_.proxy(this, this.onSeekBarKey));
|
||||
}
|
||||
}
|
||||
);
|
||||
/* Seek Handle Behaviors
|
||||
================================================================================ */
|
||||
VideoJS.fn.newBehavior("seekHandle",
|
||||
function(element){
|
||||
if (!this.bels.seekHandles) { this.bels.seekHandles = []; }
|
||||
this.bels.seekHandles.push(element);
|
||||
|
||||
// Store references between seekbar and seekhandle
|
||||
_V_.getData(element).seekBar = element.parentNode;
|
||||
_V_.getData(element.parentNode).seekHandle = element;
|
||||
},
|
||||
function(){},
|
||||
{}
|
||||
);
|
||||
|
||||
/* Play Progress Bar Behaviors
|
||||
================================================================================ */
|
||||
VideoJS.fn.newBehavior("playProgressBar",
|
||||
function(element){
|
||||
if (!this.bels.playProgressBars) {
|
||||
this.bels.playProgressBars = [];
|
||||
this.addEvent("timeupdate", this.updatePlayProgressBars);
|
||||
}
|
||||
this.bels.playProgressBars.push(element);
|
||||
},
|
||||
function(){
|
||||
// Remove
|
||||
},
|
||||
{
|
||||
// Ajust the play progress bar's width based on the current play time
|
||||
updatePlayProgressBars: function(){
|
||||
// If scrubbing, use the cached currentTime value for speed
|
||||
var progress = (this.scrubbing) ? this.values.currentTime / this.duration() : this.currentTime() / this.duration();
|
||||
// Protect against no duration and other division issues
|
||||
if (isNaN(progress)) { progress = 0; }
|
||||
// Update bar length
|
||||
this.each(this.bels.playProgressBars, function(bar){
|
||||
if (bar.style) { bar.style.width = _V_.round(progress * 100, 2) + "%"; }
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
/* Load Progress Bar Behaviors
|
||||
================================================================================ */
|
||||
VideoJS.fn.newBehavior("loadProgressBar",
|
||||
function(element){
|
||||
if (!this.bels.loadProgressBars) { this.bels.loadProgressBars = []; }
|
||||
this.bels.loadProgressBars.push(element);
|
||||
this.addEvent("progress", this.updateLoadProgressBars);
|
||||
},
|
||||
function(){},
|
||||
{
|
||||
updateLoadProgressBars: function(event){
|
||||
// log("updating progress bars", this.bufferedPercent());
|
||||
this.each(this.bels.loadProgressBars, function(bar){
|
||||
if (bar.style) { bar.style.width = _V_.round(this.bufferedPercent() * 100, 2) + "%"; }
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -1,43 +0,0 @@
|
||||
/* Text Track Displays
|
||||
================================================================================ */
|
||||
// Create a behavior type for each text track type (subtitlesDisplay, captionsDisplay, etc.).
|
||||
// Then you can easily do something like.
|
||||
// player.addBehavior(myDiv, "subtitlesDisplay");
|
||||
// And the myDiv's content will be updated with the text change.
|
||||
_V_.each(["subtitles", "captions", "chapters", "descriptions"], function(type){
|
||||
var add, remove,
|
||||
name = type+"Display",
|
||||
plural = name+"s",
|
||||
updateFuncName = "update"+plural,
|
||||
funcs = {};
|
||||
|
||||
// Add the behavior to an element
|
||||
add = function(element){
|
||||
if (!this.bels[plural]) {
|
||||
this.bels[plural] = [];
|
||||
this.addEvent(type+"update", this[updateFuncName]);
|
||||
}
|
||||
this.bels[plural].push(element);
|
||||
};
|
||||
|
||||
// Remove the behavior from an element
|
||||
remove = function(element){
|
||||
if (this.bels[plural]) {
|
||||
_V_.remove(element, this.bels[plural]);
|
||||
if (this.bels[plural].length == 0) {
|
||||
this.removeEvent(type+"update", this[updateFuncName]);
|
||||
delete this.bels[plural];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Addional needed funcitons (added directly to player)
|
||||
funcs[updateFuncName] = function(){
|
||||
var val = this.textTrackValue(type);
|
||||
this.each(this.bels[plural], function(display){
|
||||
display.innerHTML = val;
|
||||
});
|
||||
};
|
||||
|
||||
VideoJS.fn.newBehavior(name, add, remove, funcs);
|
||||
});
|
||||
@@ -1,177 +0,0 @@
|
||||
/* Volume Behaviors
|
||||
================================================================================ */
|
||||
/* Seek Bar Behaviors (Current Time Scrubber)
|
||||
================================================================================ */
|
||||
VideoJS.fn.newBehavior("volumeBar",
|
||||
function(element){
|
||||
if (!this.bels.volumeBars) {
|
||||
this.bels.volumeBars = [];
|
||||
this.addEvent("volumechange", this.updateVolumeBars);
|
||||
}
|
||||
this.bels.volumeBars.push(element);
|
||||
|
||||
// Get and store related child objects (level & handle)
|
||||
var data = _V_.getData(element);
|
||||
this.each(element.childNodes, function(c){
|
||||
if (c.className) {
|
||||
if (c.className.indexOf("volume-handle") != -1) {
|
||||
data.volumeHandle = c;
|
||||
} else if (c.className.indexOf("volume-level") != -1) {
|
||||
data.volumeLevel = c;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Binding with element as 'this' so the holder element can be retrieved in IE.
|
||||
// IE doesn't support the currentTarget event attr.
|
||||
var player = this;
|
||||
_V_.addEvent(element, "mousedown", _V_.proxy(element, function(event){
|
||||
player.onVolumeBarMouseDown(event, this);
|
||||
}));
|
||||
// _V_.addEvent(element, "focus", _V_.proxy(this, this.onVolumeBarFocus));
|
||||
// _V_.addEvent(element, "blur", _V_.proxy(this, this.onVolumeBarBlur));
|
||||
},
|
||||
function(){},
|
||||
{
|
||||
// Adjust the play position when the user drags on the progress bar
|
||||
onVolumeBarMouseDown: function(event, currentTarget){
|
||||
event.preventDefault();
|
||||
_V_.blockTextSelection();
|
||||
|
||||
this.currVolumeBar = currentTarget;
|
||||
this.currHandle = _V_.getData(currentTarget).volumeHandle || false;
|
||||
|
||||
this.setVolumeWithSlider(event);
|
||||
_V_.addEvent(document, "mousemove", _V_.proxy(this, this.onVolumeBarMouseMove));
|
||||
_V_.addEvent(document, "mouseup", _V_.proxy(this, this.onVolumeBarMouseUp));
|
||||
},
|
||||
onVolumeBarMouseMove: function(event){ // Removeable
|
||||
this.setVolumeWithSlider(event);
|
||||
},
|
||||
onVolumeBarMouseUp: function(event){ // Removeable
|
||||
_V_.unblockTextSelection();
|
||||
_V_.removeEvent(document, "mousemove", this.onVolumeBarMouseMove, false);
|
||||
_V_.removeEvent(document, "mouseup", this.onVolumeBarMouseUp, false);
|
||||
},
|
||||
setVolumeWithSlider: function(event){
|
||||
var bar = this.currVolumeBar,
|
||||
barX = _V_.findPosX(bar),
|
||||
barW = bar.offsetWidth,
|
||||
handle = this.currHandle,
|
||||
handleW = (handle) ? handle.offsetWidth : 0;
|
||||
|
||||
// Adjusted X and Width, so handle doesn't go outside the bar
|
||||
barAX = barX + (handleW / 2),
|
||||
barAW = barW - handleW,
|
||||
// Percent that the click is through the adjusted area
|
||||
percent = Math.max(0, Math.min(1, (event.pageX - barAX) / barAW)),
|
||||
// Percent translated to pixels
|
||||
percentPix = percent * barAW,
|
||||
// Percent translated to seconds
|
||||
newTime = percent * this.duration();
|
||||
|
||||
this.volume(percent);
|
||||
},
|
||||
updateVolumeBars: function(){
|
||||
var vol = this.volume();
|
||||
this.each(this.bels.volumeBars, function(bar){
|
||||
var barData = _V_.getData(bar),
|
||||
barX = _V_.findPosX(bar),
|
||||
barW = bar.offsetWidth,
|
||||
handle = barData.volumeHandle,
|
||||
progBar = barData.volumeLevel,
|
||||
handleW = (handle) ? handle.offsetWidth : 0;
|
||||
|
||||
// Adjusted X and Width, so handle doesn't go outside the bar
|
||||
barAX = barX + (handleW / 2),
|
||||
barAW = barW - handleW;
|
||||
// Percent that the click is through the adjusted area
|
||||
// percent = Math.max(0, Math.min(1, (event.pageX - barAX) / barAW)),
|
||||
// Percent translated to pixels
|
||||
// percentPix = percent * barAW,
|
||||
// Percent translated to seconds
|
||||
// newTime = percent * this.duration();
|
||||
|
||||
progBarProgress = _V_.round(vol * barAW + handleW / 2) + "px";
|
||||
if (progBar && progBar.style) { progBar.style.width = progBarProgress; }
|
||||
|
||||
handle.style.left = _V_.round(vol * barAW)+"px";
|
||||
});
|
||||
|
||||
|
||||
// Update bar length
|
||||
// this.each(this.bels.playProgressBars, function(bar){
|
||||
// if (bar.style) { bar.style.width = _V_.round(progress * 100, 2) + "%"; }
|
||||
// });
|
||||
|
||||
// Move Handle
|
||||
}// ,
|
||||
// onVolumeBarFocus: function(event){
|
||||
// _V_.addEvent(document, "keyup", _V_.proxy(this, this.onVolumeBarKey));
|
||||
// },
|
||||
// onVolumeBarKey: function(event){
|
||||
// if (event.which == 37) {
|
||||
// event.preventDefault();
|
||||
// this.currentTime(this.currentTime() - 1);
|
||||
// } else if (event.which == 39) {
|
||||
// event.preventDefault();
|
||||
// this.currentTime(this.currentTime() + 1);
|
||||
// }
|
||||
// },
|
||||
// onVolumeBarBlur: function(event){
|
||||
// _V_.removeEvent(document, "keyup", _V_.proxy(this, this.onVolumeBarKey));
|
||||
// }
|
||||
}
|
||||
);
|
||||
|
||||
/* Mute Toggle
|
||||
================================================================================ */
|
||||
VideoJS.fn.newBehavior("muteToggle", function(element){
|
||||
if (!this.bels.muteToggles) {
|
||||
this.bels.muteToggles = [];
|
||||
this.addEvent("volumechange", this.muteTogglesOnVolumeChange);
|
||||
}
|
||||
this.bels.muteToggles.push(element);
|
||||
_V_.addEvent(element, "click", _V_.proxy(this, this.onMuteToggleClick));
|
||||
// _V_.addEvent(element, "focus", _V_.proxy(this, this.onMuteToggleFocus));
|
||||
// _V_.addEvent(element, "blur", _V_.proxy(this, this.onMuteToggleBlur));
|
||||
},
|
||||
function(){},
|
||||
{
|
||||
onMuteToggleClick: function(event){
|
||||
this.muted( this.muted() ? false : true );
|
||||
},
|
||||
muteTogglesOnVolumeChange: function(event){
|
||||
var vol = this.volume(),
|
||||
level = 3;
|
||||
|
||||
if (vol == 0 || this.muted()) {
|
||||
level = 0;
|
||||
} else if (vol < 0.33) {
|
||||
level = 1;
|
||||
} else if (vol < 0.67) {
|
||||
level = 2;
|
||||
}
|
||||
|
||||
this.each(this.bels.muteToggles, function(toggle){
|
||||
/* TODO improve muted icon classes */
|
||||
_V_.each([0,1,2,3], function(i){
|
||||
_V_.removeClass(toggle, "vjs-vol-"+i);
|
||||
});
|
||||
_V_.addClass(toggle, "vjs-vol-"+level);
|
||||
});
|
||||
}//,
|
||||
// onMuteToggleFocus: function(event){
|
||||
// _V_.addEvent(document, "keyup", _V_.proxy(this, this.onMuteToggleKey));
|
||||
// },
|
||||
// onMuteToggleKey: function(event){
|
||||
// if (event.which == 32 || event.which == 13) {
|
||||
// event.preventDefault();
|
||||
// this.onMuteToggleClick();
|
||||
// }
|
||||
// },
|
||||
// onMuteToggleBlur: function(event){
|
||||
// _V_.removeEvent(document, "keyup", _V_.proxy(this, this.onMuteToggleKey));
|
||||
// }
|
||||
}
|
||||
);
|
||||
@@ -1,153 +0,0 @@
|
||||
_V_.controlSets.bar = {
|
||||
options: {},
|
||||
add: function(){
|
||||
/* See controls/controls.html to see the HTML this creates. */
|
||||
|
||||
// Create a reference to the controls elements
|
||||
var bar = this.cels.bar = {};
|
||||
|
||||
// Control Bar Main Div ("main")
|
||||
bar.main = _V_.createElement("div", { className: "vjs-controls" });
|
||||
// Add the controls to the video's container
|
||||
this.box.appendChild(bar.main);
|
||||
this.addBehavior(bar.main, "controlBar");
|
||||
|
||||
// Play Control
|
||||
bar.playControl = _V_.createElement("div", {
|
||||
className: "vjs-play-control vjs-control",
|
||||
innerHTML: '<div><span class="vjs-control-text">Play</span></div>',
|
||||
role: "button", tabIndex: 0
|
||||
});
|
||||
bar.main.appendChild(bar.playControl);
|
||||
this.addBehavior(bar.playControl, "playToggle");
|
||||
|
||||
/* Time -------------------------------------------------------------- */
|
||||
// Time Display
|
||||
bar.currentTime = _V_.createElement("div", {
|
||||
className: "vjs-current-time vjs-time-controls vjs-control"
|
||||
});
|
||||
bar.currentTimeDisplay = _V_.createElement("span", {
|
||||
className: "vjs-current-time-display",
|
||||
innerHTML: '0:00'
|
||||
});
|
||||
// Put display inside div, inside control div, to follow control scheme.
|
||||
bar.currentTime.appendChild(_V_.createElement("div").appendChild(bar.currentTimeDisplay));
|
||||
bar.main.appendChild(bar.currentTime);
|
||||
this.addBehavior(bar.currentTimeDisplay, "currentTimeDisplay");
|
||||
|
||||
// Time Separator (Not used in main skin, but still available, and could be used as a 'spare element')
|
||||
bar.timeDivider = _V_.createElement("div", {
|
||||
className: "vjs-time-divider",
|
||||
innerHTML: '<div><span>/</span></div>'
|
||||
});
|
||||
bar.main.appendChild(bar.timeDivider);
|
||||
|
||||
// Duration Display
|
||||
bar.duration = _V_.createElement("div", {
|
||||
className: "vjs-duration vjs-time-controls vjs-control"
|
||||
});
|
||||
bar.durationDisplay = _V_.createElement("span", {
|
||||
className: "vjs-duration-display",
|
||||
innerHTML: '0:00'
|
||||
});
|
||||
// Put display inside div, inside control div, to follow control scheme.
|
||||
bar.duration.appendChild(_V_.createElement("div").appendChild(bar.durationDisplay));
|
||||
bar.main.appendChild(bar.duration);
|
||||
this.addBehavior(bar.durationDisplay, "durationDisplay");
|
||||
|
||||
// Duration Display
|
||||
bar.remainingTime = _V_.createElement("div", {
|
||||
className: "vjs-remaining-time vjs-time-controls vjs-control"
|
||||
});
|
||||
bar.remainingTimeDisplay = _V_.createElement("span", {
|
||||
className: "vjs-remaining-time-display",
|
||||
innerHTML: '-0:00'
|
||||
});
|
||||
// Put display inside div, inside control div, to follow control scheme.
|
||||
bar.remainingTime.appendChild(_V_.createElement("div").appendChild(bar.remainingTimeDisplay));
|
||||
bar.main.appendChild(bar.remainingTime);
|
||||
this.addBehavior(bar.remainingTime, "remainingTimeDisplay");
|
||||
|
||||
/* Progress -------------------------------------------------------------- */
|
||||
// Progress Control: Seek, Load Progress, and Play Progress
|
||||
bar.progressControl = _V_.createElement("div", { className: "vjs-progress-control vjs-control" });
|
||||
bar.main.appendChild(bar.progressControl);
|
||||
|
||||
// Seek Bar and holder for the progress bars
|
||||
bar.seekBar = _V_.createElement("div", { className: "vjs-progress-holder" });
|
||||
bar.progressControl.appendChild(bar.seekBar);
|
||||
|
||||
// Load Progress Bar
|
||||
bar.loadProgressBar = _V_.createElement("div", {
|
||||
className: "vjs-load-progress",
|
||||
innerHTML: '<span class="vjs-control-text">Loaded: 0%</span>'
|
||||
});
|
||||
bar.seekBar.appendChild(bar.loadProgressBar);
|
||||
this.addBehavior(bar.loadProgressBar, "loadProgressBar");
|
||||
|
||||
// Play Progress Bar
|
||||
bar.playProgressBar = _V_.createElement("div", {
|
||||
className: "vjs-play-progress",
|
||||
innerHTML: '<span class="vjs-control-text">Progress: 0%</span>'
|
||||
});
|
||||
bar.seekBar.appendChild(bar.playProgressBar);
|
||||
|
||||
// Seek Handle
|
||||
bar.seekHandle = _V_.createElement("div", {
|
||||
className: "vjs-seek-handle",
|
||||
innerHTML: '<span class="vjs-control-text">00:00</span>',
|
||||
tabIndex: 0,
|
||||
role: "slider", "aria-valuenow": 0, "aria-valuemin": 0, "aria-valuemax": 100
|
||||
});
|
||||
bar.seekBar.appendChild(bar.seekHandle);
|
||||
|
||||
// SeekBar Behavior includes play progress bar, and seek handle
|
||||
// Needed so it can determine seek position based on handle position/size
|
||||
this.addBehavior(bar.seekBar, "seekBar");
|
||||
|
||||
/* Fullscreen -------------------------------------------------------------- */
|
||||
// Fullscreen Button
|
||||
bar.fullscreenControl = _V_.createElement("div", {
|
||||
className: "vjs-fullscreen-control vjs-control",
|
||||
innerHTML: '<div><span class="vjs-control-text">Fullscreen</span></div>',
|
||||
role: "button", tabIndex: 0
|
||||
});
|
||||
bar.main.appendChild(bar.fullscreenControl);
|
||||
this.addBehavior(bar.fullscreenControl, "fullscreenToggle");
|
||||
|
||||
/* Volume -------------------------------------------------------------- */
|
||||
// Fullscreen Button
|
||||
bar.volumeControl = _V_.createElement("div", { className: "vjs-volume-control vjs-control" });
|
||||
bar.volumeBar = _V_.createElement("div", { className: "vjs-volume-bar" });
|
||||
bar.volumeLevel = _V_.createElement("div", {
|
||||
className: "vjs-volume-level",
|
||||
innerHTML: '<span class="vjs-control-text"></span>'
|
||||
});
|
||||
bar.volumeHandle = _V_.createElement("div", {
|
||||
className: "vjs-volume-handle",
|
||||
innerHTML: '<span class="vjs-control-text"></span>',
|
||||
tabindex: 0,
|
||||
role: "slider", "aria-valuenow": 0, "aria-valuemin": 0, "aria-valuemax": 100
|
||||
});
|
||||
|
||||
bar.volumeBar.appendChild(bar.volumeLevel);
|
||||
bar.volumeBar.appendChild(bar.volumeHandle);
|
||||
bar.volumeControl.appendChild(bar.volumeBar);
|
||||
bar.main.appendChild(bar.volumeControl);
|
||||
this.addBehavior(bar.volumeBar, "volumeBar");
|
||||
|
||||
// Mute Button
|
||||
bar.muteControl = _V_.createElement("div", {
|
||||
className: "vjs-mute-control vjs-control",
|
||||
innerHTML: '<div><span class="vjs-control-text">Mute</span></div>',
|
||||
role: "button", tabIndex: 0
|
||||
});
|
||||
bar.main.appendChild(bar.muteControl);
|
||||
this.addBehavior(bar.muteControl, "muteToggle");
|
||||
},
|
||||
remove: function(){
|
||||
this.box.removeChild(this.cels.bigPlayButton);
|
||||
delete this.cels.bigPlayButton;
|
||||
this.removeBehavior(this.cels.bigPlayButton, "bigPlayButton");
|
||||
}
|
||||
};
|
||||
@@ -1,52 +0,0 @@
|
||||
_V_.controlSets.bigPlayButton = {
|
||||
options: {},
|
||||
add: function(){
|
||||
/* Creating this HTML
|
||||
<div class="vjs-big-play-button"><span></span></div>
|
||||
*/
|
||||
this.cels.bigPlayButton = _V_.createElement("div", {
|
||||
className: "vjs-big-play-button",
|
||||
innerHTML: "<span></span>"
|
||||
});
|
||||
this.box.appendChild(this.cels.bigPlayButton);
|
||||
this.addBehavior(this.cels.bigPlayButton, "bigPlayButton");
|
||||
},
|
||||
remove: function(){
|
||||
this.removeBehavior(this.cels.bigPlayButton, "bigPlayButton");
|
||||
this.box.removeChild(this.cels.bigPlayButton);
|
||||
delete this.cels.bigPlayButton;
|
||||
}
|
||||
};
|
||||
|
||||
/* Big Play Button Behaviors
|
||||
================================================================================ */
|
||||
VideoJS.fn.newBehavior("bigPlayButton",
|
||||
// Add Big Play Button Behavior
|
||||
function(element){
|
||||
if (!this.bels.bigPlayButtons) {
|
||||
this.bels.bigPlayButtons = [];
|
||||
this.addEvent("play", this.hideBigPlayButtons);
|
||||
this.addEvent("ended", this.showBigPlayButtons);
|
||||
}
|
||||
this.bels.bigPlayButtons.push(element);
|
||||
this.addBehavior(element, "playButton");
|
||||
},
|
||||
// Remove Big Play Button Behavior
|
||||
function(element){
|
||||
|
||||
},
|
||||
// Needed functions (added directly to player (this))
|
||||
{
|
||||
showBigPlayButtons: function(){
|
||||
if (!this.options.controlsEnabled) { return; }
|
||||
this.each(this.bels.bigPlayButtons, function(element){
|
||||
element.style.display = "block";
|
||||
});
|
||||
},
|
||||
hideBigPlayButtons: function(){
|
||||
this.each(this.bels.bigPlayButtons, function(element){
|
||||
element.style.display = "none";
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -1,157 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Controls HTML</title>
|
||||
<link rel="stylesheet" href="../video-js.css" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="video-js vjs-default-skin" style="width: 640px; height: 270px;">
|
||||
<video id="vid1" class="" preload="none" width="640" height="264" data-setup="" poster="http://video-js.zencoder.com/oceans-clip.png">
|
||||
<source src="http://pseudo01.hddn.com/vod/demo.flowplayervod/flowplayer-700.flv" type='video/flv'>
|
||||
<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; codecs="vp8, vorbis"'>
|
||||
<source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg; codecs="theora, vorbis"'>
|
||||
</video>
|
||||
|
||||
<div class="vjs-controls">
|
||||
|
||||
<!-- Play/Pause Button -->
|
||||
<div class="vjs-play-control vjs-control" role="button" tabindex="0">
|
||||
<div>
|
||||
<span class="vjs-control-text">Play</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Current Time Display -->
|
||||
<div class="vjs-current-time vjs-time-controls vjs-control">
|
||||
<div>
|
||||
<span class="vjs-current-time-display">00:00</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Optional Divider for Time -->
|
||||
<div class="vjs-time-divider">
|
||||
<div>
|
||||
<span>/</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Duration Display -->
|
||||
<div class="vjs-duration vjs-time-controls vjs-control">
|
||||
<div>
|
||||
<span class="vjs-duration-display">00:00</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Remaining Time Display -->
|
||||
<div class="vjs-remaining-time vjs-time-controls vjs-control">
|
||||
<div>
|
||||
<span class="vjs-remaining-time-display">00:00</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Seek Slider and Load & Play Progress Bars -->
|
||||
<div class="vjs-progress-control vjs-control" role="slider" tabindex="0" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">
|
||||
|
||||
<!-- Seek Slider + Holds both progress bars. -->
|
||||
<div class="vjs-progress-holder">
|
||||
|
||||
<!-- Load Progress -->
|
||||
<div class="vjs-load-progress" title="Load Progress">
|
||||
<span class="vjs-control-text">Loaded: 0%</span><!-- Support Multiple Load Progress Bars -->
|
||||
</div>
|
||||
|
||||
<!-- Play Progress -->
|
||||
<div class="vjs-play-progress" title="Play Progress">
|
||||
<span class="vjs-control-text">Progress: 0%</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Seek Handle -->
|
||||
<div class="vjs-seek-handle" title="Current Time">
|
||||
<div>
|
||||
<span class="vjs-control-text">00:00</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Fullscreen Control -->
|
||||
<div class="vjs-fullscreen-control vjs-control" role="button" tabindex="0">
|
||||
<div>
|
||||
<span class="vjs-control-text">Fullscreen</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Volume Control -->
|
||||
<div class="vjs-volume-control vjs-control">
|
||||
|
||||
<div class="vjs-volume-bar">
|
||||
<!-- Volume Bar -->
|
||||
<div class="vjs-volume-level">
|
||||
<span class="vjs-control-text"></span>
|
||||
</div>
|
||||
|
||||
<!-- Volume Handle -->
|
||||
<div class="vjs-volume-handle" tabindex="0" role="slider" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">
|
||||
<span class="vjs-control-text"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Mute Button -->
|
||||
<div class="vjs-mute-control" role="button" tabindex="0">
|
||||
<div>
|
||||
<span class="vjs-control-text">Mute</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Rewind Button -->
|
||||
<!-- <div class="vjs-rewind-control vjs-control" title="Rewind" role="button" tabindex="0">
|
||||
<div>
|
||||
<span class="vjs-control-text">Rewind</span>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- Fast Forward Button -->
|
||||
<!-- <div class="vjs-forward-control" title="Fast Forward" role="button" tabindex="0">
|
||||
<div>
|
||||
<span>Fast Forward</span>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- Previous Video Button -->
|
||||
<!-- <div class="vjs-previous-control" title="Previous Video" role="button" tabindex="0">
|
||||
<div>
|
||||
<span>Previous Video</span>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- Next Video Button -->
|
||||
<!-- <div class="vjs-next-control" title="Next Video" role="button" tabindex="0">
|
||||
<div>
|
||||
<span>Next Video</span>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- Subtitles Button -->
|
||||
<!-- <div class="vjs-subtitles-control" title="Subtitles On/Off" role="button" tabindex="0">
|
||||
<div>
|
||||
<span>Closed Captions</span>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- Captions Button -->
|
||||
<!-- <div class="vjs-captions-control" title="Captions On/Off" role="button" tabindex="0">
|
||||
<div>
|
||||
<span>Closed Captions</span>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,133 +0,0 @@
|
||||
_V_.controlSets.main = {
|
||||
options: {},
|
||||
add: function(){
|
||||
/* Creating this HTML
|
||||
<div class="vjs-controls">
|
||||
<div class="vjs-play-control">
|
||||
<span></span>
|
||||
</div>
|
||||
<div class="vjs-progress-control">
|
||||
<div class="vjs-progress-holder">
|
||||
<div class="vjs-load-progress"></div>
|
||||
<div class="vjs-play-progress"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="vjs-time-control">
|
||||
<span class="vjs-current-time-display">00:00</span><span> / </span><span class="vjs-duration-display">00:00</span>
|
||||
</div>
|
||||
<div class="vjs-volume-control">
|
||||
<div>
|
||||
<span></span><span></span><span></span><span></span><span></span><span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="vjs-fullscreen-control">
|
||||
<div>
|
||||
<span></span><span></span><span></span><span></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
*/
|
||||
|
||||
this.cels.main = {};
|
||||
|
||||
// Create a div to hold the different controls
|
||||
this.cels.main.bar = _V_.createElement("div", { className: "vjs-controls" });
|
||||
// Add the controls to the video's container
|
||||
this.box.appendChild(this.cels.main.bar);
|
||||
this.addBehavior(this.cels.main.bar, "controlBar");
|
||||
|
||||
// Build the play control
|
||||
this.cels.main.playControl = _V_.createElement("div", { className: "vjs-play-control vjs-control", innerHTML: "<span></span>" });
|
||||
this.cels.main.bar.appendChild(this.cels.main.playControl);
|
||||
this.addBehavior(this.cels.main.playControl, "playToggle");
|
||||
|
||||
// Build the progress control
|
||||
this.cels.main.progressControl = _V_.createElement("div", { className: "vjs-progress-control vjs-control" });
|
||||
this.cels.main.bar.appendChild(this.cels.main.progressControl);
|
||||
|
||||
// Create a holder for the progress bars
|
||||
this.cels.main.progressHolder = _V_.createElement("div", { className: "vjs-progress-holder" });
|
||||
this.cels.main.progressControl.appendChild(this.cels.main.progressHolder);
|
||||
this.addBehavior(this.cels.main.progressHolder, "seekBar");
|
||||
|
||||
// Create the loading progress display
|
||||
this.cels.main.loadProgressBar = _V_.createElement("div", { className: "vjs-load-progress" });
|
||||
this.cels.main.progressHolder.appendChild(this.cels.main.loadProgressBar);
|
||||
this.addBehavior(this.cels.main.loadProgressBar, "loadProgressBar");
|
||||
|
||||
// Create the playing progress display
|
||||
this.cels.main.playProgressBar = _V_.createElement("div", { className: "vjs-play-progress" });
|
||||
this.cels.main.progressHolder.appendChild(this.cels.main.playProgressBar);
|
||||
this.addBehavior(this.cels.main.playProgressBar, "playProgressBar");
|
||||
|
||||
// Create the progress time display (00:00 / 00:00)
|
||||
this.cels.main.timeControl = _V_.createElement("div", { className: "vjs-time-control vjs-control" });
|
||||
this.cels.main.bar.appendChild(this.cels.main.timeControl);
|
||||
|
||||
// // Create the current play time display
|
||||
this.cels.main.currentTimeDisplay = _V_.createElement("span", { className: "vjs-current-time-display", innerHTML: "00:00" });
|
||||
this.cels.main.timeControl.appendChild(this.cels.main.currentTimeDisplay);
|
||||
this.addBehavior(this.cels.main.currentTimeDisplay, "currentTimeDisplay");
|
||||
|
||||
// Add time separator
|
||||
this.cels.main.timeSeparator = _V_.createElement("span", { innerHTML: " / " });
|
||||
this.cels.main.timeControl.appendChild(this.cels.main.timeSeparator);
|
||||
|
||||
// Create the total duration display
|
||||
this.cels.main.durationDisplay = _V_.createElement("span", { className: "vjs-duration-display", innerHTML: "00:00" });
|
||||
this.cels.main.timeControl.appendChild(this.cels.main.durationDisplay);
|
||||
this.addBehavior(this.cels.main.durationDisplay, "durationDisplay");
|
||||
|
||||
// Create the volumne control
|
||||
this.cels.main.volumeControl = _V_.createElement("div", {
|
||||
className: "vjs-volume-control vjs-control",
|
||||
innerHTML: '<div><span class="vjs-vc-1"></span><span class="vjs-vc-2"></span><span class="vjs-vc-3"></span><span class="vjs-vc-4"></span><span class="vjs-vc-5"></span><span class="vjs-vc-6"></span></div>'
|
||||
});
|
||||
this.cels.main.bar.appendChild(this.cels.main.volumeControl);
|
||||
this.addBehavior(this.cels.main.volumeControl, "volumeScrubber");
|
||||
|
||||
this.cels.main.volumeDisplay = this.cels.main.volumeControl.children[0];
|
||||
this.addBehavior(this.cels.main.volumeDisplay, "volumeDisplay");
|
||||
|
||||
// Crete the fullscreen control
|
||||
this.cels.main.fullscreenControl = _V_.createElement("div", {
|
||||
className: "vjs-fullscreen-control vjs-control",
|
||||
innerHTML: '<div><span class="vjs-fc-1"></span><span class="vjs-fc-2"></span><span class="vjs-fc-3"></span><span class="vjs-fc-4"></span></div>'
|
||||
});
|
||||
this.cels.main.bar.appendChild(this.cels.main.fullscreenControl);
|
||||
this.addBehavior(this.cels.main.fullscreenControl, "fullscreenToggle");
|
||||
},
|
||||
remove: function(){
|
||||
this.box.removeChild(this.cels.bigPlayButton);
|
||||
delete this.cels.bigPlayButton;
|
||||
this.removeBehavior(this.cels.bigPlayButton, "bigPlayButton");
|
||||
}
|
||||
}
|
||||
|
||||
/* Control Bar Behaviors
|
||||
================================================================================ */
|
||||
VideoJS.fn.newBehavior("controlBar",
|
||||
function(element){
|
||||
if (!this.bels.controlBars) {
|
||||
this.bels.controlBars = [];
|
||||
// this.addEvent("mouseover", this.showControlBars);
|
||||
// this.addEvent("mouseout", this.hideControlBars);
|
||||
}
|
||||
this.bels.controlBars.push(element);
|
||||
},
|
||||
function(element){},
|
||||
{
|
||||
showControlBars: function(){
|
||||
this.each(this.bels.controlBars, function(bar){
|
||||
// bar.style.opacity = 1;
|
||||
bar.style.display = "block";
|
||||
});
|
||||
},
|
||||
hideControlBars: function(){
|
||||
this.each(this.bels.controlBars, function(bar){
|
||||
// bar.style.opacity = 0;
|
||||
bar.style.display = "none";
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -1,22 +0,0 @@
|
||||
_V_.controlSets.subtitlesBox = {
|
||||
options: {},
|
||||
add: function(){
|
||||
/* Creating this HTML
|
||||
|
||||
<div class="vjs-subtitles"></div>
|
||||
|
||||
*/
|
||||
|
||||
// Create a reference to the element
|
||||
var subs = this.cels.subtitlesBox = _V_.createElement("div", { className: "vjs-subtitles" });
|
||||
|
||||
// Add the controls to the video's container
|
||||
this.box.appendChild(subs);
|
||||
this.addBehavior(subs, "subtitlesDisplay");
|
||||
},
|
||||
remove: function(){
|
||||
this.removeBehavior(this.cels.subtitlesBox, "subtitlesDisplay");
|
||||
this.box.removeChild(this.cels.subtitlesBox);
|
||||
delete this.cels.subtitlesBox;
|
||||
}
|
||||
};
|
||||
@@ -1,381 +0,0 @@
|
||||
// HTML5 Shiv. Must be in <head>.
|
||||
document.createElement("video");document.createElement("audio");
|
||||
|
||||
var VideoJS = _V_ = function(id, options){
|
||||
|
||||
// Allow for element or ID to be passed in.
|
||||
var tag = (typeof id == "string" ? _V_.el(id) : id);
|
||||
if (!tag || !tag.nodeName) { // Could be a box div also
|
||||
throw new TypeError("The element or ID supplied is not valid. (video.js)");
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if (not) using "new" operator before the function to create new instance
|
||||
if (!(this instanceof arguments.callee)) {
|
||||
// Return the player attr on the element if it exists
|
||||
// Otherwise set up a new player.
|
||||
return tag.player || new VideoJS(id, options);
|
||||
}
|
||||
|
||||
this.tag = tag;
|
||||
var box = this.box = _V_.createElement("div"),
|
||||
width = tag.width || 300,
|
||||
height = tag.height || 150;
|
||||
|
||||
// Make player findable on elements
|
||||
tag.player = box.player = this;
|
||||
|
||||
// Wrap video tag in div (box) container
|
||||
tag.parentNode.insertBefore(box, tag);
|
||||
box.appendChild(tag); // Breaks iPhone, fixed in HTML5 setup.
|
||||
|
||||
// Give video tag properties to box
|
||||
box.id = tag.id; // ID will now reference box, not the video tag
|
||||
box.className = tag.className;
|
||||
box.setAttribute("width", width);
|
||||
box.setAttribute("height", height);
|
||||
box.style.width = width+"px";
|
||||
box.style.height = height+"px";
|
||||
|
||||
// Strip tag of basic properties
|
||||
tag.id += "_html5_api";
|
||||
tag.className = "vjs-tech";
|
||||
tag.removeAttribute("width");
|
||||
tag.removeAttribute("height");
|
||||
tag.removeAttribute("controls");
|
||||
|
||||
// Default Options
|
||||
this.options = _V_.options; // Global Defaults
|
||||
_V_.merge(this.options, this.getVideoTagSettings()); // Override with Video Tag Options
|
||||
_V_.merge(this.options, options); // Override/extend with options from setup call
|
||||
|
||||
// Empty video tag sources and tracks so the built in player doesn't use them also.
|
||||
if (tag.hasChildNodes()) {
|
||||
for (var i=0,j=tag.childNodes;i<j.length;i++) {
|
||||
if (j[i].nodeName == "SOURCE" || j[i].nodeName == "TRACK") {
|
||||
tag.removeChild(j[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Store references to elements for different purposes
|
||||
this.els = {};
|
||||
// Tech (playback) Elements. Store playback tech objects for switching between them.
|
||||
// ex. this.tels.html5 = videoTagElement; this.tels.flowplayer = swfObject;
|
||||
this.tels = {};
|
||||
// Behavior Elements. Store refs to elements that trigger/are triggered by a behavior.
|
||||
// ex. this.bels.playButtons = [element1, element2]
|
||||
this.bels = {};
|
||||
// Control Elements. Store refs to elements that are part of control sets
|
||||
// this.cels.mainControls.playButton = playButtonDiv;
|
||||
this.cels = {};
|
||||
// Cache for video property values.
|
||||
this.values = {};
|
||||
|
||||
this.apiIsReady = false;
|
||||
|
||||
this.addBehavior(this.box, "box");
|
||||
|
||||
this.addEvent("ended", this.handleEnded);
|
||||
|
||||
// Build controls when the API is ready
|
||||
this.addEvent("techready", _V_.proxy(this, function(){
|
||||
this.each(this.options.controlSets, function(set){
|
||||
_V_.controlSets[set].add.call(this);
|
||||
});
|
||||
}));
|
||||
|
||||
// Loop through playback technologies (HTML5, Flash) and check for support
|
||||
// Then load the best source.
|
||||
this.src(this.options.sources);
|
||||
};
|
||||
|
||||
VideoJS.options = {
|
||||
techOrder: ["h5swf","html5","flowplayer"],
|
||||
controlSets: ["bigPlayButton", "bar", "subtitlesBox"/*, "replay"*/],
|
||||
controlSetOptions: {
|
||||
bigPlayButton: {},
|
||||
bar: {},
|
||||
replay: {}
|
||||
},
|
||||
width: "auto", // Default of web browser is 300x150. Should rely on source width/height.
|
||||
height: "auto"
|
||||
};
|
||||
|
||||
VideoJS.fn = VideoJS.prototype = {
|
||||
|
||||
getVideoTagSettings: function(){
|
||||
var options = {
|
||||
sources: [],
|
||||
tracks: []
|
||||
};
|
||||
|
||||
options.width = this.tag.width;
|
||||
options.height = this.tag.height;
|
||||
options.src = this.tag.src;
|
||||
options.poster = this.tag.poster;
|
||||
options.preload = this.tag.preload;
|
||||
options.autoplay = this.tag.getAttribute("autoplay") !== null; // hasAttribute not IE <8 compatible
|
||||
options.controls = this.tag.getAttribute("controls") !== null;
|
||||
options.loop = this.tag.getAttribute("loop") !== null;
|
||||
options.muted = this.tag.getAttribute("muted") !== null;
|
||||
|
||||
for (var c,i=0,j=this.tag.children;i<j.length;i++) {
|
||||
c = j[i];
|
||||
if (c.nodeName == "SOURCE") {
|
||||
options.sources.push({
|
||||
src: c.src,
|
||||
type: c.type,
|
||||
media: c.media,
|
||||
title: c.title
|
||||
});
|
||||
}
|
||||
if (c.nodeName == "TRACK") {
|
||||
options.tracks.push(new _V_.Track({
|
||||
src: c.getAttribute("src"),
|
||||
kind: c.getAttribute("kind"),
|
||||
srclang: c.getAttribute("srclang"),
|
||||
label: c.getAttribute("label"),
|
||||
'default': c.getAttribute("default") !== null,
|
||||
title: c.getAttribute("title")
|
||||
}, this));
|
||||
|
||||
}
|
||||
}
|
||||
return options;
|
||||
},
|
||||
|
||||
/* PLayback Technology (tech)
|
||||
================================================================================ */
|
||||
loadTech: function(techName, source){
|
||||
var tech = this.currentTech = _V_.tech[techName];
|
||||
|
||||
// Pause and remove current playback technology
|
||||
if (this.currentTechName) {
|
||||
this.removeTech(techName);
|
||||
|
||||
// If the first time loading, HTML5 tag will exist but won't be initialized
|
||||
// So we need to remove it if we're not loading HTML5
|
||||
} else if (!this.currentTechName && techName != "html5") {
|
||||
this.removeTechElement(this.tag);
|
||||
}
|
||||
|
||||
this.currentTechName = techName;
|
||||
|
||||
// Turn off API access because we're loading a new tech that might load asynchronously
|
||||
this.isReady = false;
|
||||
|
||||
// Point all internal API calls to new playback tech's API.
|
||||
this.api = tech.api;
|
||||
|
||||
// Finsh API Setup when tech is ready
|
||||
this.addEvent("techready", _V_.proxy(this, function(){
|
||||
// Reomve this so it's not called twice next load
|
||||
this.removeEvent("techready", arguments.callee);
|
||||
|
||||
this.currentTechElement = this.tels[this.currentTechName];
|
||||
|
||||
// Set up playback technology's event triggers
|
||||
this.api.setupTriggers.call(this);
|
||||
this.triggerReady();
|
||||
|
||||
// Make playback element clickable
|
||||
this.addBehavior(this.currentTechElement, "tech");
|
||||
|
||||
// Manually track progress in cases where the browser/flash player doesn't report it.
|
||||
if (!_V_.techSupports(tech, "event", "progress")) { this.manualProgressOn(); }
|
||||
|
||||
// Manually track timeudpates in cases where the browser/flash player doesn't report it.
|
||||
if (!_V_.techSupports(tech, "event", "timeupdate")) { this.manualTimeUpdatesOn(); }
|
||||
}));
|
||||
|
||||
// Initialize new tech if it hasn't been yet
|
||||
if (this.tels[techName] === undefined) {
|
||||
tech.init.call(this, source);
|
||||
} else {
|
||||
_V_.insertFirst(this.tels[techName], this.box);
|
||||
this.src(source);
|
||||
}
|
||||
},
|
||||
|
||||
removeTech: function(techName){
|
||||
this.removeTechElement(this.tels[techName]);
|
||||
// Should probably remove API listeners as well
|
||||
},
|
||||
removeTechElement: function(el){
|
||||
this.box.removeChild(el);
|
||||
},
|
||||
|
||||
/* Ready - Trigger functions when player is ready
|
||||
================================================================================ */
|
||||
readyQueue: [],
|
||||
ready: function(fn){
|
||||
if (this.isReady) {
|
||||
fn.call(this);
|
||||
} else {
|
||||
this.readyQueue.push(fn);
|
||||
}
|
||||
},
|
||||
triggerReady: function(){
|
||||
if (this.isReady) return;
|
||||
this.isReady = true;
|
||||
if (this.readyQueue.length > 0) {
|
||||
// Call all functions in ready queue
|
||||
this.each(this.readyQueue, function(fn){
|
||||
fn.call(this);
|
||||
});
|
||||
|
||||
// Reset Ready Queue
|
||||
this.readyQueue = [];
|
||||
}
|
||||
},
|
||||
|
||||
/* Behaviors - Make elements act like specific controls or displays
|
||||
================================================================================ */
|
||||
/* TODO - Make behavior classes. Use JR's simple inheritance for sub-classing. */
|
||||
behaviors: {},
|
||||
// New Behavior. Gets called in prototype scope (_V_.fn.newBehavior), so added to all instances.
|
||||
newBehavior: function(name, add, remove, functions){
|
||||
this.behaviors[name] = { add: add, remove: remove };
|
||||
this.extend(functions);
|
||||
},
|
||||
addBehavior: function(element, behavior){
|
||||
// Allow passing and ID string
|
||||
if (typeof element == "string") { element = _V_.el(element); }
|
||||
this.behaviors[behavior].add.call(this, element);
|
||||
},
|
||||
removeBehavior: function(element, behavior){
|
||||
if (typeof element == "string") { element = _V_.el(element); }
|
||||
this.behaviors[behavior].remove.call(this, element);
|
||||
},
|
||||
|
||||
/* Fallbacks for unsupported event types
|
||||
================================================================================ */
|
||||
// Manually trigger progress events based on changes to the buffered amount
|
||||
// Many flash players and older HTML5 browsers don't send progress or progress-like events
|
||||
manualProgressOn: function(){
|
||||
this.manualProgress = true;
|
||||
// Trigger progress watching when a source begins loading
|
||||
// this.addEvent("loadstart", _V_.proxy(this, this.trackProgress));
|
||||
this.trackProgress();
|
||||
|
||||
// Set variables of closure
|
||||
var tech = _V_.tech[this.currentTechName],
|
||||
el = this.tels[this.currentTechName];
|
||||
|
||||
// Watch for native progress event
|
||||
_V_.addEvent(el, "progress", _V_.proxy(this, function(){
|
||||
// Remove this listener from the element
|
||||
_V_.removeEvent(el, "progress", arguments.callee);
|
||||
// Update known progress support for this playback technology
|
||||
_V_.updateTechSupport(tech, "event", "progress", true);
|
||||
// Turn off manual progress tracking
|
||||
this.manualProgressOff();
|
||||
}));
|
||||
},
|
||||
manualProgressOff: function(){
|
||||
this.manualProgress = false;
|
||||
this.removeEvent("loadstart", _V_.proxy(this, this.trackProgress));
|
||||
this.stopTrackingProgress();
|
||||
},
|
||||
|
||||
trackProgress: function(){
|
||||
this.progressInterval = setInterval(_V_.proxy(this, function(){
|
||||
// Don't trigger unless buffered amount is greater than last time
|
||||
// log(this.values.bufferEnd, this.buffered().end(0), this.duration())
|
||||
/* TODO: update for multiple buffered regions */
|
||||
if (this.values.bufferEnd < this.buffered().end(0)) {
|
||||
this.triggerEvent("progress");
|
||||
} else if (this.bufferedPercent() == 1) {
|
||||
this.stopTrackingProgress();
|
||||
this.triggerEvent("progress"); // Last update
|
||||
}
|
||||
}), 500);
|
||||
},
|
||||
stopTrackingProgress: function(){ clearInterval(this.progressInterval); },
|
||||
|
||||
/* Time Tracking -------------------------------------------------------------- */
|
||||
manualTimeUpdatesOn: function(){
|
||||
this.manualTimeUpdates = true;
|
||||
|
||||
this.addEvent("play", this.trackCurrentTime);
|
||||
this.addEvent("pause", this.stopTrackingCurrentTime);
|
||||
// timeupdate is also called by .currentTime whenever current time is set
|
||||
|
||||
// Set variables of closure
|
||||
var tech = _V_.tech[this.currentTechName],
|
||||
el = this.tels[this.currentTechName];
|
||||
|
||||
// Watch for native timeupdate event
|
||||
_V_.addEvent(el, "timeupdate", _V_.proxy(this, function(){
|
||||
|
||||
// Remove this listener from the element
|
||||
_V_.removeEvent(el, "timeupdate", arguments.callee);
|
||||
|
||||
// Update known progress support for this playback technology
|
||||
_V_.updateTechSupport(tech, "event", "timeupdate", true);
|
||||
|
||||
// Turn off manual progress tracking
|
||||
this.manualTimeUpdatesOff();
|
||||
}));
|
||||
},
|
||||
manualTimeUpdatesOff: function(){
|
||||
this.manualTimeUpdates = false;
|
||||
this.stopTrackingCurrentTime();
|
||||
this.removeEvent("play", this.trackCurrentTime);
|
||||
this.removeEvent("pause", this.stopTrackingCurrentTime);
|
||||
},
|
||||
|
||||
trackCurrentTime: function(){
|
||||
if (this.currentTimeInterval) { this.stopTrackingCurrentTime(); }
|
||||
this.currentTimeInterval = setInterval(_V_.proxy(this, function(){
|
||||
this.triggerEvent("timeupdate");
|
||||
}), 250); // 42 = 24 fps // 250 is what Webkit uses // FF uses 15
|
||||
},
|
||||
// Turn off play progress tracking (when paused or dragging)
|
||||
stopTrackingCurrentTime: function(){ clearInterval(this.currentTimeInterval); },
|
||||
|
||||
/* Player event handlers (how the player reacts to certain events)
|
||||
================================================================================ */
|
||||
handleEnded: function(){
|
||||
if (this.options.loop) {
|
||||
this.currentTime(0);
|
||||
this.play();
|
||||
} else {
|
||||
this.currentTime(0);
|
||||
this.pause();
|
||||
}
|
||||
},
|
||||
|
||||
/* Utility
|
||||
================================================================================ */
|
||||
each: function(arr, fn){
|
||||
if (!arr || arr.length === 0) { return; }
|
||||
for (var i=0,j=arr.length; i<j; i++) {
|
||||
if (fn.call(this, arr[i], i)) { break; }
|
||||
}
|
||||
},
|
||||
|
||||
extend: function(obj){
|
||||
for (var attrname in obj) {
|
||||
if (obj.hasOwnProperty(attrname)) { this[attrname]=obj[attrname]; }
|
||||
}
|
||||
},
|
||||
|
||||
/* Local Storage
|
||||
================================================================================ */
|
||||
setLocalStorage: function(key, value){
|
||||
// IE was throwing errors referencing the var anywhere without this
|
||||
var localStorage = localStorage || false;
|
||||
if (!localStorage) { return; }
|
||||
try {
|
||||
localStorage[key] = value;
|
||||
} catch(e) {
|
||||
if (e.code == 22 || e.code == 1014) { // Webkit == 22 / Firefox == 1014
|
||||
// this.warning(VideoJS.warnings.localStorageFull);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
VideoJS.players = {};
|
||||
@@ -1,217 +0,0 @@
|
||||
// ECMA-262 is the standard for javascript.
|
||||
// The following methods are impelemented EXACTLY as described in the standard (according to Mozilla Docs), and do not override the default method if one exists.
|
||||
// This may conflict with other libraries that modify the array prototype, but those libs should update to use the standard.
|
||||
|
||||
// [].indexOf
|
||||
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf
|
||||
if (!Array.prototype.indexOf) {
|
||||
Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) {
|
||||
"use strict";
|
||||
if (this === void 0 || this === null) {
|
||||
throw new TypeError();
|
||||
}
|
||||
var t = Object(this);
|
||||
var len = t.length >>> 0;
|
||||
if (len === 0) {
|
||||
return -1;
|
||||
}
|
||||
var n = 0;
|
||||
if (arguments.length > 0) {
|
||||
n = Number(arguments[1]);
|
||||
if (n !== n) { // shortcut for verifying if it's NaN
|
||||
n = 0;
|
||||
} else if (n !== 0 && n !== (1 / 0) && n !== -(1 / 0)) {
|
||||
n = (n > 0 || -1) * Math.floor(Math.abs(n));
|
||||
}
|
||||
}
|
||||
if (n >= len) {
|
||||
return -1;
|
||||
}
|
||||
var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);
|
||||
for (; k < len; k++) {
|
||||
if (k in t && t[k] === searchElement) {
|
||||
return k;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
// NOT NEEDED YET
|
||||
// [].lastIndexOf
|
||||
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf
|
||||
// if (!Array.prototype.lastIndexOf)
|
||||
// {
|
||||
// Array.prototype.lastIndexOf = function(searchElement /*, fromIndex*/)
|
||||
// {
|
||||
// "use strict";
|
||||
//
|
||||
// if (this === void 0 || this === null)
|
||||
// throw new TypeError();
|
||||
//
|
||||
// var t = Object(this);
|
||||
// var len = t.length >>> 0;
|
||||
// if (len === 0)
|
||||
// return -1;
|
||||
//
|
||||
// var n = len;
|
||||
// if (arguments.length > 1)
|
||||
// {
|
||||
// n = Number(arguments[1]);
|
||||
// if (n !== n)
|
||||
// n = 0;
|
||||
// else if (n !== 0 && n !== (1 / 0) && n !== -(1 / 0))
|
||||
// n = (n > 0 || -1) * Math.floor(Math.abs(n));
|
||||
// }
|
||||
//
|
||||
// var k = n >= 0
|
||||
// ? Math.min(n, len - 1)
|
||||
// : len - Math.abs(n);
|
||||
//
|
||||
// for (; k >= 0; k--)
|
||||
// {
|
||||
// if (k in t && t[k] === searchElement)
|
||||
// return k;
|
||||
// }
|
||||
// return -1;
|
||||
// };
|
||||
// }
|
||||
|
||||
|
||||
// NOT NEEDED YET
|
||||
// Array forEach per ECMA standard https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/foreach
|
||||
// Production steps of ECMA-262, Edition 5, 15.4.4.18
|
||||
// Reference: http://es5.github.com/#x15.4.4.18
|
||||
// if ( !Array.prototype.forEach ) {
|
||||
//
|
||||
// Array.prototype.forEach = function( callback, thisArg ) {
|
||||
//
|
||||
// var T, k;
|
||||
//
|
||||
// if ( this == null ) {
|
||||
// throw new TypeError( " this is null or not defined" );
|
||||
// }
|
||||
//
|
||||
// // 1. Let O be the result of calling ToObject passing the |this| value as the argument.
|
||||
// var O = Object(this);
|
||||
//
|
||||
// // 2. Let lenValue be the result of calling the Get internal method of O with the argument "length".
|
||||
// // 3. Let len be ToUint32(lenValue).
|
||||
// var len = O.length >>> 0;
|
||||
//
|
||||
// // 4. If IsCallable(callback) is false, throw a TypeError exception.
|
||||
// // See: http://es5.github.com/#x9.11
|
||||
// if ( {}.toString.call(callback) != "[object Function]" ) {
|
||||
// throw new TypeError( callback + " is not a function" );
|
||||
// }
|
||||
//
|
||||
// // 5. If thisArg was supplied, let T be thisArg; else let T be undefined.
|
||||
// if ( thisArg ) {
|
||||
// T = thisArg;
|
||||
// }
|
||||
//
|
||||
// // 6. Let k be 0
|
||||
// k = 0;
|
||||
//
|
||||
// // 7. Repeat, while k < len
|
||||
// while( k < len ) {
|
||||
//
|
||||
// var kValue;
|
||||
//
|
||||
// // a. Let Pk be ToString(k).
|
||||
// // This is implicit for LHS operands of the in operator
|
||||
// // b. Let kPresent be the result of calling the HasProperty internal method of O with argument Pk.
|
||||
// // This step can be combined with c
|
||||
// // c. If kPresent is true, then
|
||||
// if ( k in O ) {
|
||||
//
|
||||
// // i. Let kValue be the result of calling the Get internal method of O with argument Pk.
|
||||
// kValue = O[ Pk ];
|
||||
//
|
||||
// // ii. Call the Call internal method of callback with T as the this value and
|
||||
// // argument list containing kValue, k, and O.
|
||||
// callback.call( T, kValue, k, O );
|
||||
// }
|
||||
// // d. Increase k by 1.
|
||||
// k++;
|
||||
// }
|
||||
// // 8. return undefined
|
||||
// };
|
||||
// }
|
||||
|
||||
|
||||
// NOT NEEDED YET
|
||||
// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/map
|
||||
// Production steps of ECMA-262, Edition 5, 15.4.4.19
|
||||
// Reference: http://es5.github.com/#x15.4.4.19
|
||||
// if (!Array.prototype.map) {
|
||||
// Array.prototype.map = function(callback, thisArg) {
|
||||
//
|
||||
// var T, A, k;
|
||||
//
|
||||
// if (this == null) {
|
||||
// throw new TypeError(" this is null or not defined");
|
||||
// }
|
||||
//
|
||||
// // 1. Let O be the result of calling ToObject passing the |this| value as the argument.
|
||||
// var O = Object(this);
|
||||
//
|
||||
// // 2. Let lenValue be the result of calling the Get internal method of O with the argument "length".
|
||||
// // 3. Let len be ToUint32(lenValue).
|
||||
// var len = O.length >>> 0;
|
||||
//
|
||||
// // 4. If IsCallable(callback) is false, throw a TypeError exception.
|
||||
// // See: http://es5.github.com/#x9.11
|
||||
// if ({}.toString.call(callback) != "[object Function]") {
|
||||
// throw new TypeError(callback + " is not a function");
|
||||
// }
|
||||
//
|
||||
// // 5. If thisArg was supplied, let T be thisArg; else let T be undefined.
|
||||
// if (thisArg) {
|
||||
// T = thisArg;
|
||||
// }
|
||||
//
|
||||
// // 6. Let A be a new array created as if by the expression new Array(len) where Array is
|
||||
// // the standard built-in constructor with that name and len is the value of len.
|
||||
// A = new Array(len);
|
||||
//
|
||||
// // 7. Let k be 0
|
||||
// k = 0;
|
||||
//
|
||||
// // 8. Repeat, while k < len
|
||||
// while(k < len) {
|
||||
//
|
||||
// var kValue, mappedValue;
|
||||
//
|
||||
// // a. Let Pk be ToString(k).
|
||||
// // This is implicit for LHS operands of the in operator
|
||||
// // b. Let kPresent be the result of calling the HasProperty internal method of O with argument Pk.
|
||||
// // This step can be combined with c
|
||||
// // c. If kPresent is true, then
|
||||
// if (k in O) {
|
||||
//
|
||||
// // i. Let kValue be the result of calling the Get internal method of O with argument Pk.
|
||||
// kValue = O[ k ];
|
||||
//
|
||||
// // ii. Let mappedValue be the result of calling the Call internal method of callback
|
||||
// // with T as the this value and argument list containing kValue, k, and O.
|
||||
// mappedValue = callback.call(T, kValue, k, O);
|
||||
//
|
||||
// // iii. Call the DefineOwnProperty internal method of A with arguments
|
||||
// // Pk, Property Descriptor {Value: mappedValue, Writable: true, Enumerable: true, Configurable: true},
|
||||
// // and false.
|
||||
//
|
||||
// // In browsers that support Object.defineProperty, use the following:
|
||||
// // Object.defineProperty(A, Pk, { value: mappedValue, writable: true, enumerable: true, configurable: true });
|
||||
//
|
||||
// // For best browser support, use the following:
|
||||
// A[ k ] = mappedValue;
|
||||
// }
|
||||
// // d. Increase k by 1.
|
||||
// k++;
|
||||
// }
|
||||
//
|
||||
// // 9. return A
|
||||
// return A;
|
||||
// };
|
||||
// }
|
||||
@@ -1,287 +0,0 @@
|
||||
// Event System (J.Resig - Secrets of a JS Ninja http://jsninja.com/ [Go buy it, really])
|
||||
// (Book version isn't completely usable, so fixed some things and borrowed from jQuery where it's working)
|
||||
//
|
||||
// This should work very similarly to jQuery's events, however it's based off the book version which isn't as
|
||||
// robust as jquery's, so there's probably some differences.
|
||||
//
|
||||
// When you add an event listener using _V_.addEvent,
|
||||
// it stores the handler function in seperate cache object,
|
||||
// and adds a generic handler to the element's event,
|
||||
// along with a unique id (guid) to the element.
|
||||
|
||||
_V_.extend({
|
||||
|
||||
// Add an event listener to element
|
||||
// It stores the handler function in a separate cache object
|
||||
// and adds a generic handler to the element's event,
|
||||
// along with a unique id (guid) to the element.
|
||||
addEvent: function(elem, type, fn){
|
||||
var data = _V_.getData(elem), handlers;
|
||||
|
||||
// We only need to generate one handler per element
|
||||
if (data && !data.handler) {
|
||||
// Our new meta-handler that fixes the event object and the context
|
||||
data.handler = function(event){
|
||||
event = _V_.fixEvent(event);
|
||||
var handlers = _V_.getData(elem).events[event.type];
|
||||
// Go through and call all the real bound handlers
|
||||
if (handlers) {
|
||||
for (var i = 0, l = handlers.length; i < l; i++) {
|
||||
if (handlers[i]) handlers[i].call(elem, event); // Incase one's been removed
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// We need a place to store all our event data
|
||||
if (!data.events) { data.events = {}; }
|
||||
|
||||
// And a place to store the handlers for this event type
|
||||
handlers = data.events[type];
|
||||
|
||||
if (!handlers) {
|
||||
handlers = data.events[ type ] = [];
|
||||
|
||||
// Attach our meta-handler to the element, since one doesn't exist
|
||||
if (document.addEventListener) {
|
||||
elem.addEventListener(type, data.handler, false);
|
||||
} else if (document.attachEvent) {
|
||||
elem.attachEvent("on" + type, data.handler);
|
||||
}
|
||||
}
|
||||
|
||||
if (!fn.guid) { fn.guid = _V_.guid++; }
|
||||
|
||||
handlers.push(fn);
|
||||
},
|
||||
|
||||
removeEvent: function(elem, type, fn) {
|
||||
var data = _V_.getData(elem), handlers;
|
||||
// If no events exist, nothing to unbind
|
||||
if (!data.events) { return; }
|
||||
|
||||
// Are we removing all bound events?
|
||||
if (!type) {
|
||||
for (type in data.events) {
|
||||
_V_.cleanUpEvents(elem, type);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// And a place to store the handlers for this event type
|
||||
handlers = data.events[type];
|
||||
|
||||
// If no handlers exist, nothing to unbind
|
||||
if (!handlers) { return; }
|
||||
|
||||
// See if we're only removing a single handler
|
||||
if (fn && fn.guid) {
|
||||
for (var i = 0; i < handlers.length; i++) {
|
||||
// We found a match (don't stop here, there could be a couple bound)
|
||||
if (handlers[i].guid === fn.guid) {
|
||||
// Remove the handler from the array of handlers
|
||||
handlers.splice(i--, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_V_.cleanUpEvents(elem, type);
|
||||
},
|
||||
|
||||
cleanUpEvents: function(elem, type) {
|
||||
var data = _V_.getData(elem);
|
||||
// Remove the events of a particular type if there are none left
|
||||
|
||||
if (data.events[type].length === 0) {
|
||||
delete data.events[type];
|
||||
|
||||
// Remove the meta-handler from the element
|
||||
if (document.removeEventListener) {
|
||||
elem.removeEventListener(type, data.handler, false);
|
||||
} else if (document.detachEvent) {
|
||||
elem.detachEvent("on" + type, data.handler);
|
||||
}
|
||||
}
|
||||
|
||||
// Remove the events object if there are no types left
|
||||
if (_V_.isEmpty(data.events)) {
|
||||
delete data.events;
|
||||
delete data.handler;
|
||||
}
|
||||
|
||||
// Finally remove the expando if there is no data left
|
||||
if (_V_.isEmpty(data)) {
|
||||
_V_.removeData(elem);
|
||||
}
|
||||
},
|
||||
|
||||
fixEvent: function(event) {
|
||||
if (event[_V_.expando]) { return event; }
|
||||
// store a copy of the original event object
|
||||
// and "clone" to set read-only properties
|
||||
var originalEvent = event;
|
||||
event = new _V_.Event(originalEvent);
|
||||
|
||||
for ( var i = _V_.Event.props.length, prop; i; ) {
|
||||
prop = _V_.Event.props[ --i ];
|
||||
event[prop] = originalEvent[prop];
|
||||
}
|
||||
|
||||
// Fix target property, if necessary
|
||||
if (!event.target) { event.target = event.srcElement || document; }
|
||||
|
||||
// check if target is a textnode (safari)
|
||||
if (event.target.nodeType === 3) { event.target = event.target.parentNode; }
|
||||
|
||||
// Add relatedTarget, if necessary
|
||||
if (!event.relatedTarget && event.fromElement) {
|
||||
event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement;
|
||||
}
|
||||
|
||||
// Calculate pageX/Y if missing and clientX/Y available
|
||||
if ( event.pageX == null && event.clientX != null ) {
|
||||
var eventDocument = event.target.ownerDocument || document,
|
||||
doc = eventDocument.documentElement,
|
||||
body = eventDocument.body;
|
||||
|
||||
event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
|
||||
event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);
|
||||
}
|
||||
|
||||
// Add which for key events
|
||||
if (event.which == null && (event.charCode != null || event.keyCode != null)) {
|
||||
event.which = event.charCode != null ? event.charCode : event.keyCode;
|
||||
}
|
||||
|
||||
// Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
|
||||
if ( !event.metaKey && event.ctrlKey ) {
|
||||
event.metaKey = event.ctrlKey;
|
||||
}
|
||||
|
||||
// Add which for click: 1 === left; 2 === middle; 3 === right
|
||||
// Note: button is not normalized, so don't use it
|
||||
if ( !event.which && event.button !== undefined ) {
|
||||
event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
|
||||
}
|
||||
|
||||
return event;
|
||||
},
|
||||
|
||||
triggerEvent: function(elem, event) {
|
||||
var data = _V_.getData(elem),
|
||||
parent = elem.parentNode || elem.ownerDocument,
|
||||
type = event.type || event,
|
||||
handler;
|
||||
|
||||
if (data) { handler = data.handler }
|
||||
|
||||
// Added in attion to book. Book code was broke.
|
||||
event = typeof event === "object" ?
|
||||
event[_V_.expando] ?
|
||||
event :
|
||||
new _V_.Event(type, event) :
|
||||
new _V_.Event(type);
|
||||
|
||||
event.type = type;
|
||||
if (handler) {
|
||||
handler.call(elem, event);
|
||||
}
|
||||
|
||||
// Clean up the event in case it is being reused
|
||||
event.result = undefined;
|
||||
event.target = elem;
|
||||
|
||||
// Bubble the event up the tree to the document,
|
||||
// Unless it's been explicitly stopped
|
||||
// if (parent && !event.isPropagationStopped()) {
|
||||
// _V_.triggerEvent(parent, event);
|
||||
//
|
||||
// // We're at the top document so trigger the default action
|
||||
// } else if (!parent && !event.isDefaultPrevented()) {
|
||||
// // log(type);
|
||||
// var targetData = _V_.getData(event.target);
|
||||
// // log(targetData);
|
||||
// var targetHandler = targetData.handler;
|
||||
// // log("2");
|
||||
// if (event.target[event.type]) {
|
||||
// // Temporarily disable the bound handler,
|
||||
// // don't want to execute it twice
|
||||
// if (targetHandler) {
|
||||
// targetData.handler = function(){};
|
||||
// }
|
||||
//
|
||||
// // Trigger the native event (click, focus, blur)
|
||||
// event.target[event.type]();
|
||||
//
|
||||
// // Restore the handler
|
||||
// if (targetHandler) {
|
||||
// targetData.handler = targetHandler;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
});
|
||||
|
||||
// Custom Event object for standardizing event objects between browsers.
|
||||
_V_.Event = function(src, props){
|
||||
// Event object
|
||||
if (src && src.type) {
|
||||
this.originalEvent = src;
|
||||
this.type = src.type;
|
||||
|
||||
// Events bubbling up the document may have been marked as prevented
|
||||
// by a handler lower down the tree; reflect the correct value.
|
||||
this.isDefaultPrevented = (src.defaultPrevented || src.returnValue === false ||
|
||||
src.getPreventDefault && src.getPreventDefault()) ? returnTrue : returnFalse;
|
||||
|
||||
// Event type
|
||||
} else {
|
||||
this.type = src;
|
||||
}
|
||||
|
||||
// Put explicitly provided properties onto the event object
|
||||
if (props) { _V_.merge(this, props); }
|
||||
|
||||
this.timeStamp = (new Date).getTime();
|
||||
|
||||
// Mark it as fixed
|
||||
this[_V_.expando] = true;
|
||||
};
|
||||
|
||||
_V_.Event.prototype = {
|
||||
preventDefault: function() {
|
||||
this.isDefaultPrevented = returnTrue;
|
||||
|
||||
var e = this.originalEvent;
|
||||
if (!e) { return; }
|
||||
|
||||
// if preventDefault exists run it on the original event
|
||||
if (e.preventDefault) {
|
||||
e.preventDefault();
|
||||
// otherwise set the returnValue property of the original event to false (IE)
|
||||
} else {
|
||||
e.returnValue = false;
|
||||
}
|
||||
},
|
||||
stopPropagation: function() {
|
||||
this.isPropagationStopped = returnTrue;
|
||||
|
||||
var e = this.originalEvent;
|
||||
if (!e) { return; }
|
||||
// if stopPropagation exists run it on the original event
|
||||
if (e.stopPropagation) { e.stopPropagation(); }
|
||||
// otherwise set the cancelBubble property of the original event to true (IE)
|
||||
e.cancelBubble = true;
|
||||
},
|
||||
stopImmediatePropagation: function() {
|
||||
this.isImmediatePropagationStopped = returnTrue;
|
||||
this.stopPropagation();
|
||||
},
|
||||
isDefaultPrevented: returnFalse,
|
||||
isPropagationStopped: returnFalse,
|
||||
isImmediatePropagationStopped: returnFalse
|
||||
};
|
||||
_V_.Event.props = "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" ");
|
||||
|
||||
function returnTrue(){ return true; }
|
||||
function returnFalse(){ return false; }
|
||||
@@ -1,54 +0,0 @@
|
||||
// Javascript JSON implementation
|
||||
// (Parse Method Only)
|
||||
// https://github.com/douglascrockford/JSON-js/blob/master/json2.js
|
||||
|
||||
var JSON;
|
||||
if (!JSON) { JSON = {}; }
|
||||
|
||||
(function(){
|
||||
var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
|
||||
|
||||
if (typeof JSON.parse !== 'function') {
|
||||
JSON.parse = function (text, reviver) {
|
||||
var j;
|
||||
|
||||
function walk(holder, key) {
|
||||
var k, v, value = holder[key];
|
||||
if (value && typeof value === 'object') {
|
||||
for (k in value) {
|
||||
if (Object.prototype.hasOwnProperty.call(value, k)) {
|
||||
v = walk(value, k);
|
||||
if (v !== undefined) {
|
||||
value[k] = v;
|
||||
} else {
|
||||
delete value[k];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return reviver.call(holder, key, value);
|
||||
}
|
||||
text = String(text);
|
||||
cx.lastIndex = 0;
|
||||
if (cx.test(text)) {
|
||||
text = text.replace(cx, function (a) {
|
||||
return '\\u' +
|
||||
('0000' + a.charCodeAt(0).toString(16)).slice(-4);
|
||||
});
|
||||
}
|
||||
|
||||
if (/^[\],:{}\s]*$/
|
||||
.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')
|
||||
.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']')
|
||||
.replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
|
||||
|
||||
j = eval('(' + text + ')');
|
||||
|
||||
return typeof reviver === 'function' ?
|
||||
walk({'': j}, '') : j;
|
||||
}
|
||||
|
||||
throw new SyntaxError('JSON.parse');
|
||||
};
|
||||
}
|
||||
}());
|
||||
@@ -1,268 +0,0 @@
|
||||
_V_.merge = function(obj1, obj2, safe){
|
||||
for (var attrname in obj2){
|
||||
if (obj2.hasOwnProperty(attrname) && (!safe || !obj1.hasOwnProperty(attrname))) { obj1[attrname]=obj2[attrname]; }
|
||||
}
|
||||
return obj1;
|
||||
};
|
||||
_V_.extend = function(obj){ this.merge(this, obj, true); };
|
||||
|
||||
_V_.extend({
|
||||
tech: {}, // Holder for playback technology settings
|
||||
controlSets: {}, // Holder for control set definitions
|
||||
|
||||
techSupports: function(tech, type, name){
|
||||
if (tech.supports[type]) {
|
||||
return tech.supports[type][name];
|
||||
}
|
||||
return false;
|
||||
},
|
||||
updateTechSupport: function(tech, type, name, value){
|
||||
if (!tech.supports[type]) { tech.supports[type] = {}; }
|
||||
tech.supports[type][name] = value;
|
||||
},
|
||||
|
||||
html5Events: "loadstart,suspend,abort,error,emptied,stalled,loadedmetadata,loadeddata,canplay,canplaythrough,playing,waiting,seeking,seeked,ended,durationchange,timeupdate,progress,play,pause,ratechange,volumechange".split(","),
|
||||
|
||||
// Device Checks
|
||||
isIE: function(){ return !+"\v1"; },
|
||||
isIPad: function(){ return navigator.userAgent.match(/iPad/i) !== null; },
|
||||
isIPhone: function(){ return navigator.userAgent.match(/iPhone/i) !== null; },
|
||||
isIOS: function(){ return VideoJS.isIPhone() || VideoJS.isIPad(); },
|
||||
iOSVersion: function() {
|
||||
var match = navigator.userAgent.match(/OS (\d+)_/i);
|
||||
if (match && match[1]) { return match[1]; }
|
||||
},
|
||||
isAndroid: function(){ return navigator.userAgent.match(/Android.*AppleWebKit/i) !== null; },
|
||||
androidVersion: function() {
|
||||
var match = navigator.userAgent.match(/Android (\d+)\./i);
|
||||
if (match && match[1]) { return match[1]; }
|
||||
},
|
||||
//isAndroidBrowser
|
||||
|
||||
each: function(arr, fn){
|
||||
if (!arr || arr.length === 0) { return; }
|
||||
for (var i=0,j=arr.length; i<j; i++) {
|
||||
fn.call(this, arr[i], i);
|
||||
}
|
||||
},
|
||||
|
||||
el: function(id){ return document.getElementById(id); },
|
||||
createElement: function(tagName, attributes){
|
||||
var el = document.createElement(tagName),
|
||||
attrname;
|
||||
for (attrname in attributes){
|
||||
if (attributes.hasOwnProperty(attrname)) {
|
||||
if (attrname.indexOf("-") !== -1) {
|
||||
el.setAttribute(attrname, attributes[attrname]);
|
||||
} else {
|
||||
el[attrname] = attributes[attrname];
|
||||
}
|
||||
}
|
||||
}
|
||||
return el;
|
||||
},
|
||||
insertFirst: function(node, parent){
|
||||
if (parent.firstChild) {
|
||||
parent.insertBefore(parent.firstChild, node);
|
||||
} else {
|
||||
parent.appendChild(node);
|
||||
}
|
||||
},
|
||||
addClass: function(element, classToAdd){
|
||||
if ((" "+element.className+" ").indexOf(" "+classToAdd+" ") == -1) {
|
||||
element.className = element.className === "" ? classToAdd : element.className + " " + classToAdd;
|
||||
}
|
||||
},
|
||||
removeClass: function(element, classToRemove){
|
||||
if (element.className.indexOf(classToRemove) == -1) { return; }
|
||||
var classNames = element.className.split(" ");
|
||||
classNames.splice(classNames.indexOf(classToRemove),1);
|
||||
element.className = classNames.join(" ");
|
||||
},
|
||||
|
||||
remove: function(item, array){
|
||||
if (!array) return;
|
||||
var i = array.indexOf(item);
|
||||
if (i != -1) {
|
||||
return array.splice(i, 1)
|
||||
};
|
||||
},
|
||||
|
||||
// Attempt to block the ability to select text while dragging controls
|
||||
blockTextSelection: function(){
|
||||
document.body.focus();
|
||||
document.onselectstart = function () { return false; };
|
||||
},
|
||||
// Turn off text selection blocking
|
||||
unblockTextSelection: function(){ document.onselectstart = function () { return true; }; },
|
||||
|
||||
// Return seconds as H:MM:SS or M:SS
|
||||
// Supplying a guide (in seconds) will include enough leading zeros to cover the length of the guide
|
||||
formatTime: function(seconds, guide) {
|
||||
var guide = guide || seconds, // Default to using seconds as guide
|
||||
s = Math.floor(seconds % 60),
|
||||
m = Math.floor(seconds / 60 % 60),
|
||||
h = Math.floor(seconds / 3600),
|
||||
gm = Math.floor(guide / 60 % 60),
|
||||
gh = Math.floor(guide / 3600);
|
||||
|
||||
// Check if we need to show hours
|
||||
h = (h > 0 || gh > 0) ? h + ":" : "";
|
||||
|
||||
// If hours are showing, we may need to add a leading zero.
|
||||
// Always show at least one digit of minutes.
|
||||
m = (((h || gm >= 10) && m < 10) ? "0" + m : m) + ":";
|
||||
|
||||
// Check if leading zero is need for seconds
|
||||
s = (s < 10) ? "0" + s : s;
|
||||
|
||||
return h + m + s;
|
||||
},
|
||||
|
||||
// Return the relative horizonal position of an event as a value from 0-1
|
||||
getRelativePosition: function(x, relativeElement){
|
||||
return Math.max(0, Math.min(1, (x - _V_.findPosX(relativeElement)) / relativeElement.offsetWidth));
|
||||
},
|
||||
// Get an objects position on the page
|
||||
findPosX: function(obj) {
|
||||
var curleft = obj.offsetLeft;
|
||||
while(obj = obj.offsetParent) {
|
||||
curleft += obj.offsetLeft;
|
||||
}
|
||||
return curleft;
|
||||
},
|
||||
getComputedStyleValue: function(element, style){
|
||||
return window.getComputedStyle(element, null).getPropertyValue(style);
|
||||
},
|
||||
|
||||
trim: function(string){ return string.toString().replace(/^\s+/, "").replace(/\s+$/, ""); },
|
||||
round: function(num, dec) {
|
||||
if (!dec) { dec = 0; }
|
||||
return Math.round(num*Math.pow(10,dec))/Math.pow(10,dec);
|
||||
},
|
||||
|
||||
isEmpty: function(object) {
|
||||
for (var prop in object) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
// Mimic HTML5 TimeRange Spec.
|
||||
createTimeRange: function(start, end){
|
||||
return {
|
||||
length: 1,
|
||||
start: function() { return start; },
|
||||
end: function() { return end; }
|
||||
};
|
||||
},
|
||||
|
||||
/* Element Data Store. Allows for binding data to an element without putting it directly on the element.
|
||||
Ex. Event listneres are stored here.
|
||||
(also from jsninja.com)
|
||||
================================================================================ */
|
||||
cache: {}, // Where the data is stored
|
||||
guid: 1, // Unique ID for the element
|
||||
expando: "vdata" + (new Date).getTime(), // Unique attribute to store element's guid in
|
||||
|
||||
// Returns the cache object where data for the element is stored
|
||||
getData: function(elem){
|
||||
var id = elem[_V_.expando];
|
||||
if (!id) {
|
||||
id = elem[_V_.expando] = _V_.guid++;
|
||||
_V_.cache[id] = {};
|
||||
}
|
||||
return _V_.cache[id];
|
||||
},
|
||||
// Delete data for the element from the cache and the guid attr from element
|
||||
removeData: function(elem){
|
||||
var id = elem[_V_.expando];
|
||||
if (!id) { return; }
|
||||
// Remove all stored data
|
||||
delete _V_.cache[id];
|
||||
// Remove the expando property from the DOM node
|
||||
try {
|
||||
delete elem[_V_.expando];
|
||||
} catch(e) {
|
||||
if (elem.removeAttribute) {
|
||||
elem.removeAttribute(_V_.expando);
|
||||
} else {
|
||||
// IE doesn't appear to support removeAttribute on the document element
|
||||
elem[_V_.expando] = null;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/* Proxy (a.k.a Bind or Context). A simple method for changing the context of a function
|
||||
It also stores a unique id on the function so it can be easily removed from events
|
||||
================================================================================ */
|
||||
proxy: function(context, fn) {
|
||||
// Make sure the function has a unique ID
|
||||
if (!fn.guid) { fn.guid = _V_.guid++; }
|
||||
// Create the new function that changes the context
|
||||
var ret = function() {
|
||||
return fn.apply(context, arguments);
|
||||
};
|
||||
|
||||
// Give the new function the same ID
|
||||
// (so that they are equivalent and can be easily removed)
|
||||
ret.guid = fn.guid;
|
||||
|
||||
return ret;
|
||||
},
|
||||
|
||||
get: function(url, onSuccess, onError){
|
||||
// if (netscape.security.PrivilegeManager.enablePrivilege) {
|
||||
// netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
|
||||
// }
|
||||
|
||||
var local = (url.indexOf("file:") == 0 || (window.location.href.indexOf("file:") == 0 && url.indexOf("http:") == -1));
|
||||
|
||||
if (typeof XMLHttpRequest == "undefined") {
|
||||
XMLHttpRequest = function () {
|
||||
try { return new ActiveXObject("Msxml2.XMLHTTP.6.0"); } catch (e) {}
|
||||
try { return new ActiveXObject("Msxml2.XMLHTTP.3.0"); } catch (f) {}
|
||||
try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (g) {}
|
||||
throw new Error("This browser does not support XMLHttpRequest.");
|
||||
};
|
||||
}
|
||||
|
||||
var request = new XMLHttpRequest();
|
||||
|
||||
try {
|
||||
request.open("GET", url);
|
||||
} catch(e) {
|
||||
_V_.log(e);
|
||||
// onError(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
request.onreadystatechange = _V_.proxy(this, function() {
|
||||
if (request.readyState == 4) {
|
||||
if (request.status == 200 || local && request.status == 0) {
|
||||
onSuccess(request.responseText);
|
||||
} else {
|
||||
onError();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
try {
|
||||
request.send();
|
||||
} catch(e) {
|
||||
_V_.log(e);
|
||||
onError(e);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// /* Function Context Allows for binding context to functions when using in event listeners
|
||||
// ================================================================================ */
|
||||
// Function.prototype.context = function(obj){
|
||||
// var method = this,
|
||||
// temp = function(){
|
||||
// return method.apply(obj, arguments);
|
||||
// };
|
||||
// return temp;
|
||||
// };
|
||||
@@ -1,15 +0,0 @@
|
||||
// usage: log('inside coolFunc', this, arguments);
|
||||
// paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
|
||||
_V_.log = function(){
|
||||
_V_.log.history = _V_.log.history || [];// store logs to an array for reference
|
||||
_V_.log.history.push(arguments);
|
||||
if(window.console) {
|
||||
arguments.callee = arguments.callee.caller;
|
||||
var newarr = [].slice.call(arguments);
|
||||
(typeof console.log === 'object' ? _V_.log.apply.call(console.log, console, newarr) : console.log.apply(console, newarr));
|
||||
}
|
||||
};
|
||||
|
||||
// make it safe to use console.log always
|
||||
(function(b){function c(){}for(var d="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,timeStamp,profile,profileEnd,time,timeEnd,trace,warn".split(","),a;a=d.pop();){b[a]=b[a]||c}})((function(){try
|
||||
{console.log();return window.console;}catch(err){return window.console={};}})());
|
||||
Diff do arquivo suprimido porque uma ou mais linhas são muito longas
@@ -1,152 +0,0 @@
|
||||
VideoJS.tech.h5swf = {
|
||||
// swf: "flash/VideoJS.swf",
|
||||
swf: "https://s3.amazonaws.com/video-js/3.0b/video-js.swf",
|
||||
// swf: "http://video-js.zencoder.com/3.0b/video-js.swf",
|
||||
supported: function(){
|
||||
/* TODO Check for flash, etc. */
|
||||
return true;
|
||||
},
|
||||
canPlaySource: function(sourceObj){
|
||||
if (sourceObj.type in _V_.tech.h5swf.supports.format) { return "maybe"; }
|
||||
},
|
||||
supports: {
|
||||
format: {
|
||||
"video/flv": "FLV",
|
||||
"video/x-flv": "FLV",
|
||||
"video/mp4": "MP4",
|
||||
"video/m4v": "MP4"
|
||||
},
|
||||
|
||||
// Optional events that we can manually mimic with timers
|
||||
event: {
|
||||
progress: false,
|
||||
timeupdate: false
|
||||
}
|
||||
},
|
||||
|
||||
// Init the swf object
|
||||
init: function(sourceObj){
|
||||
var player = this,
|
||||
placeHolder = _V_.createElement("div", { id: player.box.id + "_temp_h5swf" }),
|
||||
objId = player.box.id+"_h5swf_api"
|
||||
h5swf = VideoJS.tech.h5swf,
|
||||
|
||||
flashvars = {
|
||||
readyFunction: "_V_.tech.h5swf.onSWFReady",
|
||||
eventProxyFunction: "_V_.tech.h5swf.onSWFEvent",
|
||||
errorEventProxyFunction: "_V_.tech.h5swf.onSWFErrorEvent",
|
||||
src: sourceObj.src,
|
||||
autoplay: this.options.autoplay,
|
||||
preload: this.options.preload,
|
||||
loop: this.options.loop,
|
||||
muted: this.options.muted
|
||||
},
|
||||
|
||||
params = {
|
||||
allowScriptAccess: "always",
|
||||
wmode: "opaque",
|
||||
bgcolor: "#000000"
|
||||
},
|
||||
|
||||
attributes = {
|
||||
id: objId,
|
||||
name: objId,
|
||||
'class': 'vjs-tech'
|
||||
};
|
||||
|
||||
player.box.appendChild(placeHolder);
|
||||
|
||||
swfobject.embedSWF(_V_.tech.h5swf.swf, placeHolder.id, "480", "270", "9.0.124", "", flashvars, params, attributes);
|
||||
},
|
||||
onSWFReady: function(currSwf){
|
||||
// Flash seems to be catching errors, so raising them manally
|
||||
try {
|
||||
// Delay for real swf ready.
|
||||
setTimeout(function(){
|
||||
var el = _V_.el(currSwf),
|
||||
player = el.parentNode.player; // Get player from box
|
||||
|
||||
el.player = player;
|
||||
|
||||
// Update reference to playback technology element
|
||||
player.tels.h5swf = el;
|
||||
|
||||
player.ready(function(){
|
||||
// this.src("http://video-js.zencoder.com/oceans-clip.mp4");
|
||||
});
|
||||
player.triggerEvent("techready");
|
||||
|
||||
},0);
|
||||
} catch(err) {
|
||||
_V_.log(err);
|
||||
}
|
||||
},
|
||||
|
||||
onSWFEvent: function(swfID, eventName, other){
|
||||
try {
|
||||
var player = _V_.el(swfID).player;
|
||||
if (player) {
|
||||
player.triggerEvent(eventName);
|
||||
}
|
||||
} catch(err) {
|
||||
_V_.log(err);
|
||||
}
|
||||
},
|
||||
|
||||
onSWFErrorEvent: function(swfID, eventName){
|
||||
_V_.log("Error", eventName);
|
||||
},
|
||||
|
||||
api: {
|
||||
setupTriggers: function(){
|
||||
// Using global onSWFEvent func to distribute events
|
||||
},
|
||||
|
||||
play: function(){ this.tels.h5swf.vjs_play(); },
|
||||
pause: function(){ this.tels.h5swf.vjs_pause(); },
|
||||
src: function(src){ this.tels.h5swf.vjs_src(src); },
|
||||
load: function(){ this.tels.h5swf.vjs_load(); },
|
||||
|
||||
buffered: function(){
|
||||
return _V_.createTimeRange(0, this.tels.h5swf.vjs_getProperty("buffered"));
|
||||
},
|
||||
|
||||
supportsFullScreen: function(){
|
||||
return false; // Flash does not allow fullscreen through javascript
|
||||
},
|
||||
enterFullScreen: function(){ return false; }
|
||||
}
|
||||
};
|
||||
|
||||
// Create setters and getters for attributes
|
||||
(function(){
|
||||
var api = VideoJS.tech.h5swf.api,
|
||||
readWrite = "src,preload,currentTime,defaultPlaybackRate,playbackRate,autoplay,loop,mediaGroup,controller,controls,volume,muted,defaultMuted".split(","),
|
||||
readOnly = "error,currentSrc,networkState,readyState,seeking,initialTime,duration,startOffsetTime,paused,played,seekable,ended,videoTracks,audioTracks,videoWidth,videoHeight,textTracks".split(","),
|
||||
callOnly = "load,play,pause".split(",");
|
||||
// Overridden: buffered
|
||||
|
||||
createSetter = function(attr){
|
||||
var attrUpper = attr.charAt(0).toUpperCase() + attr.slice(1);
|
||||
api["set"+attrUpper] = function(val){ return this.tels.h5swf.vjs_setProperty(attr, val); };
|
||||
},
|
||||
|
||||
createGetter = function(attr){
|
||||
api[attr] = function(){ return this.tels.h5swf.vjs_getProperty(attr); };
|
||||
};
|
||||
|
||||
// Create getter and setters for all read/write attributes
|
||||
_V_.each(readWrite, function(attr){
|
||||
createGetter(attr);
|
||||
createSetter(attr);
|
||||
});
|
||||
|
||||
// Create getters for read-only attributes
|
||||
_V_.each(readOnly, function(attr){
|
||||
createGetter(attr);
|
||||
});
|
||||
})();
|
||||
// Special
|
||||
// canPlayType
|
||||
// addTextTrack
|
||||
// textTracks
|
||||
@@ -1,157 +0,0 @@
|
||||
// Setup an API for the HTML5 playback technology
|
||||
VideoJS.tech.html5 = {
|
||||
supported: function(){
|
||||
return !!document.createElement("video").canPlayType;
|
||||
},
|
||||
canPlaySource: function(srcObj){
|
||||
return this.tag.canPlayType(srcObj.type); // Switch to global check
|
||||
// Check Type
|
||||
// If no Type, check ext
|
||||
// Check Media Type
|
||||
},
|
||||
init: function(sourceObj){
|
||||
var tag = this.tag, // Reuse original tag for HTML5 playback technology element
|
||||
html5 = _V_.tech.html5,
|
||||
options = this.options;
|
||||
|
||||
// Check if this browser supports moving the element into the box.
|
||||
// On the iPhone video will break if you move the element,
|
||||
// So we have to create a brand new element.
|
||||
if (html5.supports.movingElementInDOM === false) {
|
||||
var newTag = _V_.createElement("video", {
|
||||
id: tag.id,
|
||||
className: tag.className
|
||||
});
|
||||
|
||||
this.box.removeChild(this.tag);
|
||||
tag = this.tag = newTag;
|
||||
this.box.appendChild(tag);
|
||||
}
|
||||
|
||||
// Store reference to playback element
|
||||
this.tels.html5 = tag;
|
||||
|
||||
// Update tag settings, in case they were overridden
|
||||
_V_.each(["autoplay","preload","loop","muted","poster"], function(attr){
|
||||
tag[attr] = options[attr];
|
||||
}, this);
|
||||
|
||||
if (tag.currentSrc != sourceObj.src) {
|
||||
tag.src = sourceObj.src;
|
||||
} else {
|
||||
this.triggerEvent("loadstart");
|
||||
}
|
||||
this.triggerEvent("techready");
|
||||
},
|
||||
supports: {
|
||||
/* Will hold support info as it's discovered */
|
||||
},
|
||||
api: {
|
||||
setupTriggers: function(){
|
||||
// Make video events trigger player events
|
||||
// May seem verbose here, but makes other APIs possible.
|
||||
|
||||
// ["play", "playing", "pause", "ended", "volumechange", "error", "progress", "seeking", "timeupdate"]
|
||||
var types = _V_.html5Events,
|
||||
i;
|
||||
for (i = 0;i<types.length; i++) {
|
||||
_V_.addEvent(this.tels.html5, types[i], _V_.proxy(this, function(e){
|
||||
e.stopPropagation();
|
||||
this.triggerEvent(e);
|
||||
}));
|
||||
}
|
||||
},
|
||||
removeTriggers: function(){},
|
||||
|
||||
play: function(){ this.tels.html5.play(); },
|
||||
pause: function(){ this.tels.html5.pause(); },
|
||||
paused: function(){ return this.tels.html5.paused; },
|
||||
|
||||
currentTime: function(){ return this.tels.html5.currentTime; },
|
||||
setCurrentTime: function(seconds){
|
||||
try { this.tels.html5.currentTime = seconds; }
|
||||
catch(e) {
|
||||
_V_.log(e);
|
||||
// this.warning(VideoJS.warnings.videoNotReady);
|
||||
}
|
||||
},
|
||||
|
||||
duration: function(){ return this.tels.html5.duration || 0; },
|
||||
buffered: function(){ return this.tels.html5.buffered; },
|
||||
|
||||
volume: function(){ return this.tels.html5.volume; },
|
||||
setVolume: function(percentAsDecimal){ this.tels.html5.volume = percentAsDecimal; },
|
||||
muted: function(){ return this.tels.html5.muted; },
|
||||
setMuted: function(muted){ this.tels.html5.muted = muted },
|
||||
|
||||
width: function(){ return this.tels.html5.offsetWidth; },
|
||||
height: function(){ return this.tels.html5.offsetHeight; },
|
||||
|
||||
supportsFullScreen: function(){
|
||||
if(typeof this.tels.html5.webkitEnterFullScreen == 'function') {
|
||||
// Seems to be broken in Chromium/Chrome && Safari in Leopard
|
||||
if (!navigator.userAgent.match("Chrome") && !navigator.userAgent.match("Mac OS X 10.5")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
enterFullScreen: function(){
|
||||
try {
|
||||
this.tels.html5.webkitEnterFullScreen();
|
||||
} catch (e) {
|
||||
if (e.code == 11) { this.warning(VideoJS.warnings.videoNotReady); }
|
||||
}
|
||||
},
|
||||
src: function(src){ this.tels.html5.src = src; },
|
||||
load: function(){ this.tels.html5.load(); },
|
||||
currentSrc: function(){ return this.tels.html5.currentSrc; },
|
||||
|
||||
preload: function(){ return this.tels.html5.preload; },
|
||||
setPreload: function(val){ this.tels.html5.preload = val; },
|
||||
autoplay: function(){ return this.tels.html5.autoplay; },
|
||||
setAutoplay: function(val){ this.tels.html5.autoplay = val; },
|
||||
loop: function(){ return this.tels.html5.loop; },
|
||||
setLoop: function(val){ this.tels.html5.loop = val; },
|
||||
|
||||
error: function(){ return this.tels.html5.error; },
|
||||
networkState: function(){ return this.tels.html5.networkState; },
|
||||
readyState: function(){ return this.tels.html5.readyState; },
|
||||
seeking: function(){ return this.tels.html5.seeking; },
|
||||
initialTime: function(){ return this.tels.html5.initialTime; },
|
||||
startOffsetTime: function(){ return this.tels.html5.startOffsetTime; },
|
||||
played: function(){ return this.tels.html5.played; },
|
||||
seekable: function(){ return this.tels.html5.seekable; },
|
||||
ended: function(){ return this.tels.html5.ended; },
|
||||
videoTracks: function(){ return this.tels.html5.videoTracks; },
|
||||
audioTracks: function(){ return this.tels.html5.audioTracks; },
|
||||
videoWidth: function(){ return this.tels.html5.videoWidth; },
|
||||
videoHeight: function(){ return this.tels.html5.videoHeight; },
|
||||
textTracks: function(){ return this.tels.html5.textTracks; },
|
||||
defaultPlaybackRate: function(){ return this.tels.html5.defaultPlaybackRate; },
|
||||
playbackRate: function(){ return this.tels.html5.playbackRate; },
|
||||
mediaGroup: function(){ return this.tels.html5.mediaGroup; },
|
||||
controller: function(){ return this.tels.html5.controller; },
|
||||
controls: function(){ return this.tels.html5.controls; },
|
||||
defaultMuted: function(){ return this.tels.html5.defaultMuted; }
|
||||
}
|
||||
};
|
||||
|
||||
/* Device Fixes
|
||||
================================================================================ */
|
||||
// iOS
|
||||
if (_V_.isIOS()) {
|
||||
// If you move a video element in the DOM, it breaks video playback.
|
||||
_V_.tech.supports.movingElementInDOM = false;
|
||||
}
|
||||
|
||||
// Android
|
||||
if (_V_.isAndroid()) {
|
||||
|
||||
// Override Android 2.2 and less canPlayType method which is broken
|
||||
if (_V_.androidVersion() < 3) {
|
||||
document.createElement("video").constructor.prototype.canPlayType = function(type){
|
||||
return (type && type.toLowerCase().indexOf("video/mp4") != -1) ? "maybe" : "";
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,131 +0,0 @@
|
||||
_V_.Track = function(attributes, player){
|
||||
// Store reference to the parent player
|
||||
this.player = player;
|
||||
|
||||
this.src = attributes.src;
|
||||
this.kind = attributes.kind;
|
||||
this.srclang = attributes.srclang;
|
||||
this.label = attributes.label;
|
||||
this["default"] = attributes["default"];
|
||||
this.title = attributes.title;
|
||||
|
||||
this.cues = [];
|
||||
this.currentCue = false;
|
||||
this.lastCueIndex = 0;
|
||||
|
||||
// Update current cue on timeupdate
|
||||
player.addEvent("timeupdate", _V_.proxy(this, this.update))
|
||||
// Reset cue time on media end
|
||||
player.addEvent("ended", _V_.proxy(this, function() { this.lastCueIndex = 0; }));
|
||||
|
||||
// Load Track File
|
||||
_V_.get(attributes.src, _V_.proxy(this, this.parseCues));
|
||||
};
|
||||
|
||||
_V_.Track.prototype = {
|
||||
|
||||
parseCues: function(srcContent) {
|
||||
var cue, time, text,
|
||||
lines = srcContent.split("\n"),
|
||||
line = "";
|
||||
|
||||
for (var i=0; i<lines.length; i++) {
|
||||
line = _V_.trim(lines[i]); // Trim whitespace and linebreaks
|
||||
if (line) { // Loop until a line with content
|
||||
|
||||
// First line - Number
|
||||
cue = {
|
||||
id: line, // Cue Number
|
||||
index: this.cues.length // Position in Array
|
||||
};
|
||||
|
||||
// Second line - Time
|
||||
line = _V_.trim(lines[++i]);
|
||||
time = line.split(" --> ");
|
||||
cue.startTime = this.parseCueTime(time[0]);
|
||||
cue.endTime = this.parseCueTime(time[1]);
|
||||
|
||||
// Additional lines - Cue Text
|
||||
text = [];
|
||||
for (var j=i; j<lines.length; j++) { // Loop until a blank line or end of lines
|
||||
line = _V_.trim(lines[++i]);
|
||||
if (!line) { break; }
|
||||
text.push(line);
|
||||
}
|
||||
cue.text = text.join('<br/>');
|
||||
|
||||
// Add this cue
|
||||
this.cues.push(cue);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
parseCueTime: function(timeText) {
|
||||
var parts = timeText.split(':'),
|
||||
time = 0;
|
||||
// hours => seconds
|
||||
time += parseFloat(parts[0])*60*60;
|
||||
// minutes => seconds
|
||||
time += parseFloat(parts[1])*60;
|
||||
// get seconds
|
||||
var seconds = parts[2].split(/\.|,/); // Either . or ,
|
||||
time += parseFloat(seconds[0]);
|
||||
// add miliseconds
|
||||
ms = parseFloat(seconds[1]);
|
||||
if (ms) { time += ms/1000; }
|
||||
return time;
|
||||
},
|
||||
|
||||
update: function(){
|
||||
// Assuming all cues are in order by time, and do not overlap
|
||||
if (this.cues && this.cues.length > 0) {
|
||||
var time = this.player.currentTime();
|
||||
// If current cue should stay showing, don't do anything. Otherwise, find new cue.
|
||||
if (!this.currentCue || this.currentCue.startTime >= time || this.currentCue.endTime < time) {
|
||||
var newSubIndex = false,
|
||||
// Loop in reverse if lastCue is after current time (optimization)
|
||||
// Meaning the user is scrubbing in reverse or rewinding
|
||||
reverse = (this.cues[this.lastCueIndex].startTime > time),
|
||||
// If reverse, step back 1 becase we know it's not the lastCue
|
||||
i = this.lastCueIndex - (reverse) ? 1 : 0;
|
||||
while (true) { // Loop until broken
|
||||
if (reverse) { // Looping in reverse
|
||||
// Stop if no more, or this cue ends before the current time (no earlier cues should apply)
|
||||
if (i < 0 || this.cues[i].endTime < time) { break; }
|
||||
// End is greater than time, so if start is less, show this cue
|
||||
if (this.cues[i].startTime < time) {
|
||||
newSubIndex = i;
|
||||
break;
|
||||
}
|
||||
i--;
|
||||
} else { // Looping forward
|
||||
// Stop if no more, or this cue starts after time (no later cues should apply)
|
||||
if (i >= this.cues.length || this.cues[i].startTime > time) { break; }
|
||||
// Start is less than time, so if end is later, show this cue
|
||||
if (this.cues[i].endTime > time) {
|
||||
newSubIndex = i;
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
// Set or clear current cue
|
||||
if (newSubIndex !== false) {
|
||||
this.currentCue = this.cues[newSubIndex];
|
||||
this.lastCueIndex = newSubIndex;
|
||||
this.updatePlayer(this.currentCue.text);
|
||||
} else if (this.currentCue) {
|
||||
this.currentCue = false;
|
||||
this.updatePlayer("");
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// Update the stored value for the current track kind
|
||||
// and trigger an event to update all text track displays.
|
||||
updatePlayer: function(text){
|
||||
this.player.textTrackValue(this.kind, text);
|
||||
}
|
||||
};
|
||||
@@ -1,7 +0,0 @@
|
||||
.project
|
||||
*~
|
||||
*.diff
|
||||
*.patch
|
||||
.DS_Store
|
||||
.settings
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
[QUnit](http://docs.jquery.com/QUnit) - A JavaScript Unit Testing framework.
|
||||
================================
|
||||
|
||||
QUnit is a powerful, easy-to-use, JavaScript test suite. It's used by the jQuery
|
||||
project to test its code and plugins but is capable of testing any generic
|
||||
JavaScript code (and even capable of testing JavaScript code on the server-side).
|
||||
|
||||
QUnit is especially useful for regression testing: Whenever a bug is reported,
|
||||
write a test that asserts the existence of that particular bug. Then fix it and
|
||||
commit both. Every time you work on the code again, run the tests. If the bug
|
||||
comes up again - a regression - you'll spot it immediately and know how to fix
|
||||
it, because you know what code you just changed.
|
||||
|
||||
Having good unit test coverage makes safe refactoring easy and cheap. You can
|
||||
run the tests after each small refactoring step and always know what change
|
||||
broke something.
|
||||
|
||||
QUnit is similar to other unit testing frameworks like JUnit, but makes use of
|
||||
the features JavaScript provides and helps with testing code in the browser, eg.
|
||||
with it's stop/start facilities for testing asynchronous code.
|
||||
|
||||
If you are interested in helping developing QUnit, you are in the right place.
|
||||
For related discussions, visit the
|
||||
[QUnit and Testing forum](http://forum.jquery.com/qunit-and-testing).
|
||||
|
||||
Planning for a qunitjs.com site and other testing tools related work now happens
|
||||
on the [jQuery Testing Team planning wiki](http://jquerytesting.pbworks.com/w/page/41556026/FrontPage).
|
||||
@@ -1,16 +0,0 @@
|
||||
Canvas - A QUnit Addon For Testing Canvas Rendering
|
||||
================================
|
||||
|
||||
This addon for QUnit adds a pixelEqual method that allows you to assert
|
||||
individual pixel values in a given canvas.
|
||||
|
||||
Usage:
|
||||
|
||||
pixelEqual(canvas, x, y, r, g, b, a, message)
|
||||
|
||||
Where:
|
||||
|
||||
* canvas: Reference to a canvas element
|
||||
* x, y: Coordinates of the pixel to test
|
||||
* r, g, b, a: The color and opacity value of the pixel that you except
|
||||
* message: Optional message, same as for other assertions
|
||||
@@ -1,76 +0,0 @@
|
||||
test("Canvas pixels", function () {
|
||||
var canvas = document.getElementById('qunit-canvas'), context;
|
||||
try {
|
||||
context = canvas.getContext('2d');
|
||||
} catch(e) {
|
||||
// propably no canvas support, just exit
|
||||
return;
|
||||
}
|
||||
context.fillStyle = 'rgba(0, 0, 0, 0)';
|
||||
context.fillRect(0, 0, 5, 5);
|
||||
QUnit.pixelEqual(canvas, 0, 0, 0, 0, 0, 0);
|
||||
context.clearRect(0,0,5,5);
|
||||
context.fillStyle = 'rgba(255, 0, 0, 0)';
|
||||
context.fillRect(0, 0, 5, 5);
|
||||
QUnit.pixelEqual(canvas, 0, 0, 0, 0, 0, 0);
|
||||
context.clearRect(0,0,5,5);
|
||||
context.fillStyle = 'rgba(0, 255, 0, 0)';
|
||||
context.fillRect(0, 0, 5, 5);
|
||||
QUnit.pixelEqual(canvas, 0, 0, 0, 0, 0, 0);
|
||||
context.clearRect(0,0,5,5);
|
||||
context.fillStyle = 'rgba(0, 0, 255, 0)';
|
||||
context.fillRect(0, 0, 5, 5);
|
||||
QUnit.pixelEqual(canvas, 0, 0, 0, 0, 0, 0);
|
||||
context.clearRect(0,0,5,5);
|
||||
|
||||
context.fillStyle = 'rgba(0, 0, 0, 0.5)';
|
||||
context.fillRect(0, 0, 5, 5);
|
||||
QUnit.pixelEqual(canvas, 0, 0, 0, 0, 0, 127);
|
||||
context.clearRect(0,0,5,5);
|
||||
context.fillStyle = 'rgba(255, 0, 0, 0.5)';
|
||||
context.fillRect(0, 0, 5, 5);
|
||||
QUnit.pixelEqual(canvas, 0, 0, 255, 0, 0, 127);
|
||||
context.clearRect(0,0,5,5);
|
||||
context.fillStyle = 'rgba(0, 255, 0, 0.5)';
|
||||
context.fillRect(0, 0, 5, 5);
|
||||
QUnit.pixelEqual(canvas, 0, 0, 0, 255, 0, 127);
|
||||
context.clearRect(0,0,5,5);
|
||||
context.fillStyle = 'rgba(0, 0, 255, 0.5)';
|
||||
context.fillRect(0, 0, 5, 5);
|
||||
QUnit.pixelEqual(canvas, 0, 0, 0, 0, 255, 127);
|
||||
context.clearRect(0,0,5,5);
|
||||
|
||||
context.fillStyle = 'rgba(0, 0, 0, 0.5)';
|
||||
context.fillRect(0, 0, 5, 5);
|
||||
QUnit.pixelEqual(canvas, 2, 2, 0, 0, 0, 127);
|
||||
context.clearRect(0,0,5,5);
|
||||
context.fillStyle = 'rgba(255, 0, 0, 0.5)';
|
||||
context.fillRect(0, 0, 5, 5);
|
||||
QUnit.pixelEqual(canvas, 2, 2, 255, 0, 0, 127);
|
||||
context.clearRect(0,0,5,5);
|
||||
context.fillStyle = 'rgba(0, 255, 0, 0.5)';
|
||||
context.fillRect(0, 0, 5, 5);
|
||||
QUnit.pixelEqual(canvas, 2, 2, 0, 255, 0, 127);
|
||||
context.clearRect(0,0,5,5);
|
||||
context.fillStyle = 'rgba(0, 0, 255, 0.5)';
|
||||
context.fillRect(0, 0, 5, 5);
|
||||
QUnit.pixelEqual(canvas, 2, 2, 0, 0, 255, 127);
|
||||
context.clearRect(0,0,5,5);
|
||||
|
||||
context.fillStyle = 'rgba(0, 0, 0, 1)';
|
||||
context.fillRect(0, 0, 5, 5);
|
||||
QUnit.pixelEqual(canvas, 4, 4, 0, 0, 0, 255);
|
||||
context.clearRect(0,0,5,5);
|
||||
context.fillStyle = 'rgba(255, 0, 0, 1)';
|
||||
context.fillRect(0, 0, 5, 5);
|
||||
QUnit.pixelEqual(canvas, 4, 4, 255, 0, 0, 255);
|
||||
context.clearRect(0,0,5,5);
|
||||
context.fillStyle = 'rgba(0, 255, 0, 1)';
|
||||
context.fillRect(0, 0, 5, 5);
|
||||
QUnit.pixelEqual(canvas, 4, 4, 0, 255, 0, 255);
|
||||
context.clearRect(0,0,5,5);
|
||||
context.fillStyle = 'rgba(0, 0, 255, 1)';
|
||||
context.fillRect(0, 0, 5, 5);
|
||||
QUnit.pixelEqual(canvas, 4, 4, 0, 0, 255, 255);
|
||||
context.clearRect(0,0,5,5);
|
||||
});
|
||||
@@ -1,19 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>QUnit Test Suite - Canvas Addon</title>
|
||||
<link rel="stylesheet" href="../../qunit/qunit.css" type="text/css" media="screen">
|
||||
<script type="text/javascript" src="../../qunit/qunit.js"></script>
|
||||
<script type="text/javascript" src="qunit-canvas.js"></script>
|
||||
<script type="text/javascript" src="canvas-test.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="qunit-header">QUnit Test Suite - Canvas Addon</h1>
|
||||
<h2 id="qunit-banner"></h2>
|
||||
<div id="qunit-testrunner-toolbar"></div>
|
||||
<h2 id="qunit-userAgent"></h2>
|
||||
<ol id="qunit-tests"></ol>
|
||||
<canvas id="qunit-canvas" width="5" height="5"></canvas>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,6 +0,0 @@
|
||||
QUnit.extend( QUnit, {
|
||||
pixelEqual: function(canvas, x, y, r, g, b, a, message) {
|
||||
var actual = Array.prototype.slice.apply(canvas.getContext('2d').getImageData(x, y, 1, 1).data), expected = [r, g, b, a];
|
||||
QUnit.push(QUnit.equiv(actual, expected), actual, expected, message);
|
||||
}
|
||||
});
|
||||
@@ -1,17 +0,0 @@
|
||||
Close-Enough - A QUnit Addon For Number Approximations
|
||||
================================
|
||||
|
||||
This addon for QUnit adds close and notClose assertion methods, to test that
|
||||
numbers are close enough (or different enough) from an expected number, with
|
||||
a specified accuracy.
|
||||
|
||||
Usage:
|
||||
|
||||
close(actual, expected, maxDifference, message)
|
||||
notClose(actual, expected, minDifference, message)
|
||||
|
||||
Where:
|
||||
|
||||
* maxDifference: the maximum inclusive difference allowed between the actual and expected numbers
|
||||
* minDifference: the minimum exclusive difference allowed between the actual and expected numbers
|
||||
* actual, expected, message: The usual
|
||||
@@ -1,37 +0,0 @@
|
||||
test("Close Numbers", function () {
|
||||
|
||||
QUnit.close(7, 7, 0);
|
||||
QUnit.close(7, 7.1, 0.1);
|
||||
QUnit.close(7, 7.1, 0.2);
|
||||
|
||||
QUnit.close(3.141, Math.PI, 0.001);
|
||||
QUnit.close(3.1, Math.PI, 0.1);
|
||||
|
||||
var halfPi = Math.PI / 2;
|
||||
QUnit.close(halfPi, 1.57, 0.001);
|
||||
|
||||
var sqrt2 = Math.sqrt(2);
|
||||
QUnit.close(sqrt2, 1.4142, 0.0001);
|
||||
|
||||
QUnit.close(Infinity, Infinity, 1);
|
||||
|
||||
});
|
||||
|
||||
test("Distant Numbers", function () {
|
||||
|
||||
QUnit.notClose(6, 7, 0);
|
||||
QUnit.notClose(7, 7.2, 0.1);
|
||||
QUnit.notClose(7, 7.2, 0.19999999999);
|
||||
|
||||
QUnit.notClose(3.141, Math.PI, 0.0001);
|
||||
QUnit.notClose(3.1, Math.PI, 0.001);
|
||||
|
||||
var halfPi = Math.PI / 2;
|
||||
QUnit.notClose(halfPi, 1.57, 0.0001);
|
||||
|
||||
var sqrt2 = Math.sqrt(2);
|
||||
QUnit.notClose(sqrt2, 1.4142, 0.00001);
|
||||
|
||||
QUnit.notClose(Infinity, -Infinity, 5);
|
||||
|
||||
});
|
||||
@@ -1,18 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>QUnit Test Suite - Close Enough Addon</title>
|
||||
<link rel="stylesheet" href="../../qunit/qunit.css" type="text/css" media="screen">
|
||||
<script type="text/javascript" src="../../qunit/qunit.js"></script>
|
||||
<script type="text/javascript" src="qunit-close-enough.js"></script>
|
||||
<script type="text/javascript" src="close-enough-test.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="qunit-header">QUnit Test Suite - Close Enough</h1>
|
||||
<h2 id="qunit-banner"></h2>
|
||||
<div id="qunit-testrunner-toolbar"></div>
|
||||
<h2 id="qunit-userAgent"></h2>
|
||||
<ol id="qunit-tests"></ol>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,32 +0,0 @@
|
||||
QUnit.extend( QUnit, {
|
||||
/**
|
||||
* Checks that the first two arguments are equal, or are numbers close enough to be considered equal
|
||||
* based on a specified maximum allowable difference.
|
||||
*
|
||||
* @example close(3.141, Math.PI, 0.001);
|
||||
*
|
||||
* @param Number actual
|
||||
* @param Number expected
|
||||
* @param Number maxDifference (the maximum inclusive difference allowed between the actual and expected numbers)
|
||||
* @param String message (optional)
|
||||
*/
|
||||
close: function(actual, expected, maxDifference, message) {
|
||||
var passes = (actual === expected) || Math.abs(actual - expected) <= maxDifference;
|
||||
QUnit.push(passes, actual, expected, message);
|
||||
},
|
||||
|
||||
/**
|
||||
* Checks that the first two arguments are numbers with differences greater than the specified
|
||||
* minimum difference.
|
||||
*
|
||||
* @example notClose(3.1, Math.PI, 0.001);
|
||||
*
|
||||
* @param Number actual
|
||||
* @param Number expected
|
||||
* @param Number minDifference (the minimum exclusive difference allowed between the actual and expected numbers)
|
||||
* @param String message (optional)
|
||||
*/
|
||||
notClose: function(actual, expected, minDifference, message) {
|
||||
QUnit.push(Math.abs(actual - expected) > minDifference, actual, expected, message);
|
||||
}
|
||||
});
|
||||
@@ -1,7 +0,0 @@
|
||||
Composite - A QUnit Addon For Running Multiple Test Files
|
||||
================================
|
||||
|
||||
Composite is a QUnit addon that, when handed an array of files, will
|
||||
open each of those files inside of an iframe, run the tests and
|
||||
display the results as a single suite of QUnit tests.
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>QUnit SubsuiteRunner Test Suite</title>
|
||||
|
||||
<link rel="stylesheet" href="../../qunit/qunit.css" type="text/css" media="screen">
|
||||
<link rel="stylesheet" href="qunit-composite.css">
|
||||
<script src="../../qunit/qunit.js"></script>
|
||||
<script src="qunit-composite.js"></script>
|
||||
|
||||
<script>
|
||||
QUnit.testSuites([
|
||||
"../../test/index.html",
|
||||
"../canvas/canvas.html",
|
||||
"../close-enough/close-enough.html",
|
||||
"../step/step.html",
|
||||
"composite-test.html"
|
||||
]);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1 id="qunit-header">QUnit SubsuiteRunner Test Suite</h1>
|
||||
<h2 id="qunit-banner"></h2>
|
||||
<div id="qunit-testrunner-toolbar"></div>
|
||||
<h2 id="qunit-userAgent"></h2>
|
||||
<ol id="qunit-tests"></ol>
|
||||
<div id="qunit-fixture">
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,20 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>QUnit Core Test Suite</title>
|
||||
<link rel="stylesheet" href="../../qunit/qunit.css" type="text/css" media="screen">
|
||||
<script src="../../qunit/qunit.js"></script>
|
||||
|
||||
<script src="qunit-composite.js"></script>
|
||||
<script src="composite-test.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="qunit-header">QUnit Core Test Suite</h1>
|
||||
<h2 id="qunit-banner"></h2>
|
||||
<div id="qunit-testrunner-toolbar"></div>
|
||||
<h2 id="qunit-userAgent"></h2>
|
||||
<ol id="qunit-tests"></ol>
|
||||
<div id="qunit-fixture">test markup</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,159 +0,0 @@
|
||||
module( "testSuites tests", (function(){
|
||||
var asyncTest = QUnit.asyncTest,
|
||||
runSuite = QUnit.runSuite;
|
||||
|
||||
return {
|
||||
setup: function(){
|
||||
//proxy asyncTest and runSuite
|
||||
QUnit.asyncTest = window.asyncTest = function( name, callback ){
|
||||
ok( true, "asyncTestCalled for each suite" );
|
||||
callback(); //don't acutally create tests, just call callback
|
||||
};
|
||||
QUnit.runSuite = window.runSuite = function(){
|
||||
ok( true, "runSuite called for each suite" );
|
||||
};
|
||||
//ensure that subsuite's done doesn't run
|
||||
this.oldDone = QUnit.done;
|
||||
},
|
||||
teardown: function(){
|
||||
//restore
|
||||
QUnit.asyncTest = window.asyncTest = asyncTest;
|
||||
QUnit.runSuite = window.runSuite = runSuite;
|
||||
QUnit.done = this.oldDone;
|
||||
}
|
||||
};
|
||||
})());
|
||||
|
||||
test( "proper number of asyncTest and runSuite calls", function(){
|
||||
expect( 6 );
|
||||
QUnit.testSuites( ["one.html", "two.html", "three.html"] );
|
||||
});
|
||||
|
||||
test( "done callback changed", function(){
|
||||
QUnit.testSuites( ["dummy.html"] );
|
||||
notEqual( this.oldDone, QUnit.done, "done callback should be set" );
|
||||
});
|
||||
|
||||
module( "testStart tests", (function(){
|
||||
var id = QUnit.id;
|
||||
return {
|
||||
setup: function(){
|
||||
//proxy id
|
||||
var fakeElem = this.fakeElem = document.createElement( "div" );
|
||||
|
||||
QUnit.id = function(){
|
||||
return fakeElem;
|
||||
}
|
||||
},
|
||||
teardown: function(){
|
||||
QUnit.id = id;
|
||||
}
|
||||
};
|
||||
})());
|
||||
|
||||
test( "running message printed", function(){
|
||||
var hello = "hello world",
|
||||
expected = "Running " + hello + "...<br> ";
|
||||
QUnit.testStart( {name: hello} );
|
||||
equal( this.fakeElem.innerHTML, expected, "innerHTML was set correctly by testStart" );
|
||||
});
|
||||
|
||||
module( "testDone tests", (function(){
|
||||
var id = QUnit.id;
|
||||
return {
|
||||
setup: function(){
|
||||
//proxy id
|
||||
var fakeElem = this.fakeElem = document.createElement( "div" );
|
||||
fakeElem.appendChild( document.createElement( "ol" ) );
|
||||
fakeElem.appendChild( document.createElement( "ol" ) );
|
||||
QUnit.id = function(){
|
||||
return fakeElem;
|
||||
}
|
||||
},
|
||||
teardown: function(){
|
||||
QUnit.id = id;
|
||||
}
|
||||
};
|
||||
})());
|
||||
|
||||
test( "test expansions are hidden", function(){
|
||||
QUnit.testDone();
|
||||
equal( this.fakeElem.children[0].style.display, "none", "first ol display is none" );
|
||||
equal( this.fakeElem.children[1].style.display, "none", "second ol display is none" );
|
||||
});
|
||||
|
||||
test( "non-ol elements aren't hidden", function(){
|
||||
this.fakeElem.appendChild( document.createElement( "span" ) );
|
||||
|
||||
QUnit.testDone();
|
||||
notEqual( this.fakeElem.children[2].style.display, "none", "first ol display is none" );
|
||||
});
|
||||
|
||||
module( "runSuite tests", (function(){
|
||||
var getElementsByTagName = document.getElementsByTagName,
|
||||
createElement = document.createElement,
|
||||
runSuite = QUnit.runSuite;
|
||||
|
||||
return {
|
||||
setup: function(){
|
||||
//proxy getElementsByTagName and createElement
|
||||
var setAttributeCall = this.setAttributeCall = {},
|
||||
appendChildCall = this.appendChildCall = {called: 0},
|
||||
iframeLoad = this.iframeLoad = {},
|
||||
iframeQUnitObject = this.iframeQUnitObject = {},
|
||||
fakeElement = {
|
||||
appendChild: function(){appendChildCall.called++},
|
||||
setAttribute: function(){setAttributeCall.args = arguments},
|
||||
addEventListener: function( type, callback ){iframeLoad.callback = callback;},
|
||||
contentWindow: {QUnit: iframeQUnitObject},
|
||||
className: "",
|
||||
};
|
||||
|
||||
document.getElementsByTagName = function(){
|
||||
return [fakeElement];
|
||||
};
|
||||
document.createElement = function(){
|
||||
return fakeElement;
|
||||
}
|
||||
|
||||
},
|
||||
teardown: function(){
|
||||
document.getElementsByTagName = getElementsByTagName;
|
||||
document.createElement = createElement;
|
||||
//must restore even though we didn't proxy; the runner overwrites upon first call
|
||||
QUnit.runSuite = runSuite;
|
||||
}
|
||||
};
|
||||
})());
|
||||
|
||||
test( "runSuite different after first run", function(){
|
||||
var before = QUnit.runSuite,
|
||||
after;
|
||||
QUnit.runSuite();
|
||||
after = QUnit.runSuite;
|
||||
notEqual( before, after, "runSuite changed after initial run" );
|
||||
});
|
||||
|
||||
test( "iframe only created once", function(){
|
||||
QUnit.runSuite();
|
||||
equal( this.appendChildCall.called, 1, "append child called once" );
|
||||
QUnit.runSuite();
|
||||
equal( this.appendChildCall.called, 1, "append child only ever called once" );
|
||||
});
|
||||
|
||||
test( "iframe's QUnit object is modified when iframe source loads", function(){
|
||||
var before = this.iframeQUnitObject,
|
||||
after;
|
||||
QUnit.runSuite();
|
||||
this.iframeLoad.callback();
|
||||
notEqual( before, after, "iframe's qunit object is modified upon load");
|
||||
});
|
||||
|
||||
test( "iframe src set to suite passed", function(){
|
||||
var pages = ["testing.html", "subsuiteRunner.html"];
|
||||
QUnit.runSuite( pages[0] );
|
||||
equal( this.setAttributeCall.args[0], "src", "src attribute set" );
|
||||
equal( this.setAttributeCall.args[1], pages[0], "src attribute set" );
|
||||
QUnit.runSuite( pages[1] );
|
||||
equal( this.setAttributeCall.args[1], pages[1], "src attribute set" );
|
||||
});
|
||||
@@ -1,19 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>QUnit Core Test Suite</title>
|
||||
<link rel="stylesheet" href="../../qunit/qunit.css" type="text/css" media="screen">
|
||||
<script src="../../qunit/qunit.js"></script>
|
||||
|
||||
<script src="../../test/test.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="qunit-header">QUnit Core Test Suite</h1>
|
||||
<h2 id="qunit-banner"></h2>
|
||||
<div id="qunit-testrunner-toolbar"></div>
|
||||
<h2 id="qunit-userAgent"></h2>
|
||||
<ol id="qunit-tests"></ol>
|
||||
<div id="qunit-fixture">test markup</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,19 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>QUnit Same Test Suite</title>
|
||||
<link rel="stylesheet" href="../../qunit/qunit.css" type="text/css" media="screen">
|
||||
<script src="../../qunit/qunit.js"></script>
|
||||
|
||||
<script src="../../test/same.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="qunit-header">QUnit Same Test Suite</h1>
|
||||
<h2 id="qunit-banner"></h2>
|
||||
<div id="qunit-testrunner-toolbar"></div>
|
||||
<h2 id="qunit-userAgent"></h2>
|
||||
<ol id="qunit-tests"></ol>
|
||||
<div id="qunit-fixture">test markup</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,35 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Composite</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Composite</h1>
|
||||
<h3>A QUnit Addon For Running Multiple Test Files</h3>
|
||||
<p>Composite is a QUnit addon that, when handed an array of
|
||||
files, will open each of those files inside of an iframe, run
|
||||
the tests and display the results as a single suite of QUnit
|
||||
tests.</p>
|
||||
<h4>Using Composite</h4>
|
||||
<p>To use Composite, setup a standard QUnit html page as you
|
||||
would with other QUnit tests. Remember to include composite.js
|
||||
and composite.css. Then, inside of either an external js file,
|
||||
or a script block call the only new method that Composite
|
||||
exposes, QUnit.testSuites().</p><p>QUnit.testSuites() is
|
||||
passed an array of test files to run as follows:</p>
|
||||
<pre>
|
||||
QUnit.testSuites([
|
||||
"test-file-1.html",
|
||||
"test-file-2.html",
|
||||
"test-file-3.html"
|
||||
]);
|
||||
</pre>
|
||||
<h4>Tests</h4>
|
||||
<p>Composite has tests of it's own.</p>
|
||||
<p>
|
||||
<a href="composite-test.html">Composite Test</a>: A suite which tests the implementation of composite.<br>
|
||||
<a href="composite-demo-test.html">Composite Demo</a>: A suite which demoes how Compisite is bootstrapped and run.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,13 +0,0 @@
|
||||
iframe.qunit-subsuite{
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border-width: 1px 0 0;
|
||||
height: 45%;
|
||||
width: 100%;
|
||||
|
||||
background: #fff;
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
(function( QUnit ) {
|
||||
|
||||
var subsuiteFrame;
|
||||
|
||||
QUnit.extend( QUnit, {
|
||||
testSuites: function( suites ) {
|
||||
for ( var i = 0; i < suites.length; i++ ) {
|
||||
(function( suite ) {
|
||||
asyncTest( suite, function() {
|
||||
QUnit.runSuite( suite );
|
||||
});
|
||||
}( suites[i] ) );
|
||||
}
|
||||
QUnit.done = function() {
|
||||
subsuiteFrame.style.display = "none";
|
||||
};
|
||||
},
|
||||
|
||||
testStart: function( data ) {
|
||||
// update the test status to show which test suite is running
|
||||
QUnit.id( "qunit-testresult" ).innerHTML = "Running " + data.name + "...<br> ";
|
||||
},
|
||||
|
||||
testDone: function() {
|
||||
var current = QUnit.id( this.config.current.id ),
|
||||
children = current.children;
|
||||
|
||||
// undo the auto-expansion of failed tests
|
||||
for ( var i = 0; i < children.length; i++ ) {
|
||||
if ( children[i].nodeName === "OL" ) {
|
||||
children[i].style.display = "none";
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
runSuite: function( suite ) {
|
||||
var body = document.getElementsByTagName( "body" )[0],
|
||||
iframe = subsuiteFrame = document.createElement( "iframe" ),
|
||||
iframeWin;
|
||||
|
||||
iframe.className = "qunit-subsuite";
|
||||
body.appendChild( iframe );
|
||||
|
||||
function onIframeLoad() {
|
||||
var module, test,
|
||||
count = 0;
|
||||
|
||||
QUnit.extend( iframeWin.QUnit, {
|
||||
moduleStart: function( data ) {
|
||||
// capture module name for messages
|
||||
module = data.name;
|
||||
},
|
||||
|
||||
testStart: function( data ) {
|
||||
// capture test name for messages
|
||||
test = data.name;
|
||||
},
|
||||
|
||||
log: function( data ) {
|
||||
// pass all test details through to the main page
|
||||
var message = module + ": " + test + ": " + data.message;
|
||||
expect( ++count );
|
||||
QUnit.push( data.result, data.actual, data.expected, message );
|
||||
},
|
||||
|
||||
done: function() {
|
||||
// start the wrapper test from the main page
|
||||
start();
|
||||
}
|
||||
});
|
||||
}
|
||||
QUnit.addEvent( iframe, "load", onIframeLoad );
|
||||
|
||||
iframeWin = iframe.contentWindow;
|
||||
iframe.setAttribute( "src", suite );
|
||||
|
||||
this.runSuite = function( suite ) {
|
||||
iframe.setAttribute( "src", suite );
|
||||
};
|
||||
}
|
||||
});
|
||||
}( QUnit ) );
|
||||
@@ -1,18 +0,0 @@
|
||||
QUnit.step() - A QUnit Addon For Testing execution in order
|
||||
============================================================
|
||||
|
||||
This addon for QUnit adds a step method that allows you to assert
|
||||
the proper sequence in which the code should execute.
|
||||
|
||||
Example:
|
||||
|
||||
test("example test", function () {
|
||||
function x() {
|
||||
QUnit.step(2, "function y should be called first");
|
||||
}
|
||||
function y() {
|
||||
QUnit.step(1);
|
||||
}
|
||||
y();
|
||||
x();
|
||||
});
|
||||
@@ -1,25 +0,0 @@
|
||||
QUnit.extend( QUnit, {
|
||||
|
||||
/**
|
||||
* Check the sequence/order
|
||||
*
|
||||
* @example step(1); setTimeout(function () { step(3); }, 100); step(2);
|
||||
* @param Number expected The excepted step within the test()
|
||||
* @param String message (optional)
|
||||
*/
|
||||
step: function (expected, message) {
|
||||
this.config.current.step++; // increment internal step counter.
|
||||
if (typeof message == "undefined") {
|
||||
message = "step " + expected;
|
||||
}
|
||||
var actual = this.config.current.step;
|
||||
QUnit.push(QUnit.equiv(actual, expected), actual, expected, message);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Reset the step counter for every test()
|
||||
*/
|
||||
QUnit.testStart(function () {
|
||||
this.config.current.step = 0;
|
||||
});
|
||||
@@ -1,13 +0,0 @@
|
||||
module('Step Addon');
|
||||
test("step", 3, function () {
|
||||
QUnit.step(1, "step starts at 1");
|
||||
setTimeout(function () {
|
||||
start();
|
||||
QUnit.step(3);
|
||||
}, 100);
|
||||
QUnit.step(2, "before the setTimeout callback is run");
|
||||
stop();
|
||||
});
|
||||
test("step counter", 1, function () {
|
||||
QUnit.step(1, "each test has its own step counter");
|
||||
});
|
||||
@@ -1,19 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>QUnit Test Suite - Step Addon</title>
|
||||
<link rel="stylesheet" href="../../qunit/qunit.css" type="text/css" media="screen">
|
||||
<script type="text/javascript" src="../../qunit/qunit.js"></script>
|
||||
<script type="text/javascript" src="qunit-step.js"></script>
|
||||
<script type="text/javascript" src="step-test.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="qunit-header">QUnit Test Suite - Step Addon</h1>
|
||||
<h2 id="qunit-banner"></h2>
|
||||
<div id="qunit-testrunner-toolbar"></div>
|
||||
<h2 id="qunit-userAgent"></h2>
|
||||
<ol id="qunit-tests"></ol>
|
||||
<canvas id="qunit-canvas" width="5" height="5"></canvas>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,27 +0,0 @@
|
||||
{
|
||||
"name": "qunit",
|
||||
"author": "The jQuery Project",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "John Resig",
|
||||
"email": "jeresig@gmail.com",
|
||||
"url": "http://ejohn.org/"
|
||||
},
|
||||
{
|
||||
"name": "Jörn Zaefferer",
|
||||
"email": "joern.zaefferer@googlemail.com",
|
||||
"url": "http://bassistance.de/"
|
||||
}],
|
||||
"url": "http://docs.jquery.com/QUnit",
|
||||
"repositories" : [{
|
||||
"type": "git",
|
||||
"url": "https://github.com/jquery/qunit.git"
|
||||
}],
|
||||
"license": {
|
||||
"name": "MIT",
|
||||
"url": "http://www.opensource.org/licenses/mit-license.php"
|
||||
},
|
||||
"description": "An easy-to-use JavaScript Unit Testing framework.",
|
||||
"keywords": [ "testing", "unit", "jquery" ],
|
||||
"main": "qunit/qunit.js"
|
||||
}
|
||||
@@ -1,226 +0,0 @@
|
||||
/**
|
||||
* QUnit - A JavaScript Unit Testing Framework
|
||||
*
|
||||
* http://docs.jquery.com/QUnit
|
||||
*
|
||||
* Copyright (c) 2011 John Resig, Jörn Zaefferer
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
||||
* or GPL (GPL-LICENSE.txt) licenses.
|
||||
*/
|
||||
|
||||
/** Font Family and Sizes */
|
||||
|
||||
#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
|
||||
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
|
||||
#qunit-tests { font-size: smaller; }
|
||||
|
||||
|
||||
/** Resets */
|
||||
|
||||
#qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
/** Header */
|
||||
|
||||
#qunit-header {
|
||||
padding: 0.5em 0 0.5em 1em;
|
||||
|
||||
color: #8699a4;
|
||||
background-color: #0d3349;
|
||||
|
||||
font-size: 1.5em;
|
||||
line-height: 1em;
|
||||
font-weight: normal;
|
||||
|
||||
border-radius: 15px 15px 0 0;
|
||||
-moz-border-radius: 15px 15px 0 0;
|
||||
-webkit-border-top-right-radius: 15px;
|
||||
-webkit-border-top-left-radius: 15px;
|
||||
}
|
||||
|
||||
#qunit-header a {
|
||||
text-decoration: none;
|
||||
color: #c2ccd1;
|
||||
}
|
||||
|
||||
#qunit-header a:hover,
|
||||
#qunit-header a:focus {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#qunit-banner {
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar {
|
||||
padding: 0.5em 0 0.5em 2em;
|
||||
color: #5E740B;
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
#qunit-userAgent {
|
||||
padding: 0.5em 0 0.5em 2.5em;
|
||||
background-color: #2b81af;
|
||||
color: #fff;
|
||||
text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
|
||||
}
|
||||
|
||||
|
||||
/** Tests: Pass/Fail */
|
||||
|
||||
#qunit-tests {
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
#qunit-tests li {
|
||||
padding: 0.4em 0.5em 0.4em 2.5em;
|
||||
border-bottom: 1px solid #fff;
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
#qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#qunit-tests li strong {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#qunit-tests li a {
|
||||
padding: 0.5em;
|
||||
color: #c2ccd1;
|
||||
text-decoration: none;
|
||||
}
|
||||
#qunit-tests li a:hover,
|
||||
#qunit-tests li a:focus {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#qunit-tests ol {
|
||||
margin-top: 0.5em;
|
||||
padding: 0.5em;
|
||||
|
||||
background-color: #fff;
|
||||
|
||||
border-radius: 15px;
|
||||
-moz-border-radius: 15px;
|
||||
-webkit-border-radius: 15px;
|
||||
|
||||
box-shadow: inset 0px 2px 13px #999;
|
||||
-moz-box-shadow: inset 0px 2px 13px #999;
|
||||
-webkit-box-shadow: inset 0px 2px 13px #999;
|
||||
}
|
||||
|
||||
#qunit-tests table {
|
||||
border-collapse: collapse;
|
||||
margin-top: .2em;
|
||||
}
|
||||
|
||||
#qunit-tests th {
|
||||
text-align: right;
|
||||
vertical-align: top;
|
||||
padding: 0 .5em 0 0;
|
||||
}
|
||||
|
||||
#qunit-tests td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
#qunit-tests pre {
|
||||
margin: 0;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
#qunit-tests del {
|
||||
background-color: #e0f2be;
|
||||
color: #374e0c;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#qunit-tests ins {
|
||||
background-color: #ffcaca;
|
||||
color: #500;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/*** Test Counts */
|
||||
|
||||
#qunit-tests b.counts { color: black; }
|
||||
#qunit-tests b.passed { color: #5E740B; }
|
||||
#qunit-tests b.failed { color: #710909; }
|
||||
|
||||
#qunit-tests li li {
|
||||
margin: 0.5em;
|
||||
padding: 0.4em 0.5em 0.4em 0.5em;
|
||||
background-color: #fff;
|
||||
border-bottom: none;
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
/*** Passing Styles */
|
||||
|
||||
#qunit-tests li li.pass {
|
||||
color: #5E740B;
|
||||
background-color: #fff;
|
||||
border-left: 26px solid #C6E746;
|
||||
}
|
||||
|
||||
#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
|
||||
#qunit-tests .pass .test-name { color: #366097; }
|
||||
|
||||
#qunit-tests .pass .test-actual,
|
||||
#qunit-tests .pass .test-expected { color: #999999; }
|
||||
|
||||
#qunit-banner.qunit-pass { background-color: #C6E746; }
|
||||
|
||||
/*** Failing Styles */
|
||||
|
||||
#qunit-tests li li.fail {
|
||||
color: #710909;
|
||||
background-color: #fff;
|
||||
border-left: 26px solid #EE5757;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
#qunit-tests > li:last-child {
|
||||
border-radius: 0 0 15px 15px;
|
||||
-moz-border-radius: 0 0 15px 15px;
|
||||
-webkit-border-bottom-right-radius: 15px;
|
||||
-webkit-border-bottom-left-radius: 15px;
|
||||
}
|
||||
|
||||
#qunit-tests .fail { color: #000000; background-color: #EE5757; }
|
||||
#qunit-tests .fail .test-name,
|
||||
#qunit-tests .fail .module-name { color: #000000; }
|
||||
|
||||
#qunit-tests .fail .test-actual { color: #EE5757; }
|
||||
#qunit-tests .fail .test-expected { color: green; }
|
||||
|
||||
#qunit-banner.qunit-fail { background-color: #EE5757; }
|
||||
|
||||
|
||||
/** Result */
|
||||
|
||||
#qunit-testresult {
|
||||
padding: 0.5em 0.5em 0.5em 2.5em;
|
||||
|
||||
color: #2b81af;
|
||||
background-color: #D2E0E6;
|
||||
|
||||
border-bottom: 1px solid white;
|
||||
}
|
||||
|
||||
/** Fixture */
|
||||
|
||||
#qunit-fixture {
|
||||
position: absolute;
|
||||
top: -10000px;
|
||||
left: -10000px;
|
||||
}
|
||||
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
@@ -1,24 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>QUnit Test Suite</title>
|
||||
<link rel="stylesheet" href="../qunit/qunit.css" type="text/css" media="screen">
|
||||
<script type="text/javascript" src="../qunit/qunit.js"></script>
|
||||
<script type="text/javascript" src="test.js"></script>
|
||||
<script type="text/javascript" src="same.js"></script>
|
||||
<script>
|
||||
var logs = ["begin", "testStart", "testDone", "log", "moduleStart", "moduleDone", "done"];
|
||||
for (var i = 0; i < logs.length; i++) {
|
||||
(function() {
|
||||
var log = logs[i];
|
||||
QUnit[log] = function() {
|
||||
console.log(log, arguments);
|
||||
};
|
||||
})();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="qunit-fixture">test markup</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,19 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>QUnit Test Suite</title>
|
||||
<link rel="stylesheet" href="../qunit/qunit.css" type="text/css" media="screen">
|
||||
<script type="text/javascript" src="../qunit/qunit.js"></script>
|
||||
<script type="text/javascript" src="test.js"></script>
|
||||
<script type="text/javascript" src="same.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="qunit-header">QUnit Test Suite</h1>
|
||||
<h2 id="qunit-banner"></h2>
|
||||
<div id="qunit-testrunner-toolbar"></div>
|
||||
<h2 id="qunit-userAgent"></h2>
|
||||
<ol id="qunit-tests"></ol>
|
||||
<div id="qunit-fixture">test markup</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,17 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>QUnit Test Suite</title>
|
||||
<link rel="stylesheet" href="../qunit/qunit.css" type="text/css" media="screen">
|
||||
<script type="text/javascript" src="../qunit/qunit.js"></script>
|
||||
<script type="text/javascript" src="logs.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="qunit-header">QUnit Test Suite</h1>
|
||||
<h2 id="qunit-banner"></h2>
|
||||
<div id="qunit-testrunner-toolbar"></div>
|
||||
<h2 id="qunit-userAgent"></h2>
|
||||
<ol id="qunit-tests"></ol>
|
||||
<div id="qunit-fixture">test markup</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,153 +0,0 @@
|
||||
// TODO disable reordering for this suite!
|
||||
|
||||
|
||||
var begin = 0,
|
||||
moduleStart = 0,
|
||||
moduleDone = 0,
|
||||
testStart = 0,
|
||||
testDone = 0,
|
||||
log = 0,
|
||||
moduleContext,
|
||||
moduleDoneContext,
|
||||
testContext,
|
||||
testDoneContext,
|
||||
logContext;
|
||||
|
||||
QUnit.begin(function() {
|
||||
begin++;
|
||||
});
|
||||
QUnit.done(function() {
|
||||
});
|
||||
QUnit.moduleStart(function(context) {
|
||||
moduleStart++;
|
||||
moduleContext = context;
|
||||
});
|
||||
QUnit.moduleDone(function(context) {
|
||||
moduleDone++;
|
||||
moduleDoneContext = context;
|
||||
});
|
||||
QUnit.testStart(function(context) {
|
||||
testStart++;
|
||||
testContext = context;
|
||||
});
|
||||
QUnit.testDone(function(context) {
|
||||
testDone++;
|
||||
testDoneContext = context;
|
||||
});
|
||||
QUnit.log(function(context) {
|
||||
log++;
|
||||
logContext = context;
|
||||
});
|
||||
|
||||
var logs = ["begin", "testStart", "testDone", "log", "moduleStart", "moduleDone", "done"];
|
||||
for (var i = 0; i < logs.length; i++) {
|
||||
(function() {
|
||||
var log = logs[i];
|
||||
QUnit[log](function() {
|
||||
console.log(log, arguments);
|
||||
});
|
||||
})();
|
||||
}
|
||||
|
||||
module("logs1");
|
||||
|
||||
test("test1", 13, function() {
|
||||
equal(begin, 1);
|
||||
equal(moduleStart, 1);
|
||||
equal(testStart, 1);
|
||||
equal(testDone, 0);
|
||||
equal(moduleDone, 0);
|
||||
|
||||
deepEqual(logContext, {
|
||||
result: true,
|
||||
message: undefined,
|
||||
actual: 0,
|
||||
expected: 0
|
||||
});
|
||||
equal("foo", "foo", "msg");
|
||||
deepEqual(logContext, {
|
||||
result: true,
|
||||
message: "msg",
|
||||
actual: "foo",
|
||||
expected: "foo"
|
||||
});
|
||||
strictEqual(testDoneContext, undefined);
|
||||
deepEqual(testContext, {
|
||||
module: "logs1",
|
||||
name: "test1"
|
||||
});
|
||||
strictEqual(moduleDoneContext, undefined);
|
||||
deepEqual(moduleContext, {
|
||||
name: "logs1"
|
||||
});
|
||||
|
||||
equal(log, 12);
|
||||
});
|
||||
test("test2", 10, function() {
|
||||
equal(begin, 1);
|
||||
equal(moduleStart, 1);
|
||||
equal(testStart, 2);
|
||||
equal(testDone, 1);
|
||||
equal(moduleDone, 0);
|
||||
|
||||
deepEqual(testDoneContext, {
|
||||
module: "logs1",
|
||||
name: "test1",
|
||||
failed: 0,
|
||||
passed: 13,
|
||||
total: 13
|
||||
});
|
||||
deepEqual(testContext, {
|
||||
module: "logs1",
|
||||
name: "test2"
|
||||
});
|
||||
strictEqual(moduleDoneContext, undefined);
|
||||
deepEqual(moduleContext, {
|
||||
name: "logs1"
|
||||
});
|
||||
|
||||
equal(log, 22);
|
||||
});
|
||||
|
||||
module("logs2");
|
||||
|
||||
test("test1", 9, function() {
|
||||
equal(begin, 1);
|
||||
equal(moduleStart, 2);
|
||||
equal(testStart, 3);
|
||||
equal(testDone, 2);
|
||||
equal(moduleDone, 1);
|
||||
|
||||
deepEqual(testContext, {
|
||||
module: "logs2",
|
||||
name: "test1"
|
||||
});
|
||||
deepEqual(moduleDoneContext, {
|
||||
name: "logs1",
|
||||
failed: 0,
|
||||
passed: 23,
|
||||
total: 23
|
||||
});
|
||||
deepEqual(moduleContext, {
|
||||
name: "logs2"
|
||||
});
|
||||
|
||||
equal(log, 31);
|
||||
});
|
||||
test("test2", 8, function() {
|
||||
equal(begin, 1);
|
||||
equal(moduleStart, 2);
|
||||
equal(testStart, 4);
|
||||
equal(testDone, 3);
|
||||
equal(moduleDone, 1);
|
||||
|
||||
deepEqual(testContext, {
|
||||
module: "logs2",
|
||||
name: "test2"
|
||||
});
|
||||
deepEqual(moduleContext, {
|
||||
name: "logs2"
|
||||
});
|
||||
|
||||
equal(log, 39);
|
||||
});
|
||||
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
@@ -1,471 +0,0 @@
|
||||
test("module without setup/teardown (default)", function() {
|
||||
expect(1);
|
||||
ok(true);
|
||||
});
|
||||
|
||||
test("expect in test", 3, function() {
|
||||
ok(true);
|
||||
ok(true);
|
||||
ok(true);
|
||||
});
|
||||
|
||||
test("expect in test", 1, function() {
|
||||
ok(true);
|
||||
});
|
||||
|
||||
module("setup test", {
|
||||
setup: function() {
|
||||
ok(true);
|
||||
}
|
||||
});
|
||||
|
||||
test("module with setup", function() {
|
||||
expect(2);
|
||||
ok(true);
|
||||
});
|
||||
|
||||
test("module with setup, expect in test call", 2, function() {
|
||||
ok(true);
|
||||
});
|
||||
|
||||
var state;
|
||||
|
||||
module("setup/teardown test", {
|
||||
setup: function() {
|
||||
state = true;
|
||||
ok(true);
|
||||
},
|
||||
teardown: function() {
|
||||
ok(true);
|
||||
}
|
||||
});
|
||||
|
||||
test("module with setup/teardown", function() {
|
||||
expect(3);
|
||||
ok(true);
|
||||
});
|
||||
|
||||
module("setup/teardown test 2");
|
||||
|
||||
test("module without setup/teardown", function() {
|
||||
expect(1);
|
||||
ok(true);
|
||||
});
|
||||
|
||||
if (typeof setTimeout !== 'undefined') {
|
||||
state = 'fail';
|
||||
|
||||
module("teardown and stop", {
|
||||
teardown: function() {
|
||||
equal(state, "done", "Test teardown.");
|
||||
}
|
||||
});
|
||||
|
||||
test("teardown must be called after test ended", function() {
|
||||
expect(1);
|
||||
stop();
|
||||
setTimeout(function() {
|
||||
state = "done";
|
||||
start();
|
||||
}, 13);
|
||||
});
|
||||
|
||||
test("parameter passed to stop increments semaphore n times", function() {
|
||||
expect(1);
|
||||
stop(3);
|
||||
setTimeout(function() {
|
||||
state = "not enough starts";
|
||||
start(), start();
|
||||
}, 13);
|
||||
setTimeout(function() {
|
||||
state = "done";
|
||||
start();
|
||||
}, 15);
|
||||
});
|
||||
|
||||
test("parameter passed to start decrements semaphore n times", function() {
|
||||
expect(1);
|
||||
stop(), stop(), stop();
|
||||
setTimeout(function() {
|
||||
state = "done";
|
||||
start(3);
|
||||
}, 18);
|
||||
});
|
||||
|
||||
module("async setup test", {
|
||||
setup: function() {
|
||||
stop();
|
||||
setTimeout(function(){
|
||||
ok(true);
|
||||
start();
|
||||
}, 500);
|
||||
}
|
||||
});
|
||||
|
||||
asyncTest("module with async setup", function() {
|
||||
expect(2);
|
||||
ok(true);
|
||||
start();
|
||||
});
|
||||
|
||||
module("async teardown test", {
|
||||
teardown: function() {
|
||||
stop();
|
||||
setTimeout(function(){
|
||||
ok(true);
|
||||
start();
|
||||
}, 500);
|
||||
}
|
||||
});
|
||||
|
||||
asyncTest("module with async teardown", function() {
|
||||
expect(2);
|
||||
ok(true);
|
||||
start();
|
||||
});
|
||||
|
||||
module("asyncTest");
|
||||
|
||||
asyncTest("asyncTest", function() {
|
||||
expect(2);
|
||||
ok(true);
|
||||
setTimeout(function() {
|
||||
state = "done";
|
||||
ok(true);
|
||||
start();
|
||||
}, 13);
|
||||
});
|
||||
|
||||
asyncTest("asyncTest", 2, function() {
|
||||
ok(true);
|
||||
setTimeout(function() {
|
||||
state = "done";
|
||||
ok(true);
|
||||
start();
|
||||
}, 13);
|
||||
});
|
||||
|
||||
test("sync", 2, function() {
|
||||
stop();
|
||||
setTimeout(function() {
|
||||
ok(true);
|
||||
start();
|
||||
}, 13);
|
||||
stop();
|
||||
setTimeout(function() {
|
||||
ok(true);
|
||||
start();
|
||||
}, 125);
|
||||
});
|
||||
|
||||
test("test synchronous calls to stop", 2, function() {
|
||||
stop();
|
||||
setTimeout(function(){
|
||||
ok(true, 'first');
|
||||
start();
|
||||
stop();
|
||||
setTimeout(function(){
|
||||
ok(true, 'second');
|
||||
start();
|
||||
}, 150);
|
||||
}, 150);
|
||||
});
|
||||
}
|
||||
|
||||
module("save scope", {
|
||||
setup: function() {
|
||||
this.foo = "bar";
|
||||
},
|
||||
teardown: function() {
|
||||
deepEqual(this.foo, "bar");
|
||||
}
|
||||
});
|
||||
test("scope check", function() {
|
||||
expect(2);
|
||||
deepEqual(this.foo, "bar");
|
||||
});
|
||||
|
||||
module("simple testEnvironment setup", {
|
||||
foo: "bar",
|
||||
bugid: "#5311" // example of meta-data
|
||||
});
|
||||
test("scope check", function() {
|
||||
deepEqual(this.foo, "bar");
|
||||
});
|
||||
test("modify testEnvironment",function() {
|
||||
this.foo="hamster";
|
||||
});
|
||||
test("testEnvironment reset for next test",function() {
|
||||
deepEqual(this.foo, "bar");
|
||||
});
|
||||
|
||||
module("testEnvironment with object", {
|
||||
options:{
|
||||
recipe:"soup",
|
||||
ingredients:["hamster","onions"]
|
||||
}
|
||||
});
|
||||
test("scope check", function() {
|
||||
deepEqual(this.options, {recipe:"soup",ingredients:["hamster","onions"]}) ;
|
||||
});
|
||||
test("modify testEnvironment",function() {
|
||||
// since we do a shallow copy, the testEnvironment can be modified
|
||||
this.options.ingredients.push("carrots");
|
||||
});
|
||||
test("testEnvironment reset for next test",function() {
|
||||
deepEqual(this.options, {recipe:"soup",ingredients:["hamster","onions","carrots"]}, "Is this a bug or a feature? Could do a deep copy") ;
|
||||
});
|
||||
|
||||
|
||||
module("testEnvironment tests");
|
||||
|
||||
function makeurl() {
|
||||
var testEnv = QUnit.current_testEnvironment;
|
||||
var url = testEnv.url || 'http://example.com/search';
|
||||
var q = testEnv.q || 'a search test';
|
||||
return url + '?q='+encodeURIComponent(q);
|
||||
}
|
||||
|
||||
test("makeurl working",function() {
|
||||
equal( QUnit.current_testEnvironment, this, 'The current testEnvironment is global');
|
||||
equal( makeurl(), 'http://example.com/search?q=a%20search%20test', 'makeurl returns a default url if nothing specified in the testEnvironment');
|
||||
});
|
||||
|
||||
module("testEnvironment with makeurl settings", {
|
||||
url: 'http://google.com/',
|
||||
q: 'another_search_test'
|
||||
});
|
||||
test("makeurl working with settings from testEnvironment", function() {
|
||||
equal( makeurl(), 'http://google.com/?q=another_search_test', 'rather than passing arguments, we use test metadata to form the url');
|
||||
});
|
||||
test("each test can extend the module testEnvironment", {
|
||||
q:'hamstersoup'
|
||||
}, function() {
|
||||
equal( makeurl(), 'http://google.com/?q=hamstersoup', 'url from module, q from test');
|
||||
});
|
||||
|
||||
module("jsDump");
|
||||
test("jsDump output", function() {
|
||||
equals( QUnit.jsDump.parse([1, 2]), "[\n 1,\n 2\n]" );
|
||||
equals( QUnit.jsDump.parse({top: 5, left: 0}), "{\n \"top\": 5,\n \"left\": 0\n}" );
|
||||
if (typeof document !== 'undefined' && document.getElementById("qunit-header")) {
|
||||
equals( QUnit.jsDump.parse(document.getElementById("qunit-header")), "<h1 id=\"qunit-header\"></h1>" );
|
||||
equals( QUnit.jsDump.parse(document.getElementsByTagName("h1")), "[\n <h1 id=\"qunit-header\"></h1>\n]" );
|
||||
}
|
||||
});
|
||||
|
||||
module("assertions");
|
||||
test("raises",function() {
|
||||
function CustomError( message ) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
CustomError.prototype.toString = function() {
|
||||
return this.message;
|
||||
};
|
||||
|
||||
raises(
|
||||
function() {
|
||||
throw "error"
|
||||
}
|
||||
);
|
||||
|
||||
raises(
|
||||
function() {
|
||||
throw "error"
|
||||
},
|
||||
'raises with just a message, no expected'
|
||||
);
|
||||
|
||||
raises(
|
||||
function() {
|
||||
throw new CustomError();
|
||||
},
|
||||
CustomError,
|
||||
'raised error is an instance of CustomError'
|
||||
);
|
||||
|
||||
raises(
|
||||
function() {
|
||||
throw new CustomError("some error description");
|
||||
},
|
||||
/description/,
|
||||
"raised error message contains 'description'"
|
||||
);
|
||||
|
||||
raises(
|
||||
function() {
|
||||
throw new CustomError("some error description");
|
||||
},
|
||||
function( err ) {
|
||||
if ( (err instanceof CustomError) && /description/.test(err) ) {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
"custom validation function"
|
||||
);
|
||||
|
||||
});
|
||||
|
||||
if (typeof document !== "undefined") {
|
||||
|
||||
module("fixture");
|
||||
test("setup", function() {
|
||||
document.getElementById("qunit-fixture").innerHTML = "foobar";
|
||||
});
|
||||
test("basics", function() {
|
||||
equal( document.getElementById("qunit-fixture").innerHTML, "test markup", "automatically reset" );
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
module("custom assertions");
|
||||
(function() {
|
||||
function mod2(value, expected, message) {
|
||||
var actual = value % 2;
|
||||
QUnit.push(actual == expected, actual, expected, message);
|
||||
}
|
||||
test("mod2", function() {
|
||||
mod2(2, 0, "2 % 2 == 0");
|
||||
mod2(3, 1, "3 % 2 == 1");
|
||||
})
|
||||
})();
|
||||
|
||||
|
||||
module("recursions");
|
||||
|
||||
function Wrap(x) {
|
||||
this.wrap = x;
|
||||
if (x == undefined) this.first = true;
|
||||
}
|
||||
|
||||
function chainwrap(depth, first, prev) {
|
||||
depth = depth || 0;
|
||||
var last = prev || new Wrap();
|
||||
first = first || last;
|
||||
|
||||
if (depth == 1) {
|
||||
first.wrap = last;
|
||||
}
|
||||
if (depth > 1) {
|
||||
last = chainwrap(depth-1, first, new Wrap(last));
|
||||
}
|
||||
|
||||
return last;
|
||||
}
|
||||
|
||||
test("check jsDump recursion", function() {
|
||||
expect(4);
|
||||
|
||||
var noref = chainwrap(0);
|
||||
var nodump = QUnit.jsDump.parse(noref);
|
||||
equal(nodump, '{\n "wrap": undefined,\n "first": true\n}');
|
||||
|
||||
var selfref = chainwrap(1);
|
||||
var selfdump = QUnit.jsDump.parse(selfref);
|
||||
equal(selfdump, '{\n "wrap": recursion(-1),\n "first": true\n}');
|
||||
|
||||
var parentref = chainwrap(2);
|
||||
var parentdump = QUnit.jsDump.parse(parentref);
|
||||
equal(parentdump, '{\n "wrap": {\n "wrap": recursion(-2),\n "first": true\n }\n}');
|
||||
|
||||
var circref = chainwrap(10);
|
||||
var circdump = QUnit.jsDump.parse(circref);
|
||||
ok(new RegExp("recursion\\(-10\\)").test(circdump), "(" +circdump + ") should show -10 recursion level");
|
||||
});
|
||||
|
||||
test("check (deep-)equal recursion", function() {
|
||||
var noRecursion = chainwrap(0);
|
||||
equal(noRecursion, noRecursion, "I should be equal to me.");
|
||||
deepEqual(noRecursion, noRecursion, "... and so in depth.");
|
||||
|
||||
var selfref = chainwrap(1);
|
||||
equal(selfref, selfref, "Even so if I nest myself.");
|
||||
deepEqual(selfref, selfref, "... into the depth.");
|
||||
|
||||
var circref = chainwrap(10);
|
||||
equal(circref, circref, "Or hide that through some levels of indirection.");
|
||||
deepEqual(circref, circref, "... and checked on all levels!");
|
||||
});
|
||||
|
||||
|
||||
test('Circular reference with arrays', function() {
|
||||
|
||||
// pure array self-ref
|
||||
var arr = [];
|
||||
arr.push(arr);
|
||||
|
||||
var arrdump = QUnit.jsDump.parse(arr);
|
||||
|
||||
equal(arrdump, '[\n recursion(-1)\n]');
|
||||
equal(arr, arr[0], 'no endless stack when trying to dump arrays with circular ref');
|
||||
|
||||
|
||||
// mix obj-arr circular ref
|
||||
var obj = {};
|
||||
var childarr = [obj];
|
||||
obj.childarr = childarr;
|
||||
|
||||
var objdump = QUnit.jsDump.parse(obj);
|
||||
var childarrdump = QUnit.jsDump.parse(childarr);
|
||||
|
||||
equal(objdump, '{\n "childarr": [\n recursion(-2)\n ]\n}');
|
||||
equal(childarrdump, '[\n {\n "childarr": recursion(-2)\n }\n]');
|
||||
|
||||
equal(obj.childarr, childarr, 'no endless stack when trying to dump array/object mix with circular ref');
|
||||
equal(childarr[0], obj, 'no endless stack when trying to dump array/object mix with circular ref');
|
||||
|
||||
});
|
||||
|
||||
|
||||
test('Circular reference - test reported by soniciq in #105', function() {
|
||||
var MyObject = function() {};
|
||||
MyObject.prototype.parent = function(obj) {
|
||||
if (obj === undefined) { return this._parent; }
|
||||
this._parent = obj;
|
||||
};
|
||||
MyObject.prototype.children = function(obj) {
|
||||
if (obj === undefined) { return this._children; }
|
||||
this._children = obj;
|
||||
};
|
||||
|
||||
var a = new MyObject(),
|
||||
b = new MyObject();
|
||||
|
||||
var barr = [b];
|
||||
a.children(barr);
|
||||
b.parent(a);
|
||||
|
||||
equal(a.children(), barr);
|
||||
deepEqual(a.children(), [b]);
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
(function() {
|
||||
var reset = QUnit.reset;
|
||||
function afterTest() {
|
||||
ok( false, "reset should not modify test status" );
|
||||
}
|
||||
module("reset");
|
||||
test("reset runs assertions", function() {
|
||||
QUnit.reset = function() {
|
||||
afterTest();
|
||||
reset.apply( this, arguments );
|
||||
};
|
||||
});
|
||||
test("reset runs assertions2", function() {
|
||||
QUnit.reset = reset;
|
||||
});
|
||||
})();
|
||||
|
||||
module("noglobals", {
|
||||
teardown: function() {
|
||||
delete window.badGlobalVariableIntroducedInTest;
|
||||
}
|
||||
});
|
||||
test("let teardown clean up globals", function() {
|
||||
// this test will always pass if run without ?noglobals=true
|
||||
window.badGlobalVariableIntroducedInTest = true;
|
||||
});
|
||||
@@ -1,56 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>QUnit Test Suite</title>
|
||||
|
||||
<link rel="stylesheet" href="../design/video-js.css" type="text/css">
|
||||
<!--[if lt IE 9]>
|
||||
<script>
|
||||
document.createElement("video"); // HTML5 Shiv. Must be in <head>.
|
||||
</script>
|
||||
<![endif]-->
|
||||
|
||||
<!--[if IE]>
|
||||
<script src="https://getfirebug.com/firebug-lite.js" type="text/javascript" charset="utf-8"></script>
|
||||
<![endif]-->
|
||||
|
||||
<script src="../src/core.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../src/lib.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../src/ecma.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../src/json.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
<script src="../src/api.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../src/events.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
<script src="../src/tracks.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
<script src="../src/behaviors/behaviors.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../src/behaviors/seekBar.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../src/behaviors/volume.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../src/behaviors/texttrackdisplays.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
<script src="../src/controls/bigPlay.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../src/controls/bar.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../src/controls/subtitlesBox.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
<script src="../src/tech/html5.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../src/tech/flowplayer.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
<script src="../src/autoload.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
<script src="../src/log.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
<link rel="stylesheet" href="qunit/qunit/qunit.css" type="text/css" media="screen">
|
||||
<script type="text/javascript" src="qunit/qunit/qunit.js"></script>
|
||||
<script type="text/javascript" src="test.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="qunit-header">QUnit Test Suite</h1>
|
||||
<h2 id="qunit-banner"></h2>
|
||||
<div id="qunit-testrunner-toolbar"></div>
|
||||
<h2 id="qunit-userAgent"></h2>
|
||||
<ol id="qunit-tests"></ol>
|
||||
<div id="qunit-fixture">test markup</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,154 +0,0 @@
|
||||
var tagCode = '<video id="vid1" class="video-js vjs-default-skin" preload="none" width="640" height="264" data-setup=\'{}\' poster="http://video-js.zencoder.com/oceans-clip.png">';
|
||||
tagCode+= '<source src="http://video-js.zencoder.com/oceans-clip.mp4" type="video/mp4">';
|
||||
tagCode+= '<source src="http://video-js.zencoder.com/oceans-clip.webm" type="video/webm">';
|
||||
tagCode+= '<source src="http://video-js.zencoder.com/oceans-clip.ogv" type="video/ogg; codecs=\'theora, vorbis\'">';
|
||||
tagCode+= '<track kind="subtitles" src="http://videojs.com/subtitles/demo-subtitles.srt" srclang="en-US" label="English"></track>';
|
||||
tagCode+= '</video>';
|
||||
|
||||
function playerSetup(){
|
||||
document.body.innerHTML += tagCode;
|
||||
var vid = document.getElementById("vid1");
|
||||
this.player = _V_(vid);
|
||||
|
||||
stop();
|
||||
this.player.ready(_V_.proxy(this, function(){
|
||||
start();
|
||||
}));
|
||||
}
|
||||
|
||||
function playerTeardown(){
|
||||
document.body.removeChild(document.getElementById("vid1"));
|
||||
ok(!document.getElementById("vid1"), "torndown");
|
||||
}
|
||||
|
||||
module("video.js setup", {
|
||||
setup: playerSetup,
|
||||
teardown: playerTeardown
|
||||
});
|
||||
|
||||
test("Player Set Up", function() {
|
||||
ok(this.player);
|
||||
});
|
||||
|
||||
/* Events
|
||||
================================================================================ */
|
||||
module("API Events", {
|
||||
setup: playerSetup,
|
||||
teardown: playerTeardown
|
||||
});
|
||||
|
||||
// Play Event
|
||||
test("play", function() {
|
||||
this.player.addEvent("play", _V_.proxy(this, function(){
|
||||
start();
|
||||
ok(true);
|
||||
}));
|
||||
this.player.play();
|
||||
});
|
||||
|
||||
// Playing Event
|
||||
test("playing", function() {
|
||||
this.player.addEvent("playing", _V_.proxy(this, function(){
|
||||
start();
|
||||
ok(true, "playing");
|
||||
}));
|
||||
this.player.play();
|
||||
});
|
||||
|
||||
// Pause Event
|
||||
test("pause", function() {
|
||||
this.player.addEvent("pause", _V_.proxy(this, function(){
|
||||
start();
|
||||
ok(true);
|
||||
}));
|
||||
this.player.addEvent("playing", _V_.proxy(this, function(){
|
||||
this.player.pause();
|
||||
}));
|
||||
this.player.play();
|
||||
});
|
||||
|
||||
// Pause Event
|
||||
test("timeupdate", function() {
|
||||
this.player.addEvent("timeupdate", _V_.proxy(this, function(){
|
||||
start();
|
||||
ok(true);
|
||||
}));
|
||||
this.player.addEvent("playing", _V_.proxy(this, function(){
|
||||
this.player.pause();
|
||||
}));
|
||||
this.player.play();
|
||||
});
|
||||
|
||||
/* Methods
|
||||
================================================================================ */
|
||||
module("API Methods", {
|
||||
setup: playerSetup,
|
||||
teardown: playerTeardown
|
||||
});
|
||||
|
||||
// Play Method
|
||||
test("play()", function() {
|
||||
this.player.addEvent("playing", _V_.proxy(this, function(){
|
||||
start();
|
||||
ok(true);
|
||||
}));
|
||||
this.player.play();
|
||||
});
|
||||
|
||||
// Pause Method
|
||||
test("pause()", function() {
|
||||
this.player.addEvent("pause", _V_.proxy(this, function(){
|
||||
start();
|
||||
ok(true);
|
||||
}));
|
||||
this.player.addEvent("playing", _V_.proxy(this, function(){
|
||||
this.player.pause();
|
||||
}));
|
||||
this.player.play();
|
||||
});
|
||||
|
||||
test("currentTime()", function() {
|
||||
|
||||
// Need video loaded before we can call current time
|
||||
this.player.addEvent("loadstart", _V_.proxy(this, function(){
|
||||
start();
|
||||
ok(true, "vid loading");
|
||||
|
||||
// Watch for timeudpate
|
||||
this.player.addEvent("timeupdate", _V_.proxy(this, function(){
|
||||
start();
|
||||
equal(this.player.currentTime(), 0, "time is 0");
|
||||
this.player.removeEvent("timeupdate", arguments.callee);
|
||||
|
||||
// Test again for later time
|
||||
this.player.addEvent("timeupdate", _V_.proxy(this, function(){
|
||||
start();
|
||||
notEqual(this.player.currentTime(), 0, "time is not 0");
|
||||
this.player.removeEvent("timeupdate", arguments.callee);
|
||||
}));
|
||||
// Stop and trigger time
|
||||
stop();
|
||||
this.player.currentTime(10);
|
||||
|
||||
}));
|
||||
// Stop and trigger time
|
||||
stop();
|
||||
this.player.currentTime(0);
|
||||
|
||||
}));
|
||||
|
||||
stop();
|
||||
this.player.load();
|
||||
|
||||
|
||||
|
||||
// Watch for timeudpate
|
||||
this.player.addEvent("timeupdate", _V_.proxy(this, function(){
|
||||
start();
|
||||
notEqual(this.player.currentTime(), 0, "time is not 0");
|
||||
this.player.removeEvent("timeupdate", arguments.callee);
|
||||
}));
|
||||
// Stop and trigger time
|
||||
stop();
|
||||
this.player.load();
|
||||
});
|
||||
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": "abspielen",
|
||||
"Pause": "pausieren",
|
||||
"Current Time": "aktueller Zeitpunkt",
|
||||
"Duration Time": "gesamte Laufzeit",
|
||||
"Remaining Time": "verbleibende Laufzeit",
|
||||
"Stream Type": "Übertragungstyp",
|
||||
"LIVE": "LIVE",
|
||||
"Loaded": "geladen",
|
||||
"Progress": "Fortschritt",
|
||||
"Fullscreen": "Vollbildschirm AN",
|
||||
"Non-Fullscreen": "Vollbildschirm AUS",
|
||||
"Mute": "Ton AUS",
|
||||
"Unmuted": "Ton AN",
|
||||
"Playback Rate": "Wiedergabegeschwindigkeit",
|
||||
"Subtitles": "Untertitel AN",
|
||||
"subtitles off": "Untertitel AUS",
|
||||
"Captions": "Titel AN",
|
||||
"captions off": "Titel AUS",
|
||||
"Chapters": "Kapitel",
|
||||
"You aborted the video playback": "Sie haben die Video-Wiedergabe abgebrochen.",
|
||||
"A network error caused the video download to fail part-way.": "Ein Fehler bei der Verbindung verursachte eine Unterbrechung mitten im Download.",
|
||||
"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, entweder weil der Server bzw. die Verbindung gestört ist, oder weil das Format nicht kompatibel ist.",
|
||||
"The video playback was aborted due to a corruption problem or because the video used features your browser did not support.": "Die Wiedergabe des Videos wurde unterbrochen. Entweder ist das Video beschädigt oder es benutzt ein Feature welches von diesem Browser nicht unterstützt wird.",
|
||||
"No compatible source was found for this video.": "Für dieses Video wurde keine kompatible Quelle gefunden."
|
||||
});
|
||||
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