OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 CORSModeAnonymous, | 88 CORSModeAnonymous, |
89 CORSModeUseCredentials, | 89 CORSModeUseCredentials, |
90 }; | 90 }; |
91 | 91 |
92 enum LoadType { | 92 enum LoadType { |
93 LoadTypeURL, | 93 LoadTypeURL, |
94 LoadTypeMediaSource, | 94 LoadTypeMediaSource, |
95 LoadTypeMediaStream, | 95 LoadTypeMediaStream, |
96 }; | 96 }; |
97 | 97 |
| 98 typedef unsigned TrackId; |
| 99 |
98 virtual ~WebMediaPlayer() { } | 100 virtual ~WebMediaPlayer() { } |
99 | 101 |
100 virtual void load(LoadType, const WebURL&, CORSMode) = 0; | 102 virtual void load(LoadType, const WebURL&, CORSMode) = 0; |
101 | 103 |
102 // Playback controls. | 104 // Playback controls. |
103 virtual void play() = 0; | 105 virtual void play() = 0; |
104 virtual void pause() = 0; | 106 virtual void pause() = 0; |
105 virtual bool supportsSave() const = 0; | 107 virtual bool supportsSave() const = 0; |
106 virtual void seek(double seconds) = 0; | 108 virtual void seek(double seconds) = 0; |
107 virtual void setRate(double) = 0; | 109 virtual void setRate(double) = 0; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 virtual void setContentDecryptionModule(WebContentDecryptionModule* cdm) { } | 157 virtual void setContentDecryptionModule(WebContentDecryptionModule* cdm) { } |
156 | 158 |
157 // Sets the poster image URL. | 159 // Sets the poster image URL. |
158 virtual void setPoster(const WebURL& poster) { } | 160 virtual void setPoster(const WebURL& poster) { } |
159 | 161 |
160 // Instruct WebMediaPlayer to enter/exit fullscreen. | 162 // Instruct WebMediaPlayer to enter/exit fullscreen. |
161 virtual void enterFullscreen() { } | 163 virtual void enterFullscreen() { } |
162 virtual void exitFullscreen() { } | 164 virtual void exitFullscreen() { } |
163 // Returns true if the player can enter fullscreen. | 165 // Returns true if the player can enter fullscreen. |
164 virtual bool canEnterFullscreen() const { return false; } | 166 virtual bool canEnterFullscreen() const { return false; } |
| 167 |
| 168 virtual void enabledAudioTracksChanged(const WebVector<TrackId>& enabledTrac
kIds) { } |
| 169 virtual void selectedVideoTrackChanged(TrackId* selectedTrackId) { } |
165 }; | 170 }; |
166 | 171 |
167 } // namespace blink | 172 } // namespace blink |
168 | 173 |
169 #endif | 174 #endif |
OLD | NEW |