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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 enum ReadyState { HAVE_NOTHING, HAVE_METADATA, HAVE_CURRENT_DATA, HAVE_FUTUR
E_DATA, HAVE_ENOUGH_DATA }; | 121 enum ReadyState { HAVE_NOTHING, HAVE_METADATA, HAVE_CURRENT_DATA, HAVE_FUTUR
E_DATA, HAVE_ENOUGH_DATA }; |
122 ReadyState readyState() const; | 122 ReadyState readyState() const; |
123 bool seeking() const; | 123 bool seeking() const; |
124 | 124 |
125 // playback state | 125 // playback state |
126 virtual double currentTime() const OVERRIDE FINAL; | 126 virtual double currentTime() const OVERRIDE FINAL; |
127 virtual void setCurrentTime(double, ExceptionState&) OVERRIDE FINAL; | 127 virtual void setCurrentTime(double, ExceptionState&) OVERRIDE FINAL; |
128 virtual double duration() const OVERRIDE FINAL; | 128 virtual double duration() const OVERRIDE FINAL; |
129 bool paused() const; | 129 bool paused() const; |
130 double defaultPlaybackRate() const; | 130 double defaultPlaybackRate() const; |
131 void setDefaultPlaybackRate(double); | 131 void setDefaultPlaybackRate(double, ExceptionState&); |
132 double playbackRate() const; | 132 double playbackRate() const; |
133 void setPlaybackRate(double); | 133 void setPlaybackRate(double, ExceptionState&); |
134 void updatePlaybackRate(); | 134 void updatePlaybackRate(); |
135 PassRefPtr<TimeRanges> played(); | 135 PassRefPtr<TimeRanges> played(); |
136 PassRefPtr<TimeRanges> seekable() const; | 136 PassRefPtr<TimeRanges> seekable() const; |
137 bool ended() const; | 137 bool ended() const; |
138 bool autoplay() const; | 138 bool autoplay() const; |
139 bool loop() const; | 139 bool loop() const; |
140 void setLoop(bool b); | 140 void setLoop(bool b); |
141 void play(); | 141 void play(); |
142 void pause(); | 142 void pause(); |
143 | 143 |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 void updatePlayState(); | 384 void updatePlayState(); |
385 bool potentiallyPlaying() const; | 385 bool potentiallyPlaying() const; |
386 bool endedPlayback() const; | 386 bool endedPlayback() const; |
387 bool stoppedDueToErrors() const; | 387 bool stoppedDueToErrors() const; |
388 bool pausedForUserInteraction() const; | 388 bool pausedForUserInteraction() const; |
389 bool couldPlayIfEnoughData() const; | 389 bool couldPlayIfEnoughData() const; |
390 | 390 |
391 // Pauses playback without changing any states or generating events | 391 // Pauses playback without changing any states or generating events |
392 void setPausedInternal(bool); | 392 void setPausedInternal(bool); |
393 | 393 |
394 void setPlaybackRateInternal(double); | |
395 | |
396 void setShouldDelayLoadEvent(bool); | 394 void setShouldDelayLoadEvent(bool); |
397 void invalidateCachedTime(); | 395 void invalidateCachedTime(); |
398 void refreshCachedTime() const; | 396 void refreshCachedTime() const; |
399 | 397 |
400 bool hasMediaControls() const; | 398 bool hasMediaControls() const; |
401 bool createMediaControls(); | 399 bool createMediaControls(); |
402 void configureMediaControls(); | 400 void configureMediaControls(); |
403 | 401 |
404 void prepareMediaFragmentURI(); | 402 void prepareMediaFragmentURI(); |
405 void applyMediaFragmentURI(); | 403 void applyMediaFragmentURI(); |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 inline bool isHTMLMediaElement(const HTMLElement& element) | 553 inline bool isHTMLMediaElement(const HTMLElement& element) |
556 { | 554 { |
557 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 555 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
558 } | 556 } |
559 | 557 |
560 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 558 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
561 | 559 |
562 } //namespace | 560 } //namespace |
563 | 561 |
564 #endif | 562 #endif |
OLD | NEW |