Chromium Code Reviews| 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 2385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2396 m_previousProgressTime = WTF::currentTime(); | 2396 m_previousProgressTime = WTF::currentTime(); |
| 2397 m_playbackProgressTimer.startRepeating(maxTimeupdateEventFrequency); | 2397 m_playbackProgressTimer.startRepeating(maxTimeupdateEventFrequency); |
| 2398 } | 2398 } |
| 2399 | 2399 |
| 2400 void HTMLMediaElement::playbackProgressTimerFired(Timer<HTMLMediaElement>*) | 2400 void HTMLMediaElement::playbackProgressTimerFired(Timer<HTMLMediaElement>*) |
| 2401 { | 2401 { |
| 2402 ASSERT(m_player); | 2402 ASSERT(m_player); |
| 2403 | 2403 |
| 2404 if (m_fragmentEndTime != MediaPlayer::invalidTime() && currentTime() >= m_fr agmentEndTime && m_playbackRate > 0) { | 2404 if (m_fragmentEndTime != MediaPlayer::invalidTime() && currentTime() >= m_fr agmentEndTime && m_playbackRate > 0) { |
| 2405 m_fragmentEndTime = MediaPlayer::invalidTime(); | 2405 m_fragmentEndTime = MediaPlayer::invalidTime(); |
| 2406 if (!m_mediaController && !m_paused) { | 2406 if (!m_mediaController && !m_paused) { |
|
acolwell GONE FROM CHROMIUM
2014/03/04 01:22:15
The mediaController portion of this condition seem
philipj_slow
2014/03/04 03:53:20
I hadn't given the controller condition any though
| |
| 2407 UseCounter::count(document(), UseCounter::HTMLMediaElementPauseAtFra gmentEnd); | |
| 2407 // changes paused to true and fires a simple event named pause at th e media element. | 2408 // changes paused to true and fires a simple event named pause at th e media element. |
| 2408 pause(); | 2409 pause(); |
| 2409 } | 2410 } |
| 2410 } | 2411 } |
| 2411 | 2412 |
| 2412 if (!m_seeking) | 2413 if (!m_seeking) |
| 2413 scheduleTimeupdateEvent(true); | 2414 scheduleTimeupdateEvent(true); |
| 2414 | 2415 |
| 2415 if (!m_playbackRate) | 2416 if (!m_playbackRate) |
| 2416 return; | 2417 return; |
| (...skipping 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3848 m_fragmentEndTime = MediaPlayer::invalidTime(); | 3849 m_fragmentEndTime = MediaPlayer::invalidTime(); |
| 3849 | 3850 |
| 3850 if (m_fragmentStartTime != MediaPlayer::invalidTime() && m_readyState < HAVE _FUTURE_DATA) | 3851 if (m_fragmentStartTime != MediaPlayer::invalidTime() && m_readyState < HAVE _FUTURE_DATA) |
| 3851 prepareToPlay(); | 3852 prepareToPlay(); |
| 3852 } | 3853 } |
| 3853 | 3854 |
| 3854 void HTMLMediaElement::applyMediaFragmentURI() | 3855 void HTMLMediaElement::applyMediaFragmentURI() |
| 3855 { | 3856 { |
| 3856 if (m_fragmentStartTime != MediaPlayer::invalidTime()) { | 3857 if (m_fragmentStartTime != MediaPlayer::invalidTime()) { |
| 3857 m_sentEndEvent = false; | 3858 m_sentEndEvent = false; |
| 3859 UseCounter::count(document(), UseCounter::HTMLMediaElementSeekToFragment Start); | |
| 3858 seek(m_fragmentStartTime, IGNORE_EXCEPTION); | 3860 seek(m_fragmentStartTime, IGNORE_EXCEPTION); |
| 3859 } | 3861 } |
| 3860 } | 3862 } |
| 3861 | 3863 |
| 3862 MediaPlayerClient::CORSMode HTMLMediaElement::mediaPlayerCORSMode() const | 3864 MediaPlayerClient::CORSMode HTMLMediaElement::mediaPlayerCORSMode() const |
| 3863 { | 3865 { |
| 3864 const AtomicString& crossOriginMode = fastGetAttribute(crossoriginAttr); | 3866 const AtomicString& crossOriginMode = fastGetAttribute(crossoriginAttr); |
| 3865 if (crossOriginMode.isNull()) | 3867 if (crossOriginMode.isNull()) |
| 3866 return Unspecified; | 3868 return Unspecified; |
| 3867 if (equalIgnoringCase(crossOriginMode, "use-credentials")) | 3869 if (equalIgnoringCase(crossOriginMode, "use-credentials")) |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 3898 { | 3900 { |
| 3899 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource)); | 3901 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource)); |
| 3900 } | 3902 } |
| 3901 | 3903 |
| 3902 bool HTMLMediaElement::isInteractiveContent() const | 3904 bool HTMLMediaElement::isInteractiveContent() const |
| 3903 { | 3905 { |
| 3904 return fastHasAttribute(controlsAttr); | 3906 return fastHasAttribute(controlsAttr); |
| 3905 } | 3907 } |
| 3906 | 3908 |
| 3907 } | 3909 } |
| OLD | NEW |