|
142 | 142 | this.fallback = fallback; |
143 | 143 | } |
144 | 144 | } |
145 | | - |
| 145 | + |
146 | 146 | if ($(media).data('test-fallback') !== undefined && $(media).data('test-fallback') !== "false") { |
147 | 147 | this.testFallback = true; |
148 | 148 | } |
|
571 | 571 | if (this.debug && this.player) { |
572 | 572 | console.log ('Using the ' + this.player + ' media player'); |
573 | 573 | } |
574 | | - |
575 | 574 | // First run player specific initialization. |
576 | 575 | if (this.player === 'html5') { |
577 | 576 | playerPromise = this.initHtml5Player(); |
|
627 | 626 | }; |
628 | 627 |
|
629 | 628 | AblePlayer.prototype.initJwPlayer = function () { |
| 629 | + |
| 630 | + var jwHeight; |
630 | 631 | var thisObj = this; |
631 | 632 | var deferred = new $.Deferred(); |
632 | 633 | var promise = deferred.promise(); |
|
794 | 795 | AblePlayer.prototype.getPlayer = function() { |
795 | 796 | // Determine which player to use, if any |
796 | 797 | // return 'html5', 'jw' or null |
797 | | - |
798 | 798 | var i, sourceType, $newItem; |
799 | 799 | if (this.youtubeId) { |
800 | 800 | if (this.mediaType !== 'video') { |
|
806 | 806 | } |
807 | 807 | else if (this.testFallback || |
808 | 808 | ((this.isUserAgent('msie 7') || this.isUserAgent('msie 8') || this.isUserAgent('msie 9')) && this.mediaType === 'video') || |
809 | | - (this.isIOS() && !this.isIOS(7))) { |
| 809 | + (this.isIOS() && (this.isIOS(4) || this.isIOS(5) || this.isIOS(6))) |
| 810 | + ) { |
810 | 811 | // the user wants to test the fallback player, or |
811 | | - // the user is using IE9, which has buggy implementation of HTML5 video |
812 | | - // e.g., plays only a few seconds of MP4 than stops and resets to 0 |
813 | | - // even in native HTML player with no JavaScript |
814 | | - // Couldn't figure out a solution to this problem - IE10 fixes it. Meanwhile, use JW for IE9 video |
| 812 | + // the user is using an older version of IE or IOS, |
| 813 | + // both of which had buggy implementation of HTML5 video |
815 | 814 | if (this.fallback === 'jw') { |
816 | 815 | if (this.$sources.length > 0) { // this media has one or more <source> elements |
817 | 816 | for (i = 0; i < this.$sources.length; i++) { |
|
5695 | 5694 | // add listeners for JW Player events |
5696 | 5695 | this.jwPlayer |
5697 | 5696 | .onTime(function() { |
5698 | | - console.log('a'); |
5699 | 5697 | thisObj.onMediaUpdateTime(); |
5700 | | - console.log('b'); |
5701 | 5698 | }) |
5702 | 5699 | .onComplete(function() { |
5703 | | - console.log('c'); |
5704 | 5700 | thisObj.onMediaComplete(); |
5705 | | - console.log('d'); |
5706 | 5701 | }) |
5707 | 5702 | .onReady(function() { |
5708 | | - console.log('e'); |
5709 | 5703 | if (thisObj.debug) { |
5710 | 5704 | console.log('JW Player onReady event fired'); |
5711 | 5705 | } |
|
5732 | 5726 | } |
5733 | 5727 |
|
5734 | 5728 | thisObj.refreshControls(); |
5735 | | - console.log('f'); |
5736 | 5729 | }) |
5737 | 5730 | .onSeek(function(event) { |
5738 | 5731 | // this is called when user scrubs ahead or back |
|
0 commit comments