| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 1498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1509 if (m_networkState < NETWORK_LOADING || m_networkState == NETWORK_NO_SOU
RCE) | 1509 if (m_networkState < NETWORK_LOADING || m_networkState == NETWORK_NO_SOU
RCE) |
| 1510 startProgressEventTimer(); | 1510 startProgressEventTimer(); |
| 1511 m_networkState = NETWORK_LOADING; | 1511 m_networkState = NETWORK_LOADING; |
| 1512 } | 1512 } |
| 1513 | 1513 |
| 1514 if (state == MediaPlayer::Loaded) { | 1514 if (state == MediaPlayer::Loaded) { |
| 1515 if (m_networkState != NETWORK_IDLE) | 1515 if (m_networkState != NETWORK_IDLE) |
| 1516 changeNetworkStateFromLoadingToIdle(); | 1516 changeNetworkStateFromLoadingToIdle(); |
| 1517 m_completelyLoaded = true; | 1517 m_completelyLoaded = true; |
| 1518 } | 1518 } |
| 1519 | |
| 1520 if (hasMediaControls()) | |
| 1521 mediaControls()->updateStatusDisplay(); | |
| 1522 } | 1519 } |
| 1523 | 1520 |
| 1524 void HTMLMediaElement::changeNetworkStateFromLoadingToIdle() | 1521 void HTMLMediaElement::changeNetworkStateFromLoadingToIdle() |
| 1525 { | 1522 { |
| 1526 m_progressEventTimer.stop(); | 1523 m_progressEventTimer.stop(); |
| 1527 if (hasMediaControls() && m_player->didLoadingProgress()) | 1524 if (hasMediaControls() && m_player->didLoadingProgress()) |
| 1528 mediaControls()->bufferingProgressed(); | 1525 mediaControls()->bufferingProgressed(); |
| 1529 | 1526 |
| 1530 // Schedule one last progress event so we guarantee that at least one is fir
ed | 1527 // Schedule one last progress event so we guarantee that at least one is fir
ed |
| 1531 // for files that load very quickly. | 1528 // for files that load very quickly. |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1635 invalidateCachedTime(); | 1632 invalidateCachedTime(); |
| 1636 scheduleEvent(EventTypeNames::play); | 1633 scheduleEvent(EventTypeNames::play); |
| 1637 scheduleEvent(EventTypeNames::playing); | 1634 scheduleEvent(EventTypeNames::playing); |
| 1638 } | 1635 } |
| 1639 | 1636 |
| 1640 shouldUpdateDisplayState = true; | 1637 shouldUpdateDisplayState = true; |
| 1641 } | 1638 } |
| 1642 | 1639 |
| 1643 if (shouldUpdateDisplayState) { | 1640 if (shouldUpdateDisplayState) { |
| 1644 updateDisplayState(); | 1641 updateDisplayState(); |
| 1645 if (hasMediaControls()) { | 1642 if (hasMediaControls()) |
| 1646 mediaControls()->refreshClosedCaptionsButtonVisibility(); | 1643 mediaControls()->refreshClosedCaptionsButtonVisibility(); |
| 1647 mediaControls()->updateStatusDisplay(); | |
| 1648 } | |
| 1649 } | 1644 } |
| 1650 | 1645 |
| 1651 updatePlayState(); | 1646 updatePlayState(); |
| 1652 updateMediaController(); | 1647 updateMediaController(); |
| 1653 if (RuntimeEnabledFeatures::videoTrackEnabled()) | 1648 if (RuntimeEnabledFeatures::videoTrackEnabled()) |
| 1654 updateActiveTextTrackCues(currentTime()); | 1649 updateActiveTextTrackCues(currentTime()); |
| 1655 } | 1650 } |
| 1656 | 1651 |
| 1657 void HTMLMediaElement::mediaPlayerKeyAdded(const String& keySystem, const String
& sessionId) | 1652 void HTMLMediaElement::mediaPlayerKeyAdded(const String& keySystem, const String
& sessionId) |
| 1658 { | 1653 { |
| (...skipping 2290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3949 { | 3944 { |
| 3950 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource)); | 3945 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource)); |
| 3951 } | 3946 } |
| 3952 | 3947 |
| 3953 bool HTMLMediaElement::isInteractiveContent() const | 3948 bool HTMLMediaElement::isInteractiveContent() const |
| 3954 { | 3949 { |
| 3955 return fastHasAttribute(controlsAttr); | 3950 return fastHasAttribute(controlsAttr); |
| 3956 } | 3951 } |
| 3957 | 3952 |
| 3958 } | 3953 } |
| OLD | NEW |