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.
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.
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.
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
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.
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
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.
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.
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.
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
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.
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.
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.
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.
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.
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
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.
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.