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 2423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2434 m_playbackProgressTimer.startRepeating(maxTimeupdateEventFrequency); | 2434 m_playbackProgressTimer.startRepeating(maxTimeupdateEventFrequency); |
2435 } | 2435 } |
2436 | 2436 |
2437 void HTMLMediaElement::playbackProgressTimerFired(Timer<HTMLMediaElement>*) | 2437 void HTMLMediaElement::playbackProgressTimerFired(Timer<HTMLMediaElement>*) |
2438 { | 2438 { |
2439 ASSERT(m_player); | 2439 ASSERT(m_player); |
2440 | 2440 |
2441 if (m_fragmentEndTime != MediaPlayer::invalidTime() && currentTime() >= m_fr
agmentEndTime && m_playbackRate > 0) { | 2441 if (m_fragmentEndTime != MediaPlayer::invalidTime() && currentTime() >= m_fr
agmentEndTime && m_playbackRate > 0) { |
2442 m_fragmentEndTime = MediaPlayer::invalidTime(); | 2442 m_fragmentEndTime = MediaPlayer::invalidTime(); |
2443 if (!m_mediaController && !m_paused) { | 2443 if (!m_mediaController && !m_paused) { |
| 2444 UseCounter::count(document(), UseCounter::HTMLMediaElementPauseAtFra
gmentEnd); |
2444 // changes paused to true and fires a simple event named pause at th
e media element. | 2445 // changes paused to true and fires a simple event named pause at th
e media element. |
2445 pause(); | 2446 pause(); |
2446 } | 2447 } |
2447 } | 2448 } |
2448 | 2449 |
2449 if (!m_seeking) | 2450 if (!m_seeking) |
2450 scheduleTimeupdateEvent(true); | 2451 scheduleTimeupdateEvent(true); |
2451 | 2452 |
2452 if (!m_playbackRate) | 2453 if (!m_playbackRate) |
2453 return; | 2454 return; |
(...skipping 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3877 m_fragmentEndTime = MediaPlayer::invalidTime(); | 3878 m_fragmentEndTime = MediaPlayer::invalidTime(); |
3878 | 3879 |
3879 if (m_fragmentStartTime != MediaPlayer::invalidTime() && m_readyState < HAVE
_FUTURE_DATA) | 3880 if (m_fragmentStartTime != MediaPlayer::invalidTime() && m_readyState < HAVE
_FUTURE_DATA) |
3880 prepareToPlay(); | 3881 prepareToPlay(); |
3881 } | 3882 } |
3882 | 3883 |
3883 void HTMLMediaElement::applyMediaFragmentURI() | 3884 void HTMLMediaElement::applyMediaFragmentURI() |
3884 { | 3885 { |
3885 if (m_fragmentStartTime != MediaPlayer::invalidTime()) { | 3886 if (m_fragmentStartTime != MediaPlayer::invalidTime()) { |
3886 m_sentEndEvent = false; | 3887 m_sentEndEvent = false; |
| 3888 UseCounter::count(document(), UseCounter::HTMLMediaElementSeekToFragment
Start); |
3887 seek(m_fragmentStartTime, IGNORE_EXCEPTION); | 3889 seek(m_fragmentStartTime, IGNORE_EXCEPTION); |
3888 } | 3890 } |
3889 } | 3891 } |
3890 | 3892 |
3891 MediaPlayerClient::CORSMode HTMLMediaElement::mediaPlayerCORSMode() const | 3893 MediaPlayerClient::CORSMode HTMLMediaElement::mediaPlayerCORSMode() const |
3892 { | 3894 { |
3893 const AtomicString& crossOriginMode = fastGetAttribute(crossoriginAttr); | 3895 const AtomicString& crossOriginMode = fastGetAttribute(crossoriginAttr); |
3894 if (crossOriginMode.isNull()) | 3896 if (crossOriginMode.isNull()) |
3895 return Unspecified; | 3897 return Unspecified; |
3896 if (equalIgnoringCase(crossOriginMode, "use-credentials")) | 3898 if (equalIgnoringCase(crossOriginMode, "use-credentials")) |
(...skipping 30 matching lines...) Expand all Loading... |
3927 { | 3929 { |
3928 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource)); | 3930 m_mediaSource->setWebMediaSourceAndOpen(adoptPtr(webMediaSource)); |
3929 } | 3931 } |
3930 | 3932 |
3931 bool HTMLMediaElement::isInteractiveContent() const | 3933 bool HTMLMediaElement::isInteractiveContent() const |
3932 { | 3934 { |
3933 return fastHasAttribute(controlsAttr); | 3935 return fastHasAttribute(controlsAttr); |
3934 } | 3936 } |
3935 | 3937 |
3936 } | 3938 } |
OLD | NEW |