1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-23 02:04:34 +02:00
Commit Graph

681 Commits

Author SHA1 Message Date
Adam Misiorny
de25d751b9 feat: Allow to use custom Player class (#3458)
This allows a user to register a new Player component with videojs to be used when videojs is called. If a player has been created already when trying to register a Player component, an error is thrown.
Fixes #3335 and #3016.
2016-11-23 13:52:54 -05:00
Gary Katsevman
eb5e78bb88 revert: perf: Cache currentTime and buffered from Flash (#3705) (#3778)
This reverts commit 45ffa810fb.
2016-11-14 16:09:54 -05:00
Jon-Carlos Rivera
f05a9271b8 feat: option to have remoteTextTracks automatically 'garbage-collected' when sources change (#3736)
Tech#addRemoteTextTrack now accepts a second parameter - a boolean named manualCleanup which defaults to true preserving backwards compatibility. When that value is set to false the text track will be removed from the video element whenever a source change occurs.
2016-11-09 16:07:59 -05:00
Gary Katsevman
996507744f test(dom): fix removeElClass test in Safari 10. (#3768)
Safari 10 automatically dedupes duplicate class names in an element. So,
our test was failing because we had an extra "foo" in the check. This is
an unlikely scenario that has browser variations, so, better to just
remove it.
2016-11-09 16:06:38 -05:00
David LaPalomento
45ffa810fb perf: Cache currentTime and buffered from Flash (#3705)
Calling into the SWF too often is expensive. Current time and buffered don't actually change that often but it's very common to call them a couple times in the handling of a single event. Cache their return values for 100ms so the performance penalty of going through ExternalInterface is limited.
2016-11-04 18:03:44 -04:00
Brandon Casey
e9e5b5f782 test(hooks): fix hooks unit test in ie8 (#3745) 2016-11-04 16:43:27 -04:00
Brandon Casey
77357b1cd2 feat: implement player lifecycle hooks and trigger beforesetup/setup hooks (#3639)
Allows you to hook into `beforesetup` and `setup` hooks for all players that are created by videojs.
2016-11-04 14:25:32 -04:00
Pat O'Neill
fb74c71ba6 refactor(texttracksettings): DRYer code and remove massive HTML blob (#3679)
* DRYer code while keeping tests passing
* Replace massive HTML blob with DOM methods
* Create obj util and implement it
2016-11-04 13:45:51 -04:00
mister-ben
2e720afb65 fix: allow rounded value for fluid player ratio test (#3739) 2016-11-03 18:40:14 -04:00
Carey Hinoki
028559ccb0 feat: add ability to get current source object and all source objects (#2678)
Adds `currentSource` and `currentSources` methods to the player that return the current source object, containing `currentSrc()` and `currentType()`, and all source objects that were given to the player.

Fixes #2443
2016-11-03 15:50:55 -04:00
mister-ben
de1b363470 feat(clickable-component): Disable interaction with disabled clickable components (#3525)
enable() and disable() on clickable components is only cosmetic. "Disabled" implies the control should not be functional.

* Remove event listeners on disable() and add back on enable().
* Move adding listeners from constructor to enable
* Remove tabindex from disabled components and add disabled attribute to disabled buttons to prevent keyboard access.
2016-11-03 15:43:15 -04:00
Carey Hinoki
9d77268f76 feat: Components are now accessible via camelCase and UpperCamelCase (#3439)
This means that you can `getChild` and `addChild` with both `myComponent` and `MyComponent`.

Fixes #3436.
2016-11-03 15:40:35 -04:00
mister-ben
ed59531f78 fix: Suppress Infinity duration on Android Chrome before playback (#3476)
HTML5 tech will return NaN instead of Infinity if playback has not started. Fires a durationupdate event once the reported duration can be believed if the duration is still Infinity, so controls can update.

Fixes #3079.
2016-11-03 15:39:09 -04:00
mister-ben
2988f6ae53 feat(fluid): use default aspect ratio for fluid players if width unknown (#3614)
If a player is fluid and does not have a width set, and preload is set to none, the height of the player is zero. This includes where preload is forced to none by mobile Chrome as in #3606.

* If the player has the .vjs-fluid class when initialised, fluid is set to true, so adding the class behaves the same as {fluid: true} in the setup options.
* The fluid(bool) setter calls player.updateStyleEl_(). Otherwise it won't be triggered in createEl() if an aspect ratio is not also set.
* Corrects the test for a set videoWidth() in updateStyleEl_() - videoWidth() returns 0 if the width is unknown. This allows the default 16:9 to kick in rather than using 0:0.
2016-11-03 15:37:30 -04:00
Marco
dd2aff00a8 fix: disable HLS hack on Firefox for Android (#3586)
* Disable HLS hack on Firefox for Android

* Fix canPlayType patching tests

* Add test to ensure that canPlayType is not patched in Firefox for Android

* Fix assertion message in Firefox for Android test
2016-09-29 14:14:42 -04:00
Gary Katsevman
fac52046f3 Merge branch 'stable' 2016-08-25 19:34:07 -04:00
Jon-Carlos Rivera
fdd8550307 @imbcmdth Added exception handling to event dispatcher. closes #3580
* Guard against exceptions in an event handler to stop them from breaking further processing of event handlers

* Added a test for try/catch behavior for exceptions originating in event handlers
2016-08-25 19:08:56 -04:00
Gary Katsevman
f37383784d Merge branch 'stable' 2016-08-25 12:19:03 -04:00
Richard L. Chung
af6beb21c3 @rlchung fixed tests that weren't disposing players when they finished. closes 3524 2016-08-25 10:58:42 -04:00
Pat O'Neill
1d2d08584e @misteroneill fixed IE8 media error test failure. closes #3568 2016-08-24 13:48:39 -04:00
Pat O'Neill
b56ed61523 @misteroneill fixed wrapping native and emulated MediaErrors. closes #3562 2016-08-24 11:00:21 -04:00
Gary Katsevman
955185379f @gkatsev updated build system to open es5 folder for bundles and dist folder other users. closes #3445 2016-08-17 17:16:41 -04:00
Gary Katsevman
773b5ab1c1 Merge branch 'stable' 2016-08-15 18:20:47 -04:00
mister-ben
fa1c6430f4 @mister-ben silenced chrome's play() request was interrupted by pause() error. closes #3518 2016-08-15 17:49:52 -04:00
Vineet
2c84f45ff3 @vdeshpande fixed control text for fullscreen button. closes #3485 2016-08-15 17:44:01 -04:00
Pat O'Neill
72c44daaf3 @misteroneill updated tests to qunit 2.0. closes #3509 2016-08-12 13:51:31 -04:00
Priti Agarwal
945711855a @pagarwal123 updated some test code to pass linter 2016-08-05 11:38:08 -04:00
Brandon Casey
86068a5b45 @BrandonOCasey updates tests to pass linter 2016-08-05 11:37:12 -04:00
Brandon Casey
c89b75699e first half of the test/unit/tracks directory (#3483) 2016-08-03 15:27:47 -04:00
Pat O'Neill
8dd01467f3 @misteroneill corrects test assertions for older IEs in the log module. closes #3454 2016-07-22 13:50:29 -04:00
Owen Edwards
238c752aee @OwenEdwards fixed caption settings dialog labels for accessibility. closes #3281 2016-07-19 00:19:36 -04:00
mister-ben
5883c9236e @mister-ben updated language to inherit correctly and respect the attribute on the player. closes #3426 2016-07-18 14:53:31 -04:00
Pat O'Neill
13d349b0da @misteroneill improved Logging for IE < 11. closes #3356 2016-07-18 14:32:31 -04:00
Vít Koumar
f36da276e3 @vit-koumar updated Flash tech to return Infinity from duration instead of -1. closes #3128 2016-07-18 14:10:57 -04:00
ldayananda
c51c180b3c @ldayananda updated videojs to not do anything if no src is set. closes #3378 2016-06-27 23:07:00 -04:00
Gary Katsevman
b9e3e55384 Merge branch 'stable' 2016-05-27 18:28:40 -04:00
brandonocasey
fa8fc80b83 @BrandonOCasey fixed source handlers being disposed multiple times when a video is put into the video element directly. closes #3343 2016-05-27 18:12:47 -04:00
Nicky Gerritsen
17f856849d @nickygerritsen Fix test for tooltips in IE8. closes #3327 2016-05-19 09:47:27 +02:00
Nicky Gerritsen
ed39b68f13 @nickygerritsen Add title to all clickable components. closes #3296 2016-05-17 10:17:12 +02:00
Gary Katsevman
b1e7bfd8f8 Merge branch 'stable' 2016-05-12 14:49:47 -04:00
Gary Katsevman
82d396a1fb @gkatsev nulled out currentSource_ in setSource. closes #3314 2016-05-12 14:43:10 -04:00
Pat O'Neill
ed3249818e @misteroneill Un-deprecate the videojs.players property. closes #3299 2016-05-11 09:10:15 +02:00
Nicky Gerritsen
68c4d248d9 @nickygerritsen Also pass tech options to canHandleSource. closes #3303 2016-05-11 09:08:17 +02:00
Greg Smith
249532ad45 @incompl clear currentSource_ after subsequent loadstarts. closes #3285 2016-05-02 18:54:34 -04:00
brandonocasey
2e2dbde4b4 @BrandonOCasey added audio and video track support. closes #3173 2016-04-22 14:31:12 -04:00
Gary Katsevman
cfb9621884 Merge branch 'stable' 2016-04-19 17:20:24 -04:00
Gary Katsevman
264e53fb5b @gkatsev fixed text track tests for older IEs. closes #3269 2016-04-19 17:09:53 -04:00
Gary Katsevman
d3b368ccce @gkatsev fixed removeRemoteTextTracks not working with return value from addRemoteTextTracks. closes #3253 2016-04-19 15:46:33 -04:00
Gary Katsevman
ff83aa6573 @gkatsev made the first emulated text track enabled by default. closes #3248 2016-04-19 15:18:21 -04:00
Nicky Gerritsen
f606f9df50 @nickygerritsen Pass tech options to source handlers. closes #3245 2016-04-13 20:28:09 +02:00
Chris Auclair
fa27cc7dbf @chrisauclair added ARIA region and label to player element. closes #3227 2016-04-05 13:47:58 -04:00
Gary Katsevman
b91018952e Merge branch 'stable' 2016-03-29 16:15:07 -04:00
Maythee Anegboonlap
31b2f9d489 @llun fixed menus from throwing when focused when empty. closes #3218 2016-03-29 16:09:10 -04:00
Gary Katsevman
4663d0ed01 use a brand new tag el for ie8 2016-03-28 12:08:00 -04:00
Can Küçükyılmaz
ac3771a329 @defli added currentWidth and currentHeight methods to the player. closes #3144. 2016-03-25 15:12:53 -04:00
Owen Edwards
41bc481597 @OwenEdwards added basic descriptions track support. closes #3098 2016-03-25 14:16:56 -04:00
Gary Katsevman
66a2c05510 @gkatsev updated vjs to not add dynamic styles when VIDEOJS_NO_DYNAMIC_STYLE is set. closes #3093 2016-03-25 14:06:39 -04:00
Gary Katsevman
dbdc411dc2 @gkatsev cleared vttjs script handlers on dispose. Fixed tests. closes #3189 2016-03-17 18:56:25 -04:00
Gary Katsevman
e2c8c125a2 @gkatsev changed emulated tracks to in novtt to wait for vttjs to load or error before parsing. closes #3181 2016-03-17 14:53:00 -04:00
brandonocasey
c1112b74fe @BrandonOCasey updated text track unit tests to use full es6 syntax. closes #3148 2016-03-07 14:54:32 -05:00
Gary Katsevman
f77bcc95d0 @gkatsev cleared waiting/spinner on timeupdate. Fixes #3124. closes #3138 2016-03-07 14:48:15 -05:00
Erik Yuzwa
fc7a166705 @erikyuzwa added ability to add child component at specific index. closes #2540 2016-02-04 13:42:49 -05:00
jforbes
c8646aa02b @forbesjo updated emulated tracks to have listeners removed when they are removed. closes #3046 2016-02-02 14:29:31 -05:00
Owen Edwards
16f0179c07 @OwenEdwards added ClickableComponent. Fixed keyboard operation of buttons. closes #3032 2016-01-25 18:30:12 -05:00
Gary Katsevman
6977b0e3fe @gkasev updated vjs to correctly return already created player when given an element. closes #3006 2016-01-15 15:27:35 -05:00
Gary Katsevman
dcf2a300ef make sure that styleEl_ is in DOM before removing on dispose. closes #3004 2016-01-14 14:01:30 -05:00
Pat O'Neill
8ad286a768 @misteroneill exposed createEl on videojs. closes #2926 2016-01-07 23:03:23 -05:00
Carey Hinoki
8f2bc92412 @chemoish emulated HTMLTrackElement to enable track load events. closes #2804 2015-12-08 11:24:51 -05:00
Gary Katsevman
e78e26b8a4 @gkatsev added a Player#reset method. Fixes #2852. closes #2880 2015-12-07 17:45:50 -05:00
Gary Katsevman
0b7a2e41b3 @gkatsev added Player#tech. Fixes #2617. closes #2883 2015-12-07 16:27:33 -05:00
jrivera
69b89e51f4 @imbcmdth added sourceOrder option for source-first ordering in selectSource. closes #2847 2015-11-25 17:11:36 -05:00
jforbes
8acd28c15a @forbesjo updated formatTime to not go negative. closes #2821 2015-11-25 16:46:41 -05:00
Garrett Singer
72f77d77c9 @gesinger fixed handler explosion for cuechange events. closes #2849 2015-11-25 16:13:23 -05:00
Garrett Singer
7171ea8d42 @gesinger checked for track changes before tech started listening. closes #2835 2015-11-25 16:00:49 -05:00
Gary Katsevman
5f9095079e @gkatsev fixed clearing out errors. closes #2850 2015-11-24 15:37:34 -05:00
Violeta Marculescu
c0d5f471bc @bcvio fixed returning current source rather than blob url. closes #2833 2015-11-23 12:04:31 -05:00
Nathaniel Bibler
3a40b10fa6 @nbibler ensured classes begin with alpha characters. Fixes #2828. closes #2829 2015-11-20 17:38:05 -05:00
Gary Katsevman
d1316a39ab @gkatsev updated MediaLoader to check for techs in their registry. closes #2798 2015-11-10 15:53:14 -05:00
Gary Katsevman
0da23c1d8d @gkatsev fixed usage of textTracksToJson. closes #2797 2015-11-10 15:30:09 -05:00
Pat O'Neill
f2fa8f8687 @misteroneill exposed DOM helpers. closes #2754 2015-11-09 17:43:17 -05:00
Brian Deitte
4e395b6b02 Add unit test for new rtmp path changes 2015-11-09 14:31:15 -05:00
Gary Katsevman
5d754c911d @gkatsev made initListeners more general and added Tech.isTech. Fixes #2767. closes #2773 2015-11-06 16:42:19 -05:00
Pat O'Neill
51f1863adc @misteroneill added a modal dialog. closes #2668 2015-10-28 13:28:15 -04:00
Gary Katsevman
ab88bcdde3 @gkatsev fixes track tests and ignored empty properties in tracks converter. closes #2744 2015-10-27 15:54:48 -04:00
Nicky Gerritsen
589cab7fa7 @nickygerritsen added canPlayType method to player. closes #2709 2015-10-27 13:46:05 -04:00
Gary Katsevman
93e079718e @gkatsev removed unhelpful isCrossOrigin test. closes #2715 2015-10-26 16:57:21 -04:00
heff
cd6c568a03 @imbcmdth fix potential triggerReady infinite loop 2015-09-29 09:28:02 -07:00
heff
e225fbffc2 Merge branch 'master' into stable
Conflicts:
	dist/video-js/video-js.css
	dist/video-js/video-js.less
	dist/video-js/video-js.min.css
	dist/video-js/video-js.swf
	dist/video-js/video.dev.js
	dist/video-js/video.js
	dist/video-js/video.novtt.dev.js
	dist/video-js/video.novtt.js
	src/css/video-js.less
	src/js/control-bar/time-display.js
	src/js/exports.js
	src/js/lib.js
	src/js/media/flash.js
	src/js/media/flash.rtmp.js
	src/js/media/html5.js
	src/js/media/media.js
	src/js/player.externs.js
	test/unit/api.js
	test/unit/flash.js
	test/unit/media.html5.js
	test/unit/media.js
2015-09-29 09:14:50 -07:00
Benoit Tremblay
2de28927d7 @eXon added support for a tech-supplied poster. closes #2339 2015-09-28 11:23:25 -07:00
Gary Katsevman
0b7cf586c2 @gkatsev exposed isCrossOrigin and used it to enable CORS for textTrack XHRs. closes #2633 2015-09-24 19:58:25 -04:00
heff
81806d5725 @heff fixed timeranges deprecation warnings in tests. closes #2627 2015-09-23 12:34:59 -04:00
Pat O'Neill
61a00db7cb @misteroneill rename "extends" to "extend" for ie8. closes #2624 2015-09-22 11:19:04 -04:00
jrivera
24ad9841ac @imbcmdth extended createTimeRange to support multiple timeranges. closes #2604 2015-09-21 18:04:10 -04:00
heff
51bae4d7cf Fixed a double loadstart and added readyState catch up events
- Fixed some issue comments
 - Fixed a double ready event

closes #2605
fixes #2588
2015-09-18 10:28:16 -07:00
David LaPalomento
24cdbdefff Use Raynos/xhr for XMLHttpRequests
- Get rid of our custom XHR shim. Export it as videojs.xhr.
- Updated XHR to be stubbed everywhere in tests to prevent errors.
- Added npm install to the review process

closes #2318
closes #2594
2015-09-15 15:25:11 -07:00
heff
f7466af956 Made tech related functions clearly private in the player
This is important for enforcing the model that techs should
work the same for everything.

closes #2590
fixes #2060

- Made techGet and techCall private functions
- Made loadTech, techName, and unloadTech private
- Cleaned up all other private method naming in the player
- Removed some unneeded comments
2015-09-15 12:54:26 -07:00
heff
f10d8d0cb3 @heff added an attributes argument to createEl(). closes #2589
fixes #2176
2015-09-15 10:59:08 -07:00
heff
3fb786e271 @heff removed playerOptions from plugin options because it created an inconsistency in plugin inits. closes #2532 2015-09-02 15:47:10 -07:00
heff
f492450a01 Small fix to an IE9 broken test, introduced in #2513 2015-08-31 17:17:26 -07:00
heff
4d97dd4d29 Fixed a number of errors in the log after testing
- Fixed a console error in dom tests from loading a track source
- Switched to non-fetching poster urls in tests to prevent errors
- Stubbed XHR for TextTrack tests to prevent log errors
- Fixed text track console errors that stubbing async didn't catch
    because there's some async happening in tracks that makes it so
- XHR isn't even used until the test is complete
- Removed extra code
- Added player.dispose more places and fixed attributes test
2015-08-31 16:36:11 -07:00
Brandon Bay
fca885a62f @bc-bbay migrate seeking on replay to the flash tech. closes #2519 2015-08-31 15:02:19 -04:00
Gary Katsevman
98315b0e52 @dmlap @gkatsev improve Flash tech error property and add an error setter to the base tech. closes #2517 2015-08-31 14:21:53 -04:00
David LaPalomento
90c6890567 @dmlap move seek on replay into the flash tech. closes #2527 2015-08-31 14:12:12 -04:00
Gary Katsevman
de39cfc5ab @gkatsev improved tech controls listener handling.. closes #2511 2015-08-25 16:17:35 -04:00
heff
f7d1289593 @heff fixed cross-platform track tests by switching to a fake tech. closes #2496 2015-08-24 12:48:42 -07:00
Gary Katsevman
f3b5075bcd @gkatsev fixed nativeControlsForTouch handling. Defaults to native controls on iphone and native android browsers.. closes #2499 2015-08-21 17:43:07 -04:00
Gary Katsevman
76b5ffc7b5 @gkatsev moved default and player dimensions to style els at the top of HEAD. closes #2482 2015-08-19 14:13:58 -04:00
Gary Katsevman
4ec82d647d @gkatsev fixed text track errors on dispose and in cross-browser testing. closes #2466 2015-08-12 16:04:31 -07:00
David LaPalomento
fecf3a0f8a @dmlap switched global options back to an object at videojs.options. closes #2461 2015-08-12 13:51:43 -07:00
Gary Katsevman
2dfd315ac1 @gkatsev always use emulated TextTrackLists so tracks survive tech switches. closes #2425 2015-08-03 15:19:36 -04:00
heff
3bf415e522 @heff use a synchronous ready() internally. closes #2392 2015-07-30 15:38:01 -04:00
Pat O'Neill
8aa61d3b1a @misteroneill restore some 4.x utilities and remove deprecated functionality. closes #2406 2015-07-30 14:11:31 -04:00
David LaPalomento
a76b42d50c @misteroneill restore some properties on window.videojs. Closes #2395 2015-07-30 12:10:04 -04:00
heff
e0b1008225 Fix IE8 tests
- Removed incompatible module
- Added ie8 shim to qunit index.html
- Fixed extends() usage

--skip-ci
2015-07-24 09:20:43 -07:00
Pat O'Neill
456ee4e84f @misteroneill fixed internal extends usage and added a deprecation warning. closes #2390 2015-07-24 09:07:58 -07:00
jrivera
69dde46aa2 @imbcmdth fix potential triggerReady infinite loop. closes #2398 2015-07-23 11:28:34 -04:00
David LaPalomento
4ad45ef9a8 @dmlap fire seeking in the flash tech, not the SWF. closes #2372 2015-07-21 17:31:51 -04:00
David LaPalomento
d3d5d032fc @dmlap use seekable on source handlers when defined. closes #2376 2015-07-21 17:12:24 -04:00
David LaPalomento
1102452ca3 @dmlap export a basic played() on techs. closes #2384 2015-07-21 16:56:23 -04:00
jrivera
d2de00cae1 @imbcmdth updated source handlers to use bracket notation so they wont break when using minified videojs. closes #2348 2015-07-16 13:48:34 -04:00
David LaPalomento
ccd6ed44b8 Don't track progress until ready
Delay manual progress checks until the tech is ready to avoid errors.
The Flash tech errors if buffered() is called before the SWF has loaded,
for instance.

closes #2316
fixes #2288
rel #2289
2015-07-10 12:22:20 -07:00
Pavel Horal
f9316fcda0 @pavelhoral fixed subclassing without a constructor. closes #2308 2015-07-10 11:42:29 -07:00
Michelle Anderson
3479a545aa Checking on the event the relatedTarget exists before setting its property
Fixes a bug where relatedTarget was undefined in Firefox

fixes #2024
closes #2025
2015-07-09 15:41:07 -07:00
David LaPalomento
c2820e9e38 @dmlap fixed an error caused by calling vjs_getProperty on the swf too early. closes #2289 2015-07-09 11:52:52 -07:00
Thijs Triemstra
56be47b80a Log an error when a plugin can't be found
closes #1931
closes #1928
2015-07-08 14:51:00 -07:00
jrivera
56d4861bb0 src() should not return blob URLs with MSE source handlers. closes #2271 2015-06-23 16:28:23 -04:00
jrivera
463ba4ea44 @imbcmdth fixed async currentSrc behavior. closes #2256 2015-06-15 16:26:07 -04:00
jrivera
20b46b9fb9 @imbcmdth updated currentSrc to return src instead of blob urls in html5 tech. Fixes #2232. closes #2232 2015-06-10 14:14:54 -04:00
heff
05b6bb2ae4 Removed swf creation from tests
- Broke out RTMP tests into their own file.
- Cleaned up the currentTime test to not create the swf
- Cleaned up the flash dispose test
- Cleaned up formatting for additional flash tests

--skip-ci
2015-06-09 12:49:12 -07:00
David LaPalomento
0be74e51ff @dmlap added support for the seekable property. closes #2208 2015-06-08 13:47:04 -07:00
Carlos
55a391b54a @carpasse enhanced events to allow passing a second data argument. closes #2163 2015-06-05 10:36:59 -07:00
Matthew McClure
42f00f2bfc @mmcc deprecated the options() function and removed internal uses. closes #2229 2015-06-04 17:33:34 -07:00
David LaPalomento
1c35bfafc2 @dmlap add the seekable property. closes #2207 2015-06-01 17:40:40 -04:00
Matthew McClure
9c33bd72c7 @mmcc switched to using button elements for button components. closes #2209 2015-05-29 15:56:45 -07:00
heff
a5758019e5 Updated the ready event to always be async
closes #1667

Fix text track tests.
Now that ready is async, we need to tick the clock so the ready handler
fires.

Remove unneeded ready test
2015-05-22 17:27:15 -07:00
45aff0062cf1b0e55a6532b0a513db6be3952d17
6b2dca32fc Normalise lang codes to lowercase for insensitive match
Use primary code ('en') if specific code ('en-us') doesn not match
Always re-merge languages

closes #2177

Updated language function to lowercase internally

Updated component.localize to not require stubbing
2015-05-21 17:07:13 -07:00
heff
1bfe0b4fed Clean up and documentation of src/js/video.js and DOM functions
Preparing to export utility functions on the videojs object

closes #2182

Change el() to getEl() for consistency

Cleaned up DOM functions library

Clean up and document videojs object API

Fixed mergeOptions to modify the first object instead of a copy

More cleanup of the main video.js file and documentation

Fixed issues with mergeOptions

Cleaned up the addLanguage function

Removed unnecessary underscores in private module vars
2015-05-21 11:33:12 -07:00
eXon
5d550ffada Additional tech 2.0 improvements from #2126
closes #2166
closes #2126

this.tech.emitTapEvents(); should be handled by the tech

De-dupe the bufferedPercent code in both Tech and Player

Have the player generate the tech ID

Added autoplay/preload/loop/muted to tech option

Remove the watch for native timeupdates

Fixed the JSDoc for bufferedPercent

Removed the unit test for native timeupdate

Added cute whitespaces

buffer should always return a TimeRange
2015-05-21 11:19:33 -07:00
heff
1ffb13a799 Fixed all uses of registerComponent that relied on __proto__ inheritance 2015-05-18 17:35:21 -07:00
heff
a8ff970d4a Broke up Lib and Util into smaller libraries of functions
Broke out bind, guid, and element data functions from Lib

Separated out more dom functions in to dom.js

Broke out URL functions into url.js

Removed setLocalStorage since it wasn't being used

Moved browser tests out of lib

Moved log functions into their own file

Removed trim() since it wasn't being used

Moved formatTime into its own file

Moved round into its own file and renamed roundFloat()

Moved capitalize into its own file and renamed as toTitleCase()

Moved createTimeRange into its own file

Removed Lib.arr.forEach infavor of the native forEach

Removed Lib.obj.create in favor of native Object.create (ES6-sham)

Removed obj.each in favor of native Object.getOwnPropertyNames().forEach()

Removed obj.merge and copy. Using lodash.assign instead.

Replaced Lib.obj.isPlain with lodash.isPlainObject

Removed Lib.obj.isArray in favor of the native Array.isArray

Also removed the lib.js tests file as all tests have been moved
or removed.

Removed Lib.isEmpty in favor of !Object.getOwnPropertyNames().length

Switched Util.mergeOptions and deepMerge to use new mergeOptions()

Moved Lib.TEST_VID to Html5.TEST_VID

Removed Lib references everywhere. Woo!

Attempting to fix sourcemap test errors by setting grunt-browserify version

Switched to object.assign from lodash.assign

Removed unused 'inherits' dependency

Reorganzied test files and added '.test' to file names

Combined js/core.js and js/video.js

Moved events.js into the utils directory
2015-05-15 18:20:35 -07:00
heff
2fc8968002 @heff added support for fluid widths, aspect ratios, and metadata defaults. closes #1952 2015-05-13 22:45:01 -07:00
Brandon Bay
652a44026f @bc-bbay fixed a bug where the player would try to autoplay when there was no source. closes #2127 2015-05-13 15:10:55 -07:00
Gaurav Saxena
36956e20df @saxena-gaurav fixed a bug from disposing after changing techs. closes #2125 2015-05-06 14:45:50 -04:00
eXon
e5595b1e38 @eXon began Tech 2.0 work, improved how tech events are handled by the player. closes #2057
closes #1485
2015-05-06 14:02:01 -04:00
Gary Katsevman
102c6fb197 @gkatsev added a sensible toJSON function. closes #2114 2015-05-01 14:16:19 -07:00
Deirdre Connolly
f84632e057 @dconnolly exported the missing videojs.plugin function. closes #2103 2015-04-30 14:49:22 -07:00
David LaPalomento
b5968f13e2 @dmlap added an error message if techOrder is not in options. closes #2097 2015-04-29 14:05:22 -07:00
Brandon Bay
bb9fde0f82 @bc-bbay rename onEvent methods to handleEvent. closes #2093 2015-04-29 10:17:46 -07:00
jforbes
69738a86dc @forbesjo added the `scrubbing` property. closes #2080 2015-04-28 13:33:55 -07:00
Deirdre Connolly
c62aa10637 @dconnolly replaced JSON.parse with a safe non-eval JSON parse. closes #2077 2015-04-27 17:05:39 -07:00
Matthew McClure
e1e69941a1 @mmcc added ES6 default args and template strings. closes #2015 2015-04-22 15:26:37 -07:00
heff
a02ee27802 @heff converted all classes to use ES6 classes. closes #1993 2015-04-14 13:08:32 -07:00
Matthew McClure
f3036dd528 cleanup and fixed options shadowing in player 2015-04-03 15:25:58 -07:00
heff
6e5fc8d687 More build and testing cleanup. Also some reorganization. 2015-04-02 11:33:51 -07:00
Matthew McClure
0c9d53321f Report test coverage analytics during test runs 2015-04-02 11:33:50 -07:00
heff
f298d18023 Most of test conversion for es6ification 2015-04-02 11:33:50 -07:00
Matthew McClure
2e689f85e5 Starting ES6 conversion up to functional player 2015-04-02 11:33:50 -07:00
Carlos Pastor
f69a229224 Extended getFileExtension test cases 2015-03-25 12:40:10 +01:00
Carlos Pastor
213c23d097 Added getFileExtension to libs. Extended canHandleSource in media files to consistently guess mime types. Fixes #1833 2015-03-24 19:52:04 +01:00
heff
20a4184ea7 @heff fixed setting the source to an empty string. closes #1905 2015-02-27 15:50:13 -08:00
Gary Katsevman
8b0966c1b4 Store text tracks on player not tech
Test keeping text tracks between tech loads.
This does break without the previous commit.

closes #1874
2015-02-19 12:28:26 -08:00
heff
f27df10920 Fixed a controls test on the iPhone
On the iphone the controls attribute of the video element is always true.
2015-02-17 13:49:32 -08:00
heff
f96803a806 Fixed a poster test for IE11 2015-02-17 13:09:19 -08:00
Gary Katsevman
4e5c28cc56 @gkatsev greatly improved text track support and implemented vtt.js as the webvtt parser. closes #1749 2015-02-13 15:19:02 -08:00
David LaPalomento
5e371b4625 @dmlap Add network and ready state properties. closes #1854 2015-02-12 18:26:32 -05:00
45aff0062cf1b0e55a6532b0a513db6be3952d17
3742afe607 Add vjs-ended class when playback reaches the end of the timeline. closes #1857 2015-02-12 18:15:44 -05:00
Matthew McClure
fd24c5c7a3 lowered tap movement and tap time thresholds
or, you know, actually change the threshold

updated component test to account for smaller touchmove threshold

closes #1830
2015-02-12 14:34:07 -08:00
Steve Randy Tantra
fbb2197dfa @steverandy fixed an issue with scrolling over the player on touch devices. closes #1809 2015-02-12 12:01:20 -08:00
David LaPalomento
f980cdb1fb Hide the poster when play fires. closes #1834 2015-02-09 12:11:00 -05:00
heff
2489cc1c10 Merge branch 'stable'
Conflicts:
	dist/video-js/video-js.css
	dist/video-js/video-js.min.css
	dist/video-js/video-js.swf
	dist/video-js/video.dev.js
	dist/video-js/video.js
2015-01-23 10:50:49 -08:00
Artem Suschev
c8781cf51b @H1D fixed an issue with file extension type detection. closes #1818 2015-01-21 17:55:35 -08:00
David LaPalomento
4bde5c8928 Don't always add controls to the video element
Fix for #1561. If the HTML tech is being constructed without a video element to work off of, make sure that the controls attribute is only added under the same circumstances it would be at player init. Before this fix, if you loaded the Flash tech and then switched to the HTML tech, you would see the native controls underneath the video.js controls.

Fix controls attribute test on iOS
iOS uses native controls by default and so was failing the assertions that native controls weren't used. Force custom controls for this test case to make it work like everywhere else.

Update nativeControlsForTouch default
The default value changed so fix the predicate that tested for whether it was in use.

closes #1811, closes #1564, closes #1561
2015-01-21 17:35:55 -08:00
Gary Katsevman
1c17a67f39 Fixed issue where ManualTimeUpdatesOff was not de-registering events. closes #1793 2015-01-16 12:05:21 -08:00
heff
e8235c9022 Fixed type support checking for an empty src string. closes #1797 2015-01-16 11:43:58 -08:00
heff
a3b12d9d03 Exported missing source handler functions. closes #1787 2015-01-12 14:28:22 -08:00
David LaPalomento
c939ab86ca @dmlap fixed URL parsing in IE9. closes #1765 2014-12-23 08:25:49 -08:00
Matthew McClure
a67201f913 @mmcc updated the hide/show functions to use a class instead of inline styles. closes #1681 2014-12-22 09:38:54 -08:00
Matthew McClure
1f6c5179d8 @mmcc added functions for better timeout and interval handling. closes #1642 2014-12-03 11:31:39 -08:00
Steve Heffernan
76e662a756 @heff added the Source Handler interface for handling advanced formats including adaptive streaming. closes #1560 2014-12-02 14:22:34 -08:00
Steve Heffernan
1325722447 @heff fixed checking for child options in the parent options to allow for `false`. closes #1630 2014-10-30 13:19:01 -07:00
Steve Heffernan
f27bdd27ca @heff Added the ability to set options for child components directly in the parent options. closes #1599 2014-10-28 11:45:32 -07:00
Steve Heffernan
4b818d9ebf @heff enhanced the event listener API to allow for auto-cleanup of listeners on other componenets and elements. closes #1588 2014-10-28 11:16:56 -07:00
Steve Heffernan
af02d158da @heff updated the poster to use CSS styles to display; fixed the poster not showing if not originally set. closes #1568 2014-10-16 12:59:41 -07:00
Matthew McClure
18b6d25bc7 @mmcc added support for audio tags (html5 audio only). closes #1540 2014-09-30 18:34:51 -07:00
Craig Rogers
9b7882e395 @twentyrogersc fixed the return value when setting the poster source. closes #1552 2014-09-30 15:38:22 -07:00
Ryo Chikazawa
f47bf26e49 @chikathreesix fixed an issue where data-setup options could be missed. closes #1514 2014-09-29 16:13:07 -07:00
baloneysandwiches
fd181aa9cd @baloneysandwiches added a hasClass method. closes #1464 2014-09-29 15:46:18 -07:00
Gary Katsevman
53ea60cd06 fixes #1512, fixes #1507
On ended, pause player if not paused or looping
IE11 (and maybe other browsers as well) only fire 'ended' event when the
video ends and doesn't fire pause. This makes IE11 not reset it's state
into a paused state that allows a user to replay immediately. However, a
two clicks on the play/pause button will allow you to replay.
In Chrome, we get first a pause event and then an ended event. When
'loop' is set, neither the last pause nor ended fire.
In the flash tech, the pause and ended events fire like in chrome in all
browsers.

Add tests for onEnded change

Appease jshint.
2014-09-16 14:53:46 -07:00
Steve Heffernan
5abff360cc Added back missing deprecated fullscreen functions, and fixed a warning from using a deprecated method internally.
fixes #1451
2014-09-05 14:33:27 -07:00
David LaPalomento
eec1fc13fe Move language methods into externs
Trying to create a player-like subclass of component requires overriding languages() but that method was being minified. Add it to externs so that it can be overridden after minification. Fixes #1420.
2014-09-05 13:50:13 -07:00
David LaPalomento
b9181ee55b Make sure the error property is set before proxying through the tech.
Some error events don't cause the error property on the video element to be set. In that case, handle the event like any other. Fixes #1465.
2014-09-05 13:36:50 -07:00
David LaPalomento
d385f8257f Fixes #1481
Clear out pending errors on player disposal.
Source selection errors are dispatched asynchronously so that there is an opportunity to override the error message. If the player is disposed during that period, the error timeout wasn't being cleared properly. Fix for #1480.

Fix whitespace
When defining variables inline with declarations, stick to one variable per line.
2014-09-05 13:32:15 -07:00
Steve Heffernan
7d4b26625f Fixed a broken playbackRate test on Android 2.3 2014-09-02 17:38:11 -07:00
Steve Heffernan
16640274d7 Merge branch 'hotfix/error-timeout-squashed' of github.com:mmcc/video.js into mmcc-hotfix/error-timeout-squashed 2014-09-02 16:43:01 -07:00
Steve Heffernan
f3925c7364 Changed to feature prefix over suffix to make it read more as a boolean 2014-09-02 16:22:43 -07:00
Steve Heffernan
c90d7d36f6 Merge branch 'media-tech-features2' of github.com:gkatsev/video.js into gkatsev-media-tech-features2 2014-09-02 16:11:26 -07:00
Steve Heffernan
a6fa0dcc80 Merge branch 'the-N-Zone' of github.com:gkatsev/video.js into gkatsev-the-N-Zone 2014-09-02 12:50:10 -07:00
Matthew McClure
e72d682028 added timeout fix and tests. 2014-09-02 12:39:08 -07:00
Gary Katsevman
599217f158 Update tests to grab/restore progressEventsFeature 2014-09-02 14:57:29 -04:00
Gary Katsevman
7caa2fc1a7 Append Feature to 'features'. Update tests. 2014-09-02 14:46:19 -04:00
Gary Katsevman
df1944e9ff NaN & null should be treated as 0 in dimension()
When dimension() receives a NaN or null value for the number, it will
treat it as zero.
Updated tests to reflect that as well.
2014-09-02 14:37:42 -04:00
Steve Heffernan
82aa55795e Removed html5Mock var declarations and fixed whitespace 2014-09-02 11:04:30 -07:00
Steve Heffernan
7c27add29d Merge branch 'issue-1408' of github.com:glencoesoftware/video.js into glencoesoftware-issue-1408 2014-09-02 11:00:36 -07:00
Andreas Knab
c4b4ebea4a Remove unneeded html5Mock 2014-08-28 12:28:07 +02:00
Steve Heffernan
537ae2b805 Merge pull request #1435 from dmlap/test-manual-tracking
Add test for manual time tracking and dispose
2014-08-27 13:26:48 -07:00
Gary Katsevman
68ad48d8e8 Ignore null, undefined, and NaN is dimension()
Add vjs.isNaN to have a better cross browser isNaN checker.
Previously, only undefined was ignored, so, it tried setting the
dimension using null and NaN as values. In most browsers this isn't a
problem, but in particular on IE8, things break.
With this PR, all three of those values will be ignored.
2014-08-25 18:41:33 -04:00
Andreas Knab
49f58e0bbd Switch to sinon fake timers 2014-08-25 16:42:58 +02:00
Andreas Knab
f716807852 Add test cases for default and disabled timeout 2014-08-25 11:35:06 +02:00
Andreas Knab
6d65871cb0 Add simple inactivityTimeout test 2014-08-25 11:28:52 +02:00
Tom Johnson
c19a3f3f48 add fix for localization of not supported message
add base documentation for language support

typo fix

added utility function for adding languages per conversation with @heff. Includes test.

move addLanguage to core. update both core and util tests. added export property

added language sandbox for demo

fix comment

doc udpate

remove build instructions

add addLanguage API to doc

fix deep merge in test

test update

update local reference to string for compiled tests
2014-08-20 15:04:30 -07:00
David LaPalomento
a1eb8dd975 Add test for manual time tracking and dispose
Make sure time and progress event synthesis is turned off after the tech is disposed.For #1431.
2014-08-20 14:39:02 -04:00
Steve Heffernan
487c05628c Fixed console log tests that were breaking in IE8 2014-08-14 16:15:13 -07:00
David LaPalomento
f037818656 Don't dynamically turn off progress events
The major browsers that support HTML video now reliably support progress events, so don't worry about synthesizing them for HTML anymore.
2014-08-14 15:08:54 -07:00
David LaPalomento
f4ce62d4b1 Move manual events into tech controller
Migrate the timers that manage creating timeupdate and progress events when the tech doesn't support them natively. Now, techs that extend MediaTechController will continue to automatically pick up synthetic playback and buffering events but they're scoped much more closely to the entity that needs them. In addition, time and progress tracking have been moved much earlier into the component initialization which fixes #1414.
2014-08-14 15:08:37 -07:00
Steve Heffernan
7ea1d8f544 Modified language json structure to not include the code.
Also removed languages from being combined with core until we add the ability to choose languages.
2014-08-05 17:48:00 -07:00
Tom Johnson
6b612d8cdc Added localization support. closes #1360 2014-08-05 17:48:00 -07:00
Steve Heffernan
527a33a252 Maded some revisions to videojs/video.js#1369
closes #1369
2014-08-04 15:53:28 -07:00
Steve Heffernan
b3bbb17dd4 Restore the original video tag attributes on a tech change
set attributes of video tag and not only values

add unsupported attribute to the video tag - test failing

helper to set attributes on an element from a map of values

dummy compare of html content with a sort of the attributes

ignore html attributes order for comparition

save original tag attributes

restore original tag attributes n creation and overwrite if required by settings

replace object.keys with vjs.obj.each for ie<9

fix spacing

API consistency, getAttributeValues renamed to getElementAttributes

clear variable naming

move setElementAttributes close to getElementAttributes
2014-08-04 15:47:56 -07:00
Steve Heffernan
624bf16070 Merge branch 'master' into fix-flash-ready
Conflicts:
	src/js/media/flash.js
	test/unit/flash.js
2014-07-28 17:27:29 -07:00
Steve Heffernan
ae90526f2c Merge branch 'hotfix/flash-dispose' of github.com:dmlap/video-js into dmlap-hotfix/flash-dispose 2014-07-28 16:10:47 -07:00
Steve Heffernan
34ad720626 Merge branch 'data-attributes' of github.com:gkatsev/video.js into gkatsev-data-attributes 2014-07-28 15:00:09 -07:00
Steve Heffernan
f6ba25ddf6 Made the swf account for being ready after the tech was disposed 2014-07-16 14:01:01 -07:00
David LaPalomento
a77e39f342 Set this.el_ directly instead of using another variable
The flash tech doesn't need to hold onto a reference to the placeholder element after the embed code has been generated. Set this.el_ to the embed code immediately instead of using another property to track it during init. Tested in IE8.
2014-07-10 17:17:53 -04:00
David LaPalomento
da19fa3ead Track the object element during init and remove it if the tech is disposed before onReady. For #1339.
If dispose() was called before the SWF triggered onReady(), the placeholder div would be cleaned up but the actual object element would be left behind to mess things up in the future. Keep track of the object element during initialization and make sure it is removed if flash is unloaded early.
2014-07-09 16:29:30 -04:00
themicp
392cbda095 Added support for listening to multiple events through a types array. closes #1231 2014-07-08 11:51:47 -07:00
Gary Katsevman
c9b1217e10 Copy over data attrs from video el to wrapper el. 2014-07-01 15:10:45 -04:00
Steve Heffernan
595a6131c1 Added tests for cue times with flags 2014-06-13 13:41:23 -07:00
Troy Brandt
bb50466733 Fixed issues around webvtt cue time parsing. Fixed #877, fixed #183.. closes #1236 2014-06-13 13:30:16 -07:00
shmulik
6d78c95bb4 Added cross-browser isArray for cross-frame support. fixes #1195. closes #1218 2014-06-12 15:24:46 -07:00
Steve Heffernan
9d311640b1 Merge branch 'stable'
Conflicts:
	dist/video-js/video-js.css
	dist/video-js/video-js.min.css
	dist/video-js/video.dev.js
	dist/video-js/video.js
2014-06-10 16:59:17 -07:00
Steve Heffernan
71c0a72717 Fixed an issue with the firstplay event not firing when autoplaying. closes #1271 2014-06-10 16:55:08 -07:00
Steve Heffernan
aedaa17e3c Added tests for cue time parsing, including for #183 (test-only) 2014-05-21 17:28:18 -07:00
Steve Heffernan
e3e836f41e Added tests for cue parsing, including tests for #877 2014-05-21 16:50:58 -07:00
Gary Katsevman
3189ec1a0b Added cross-browser testing with SauceLabs, and added Karma as the default test runner. closes #1187 2014-05-16 14:48:05 -07:00
Steve Heffernan
46aa551e1e Modernized the fullscreen API and added support for IE11. fixes #1155 closes #1205 2014-05-15 14:46:28 -07:00
Artem Suschev
8dfe0a4d06 Added support for playbackRate switching. closes #1132 2014-05-13 14:02:02 -07:00
Erik Skogby
047bd8f618 Made vjs.get work with xDomain in IE < 10. closes #1095 2014-05-13 12:35:40 -07:00
Steve Heffernan
d7f840a969 Better error handling. closes #1197
Squashed commit of the following:

commit 81d785980d
Author: Steve Heffernan <steve@zencoder.com>
Date:   Mon May 12 12:53:59 2014 -0700

    Removed unneeded comments

commit c7ad7322e4
Author: Steve Heffernan <steve@zencoder.com>
Date:   Fri May 9 14:29:31 2014 -0700

    Addressed comments in #1191
    Now clearing errors on loadstart events.
    Added some default error messages.

commit a742239d0e
Author: Steve Heffernan <steve@zencoder.com>
Date:   Wed May 7 15:38:31 2014 -0700

    Fixed the error display to hide by default

commit 561c3f8449
Author: Steve Heffernan <steve@zencoder.com>
Date:   Mon May 5 10:44:47 2014 -0700

    Added support for displaying a message for the error.

commit 2214207842
Author: Steve Heffernan <steve@zencoder.com>
Date:   Fri May 2 17:18:22 2014 -0700

    Updated spinner to hide on all errors

commit 95d7e70274
Author: Steve Heffernan <steve@zencoder.com>
Date:   Fri May 2 15:37:44 2014 -0700

    Exported ErrorDisplay

commit 11ca9cdd8d
Author: Steve Heffernan <steve@zencoder.com>
Date:   Fri May 2 15:35:46 2014 -0700

    Updated flash tech to support new errors

commit 56cbe66f42
Author: Steve Heffernan <steve@zencoder.com>
Date:   Fri May 2 13:06:49 2014 -0700

    Started on better error handling and displaying in the UI when an error has occurred.

commit 740014c57b
Author: Steve Heffernan <steve@zencoder.com>
Date:   Wed Apr 30 16:11:33 2014 -0700

    Added better global log/error/warn functions.
    Added sinon.js for stubs in tests.
    Updated grunt version to satisfy peer dependency warning.
2014-05-12 17:08:48 -07:00
Chris Fung
1df28ff311 Fixed the default flag for captions/subtitles tracks. closes #1153 closes #656 2014-05-07 14:59:01 -07:00
Jon Zepernick
dbff62e3f0 Made tap events on mobile less sensitive to touch moves. closes #1111 2014-05-06 17:22:29 -07:00
Steve Heffernan
27f0f789e0 Updated to match comments in #1093 2014-05-05 17:11:14 -07:00
Steve Heffernan
3e5ef19212 Merge branch 'master' of github.com:Akkuma/video.js into Akkuma-master
Conflicts:
	src/js/lib.js
2014-05-05 16:34:15 -07:00
Steve Heffernan
46605739e2 Merge branch 'feature/fix-menu-title' of github.com:coursera/video.js into coursera-feature/fix-menu-title 2014-04-17 22:55:16 -07:00
Jon Wong
9d258742c5 Adjusting menu to use title given in options 2014-04-03 23:35:15 -07:00
Jon Wong
35d7258973 Merge branch 'feature/fix-menu-title' of git://github.com/coursera/video.js into coursera-feature/fix-menu-title 2014-04-03 14:26:38 -07:00
Matthew McClure
95c29e684f Reset player on source change. closes #1050 closes #1124 2014-04-03 11:16:09 -07:00
Jon Wong
c7e35e51de Making sure that the title element gets placed into the UL element
Included are two sanity check tests for the two areas being checked
to make sure that the menu title items are being correctly placed
in the actual UL element of the menu.

Fixes #1107
2014-04-01 22:32:14 -07:00
Steve Heffernan
af50b8ee29 Fixed canPlaySource export that got lost in last release 2014-03-27 14:25:58 -07:00
Steve Heffernan
e8d36e0fab Exported upatchCanPlayType and moved tests to api.js 2014-03-27 13:24:03 -07:00
Steve Heffernan
a9ad77aa00 Removed a low value test that was causing a hang in testing 2014-03-27 11:53:06 -07:00
Steve Heffernan
88403221a9 Fixed canPlayType patch tests on Android 2014-03-27 11:19:21 -07:00
Steve Heffernan
74c73969cd Merge branch 'gkatsev-defaultprevented' 2014-03-26 14:45:53 -07:00
Steve Heffernan
2c12ed98a7 Merge branch 'defaultprevented' of git://github.com/gkatsev/video-js into gkatsev-defaultprevented 2014-03-26 14:32:50 -07:00
Gary Katsevman
e39557e790 Always unpatch canPlayType.
Fix up tests to not ignore some if canPlayType is not available since
unpatch is no longer broken.
2014-03-26 16:59:04 -04:00
Gary Katsevman
e2a1cac136 fix typo for unpatchCanPlayType 2014-03-26 16:58:49 -04:00
Gary Katsevman
d21019ad78 add existence test for patch and unpatch methods 2014-03-26 16:39:11 -04:00
Gary Katsevman
94ec725a66 update for IE8 and fixup stupid tests 2014-03-26 14:58:36 -04:00
Gary Katsevman
fef6282d55 remove unused var 2014-03-26 13:49:21 -04:00
Gary Katsevman
0c856ce9a4 call unpatchCanPlayType after tests 2014-03-25 15:32:03 -04:00
Gary Katsevman
817253b74f Also, switch out HTMLVideoElement to constructor reference in tests 2014-03-24 19:07:19 -04:00
Gary Katsevman
86c3f94c87 fix up jshint errors 2014-03-24 18:00:00 -04:00
Gary Katsevman
d48d6cf99d add a test 2014-03-24 17:56:02 -04:00
Gregory Waxman
204bb84ecb Array traversing for children opts - closes #1070 2014-03-18 15:49:59 -04:00
Gary Katsevman
5381f70d1c + vjs.Html5.{patchCanPlayType,unpatchCanPlayType}
patchCanPlayType is called on load.
It patched video#canPlayType if needed.
unpatchCanPlayType will revert the patch and return the patch function.
There are also corresponding tests that test patchCanPlayType,
unpatchCanPlayType and also whether the patch functions themselves work
correctly.
2014-03-17 20:47:47 -04:00
Steve Heffernan
a64a5e27cf Merge branch 'stable'
Conflicts:
	dist/video-js/video-js.css
	dist/video-js/video-js.min.css
	dist/video-js/video.dev.js
	dist/video-js/video.js
2014-03-06 13:18:49 -08:00
Steve Heffernan
2005fe2136 Exporting tech.setPoster(). Fixes #1028 2014-03-05 16:08:49 -08:00
Steve Heffernan
7c772fbf3e Merge branch 'bugfix/src-getter' of git://github.com/dmlap/video-js into dmlap-bugfix/src-getter
Conflicts:
	src/js/media/flash.js
2014-03-04 11:24:10 -08:00
Steve Heffernan
e9da3350d4 Made the src method return the player when setting, and made Flash return the current srouce for flash.src() 2014-02-27 17:34:01 -08:00
Steve Heffernan
8c59405d86 Added missing files from standard test suite 2014-02-10 17:14:46 -08:00
Steve Heffernan
7ade43d91d Merge branch 'bugfix/lastseek-cleanup' of git://github.com/dmlap/video-js into dmlap-bugfix/lastseek-cleanup 2014-02-10 16:17:30 -08:00
Steve Heffernan
1b45195f9d Close GH-981: Stopped component's dispose event from bubbling up. 2014-02-06 17:11:33 -08:00
Steve Heffernan
ef1b239b2a Removed unneeded option in tests 2014-02-06 16:58:25 -08:00
Steve Heffernan
4521c70173 Changed enableUserActivity to enableTouchActivity
Added back tracking of touch+hold
2014-02-06 16:54:35 -08:00
Gary Katsevman
9975ed407a Don't enable enableUserActivity on an option 2014-02-06 15:59:57 -05:00
Gary Katsevman
44d6cac1b7 Test is for tap events and not user activity 2014-02-05 20:58:30 -05:00
David LaPalomento
7184cb4b49 src() called as a getter should return the video src
It can be handy that src() returns the player object when it is invoked but it does not match the behavior of the corresponding property on the video element. Ignoring the spec however, while the video element is running the resource selection algorithm, currentSrc may be undefined. If the video source has been specified through an attribute on the video element, src() is the natural way to expose that URL programmatically. Without this change, it's necessary to bypass the player and interact with the tech directly to determine the value of the src attribute.
2014-01-25 23:16:35 -05:00
Steve Heffernan
a8afe9c673 Merge pull request #906 from heff/feature/more-exports
Added missing component exports
2014-01-23 16:45:27 -08:00
David LaPalomento
ff1c9c5cf0 Fix touch detection test on non-touch devices
TOUCH_ENABLED is false on non-touch devices which causes our minified API test to fail when opened in a browser on a traditional destktop machine. It worked fine through the command line because apparanetly phantomjs supports touch events (ha!). Check to make sure the property is not undefined instead.
2014-01-23 18:28:46 -05:00
David LaPalomento
dd8c25e8d5 Store last seek time in the Flash tech
Instead of caching the last seek time at the player level, cache it in the Flash tech. The only place this value was used was in the progress controls when Flash was loaded, so this simplifies the logic in that component and pushes the hack down into a single location at least.
2014-01-23 18:19:15 -05:00
Steve Heffernan
024b031646 Added missing component exports. fixes #903 2013-12-18 17:53:43 -08:00
Steve Heffernan
166cc9c1ef Close GH-878: Moved player exports to externs. 2013-12-09 16:16:09 -08:00
Steve Heffernan
15a0d7dbb6 Added note to fullscreen externs test 2013-12-02 17:31:18 -08:00
Steve Heffernan
c23ca5200c Merge branch 'hotfix/player-externs' of git://github.com/dmlap/video-js into dmlap-hotfix/player-externs
Conflicts:
	Gruntfile.js
2013-12-02 17:29:34 -08:00
Steve Heffernan
522f45f458 Exported util namespace and mergeOptions 2013-12-02 17:11:08 -08:00
Steve Heffernan
2aa09fd15a Close GH-862: Add util namespace. 2013-12-02 17:03:32 -08:00
David LaPalomento
1cab78347d Close GH-845: Move player id generation. 2013-12-02 15:29:41 -08:00
Steve Heffernan
0cbe95d615 Added a test for the posterImage source getter 2013-12-02 08:11:22 -08:00
Steve Heffernan
ef0d63b5ba Modified tests for #838 and updated changelog. closes #838 2013-11-26 16:53:23 -08:00
David LaPalomento
c69290c39f Don't use minifiable player methods in fullscreenToggle
Use string literals to lookup fullscreen-related methods on the player object in the fullscreenToggle component. Otherwise, closure compiler replaces them with minified method names and makes it impossible to supply a simpler "player" object with customized fullscreen logic for the fullscreenToggle to interact with.
2013-11-26 18:46:08 -05:00
David LaPalomento
cb9447b2c3 Fix typo in test description
availble -> available
2013-11-26 18:45:58 -05:00
David LaPalomento
875fc2ff32 Allow poster to be changed after init. Fixes #525
When poster() is called with a URL, fire a `posterchange` event to update the PosterImage source and update the video element attribute.

Trigger posterchange after updating the tech
Wait until the tech has updated its poster image before alerting components so they don't see the intermediate state in event handlers. Remove unused variable from PosterImage.createEl.

Don't create new img elements each time the poster is set on ie8
Create the img fallback for the poster during PosterImage initialization on ie8 so we can avoid having to check and possibly create it each time the src is set. Add a test to ensure that new elements are not appended to the poster component when the img fallback is in use and the src attribute is modified.

fixing a broken IE8 test, and adding a negative test, for poster switching.

modified the poster-switching test to accomodate IE8
added a negative test for an undefined poster

fixed the assertion message in the 'undefined' image case

fixed test breakage in Firefox and IE10 (quotes were not being handled properly in the test data)

testing:
ran the tests at the command line, and in Chrome, Firefox, IE8, IE10, Firefox and Safari
all passed
2013-11-25 14:49:49 -08:00
Matthew McClure
4c6a12898b Close GH-805: Flash - ignore codec info - added tests for #785. 2013-10-29 11:00:54 -07:00
Steve Heffernan
3203c2c5ed Merge branch 'stable' 2013-10-15 13:39:32 -07:00
Steve Heffernan
14193c4308 Close GH-776: hotfix: source and duration loading after video element init. Fixes #756, Fixes #775 2013-10-15 13:38:48 -07:00
Gary Katsevman
c5a8cff129 Expand TOUCH_ENABLED and expose it publically 2013-10-09 15:32:01 -04:00
Steve Heffernan
7b73c2725e Added back in reverted #630 2013-09-04 13:33:27 -07:00
Steve Heffernan
8f53e514de Merge branch 'stable' of github.com:videojs/video.js into stable 2013-09-04 13:30:36 -07:00
Steve Heffernan
efe7a12ccb Fixed IE8 tests and flaky fonts 2013-09-04 11:48:19 -07:00
Steve Heffernan
f146ebb179 Fixed the getAttributes test in ie8, which reports all attrs, whether or not they were set 2013-09-03 11:27:50 -07:00
Steve Heffernan
72bf48cf36 Fixed the custom fallback message test which would break when ie8 capitalized tag names 2013-09-03 10:48:48 -07:00
Steve Heffernan
4772e4680b Merge branch '636-incompatible' of git://github.com/jelbourn/video.js into jelbourn-636-incompatible
Conflicts:
	test/unit/player.js
2013-08-27 10:26:32 -07:00
Steve Heffernan
26cc24c59d Merge branch 'export-addremove-class' of git://github.com/theonion/video.js into theonion-export-addremove-class
Conflicts:
	src/js/exports.js
	test/unit/api.js
2013-08-26 16:40:40 -07:00
Steve Heffernan
acb4a43d8a Minor modifications to #627 2013-08-26 16:23:33 -07:00
David LaPalomento
f515ac0236 Close GH-627: Use dashes to format invalid times. 2013-08-26 16:13:54 -07:00
Steve Heffernan
6418531d0c Merge pull request #702 from dmlap/feature/expose-volume-menu
Feature/expose volume menu
2013-08-26 08:54:39 -07:00
Steve Heffernan
92d16d6409 Close GH-705: Changed tech.feature keys to strings to support external techs. closes #466. 2013-08-25 18:50:59 -07:00
Jeremy West
7ab3d190f2 Close GH-605: added RTMP support. fixes #559. 2013-08-23 15:05:04 -07:00
David LaPalomento
29668ec45b Fix issue with fractional computed dimensions on Chrome
Chrome 29 on OS X (at least) seems to report fractional dimensions occasionally when integer values are assigned. For example, '123px' might be translated to '123.999998458px'. Parse the value and round it to ignore this slight discrepancy.
2013-08-23 14:16:53 -04:00
David LaPalomento
bd18f5b25f Export VolumeMenuButton
Add the volumemenubutton to the list of unminified properties for gcc. Create a test case to verify it doesn't get accidentally removed at some point.
2013-08-23 14:15:58 -04:00
Andy Niccolai
02de927043 Close GH-672: Control bar updates. Fixes #556, Fixes #500, Fixes #374, Fixes #403, Fixes #441, Fixes #193, Fixes #602, Fixes #561, Fixes #281 2013-08-09 14:29:22 -07:00
Jeremy Elbourn
20e2d4e984 Merge branch 'master' of https://github.com/videojs/video.js into 636-incompatible 2013-08-05 14:23:05 -04:00
Sean Bloomfield
f7a72b1f20 exporting addClass and removeClass. added api existence tests for fadeIn,fadeOut,addClass,removeClass 2013-07-30 15:58:00 -05:00
Steve Heffernan
9030a5655e Revert "Close GH-630: prevent default action for simple html5 media events. fixes #573, fixes #620 (duplicate bug)."
This reverts commit 15544c3d05.
2013-07-30 11:31:33 -07:00
Steve Heffernan
699c476575 Merge pull request #660 from videojs/stable
Close GH-630: prevent default action for simple html5 media events. fixe...
2013-07-30 11:25:07 -07:00
Cameron Tangney
15544c3d05 Close GH-630: prevent default action for simple html5 media events. fixes #573, fixes #620 (duplicate bug). 2013-07-30 11:12:30 -07:00
Jeremy West
a449cb043a Close GH-614: added dispose event. fixes #613. 2013-07-18 14:39:14 -07:00
Jeremy Elbourn
918ee040e1 Allow setting a custom incompatible video message. fixes #636 2013-07-12 16:05:25 -04:00
Steve Heffernan
9f647ef081 Fixed an issue where the tag player reference wasn't getting killed in the minified version 2013-06-28 15:42:47 -07:00
Steve Heffernan
1ddef27903 Close GH-588: Export bufferedPercent. 2013-06-24 12:47:47 -07:00
Steve Heffernan
d5d97bd64f Close GH-560: Export global players object. 2013-06-05 10:27:38 -07:00
Steve Heffernan
f6bd819c5c Close GH-555: Export requestFullScreen(). 2013-06-03 13:19:46 -07:00
Steve Heffernan
753ce48e21 Close GH-546: Fix for exit-fullscreen bug in 4.0. fixes #497. 2013-05-28 15:29:42 -07:00
Steve Heffernan
94c07756dc Updated docs. Changed _V_ to videojs. 2013-05-09 09:23:32 -07:00
Steve Heffernan
d54f473670 Wrote a test for controls changes. 2013-05-02 17:15:37 -07:00
Steve Heffernan
4f319a2174 Fixed muted errors in tests from previous pull request. Removed error captureing that was preventing test breakage. 2013-05-02 17:07:05 -07:00
Steve Heffernan
fa79564802 Merge pull request #477 from gkatsev/verticalSlider
Vertical slider
2013-05-01 16:13:00 -07:00
Gary Katsevman
fc96ef68ac fix jshint errors 2013-05-01 13:02:05 -04:00
Gary Katsevman
b36665ebcd Add a few tests for vjs.findPosition 2013-05-01 12:03:10 -04:00
Steve Heffernan
f0d3680fe4 Added an optional contentEl for compontents.
This allows you to define a different element to append children to as opposed to the main component element. Because sometimes components require more than one element to create their structure. e.g. a menu button.
2013-04-30 17:27:36 -07:00
Gary Katsevman
a8e87f80ed Make slider use changedTouches if available. Also, test to make sure we get the correct ratio for calculateDistance 2013-04-22 13:57:42 -04:00
Steve Heffernan
3b48be921e First pass at automated multi-browser/device testing. closes #419
I've got a way to run tests across every browser and device out there except for IE8, and IE8 should work except I'm running into a Browserstack bug that I've let them know about.

It uses a project called bunyip, which internallt uses Yeti (YUI), Pagekite, and Browserstack.

Next steps include:
  - Making it all automatic. Right now you have to wait for browsers to connect and then manually hit enter when they have.
  - Make it a grunt task
  - Document it all so others can use it

I think this is close enough for me to close the milestone 4.0 issue.
2013-04-12 16:51:04 -07:00
Steve Heffernan
2138d4f2a0 Close GH-425: Backing out goog.inherits and adding back the previous inheritance API. fixes #415. 2013-04-09 13:43:35 -07:00
Benoit Tremblay
3a32f44f23 Close GH-432: Additional exports for external techs. 2013-04-09 13:18:55 -07:00
Steve Heffernan
c74f39318f Updated grunt and grunt-contrib versions to fix PhantomJS bug
Also changed some additional code to fix new jshint issues found by new jshint version.
2013-04-09 10:42:41 -07:00
Steve Heffernan
dbd02fb05a Close GH-437: Made IE updates from CorwinT. Closes #309. Closes #364.. 2013-04-08 16:23:41 -07:00
Steve Heffernan
78a74536e5 Merge pull request #360 from mente/minified
correctly expose ready and dispose in minified version
2013-04-05 15:04:21 -07:00
Steve Heffernan
496fa982e0 Merge pull request #426 from dmlap/feature/poster-attribute
Do not remove poster attribute when creating the player
2013-04-04 16:03:25 -07:00
David LaPalomento
6f5e49fc16 Use accessors to transfer the poster attribute
When transferring the poster attribute from the container to the tech in mediafaker, use the accessor methods instead of directly referencing the private properties.
2013-04-04 18:56:52 -04:00
David LaPalomento
99a973e529 Do not remove poster attribute when creating the player
We use a div with a background image to simulate the poster image so that we can use a single poster implementation for flash and html. It may be desirable on some platforms to use the native poster image, however. On iPhones for instance, the simulated poster image covers up the native play button and can make it difficult to figure out where to touch to initiate playback. By keeping the poster attribute on the underlying video element, you can hide the simulated poster to get a native look-and-feel on that platform.
2013-04-04 09:55:27 -04:00
David LaPalomento
65687aa3d0 Rename vjs-disabled to vjs-hidden
Disabled is a bit overloaded with visible but unusable controls, so use hidden instead. Re-arrange default styles a bit and use dom helper methods instead of the vjs-objection functions.
2013-04-02 16:17:30 -04:00
David LaPalomento
cf52750a57 Update tests
Check for the presence of `vjs-disabled` instead of whether the display is set to none for volume and mute control tests.
2013-03-24 18:51:09 -04:00
Steve Heffernan
8bc5fb055e Merge branch 'master' of github.com:zencoder/video-js 2013-03-09 13:19:16 -08:00
Steve Heffernan
d147b1ae2f Merge branch 'optional_resize' of git://github.com/mente/video-js into mente-optional_resize closes #359
Conflicts:
	test/unit/component.js
2013-03-09 13:18:07 -08:00
Alex Vasilenko
a3b9b50e8b vjs.Component.dimension accepts 'auto' as value
test case for vjs.Component.dimension with 'auto'
2013-03-09 10:39:28 +02:00
David LaPalomento
7e0ee0c799 Fix minified property access
Use a string literal to reference the tech's player property so the access isn't mangled by closure.
2013-03-08 10:13:01 -05:00
David LaPalomento
0ba7166636 Fixes #367
If you are quick, you could get videojs to wrap the HTML video element twice on iOS. The video element has to be recreated after moving on iOS but we weren't re-associating it with the player object. When autoSetup swung through, it would re-initialize the video element and create a player within a player.
2013-03-07 20:57:52 -05:00
Alex Vasilenko
e1409f8972 minified lib files renamed to minified api 2013-03-07 23:24:52 +02:00
David LaPalomento
888f04484a Remove phantom UA check
The volume controls and mute toggle are guarding against not having a tech present, so it's no longer necessary to mock the tech for all command-line tests. Individual tests continue to do so using PlayerTest.makePlayer.
2013-03-06 09:45:18 -05:00
David LaPalomento
f1e90d65f2 Block defineSetter test for older IE
__defineSetter__ doesn't work on some versions of IE, so just ignore the volume/mute toggle tests when run on those browsers.
2013-03-05 18:07:35 -05:00
Alex Vasilenko
1bceadf094 expose correct dispose method
testcase for correct dispose method
2013-03-05 23:23:01 +02:00