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 1589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1600 | 1600 |
1601 bool isPotentiallyPlaying = potentiallyPlaying(); | 1601 bool isPotentiallyPlaying = potentiallyPlaying(); |
1602 if (m_readyState == HAVE_FUTURE_DATA && oldState <= HAVE_CURRENT_DATA && tra
cksAreReady) { | 1602 if (m_readyState == HAVE_FUTURE_DATA && oldState <= HAVE_CURRENT_DATA && tra
cksAreReady) { |
1603 scheduleEvent(EventTypeNames::canplay); | 1603 scheduleEvent(EventTypeNames::canplay); |
1604 if (isPotentiallyPlaying) | 1604 if (isPotentiallyPlaying) |
1605 scheduleEvent(EventTypeNames::playing); | 1605 scheduleEvent(EventTypeNames::playing); |
1606 shouldUpdateDisplayState = true; | 1606 shouldUpdateDisplayState = true; |
1607 } | 1607 } |
1608 | 1608 |
1609 if (m_readyState == HAVE_ENOUGH_DATA && oldState < HAVE_ENOUGH_DATA && track
sAreReady) { | 1609 if (m_readyState == HAVE_ENOUGH_DATA && oldState < HAVE_ENOUGH_DATA && track
sAreReady) { |
1610 if (oldState <= HAVE_CURRENT_DATA) | 1610 if (oldState <= HAVE_CURRENT_DATA) { |
1611 scheduleEvent(EventTypeNames::canplay); | 1611 scheduleEvent(EventTypeNames::canplay); |
1612 | 1612 if (isPotentiallyPlaying) |
1613 scheduleEvent(EventTypeNames::canplaythrough); | 1613 scheduleEvent(EventTypeNames::playing); |
1614 | 1614 } |
1615 if (isPotentiallyPlaying && oldState <= HAVE_CURRENT_DATA) | |
1616 scheduleEvent(EventTypeNames::playing); | |
1617 | 1615 |
1618 if (m_autoplaying && m_paused && autoplay() && !document().isSandboxed(S
andboxAutomaticFeatures) && !userGestureRequiredForPlay()) { | 1616 if (m_autoplaying && m_paused && autoplay() && !document().isSandboxed(S
andboxAutomaticFeatures) && !userGestureRequiredForPlay()) { |
1619 m_paused = false; | 1617 m_paused = false; |
1620 invalidateCachedTime(); | 1618 invalidateCachedTime(); |
1621 scheduleEvent(EventTypeNames::play); | 1619 scheduleEvent(EventTypeNames::play); |
1622 scheduleEvent(EventTypeNames::playing); | 1620 scheduleEvent(EventTypeNames::playing); |
1623 } | 1621 } |
1624 | 1622 |
| 1623 scheduleEvent(EventTypeNames::canplaythrough); |
| 1624 |
1625 shouldUpdateDisplayState = true; | 1625 shouldUpdateDisplayState = true; |
1626 } | 1626 } |
1627 | 1627 |
1628 if (shouldUpdateDisplayState) { | 1628 if (shouldUpdateDisplayState) { |
1629 updateDisplayState(); | 1629 updateDisplayState(); |
1630 if (hasMediaControls()) | 1630 if (hasMediaControls()) |
1631 mediaControls()->refreshClosedCaptionsButtonVisibility(); | 1631 mediaControls()->refreshClosedCaptionsButtonVisibility(); |
1632 } | 1632 } |
1633 | 1633 |
1634 updatePlayState(); | 1634 updatePlayState(); |
(...skipping 2285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3920 { | 3920 { |
3921 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource)); | 3921 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource)); |
3922 } | 3922 } |
3923 | 3923 |
3924 bool HTMLMediaElement::isInteractiveContent() const | 3924 bool HTMLMediaElement::isInteractiveContent() const |
3925 { | 3925 { |
3926 return fastHasAttribute(controlsAttr); | 3926 return fastHasAttribute(controlsAttr); |
3927 } | 3927 } |
3928 | 3928 |
3929 } | 3929 } |
OLD | NEW |