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 1976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1987 if (m_paused) { | 1987 if (m_paused) { |
1988 m_paused = false; | 1988 m_paused = false; |
1989 invalidateCachedTime(); | 1989 invalidateCachedTime(); |
1990 scheduleEvent(EventTypeNames::play); | 1990 scheduleEvent(EventTypeNames::play); |
1991 | 1991 |
1992 if (m_readyState <= HAVE_CURRENT_DATA) | 1992 if (m_readyState <= HAVE_CURRENT_DATA) |
1993 scheduleEvent(EventTypeNames::waiting); | 1993 scheduleEvent(EventTypeNames::waiting); |
1994 else if (m_readyState >= HAVE_FUTURE_DATA) | 1994 else if (m_readyState >= HAVE_FUTURE_DATA) |
1995 scheduleEvent(EventTypeNames::playing); | 1995 scheduleEvent(EventTypeNames::playing); |
1996 } | 1996 } |
1997 m_autoplaying = false; | |
philipj_slow
2015/12/01 09:45:39
This should actually stay, and if removing it does
liberato (no reviews please)
2015/12/01 23:53:52
Done.
| |
1998 | 1997 |
1999 updatePlayState(); | 1998 updatePlayState(); |
2000 } | 1999 } |
2001 | 2000 |
2002 void HTMLMediaElement::autoplayMediaEncountered() | 2001 void HTMLMediaElement::autoplayMediaEncountered() |
2003 { | 2002 { |
2004 if (!m_autoplayMediaCounted) { | 2003 if (!m_autoplayMediaCounted) { |
2005 m_autoplayMediaCounted = true; | 2004 m_autoplayMediaCounted = true; |
2006 recordAutoplayMetric(AutoplayMediaFound); | 2005 recordAutoplayMetric(AutoplayMediaFound); |
2007 | 2006 |
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2938 // The media engine should just stash the rate and muted values sinc e it isn't already playing. | 2937 // The media engine should just stash the rate and muted values sinc e it isn't already playing. |
2939 webMediaPlayer()->setRate(playbackRate()); | 2938 webMediaPlayer()->setRate(playbackRate()); |
2940 updateVolume(); | 2939 updateVolume(); |
2941 webMediaPlayer()->play(); | 2940 webMediaPlayer()->play(); |
2942 } | 2941 } |
2943 | 2942 |
2944 if (mediaControls()) | 2943 if (mediaControls()) |
2945 mediaControls()->playbackStarted(); | 2944 mediaControls()->playbackStarted(); |
2946 startPlaybackProgressTimer(); | 2945 startPlaybackProgressTimer(); |
2947 m_playing = true; | 2946 m_playing = true; |
2947 m_autoplaying = false; | |
philipj_slow
2015/12/01 09:45:39
This is not the place where it's cleared in the sp
liberato (no reviews please)
2015/12/01 23:53:52
Done.
| |
2948 recordAutoplayMetric(AnyPlaybackStarted); | 2948 recordAutoplayMetric(AnyPlaybackStarted); |
2949 | 2949 |
2950 } else { // Should not be playing right now | 2950 } else { // Should not be playing right now |
2951 if (isPlaying) | 2951 if (isPlaying) |
2952 webMediaPlayer()->pause(); | 2952 webMediaPlayer()->pause(); |
2953 refreshCachedTime(); | 2953 refreshCachedTime(); |
2954 | 2954 |
2955 m_playbackProgressTimer.stop(); | 2955 m_playbackProgressTimer.stop(); |
2956 m_playing = false; | 2956 m_playing = false; |
2957 double time = currentTime(); | 2957 double time = currentTime(); |
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3672 visitor->trace(m_client); | 3672 visitor->trace(m_client); |
3673 } | 3673 } |
3674 | 3674 |
3675 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) | 3675 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) |
3676 { | 3676 { |
3677 visitor->trace(m_client); | 3677 visitor->trace(m_client); |
3678 } | 3678 } |
3679 #endif | 3679 #endif |
3680 | 3680 |
3681 } | 3681 } |
OLD | NEW |