mirror of
https://github.com/videojs/video.js.git
synced 2025-07-15 01:34:23 +02:00
@nickygerritsen Also pass tech options to canHandleSource. closes #3303
This commit is contained in:
@ -190,16 +190,16 @@ test('native source handler canHandleSource', function(){
|
||||
|
||||
var canHandleSource = Html5.nativeSourceHandler.canHandleSource;
|
||||
|
||||
equal(canHandleSource({ type: 'video/mp4', src: 'video.flv' }), 'maybe', 'Native source handler reported type support');
|
||||
equal(canHandleSource({ src: 'http://www.example.com/video.mp4' }), 'maybe', 'Native source handler reported extension support');
|
||||
equal(canHandleSource({ src: 'https://example.com/video.sd.mp4?s=foo&token=bar' }), 'maybe', 'Native source handler reported extension support');
|
||||
equal(canHandleSource({ src: 'https://example.com/video.sd.mp4?s=foo' }), 'maybe', 'Native source handler reported extension support');
|
||||
equal(canHandleSource({ type: 'video/mp4', src: 'video.flv' }, {}), 'maybe', 'Native source handler reported type support');
|
||||
equal(canHandleSource({ src: 'http://www.example.com/video.mp4' }, {}), 'maybe', 'Native source handler reported extension support');
|
||||
equal(canHandleSource({ src: 'https://example.com/video.sd.mp4?s=foo&token=bar' }, {}), 'maybe', 'Native source handler reported extension support');
|
||||
equal(canHandleSource({ src: 'https://example.com/video.sd.mp4?s=foo' }, {}), 'maybe', 'Native source handler reported extension support');
|
||||
|
||||
// Test for issue videojs/video.js#1785 and other potential failures
|
||||
equal(canHandleSource({ src: '' }), '', 'Native source handler handled empty src');
|
||||
equal(canHandleSource({}), '', 'Native source handler handled empty object');
|
||||
equal(canHandleSource({ src: 'foo' }), '', 'Native source handler handled bad src');
|
||||
equal(canHandleSource({ type: 'foo' }), '', 'Native source handler handled bad type');
|
||||
equal(canHandleSource({ src: '' }, {}), '', 'Native source handler handled empty src');
|
||||
equal(canHandleSource({}, {}), '', 'Native source handler handled empty object');
|
||||
equal(canHandleSource({ src: 'foo' }, {}), '', 'Native source handler handled bad src');
|
||||
equal(canHandleSource({ type: 'foo' }, {}), '', 'Native source handler handled bad type');
|
||||
|
||||
// Reset test video canPlayType
|
||||
Html5.TEST_VID.canPlayType = origCPT;
|
||||
|
Reference in New Issue
Block a user