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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 102 |
103 enum DelayedActionType { | 103 enum DelayedActionType { |
104 LoadMediaResource = 1 << 0, | 104 LoadMediaResource = 1 << 0, |
105 LoadTextTrackResource = 1 << 1, | 105 LoadTextTrackResource = 1 << 1, |
106 TextTrackChangesNotification = 1 << 2 | 106 TextTrackChangesNotification = 1 << 2 |
107 }; | 107 }; |
108 void scheduleDelayedAction(DelayedActionType); | 108 void scheduleDelayedAction(DelayedActionType); |
109 | 109 |
110 bool isActive() const { return m_active; } | 110 bool isActive() const { return m_active; } |
111 | 111 |
| 112 bool hasRemoteRoutes() const { return m_remoteRoutesAvailable; } |
| 113 bool isPlayingRemotely() const { return m_playingRemotely; } |
| 114 |
112 // error state | 115 // error state |
113 PassRefPtrWillBeRawPtr<MediaError> error() const; | 116 PassRefPtrWillBeRawPtr<MediaError> error() const; |
114 | 117 |
115 // network state | 118 // network state |
116 void setSrc(const AtomicString&); | 119 void setSrc(const AtomicString&); |
117 const KURL& currentSrc() const { return m_currentSrc; } | 120 const KURL& currentSrc() const { return m_currentSrc; } |
118 | 121 |
119 enum NetworkState { NETWORK_EMPTY, NETWORK_IDLE, NETWORK_LOADING, NETWORK_NO
_SOURCE }; | 122 enum NetworkState { NETWORK_EMPTY, NETWORK_IDLE, NETWORK_LOADING, NETWORK_NO
_SOURCE }; |
120 NetworkState networkState() const; | 123 NetworkState networkState() const; |
121 | 124 |
(...skipping 20 matching lines...) Expand all Loading... |
142 void setPlaybackRate(double); | 145 void setPlaybackRate(double); |
143 void updatePlaybackRate(); | 146 void updatePlaybackRate(); |
144 PassRefPtrWillBeRawPtr<TimeRanges> played(); | 147 PassRefPtrWillBeRawPtr<TimeRanges> played(); |
145 PassRefPtrWillBeRawPtr<TimeRanges> seekable() const; | 148 PassRefPtrWillBeRawPtr<TimeRanges> seekable() const; |
146 bool ended() const; | 149 bool ended() const; |
147 bool autoplay() const; | 150 bool autoplay() const; |
148 bool loop() const; | 151 bool loop() const; |
149 void setLoop(bool b); | 152 void setLoop(bool b); |
150 void play(); | 153 void play(); |
151 void pause(); | 154 void pause(); |
| 155 void requestRemotePlayback(); |
| 156 void requestRemotePlaybackControl(); |
152 | 157 |
153 // statistics | 158 // statistics |
154 unsigned webkitAudioDecodedByteCount() const; | 159 unsigned webkitAudioDecodedByteCount() const; |
155 unsigned webkitVideoDecodedByteCount() const; | 160 unsigned webkitVideoDecodedByteCount() const; |
156 | 161 |
157 // media source extensions | 162 // media source extensions |
158 void closeMediaSource(); | 163 void closeMediaSource(); |
159 void durationChanged(double duration, bool requestSeek); | 164 void durationChanged(double duration, bool requestSeek); |
160 | 165 |
161 // controls | 166 // controls |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 bool hasSingleSecurityOrigin() const { return !m_player || (webMediaPlayer()
&& webMediaPlayer()->hasSingleSecurityOrigin()); } | 259 bool hasSingleSecurityOrigin() const { return !m_player || (webMediaPlayer()
&& webMediaPlayer()->hasSingleSecurityOrigin()); } |
255 | 260 |
256 bool isFullscreen() const; | 261 bool isFullscreen() const; |
257 void enterFullscreen(); | 262 void enterFullscreen(); |
258 void exitFullscreen(); | 263 void exitFullscreen(); |
259 | 264 |
260 bool hasClosedCaptions() const; | 265 bool hasClosedCaptions() const; |
261 bool closedCaptionsVisible() const; | 266 bool closedCaptionsVisible() const; |
262 void setClosedCaptionsVisible(bool); | 267 void setClosedCaptionsVisible(bool); |
263 | 268 |
| 269 void remoteRouteAvailabilityChanged(bool); |
| 270 void connectedToRemoteDevice(); |
| 271 void disconnectedFromRemoteDevice(); |
| 272 |
264 MediaControls* mediaControls() const; | 273 MediaControls* mediaControls() const; |
265 | 274 |
266 void sourceWasRemoved(HTMLSourceElement*); | 275 void sourceWasRemoved(HTMLSourceElement*); |
267 void sourceWasAdded(HTMLSourceElement*); | 276 void sourceWasAdded(HTMLSourceElement*); |
268 | 277 |
269 bool isPlaying() const { return m_playing; } | 278 bool isPlaying() const { return m_playing; } |
270 | 279 |
271 // ActiveDOMObject functions. | 280 // ActiveDOMObject functions. |
272 virtual bool hasPendingActivity() const OVERRIDE FINAL; | 281 virtual bool hasPendingActivity() const OVERRIDE FINAL; |
273 virtual void contextDestroyed() OVERRIDE FINAL; | 282 virtual void contextDestroyed() OVERRIDE FINAL; |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 | 579 |
571 bool m_closedCaptionsVisible : 1; | 580 bool m_closedCaptionsVisible : 1; |
572 | 581 |
573 bool m_completelyLoaded : 1; | 582 bool m_completelyLoaded : 1; |
574 bool m_havePreparedToPlay : 1; | 583 bool m_havePreparedToPlay : 1; |
575 bool m_delayingLoadForPreloadNone : 1; | 584 bool m_delayingLoadForPreloadNone : 1; |
576 | 585 |
577 bool m_tracksAreReady : 1; | 586 bool m_tracksAreReady : 1; |
578 bool m_haveVisibleTextTrack : 1; | 587 bool m_haveVisibleTextTrack : 1; |
579 bool m_processingPreferenceChange : 1; | 588 bool m_processingPreferenceChange : 1; |
| 589 bool m_remoteRoutesAvailable : 1; |
| 590 bool m_playingRemotely : 1; |
580 #if ENABLE(OILPAN) | 591 #if ENABLE(OILPAN) |
581 bool m_isFinalizing : 1; | 592 bool m_isFinalizing : 1; |
582 bool m_closeMediaSourceWhenFinalizing : 1; | 593 bool m_closeMediaSourceWhenFinalizing : 1; |
583 #endif | 594 #endif |
584 double m_lastTextTrackUpdateTime; | 595 double m_lastTextTrackUpdateTime; |
585 | 596 |
586 RefPtrWillBeMember<AudioTrackList> m_audioTracks; | 597 RefPtrWillBeMember<AudioTrackList> m_audioTracks; |
587 RefPtrWillBeMember<VideoTrackList> m_videoTracks; | 598 RefPtrWillBeMember<VideoTrackList> m_videoTracks; |
588 RefPtrWillBeMember<TextTrackList> m_textTracks; | 599 RefPtrWillBeMember<TextTrackList> m_textTracks; |
589 WillBeHeapVector<RefPtrWillBeMember<TextTrack> > m_textTracksWhenResourceSel
ectionBegan; | 600 WillBeHeapVector<RefPtrWillBeMember<TextTrack> > m_textTracksWhenResourceSel
ectionBegan; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 inline bool isHTMLMediaElement(const HTMLElement& element) | 642 inline bool isHTMLMediaElement(const HTMLElement& element) |
632 { | 643 { |
633 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 644 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
634 } | 645 } |
635 | 646 |
636 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 647 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
637 | 648 |
638 } //namespace | 649 } //namespace |
639 | 650 |
640 #endif | 651 #endif |
OLD | NEW |