| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 | 558 |
| 559 bool MediaController::hasAudio() const | 559 bool MediaController::hasAudio() const |
| 560 { | 560 { |
| 561 for (size_t index = 0; index < m_mediaElements.size(); ++index) { | 561 for (size_t index = 0; index < m_mediaElements.size(); ++index) { |
| 562 if (m_mediaElements[index]->hasAudio()) | 562 if (m_mediaElements[index]->hasAudio()) |
| 563 return true; | 563 return true; |
| 564 } | 564 } |
| 565 return false; | 565 return false; |
| 566 } | 566 } |
| 567 | 567 |
| 568 bool MediaController::hasVideo() const | |
| 569 { | |
| 570 for (size_t index = 0; index < m_mediaElements.size(); ++index) { | |
| 571 if (m_mediaElements[index]->hasVideo()) | |
| 572 return true; | |
| 573 } | |
| 574 return false; | |
| 575 } | |
| 576 | |
| 577 void MediaController::beginScrubbing() | 568 void MediaController::beginScrubbing() |
| 578 { | 569 { |
| 579 for (size_t index = 0; index < m_mediaElements.size(); ++index) | 570 for (size_t index = 0; index < m_mediaElements.size(); ++index) |
| 580 m_mediaElements[index]->beginScrubbing(); | 571 m_mediaElements[index]->beginScrubbing(); |
| 581 if (m_playbackState == PLAYING) | 572 if (m_playbackState == PLAYING) |
| 582 m_clock->stop(); | 573 m_clock->stop(); |
| 583 } | 574 } |
| 584 | 575 |
| 585 void MediaController::endScrubbing() | 576 void MediaController::endScrubbing() |
| 586 { | 577 { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 { | 619 { |
| 629 double now = WTF::currentTime(); | 620 double now = WTF::currentTime(); |
| 630 double timedelta = now - m_previousTimeupdateTime; | 621 double timedelta = now - m_previousTimeupdateTime; |
| 631 | 622 |
| 632 if (timedelta < maxTimeupdateEventFrequency) | 623 if (timedelta < maxTimeupdateEventFrequency) |
| 633 return; | 624 return; |
| 634 | 625 |
| 635 scheduleEvent(EventTypeNames::timeupdate); | 626 scheduleEvent(EventTypeNames::timeupdate); |
| 636 m_previousTimeupdateTime = now; | 627 m_previousTimeupdateTime = now; |
| 637 } | 628 } |
| OLD | NEW |