| 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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 // This does not check user gesture restrictions. | 404 // This does not check user gesture restrictions. |
| 405 void playInternal(); | 405 void playInternal(); |
| 406 | 406 |
| 407 void gesturelessInitialPlayHalted(); | 407 void gesturelessInitialPlayHalted(); |
| 408 void autoplayMediaEncountered(); | 408 void autoplayMediaEncountered(); |
| 409 void allowVideoRendering(); | 409 void allowVideoRendering(); |
| 410 | 410 |
| 411 void updateVolume(); | 411 void updateVolume(); |
| 412 void updatePlayState(); | 412 void updatePlayState(); |
| 413 bool potentiallyPlaying() const; | 413 bool potentiallyPlaying() const; |
| 414 bool endedPlayback() const; | |
| 415 bool stoppedDueToErrors() const; | 414 bool stoppedDueToErrors() const; |
| 416 bool couldPlayIfEnoughData() const; | 415 bool couldPlayIfEnoughData() const; |
| 417 | 416 |
| 417 // Generally the presence of the loop attribute should be considered to mean
playback |
| 418 // has not "ended", as "ended" and "looping" are mutually exclusive. See |
| 419 // https://html.spec.whatwg.org/multipage/embedded-content.html#ended-playba
ck |
| 420 enum class LoopCondition { Included, Ignored }; |
| 421 bool endedPlayback(LoopCondition = LoopCondition::Included) const; |
| 422 |
| 418 void setShouldDelayLoadEvent(bool); | 423 void setShouldDelayLoadEvent(bool); |
| 419 void invalidateCachedTime(); | 424 void invalidateCachedTime(); |
| 420 void refreshCachedTime() const; | 425 void refreshCachedTime() const; |
| 421 | 426 |
| 422 bool hasMediaControls() const; | 427 bool hasMediaControls() const; |
| 423 void ensureMediaControls(); | 428 void ensureMediaControls(); |
| 424 void configureMediaControls(); | 429 void configureMediaControls(); |
| 425 | 430 |
| 426 virtual void* preDispatchEventHandler(Event*) override final; | 431 virtual void* preDispatchEventHandler(Event*) override final; |
| 427 | 432 |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 inline bool isHTMLMediaElement(const HTMLElement& element) | 616 inline bool isHTMLMediaElement(const HTMLElement& element) |
| 612 { | 617 { |
| 613 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 618 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
| 614 } | 619 } |
| 615 | 620 |
| 616 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 621 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
| 617 | 622 |
| 618 } // namespace blink | 623 } // namespace blink |
| 619 | 624 |
| 620 #endif // HTMLMediaElement_h | 625 #endif // HTMLMediaElement_h |
| OLD | NEW |