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
Squashed commit of the following:
commit 02fe7a40d0
Author: Gary Katsevman <git@gkatsev.com>
Date: Tue Sep 23 14:15:08 2014 -0400
Feature detect old fullscreen instead of UA switch
commit f3eccbbe67
Author: Gary Katsevman <git@gkatsev.com>
Date: Mon Sep 22 21:31:34 2014 -0400
No need for if since assume we're in fs
commit 0498b10084
Author: Gary Katsevman <git@gkatsev.com>
Date: Mon Sep 22 21:28:10 2014 -0400
Revert "Don't trigget vjs's fullscreenchange event"
This reverts commit cc45177ee5.
Conflicts:
src/js/media/html5.js
commit 1ed30853ef
Author: Gary Katsevman <git@gkatsev.com>
Date: Wed Sep 17 12:00:29 2014 -0400
Listen via 'this.one'.
Don't bother checking whether the video element is fullscreen but just
assume we are fullscreen.
commit 27e2707508
Author: Gary Katsevman <git@gkatsev.com>
Date: Tue Sep 16 18:12:36 2014 -0400
Use one for event binding.
commit cc45177ee5
Author: Gary Katsevman <git@gkatsev.com>
Date: Mon Sep 15 17:28:46 2014 -0400
Don't trigget vjs's fullscreenchange event
This event isn't really being used for this usecase right now, so, no
need to trigger it.
commit ad505a6807
Author: Gary Katsevman <git@gkatsev.com>
Date: Mon Sep 15 16:45:48 2014 -0400
Update exports for request & cancel fullscreen
commit e423635b6c
Author: Gary Katsevman <git@gkatsev.com>
Date: Mon Sep 15 16:15:10 2014 -0400
On iOS, use ios specific enterFullscreen methods.
commit fe4a8fbf6a
Author: Gary Katsevman <git@gkatsev.com>
Date: Mon Sep 15 14:53:20 2014 -0400
Export isFullScreen correctly. Export isFullscreen as well.
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
closes#1334
Update html5.js
If the HTML tag is not removed, the video will still download in the background in Firefox after the player is disposed.
Update component.js
Moved my fix to src/js/media/html5.js
Changed order of html5 element dispose and using this.el_ instead of player.tag
Previously this was only done in the HTML5 tech, but Flash needs it as well. This relies on videojs/video-js-swf#106.
Also removed the 'not implemented' warnings from the media tech functions. I think there's a better way we can help tech authors here, and it was blocking the ability to check if a function was implemented for real.
Fixes#1300, fixes#1341
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.
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.
Android devices starting with 4.0 can play HLS natively to some extent.
However, they do not say so in the canPlayType method. This commit
monkey patches canPlayType to respond with "maybe" for
"application/x-mpegURL" and "application/vnd.apple.mpegURL". Otherwise,
it'll fallback to the original canPlayType method.
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