Changeset 167828 in webkit
- Timestamp:
- Apr 25, 2014 3:18:23 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r167827 r167828 1 2014-04-11 Jer Noble <jer.noble@apple.com> 2 3 Support "Live" streams in media controls. 4 https://bugs.webkit.org/show_bug.cgi?id=131390 5 6 Reviewed by Brent Fulgham. 7 8 * http/tests/media/hls/video-controls-live-stream-expected.txt: Added. 9 * http/tests/media/hls/video-controls-live-stream.html: Added. 10 * http/tests/media/resources/hls/test-live.php: Added. 11 * http/tests/media/resources/hls/test-vod.m3u8: Added. 12 * http/tests/media/resources/hls/test.ts: Added. 13 * platform/efl/TestExpectations: 14 * platform/gtk/TestExpectations: 15 * platform/mac/fast/hidpi/video-controls-in-hidpi-expected.txt: 16 * platform/mac/fast/layers/video-layer-expected.txt: 17 * platform/mac/media/media-controls-clone-expected.txt: 18 * platform/wincairo/TestExpectations: 19 1 20 2014-04-25 Tim Horton <timothy_horton@apple.com> 2 21 -
trunk/LayoutTests/platform/efl/TestExpectations
r167704 r167828 1844 1844 webkit.org/b/109570 media/track/regions-webvtt [ Skip ] 1845 1845 webkit.org/b/109570 media/track/w3c [ Skip ] 1846 1847 # No HLS support 1848 http/tests/media/hls [ Skip ] -
trunk/LayoutTests/platform/gtk/TestExpectations
r167800 r167828 409 409 webkit.org/b/131347 fast/borders/hidpi-border-image-gradient-on-subpixels.html [ ImageOnlyFailure ] 410 410 webkit.org/b/131347 fast/borders/hidpi-rounded-border-on-subpixel-position.html [ ImageOnlyFailure ] 411 412 # No HLS support 413 http/tests/media/hls [ Skip ] 411 414 412 415 #//////////////////////////////////////////////////////////////////////////////////////// -
trunk/LayoutTests/platform/mac/fast/hidpi/video-controls-in-hidpi-expected.txt
r161884 r167828 19 19 layer at (40,156) size 16x16 20 20 RenderButton {BUTTON} at (32,5) size 16x16 [color=#FFFFFF] 21 layer at ( 57,160) size 221x922 RenderFlexibleBox {DIV} at ( 49,8) size 221x1023 layer at ( 59,160) size 217x924 RenderFlexibleBox {DIV} at (2,0) size 217x921 layer at (180,160) size 98x9 22 RenderFlexibleBox {DIV} at (171,8) size 99x10 23 layer at (182,160) size 95x9 24 RenderFlexibleBox {DIV} at (2,0) size 95x9 25 25 layer at (285,156) size 16x16 26 26 RenderButton {BUTTON} at (277,5) size 16x16 [color=#FFFFFF] -
trunk/LayoutTests/platform/mac/fast/layers/video-layer-expected.txt
r161884 r167828 24 24 layer at (91,241) size 16x16 25 25 RenderButton {BUTTON} at (32,5) size 16x16 [color=#FFFFFF] 26 layer at ( 108,245) size 221x927 RenderFlexibleBox {DIV} at ( 49,8) size 221x1028 layer at ( 110,245) size 217x929 RenderFlexibleBox {DIV} at (2,0) size 217x926 layer at (231,245) size 98x9 27 RenderFlexibleBox {DIV} at (171,8) size 99x10 28 layer at (233,245) size 95x9 29 RenderFlexibleBox {DIV} at (2,0) size 95x9 30 30 layer at (336,241) size 16x16 31 31 RenderButton {BUTTON} at (277,5) size 16x16 [color=#FFFFFF] -
trunk/LayoutTests/platform/mac/media/media-controls-clone-expected.txt
r161884 r167828 20 20 layer at (40,138) size 16x16 21 21 RenderButton {BUTTON} at (32,5) size 16x16 [color=#FFFFFF] 22 layer at ( 57,142) size 221x923 RenderFlexibleBox {DIV} at ( 49,8) size 221x1024 layer at ( 59,142) size 217x925 RenderFlexibleBox {DIV} at (2,0) size 217x922 layer at (180,142) size 98x9 23 RenderFlexibleBox {DIV} at (171,8) size 99x10 24 layer at (182,142) size 95x9 25 RenderFlexibleBox {DIV} at (2,0) size 95x9 26 26 layer at (285,138) size 16x16 27 27 RenderButton {BUTTON} at (277,5) size 16x16 [color=#FFFFFF] … … 34 34 layer at (340,138) size 16x16 35 35 RenderButton {BUTTON} at (32,5) size 16x16 [color=#FFFFFF] 36 layer at ( 357,142) size 151x937 RenderFlexibleBox {DIV} at ( 49,8) size 151x1038 layer at ( 359,142) size 147x939 RenderFlexibleBox {DIV} at (2,0) size 147x936 layer at (445,142) size 63x9 37 RenderFlexibleBox {DIV} at (136,8) size 64x10 38 layer at (447,142) size 60x9 39 RenderFlexibleBox {DIV} at (2,0) size 60x9 40 40 layer at (8,162) size 300x150 41 41 RenderFlexibleBox {DIV} at (0,0) size 300x150 … … 46 46 layer at (40,292) size 16x16 47 47 RenderButton {BUTTON} at (32,5) size 16x16 [color=#FFFFFF] 48 layer at ( 57,296) size 221x949 RenderFlexibleBox {DIV} at ( 49,8) size 221x1050 layer at ( 59,296) size 217x951 RenderFlexibleBox {DIV} at (2,0) size 217x948 layer at (180,296) size 98x9 49 RenderFlexibleBox {DIV} at (171,8) size 99x10 50 layer at (182,296) size 95x9 51 RenderFlexibleBox {DIV} at (2,0) size 95x9 52 52 layer at (285,292) size 16x16 53 53 RenderButton {BUTTON} at (277,5) size 16x16 [color=#FFFFFF] … … 60 60 layer at (340,292) size 16x16 61 61 RenderButton {BUTTON} at (32,5) size 16x16 [color=#FFFFFF] 62 layer at ( 357,296) size 151x963 RenderFlexibleBox {DIV} at ( 49,8) size 151x1064 layer at ( 359,296) size 147x965 RenderFlexibleBox {DIV} at (2,0) size 147x962 layer at (445,296) size 63x9 63 RenderFlexibleBox {DIV} at (136,8) size 64x10 64 layer at (447,296) size 60x9 65 RenderFlexibleBox {DIV} at (2,0) size 60x9 -
trunk/LayoutTests/platform/wincairo/TestExpectations
r167488 r167828 2830 2830 # QuickTime plug-in not relevant to this port 2831 2831 plugins/quicktime-plugin-replacement.html [ Skip ] 2832 2833 # No HLS support 2834 http/tests/media/hls [ Skip ] -
trunk/Source/WebCore/ChangeLog
r167825 r167828 1 2014-04-08 Jer Noble <jer.noble@apple.com> 2 3 Support "Live" streams in media controls. 4 https://bugs.webkit.org/show_bug.cgi?id=131390 5 6 Reviewed by Brent Fulgham. 7 8 Test: http/tests/media/hls/video-controls-live-stream.html 9 10 Support "Live" streams by adding an isLive property to our media controls. 11 12 * Modules/mediacontrols/mediaControlsApple.css: 13 (audio::-webkit-media-controls-status-display): 14 (video:-webkit-full-screen::-webkit-media-controls-status-display): 15 * Modules/mediacontrols/mediaControlsApple.js: 16 (Controller): isLive defaults to false. 17 (Controller.prototype.setIsLive): Set the isLive property and conditionally reconfigure the controls. 18 (Controller.prototype.configureInlineControls): Don't add the timeline if we are live. 19 (Controller.prototype.configureFullScreenControls): Ditto. 20 (Controller.prototype.updateStatusDisplay): Added. 21 (Controller.prototype.handleLoadStart): Call updateStatusDisplay(). 22 (Controller.prototype.handleError): Ditto. 23 (Controller.prototype.handleAbort): Ditto. 24 (Controller.prototype.handleSuspend): Ditto. 25 (Controller.prototype.handleStalled): Ditto. 26 (Controller.prototype.handleWaiting): Ditto. 27 (Controller.prototype.updateDuration): Ditto. 28 (Controller.prototype.updateReadyState): Ditto. 29 1 30 2014-04-25 Dean Jackson <dino@apple.com> 2 31 -
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css
r165676 r167828 401 401 text-indent: 0; 402 402 text-decoration: none; 403 text-align: center; 404 405 -webkit-box-flex: 1; 403 text-align: left; 404 405 padding: 0 12px; 406 407 -webkit-flex: 1 1 0; 406 408 } 407 409 video::-webkit-media-controls-timeline, … … 673 675 width: 420px; 674 676 position: absolute; 675 bottom: 9px;677 bottom: 7px; 676 678 left: 8px; 677 679 right: 8px; -
trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js
r167596 r167828 11 11 this.controls = {}; 12 12 this.listeners = {}; 13 this.isLive = false; 13 14 14 15 this.addVideoListeners(); … … 376 377 this.controlsType = type; 377 378 379 this.reconnectControls(); 380 }, 381 382 setIsLive: function(live) 383 { 384 if (live === this.isLive) 385 return; 386 this.isLive = live; 387 388 this.updateStatusDisplay(); 389 390 this.reconnectControls(); 391 }, 392 393 reconnectControls: function() 394 { 378 395 this.disconnectControls(); 379 396 380 if (t ype === Controller.InlineControls)397 if (this.controlsType === Controller.InlineControls) 381 398 this.configureInlineControls(); 382 else if (t ype == Controller.FullScreenControls)399 else if (this.controlsType == Controller.FullScreenControls) 383 400 this.configureFullScreenControls(); 384 401 … … 398 415 configureInlineControls: function() 399 416 { 400 this.controls.panel.appendChild(this.controls.rewindButton); 417 if (!this.isLive) 418 this.controls.panel.appendChild(this.controls.rewindButton); 401 419 this.controls.panel.appendChild(this.controls.playButton); 402 420 this.controls.panel.appendChild(this.controls.statusDisplay); 403 this.controls.panel.appendChild(this.controls.timelineBox); 404 this.controls.timelineBox.appendChild(this.controls.currentTime); 405 this.controls.timelineBox.appendChild(this.controls.thumbnailTrack); 406 this.controls.thumbnailTrack.appendChild(this.controls.timeline); 407 this.controls.thumbnailTrack.appendChild(this.controls.thumbnail); 408 this.controls.thumbnail.appendChild(this.controls.thumbnailImage); 409 this.controls.timelineBox.appendChild(this.controls.remainingTime); 421 if (!this.isLive) { 422 this.controls.panel.appendChild(this.controls.timelineBox); 423 this.controls.timelineBox.appendChild(this.controls.currentTime); 424 this.controls.timelineBox.appendChild(this.controls.thumbnailTrack); 425 this.controls.thumbnailTrack.appendChild(this.controls.timeline); 426 this.controls.thumbnailTrack.appendChild(this.controls.thumbnail); 427 this.controls.thumbnail.appendChild(this.controls.thumbnailImage); 428 this.controls.timelineBox.appendChild(this.controls.remainingTime); 429 } 410 430 this.controls.panel.appendChild(this.controls.muteBox); 411 431 this.controls.muteBox.appendChild(this.controls.volumeBox); … … 433 453 if (!this.isAudio()) 434 454 this.controls.panel.appendChild(this.controls.fullscreenButton); 435 this.controls.panel.appendChild(this.controls.timelineBox); 436 this.controls.timelineBox.appendChild(this.controls.currentTime); 437 this.controls.timelineBox.appendChild(this.controls.thumbnailTrack); 438 this.controls.thumbnailTrack.appendChild(this.controls.timeline); 439 this.controls.thumbnailTrack.appendChild(this.controls.thumbnail); 440 this.controls.thumbnail.appendChild(this.controls.thumbnailImage); 441 this.controls.timelineBox.appendChild(this.controls.remainingTime); 455 if (!this.isLive) { 456 this.controls.panel.appendChild(this.controls.timelineBox); 457 this.controls.timelineBox.appendChild(this.controls.currentTime); 458 this.controls.timelineBox.appendChild(this.controls.thumbnailTrack); 459 this.controls.thumbnailTrack.appendChild(this.controls.timeline); 460 this.controls.thumbnailTrack.appendChild(this.controls.thumbnail); 461 this.controls.thumbnail.appendChild(this.controls.thumbnailImage); 462 this.controls.timelineBox.appendChild(this.controls.remainingTime); 463 } else 464 this.controls.panel.appendChild(this.controls.statusDisplay); 442 465 }, 443 466 … … 451 474 }, 452 475 476 updateStatusDisplay: function(event) 477 { 478 if (this.video.error !== null) 479 this.controls.statusDisplay.innerText = this.UIString('Error'); 480 else if (this.isLive && this.video.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA) 481 this.controls.statusDisplay.innerText = this.UIString('Live Broadcast'); 482 else if (this.video.networkState === HTMLMediaElement.NETWORK_LOADING) 483 this.controls.statusDisplay.innerText = this.UIString('Loading'); 484 else 485 this.controls.statusDisplay.innerText = ''; 486 487 this.setStatusHidden(!this.isLive && this.video.readyState > HTMLMediaElement.HAVE_NOTHING && !this.video.error); 488 }, 489 453 490 handleLoadStart: function(event) 454 491 { 455 this. controls.statusDisplay.innerText = this.UIString('Loading');492 this.updateStatusDisplay(); 456 493 this.updateProgress(); 457 494 }, … … 459 496 handleError: function(event) 460 497 { 461 this. controls.statusDisplay.innerText = this.UIString('Error');498 this.updateStatusDisplay(); 462 499 }, 463 500 464 501 handleAbort: function(event) 465 502 { 466 this. controls.statusDisplay.innerText = this.UIString('Aborted');503 this.updateStatusDisplay(); 467 504 }, 468 505 469 506 handleSuspend: function(event) 470 507 { 471 this. controls.statusDisplay.innerText = this.UIString('Suspended');508 this.updateStatusDisplay(); 472 509 }, 473 510 474 511 handleStalled: function(event) 475 512 { 476 this. controls.statusDisplay.innerText = this.UIString('Stalled');513 this.updateStatusDisplay(); 477 514 this.updateProgress(); 478 515 }, … … 480 517 handleWaiting: function(event) 481 518 { 482 this. controls.statusDisplay.innerText = this.UIString('Waiting');519 this.updateStatusDisplay(); 483 520 }, 484 521 … … 486 523 { 487 524 this.updateReadyState(); 525 this.updateDuration(); 488 526 this.updateCaptionButton(); 489 527 this.updateCaptionContainer(); … … 843 881 this.controls.timeline.min = 0; 844 882 this.controls.timeline.max = this.video.duration; 883 884 this.setIsLive(this.video.duration === Number.POSITIVE_INFINITY); 845 885 }, 846 886 … … 949 989 updateReadyState: function() 950 990 { 951 this. setStatusHidden(this.video.readyState > HTMLMediaElement.HAVE_NOTHING);991 this.updateStatusDisplay(); 952 992 }, 953 993
Note: See TracChangeset
for help on using the changeset viewer.