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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document& docum
ent, bool createdByParser) | 243 HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document& docum
ent, bool createdByParser) |
244 : HTMLElement(tagName, document) | 244 : HTMLElement(tagName, document) |
245 , ActiveDOMObject(&document) | 245 , ActiveDOMObject(&document) |
246 , m_loadTimer(this, &HTMLMediaElement::loadTimerFired) | 246 , m_loadTimer(this, &HTMLMediaElement::loadTimerFired) |
247 , m_progressEventTimer(this, &HTMLMediaElement::progressEventTimerFired) | 247 , m_progressEventTimer(this, &HTMLMediaElement::progressEventTimerFired) |
248 , m_playbackProgressTimer(this, &HTMLMediaElement::playbackProgressTimerFire
d) | 248 , m_playbackProgressTimer(this, &HTMLMediaElement::playbackProgressTimerFire
d) |
249 , m_playedTimeRanges() | 249 , m_playedTimeRanges() |
250 , m_asyncEventQueue(GenericEventQueue::create(this)) | 250 , m_asyncEventQueue(GenericEventQueue::create(this)) |
251 , m_playbackRate(1.0f) | 251 , m_playbackRate(1.0f) |
252 , m_defaultPlaybackRate(1.0f) | 252 , m_defaultPlaybackRate(1.0f) |
253 , m_webkitPreservesPitch(true) | |
254 , m_networkState(NETWORK_EMPTY) | 253 , m_networkState(NETWORK_EMPTY) |
255 , m_readyState(HAVE_NOTHING) | 254 , m_readyState(HAVE_NOTHING) |
256 , m_readyStateMaximum(HAVE_NOTHING) | 255 , m_readyStateMaximum(HAVE_NOTHING) |
257 , m_volume(1.0f) | 256 , m_volume(1.0f) |
258 , m_lastSeekTime(0) | 257 , m_lastSeekTime(0) |
259 , m_previousProgressTime(numeric_limits<double>::max()) | 258 , m_previousProgressTime(numeric_limits<double>::max()) |
260 , m_duration(numeric_limits<double>::quiet_NaN()) | 259 , m_duration(numeric_limits<double>::quiet_NaN()) |
261 , m_lastTimeUpdateEventWallTime(0) | 260 , m_lastTimeUpdateEventWallTime(0) |
262 , m_lastTimeUpdateEventMovieTime(numeric_limits<double>::max()) | 261 , m_lastTimeUpdateEventMovieTime(numeric_limits<double>::max()) |
263 , m_loadState(WaitingForSource) | 262 , m_loadState(WaitingForSource) |
(...skipping 1829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2093 m_player->setRate(rate); | 2092 m_player->setRate(rate); |
2094 } | 2093 } |
2095 | 2094 |
2096 void HTMLMediaElement::updatePlaybackRate() | 2095 void HTMLMediaElement::updatePlaybackRate() |
2097 { | 2096 { |
2098 double effectiveRate = m_mediaController ? m_mediaController->playbackRate()
: m_playbackRate; | 2097 double effectiveRate = m_mediaController ? m_mediaController->playbackRate()
: m_playbackRate; |
2099 if (m_player && potentiallyPlaying() && m_player->rate() != effectiveRate) | 2098 if (m_player && potentiallyPlaying() && m_player->rate() != effectiveRate) |
2100 m_player->setRate(effectiveRate); | 2099 m_player->setRate(effectiveRate); |
2101 } | 2100 } |
2102 | 2101 |
2103 bool HTMLMediaElement::webkitPreservesPitch() const | |
2104 { | |
2105 return m_webkitPreservesPitch; | |
2106 } | |
2107 | |
2108 void HTMLMediaElement::setWebkitPreservesPitch(bool preservesPitch) | |
2109 { | |
2110 LOG(Media, "HTMLMediaElement::setWebkitPreservesPitch(%s)", boolString(prese
rvesPitch)); | |
2111 | |
2112 m_webkitPreservesPitch = preservesPitch; | |
2113 notImplemented(); | |
2114 } | |
2115 | |
2116 bool HTMLMediaElement::ended() const | 2102 bool HTMLMediaElement::ended() const |
2117 { | 2103 { |
2118 // 4.8.10.8 Playing the media resource | 2104 // 4.8.10.8 Playing the media resource |
2119 // The ended attribute must return true if the media element has ended | 2105 // The ended attribute must return true if the media element has ended |
2120 // playback and the direction of playback is forwards, and false otherwise. | 2106 // playback and the direction of playback is forwards, and false otherwise. |
2121 return endedPlayback() && m_playbackRate > 0; | 2107 return endedPlayback() && m_playbackRate > 0; |
2122 } | 2108 } |
2123 | 2109 |
2124 bool HTMLMediaElement::autoplay() const | 2110 bool HTMLMediaElement::autoplay() const |
2125 { | 2111 { |
(...skipping 1865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3991 { | 3977 { |
3992 m_restrictions = NoRestrictions; | 3978 m_restrictions = NoRestrictions; |
3993 } | 3979 } |
3994 | 3980 |
3995 void HTMLMediaElement::mediaPlayerScheduleLayerUpdate() | 3981 void HTMLMediaElement::mediaPlayerScheduleLayerUpdate() |
3996 { | 3982 { |
3997 scheduleLayerUpdate(); | 3983 scheduleLayerUpdate(); |
3998 } | 3984 } |
3999 | 3985 |
4000 } | 3986 } |
OLD | NEW |