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 02fe7a40d0958e2ed84a6a0cf2be43bec259c72c
Author: Gary Katsevman <git@gkatsev.com>
Date: Tue Sep 23 14:15:08 2014 -0400
Feature detect old fullscreen instead of UA switch
commit f3eccbbe678c163021d790c69c3ab365e0a1fe1a
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 0498b100843e0aa858b166d02a467e4471c126ab
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 cc45177ee5fa950e665e066d170b137aaeb6e398.
Conflicts:
src/js/media/html5.js
commit 1ed30853efb2ea043da4f18b4fdf75da15f55e88
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 27e27075083d2ad408b5d47055881b2554f59154
Author: Gary Katsevman <git@gkatsev.com>
Date: Tue Sep 16 18:12:36 2014 -0400
Use one for event binding.
commit cc45177ee5fa950e665e066d170b137aaeb6e398
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 ad505a680785d638289657aec4edad60879e945a
Author: Gary Katsevman <git@gkatsev.com>
Date: Mon Sep 15 16:45:48 2014 -0400
Update exports for request & cancel fullscreen
commit e423635b6c8ad58a1ba04e1534a51c075e08b73a
Author: Gary Katsevman <git@gkatsev.com>
Date: Mon Sep 15 16:15:10 2014 -0400
On iOS, use ios specific enterFullscreen methods.
commit fe4a8fbf6ad73b6bc8f57d16c44f0ca4d3bf9450
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 81d785980d3f3e4c1025f7b421f0ecb7320469f1
Author: Steve Heffernan <steve@zencoder.com>
Date: Mon May 12 12:53:59 2014 -0700
Removed unneeded comments
commit c7ad7322e49df9cb22665692dbfe615dfa44758f
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 a742239d0e799fa6a5fee056cc37b3c2e3ab4510
Author: Steve Heffernan <steve@zencoder.com>
Date: Wed May 7 15:38:31 2014 -0700
Fixed the error display to hide by default
commit 561c3f844956db6f532cae8ed81a86cc39b10db1
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 22142078427ead85548c4755bf1943a0a07b22b4
Author: Steve Heffernan <steve@zencoder.com>
Date: Fri May 2 17:18:22 2014 -0700
Updated spinner to hide on all errors
commit 95d7e7027467cf96b14db6692d93c7c7f41c5810
Author: Steve Heffernan <steve@zencoder.com>
Date: Fri May 2 15:37:44 2014 -0700
Exported ErrorDisplay
commit 11ca9cdd8db4d1559f5d1908c4e67be32ca7a25e
Author: Steve Heffernan <steve@zencoder.com>
Date: Fri May 2 15:35:46 2014 -0700
Updated flash tech to support new errors
commit 56cbe66f4233e54f13550367590864102f5de0fe
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 740014c57b264079cf4084965a9384b49a7c0f64
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