Changeset 179689 in webkit
- Timestamp:
- Feb 5, 2015, 5:34:41 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
Modules/mediacontrols/mediaControlsiOS.js (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r179687 r179689 1 2015-02-04 Dean Jackson <dino@apple.com> 2 3 [Media iOS] Add a debug setting to always show the optimized fullscreen button 4 https://bugs.webkit.org/show_bug.cgi?id=141277 5 <rdar://problem/19724471> 6 7 Reviewed by Eric Carlson. 8 9 Add a debug option so that we can test the optimized fullscreen 10 control on media that doesn't support it. 11 12 * Modules/mediacontrols/mediaControlsiOS.js: Add gSimulateOptimizedFullscreenAvailable. 13 (ControllerIOS.prototype.createControls): Check the setting. 14 (ControllerIOS.prototype.configureInlineControls): Ditto. 15 (ControllerIOS.prototype.formatTime): Drive-by whitespace cleanup. 16 (ControllerIOS.prototype.handleBaseGestureChange): 17 (ControllerIOS.prototype.handleWrapperTouchStart): 18 (ControllerIOS.prototype.handleOptimizedFullscreenTouchEnd): 19 (ControllerIOS.prototype.handlePresentationModeChange): Drive-by variable renaming. 20 1 21 2015-02-05 Youenn Fablet <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar <calvaris@igalia.com> 2 22 -
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js
r179612 r179689 26 26 ControllerIOS.gWirelessImage = 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 245"><g fill="#1060FE"><path d="M193.6,6.3v121.6H6.4V6.3H193.6 M199.1,0.7H0.9v132.7h198.2V0.7L199.1,0.7z"/><path d="M43.5,139.3c15.8,8,35.3,12.7,56.5,12.7s40.7-4.7,56.5-12.7H43.5z"/></g><g text-anchor="middle" font-family="Helvetica Neue"><text x="100" y="204" fill="white" font-size="24">##DEVICE_TYPE##</text><text x="100" y="234" fill="#5C5C5C" font-size="21">##DEVICE_NAME##</text></g></svg>'; 27 27 ControllerIOS.gSimulateWirelessPlaybackTarget = false; // Used for testing when there are no wireless targets. 28 ControllerIOS.gSimulateOptimizedFullscreenAvailable = false; // Used for testing when optimized fullscreen is not available. 28 29 29 30 ControllerIOS.prototype = { … … 151 152 var inlinePlaybackPlaceholder = this.controls.inlinePlaybackPlaceholder = document.createElement('div'); 152 153 inlinePlaybackPlaceholder.setAttribute('pseudo', '-webkit-media-controls-inline-playback-placeholder'); 153 inlinePlaybackPlaceholder.classList.add(this.ClassNames.hidden); 154 if (!ControllerIOS.gSimulateOptimizedFullscreenAvailable) 155 inlinePlaybackPlaceholder.classList.add(this.ClassNames.hidden); 154 156 inlinePlaybackPlaceholder.setAttribute('aria-label', this.UIString('Display Optimized Full Screen')); 155 157 … … 224 226 } 225 227 if (!this.isAudio()) { 226 if ( 'webkitSupportsPresentationMode' in this.video && this.video.webkitSupportsPresentationMode('optimized'))228 if (ControllerIOS.gSimulateOptimizedFullscreenAvailable || ('webkitSupportsPresentationMode' in this.video && this.video.webkitSupportsPresentationMode('optimized'))) 227 229 this.controls.panel.appendChild(this.controls.optimizedFullscreenButton); 228 230 this.controls.panel.appendChild(this.controls.fullscreenButton); … … 343 345 if (!this.video.controls || this.isAudio() || this.isFullScreen() || this.gestureStartTime === undefined || this.controlsType == ControllerIOS.StartPlaybackControls) 344 346 return; 345 347 346 348 var scaleDetectionThreshold = 0.2; 347 349 if (event.scale > 1 + scaleDetectionThreshold || event.scale < 1 - scaleDetectionThreshold) … … 357 359 358 360 var velocity = Math.abs(event.scale - 1) / duration; 359 361 360 362 var pinchOutVelocityThreshold = 2; 361 363 var pinchOutGestureScaleThreshold = 1.25; … … 376 378 377 379 this.mostRecentNumberOfTargettedTouches = event.targetTouches.length; 378 380 379 381 if (this.controlsAreHidden()) { 380 382 this.showControls(); … … 459 461 this.video.webkitSetPresentationMode('optimized'); 460 462 }, 461 463 462 464 handleOptimizedFullscreenTouchStart: function() { 463 465 this.controls.optimizedFullscreenButton.classList.add('active'); 464 466 }, 465 467 466 468 handleOptimizedFullscreenTouchEnd: function(event) { 467 469 this.controls.optimizedFullscreenButton.classList.remove('active'); 468 470 469 471 this.handleOptimizedFullscreenButtonClicked(); 470 471 return true; 472 }, 473 472 473 return true; 474 }, 475 474 476 handleOptimizedFullscreenTouchCancel: function(event) { 475 477 this.controls.optimizedFullscreenButton.classList.remove('active'); … … 613 615 break; 614 616 case 'optimized': 615 var backgroundImage SVG= "url('" + this.host.mediaUIImageData("optimized-fullscreen-placeholder") + "')";616 this.controls.inlinePlaybackPlaceholder.style.backgroundImage = backgroundImage SVG;617 var backgroundImage = "url('" + this.host.mediaUIImageData("optimized-fullscreen-placeholder") + "')"; 618 this.controls.inlinePlaybackPlaceholder.style.backgroundImage = backgroundImage; 617 619 this.controls.inlinePlaybackPlaceholder.setAttribute('aria-label', "video playback placeholder"); 618 620 this.controls.inlinePlaybackPlaceholder.classList.remove(this.ClassNames.hidden);
Note:
See TracChangeset
for help on using the changeset viewer.