| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 virtual void play() = 0; | 107 virtual void play() = 0; |
| 108 virtual void pause() = 0; | 108 virtual void pause() = 0; |
| 109 virtual bool supportsSave() const = 0; | 109 virtual bool supportsSave() const = 0; |
| 110 virtual void seek(double seconds) = 0; | 110 virtual void seek(double seconds) = 0; |
| 111 virtual void setRate(double) = 0; | 111 virtual void setRate(double) = 0; |
| 112 virtual void setVolume(double) = 0; | 112 virtual void setVolume(double) = 0; |
| 113 virtual void requestRemotePlayback() { }; | 113 virtual void requestRemotePlayback() { }; |
| 114 virtual void requestRemotePlaybackControl() { }; | 114 virtual void requestRemotePlaybackControl() { }; |
| 115 virtual void setPreload(Preload) { }; | 115 virtual void setPreload(Preload) { }; |
| 116 virtual WebTimeRanges buffered() const = 0; | 116 virtual WebTimeRanges buffered() const = 0; |
| 117 virtual WebTimeRanges seekable() const | 117 virtual WebTimeRanges seekable() const = 0; |
| 118 { | |
| 119 if (double end = maxTimeSeekable()) { | |
| 120 WebTimeRanges ranges(static_cast<size_t>(1)); | |
| 121 ranges[0].start = 0.0; | |
| 122 ranges[0].end = end; | |
| 123 return ranges; | |
| 124 } | |
| 125 return WebTimeRanges(); | |
| 126 } | |
| 127 virtual double maxTimeSeekable() const { return 0.0; } | |
| 128 | 118 |
| 129 // True if the loaded media has a playable video/audio track. | 119 // True if the loaded media has a playable video/audio track. |
| 130 virtual bool hasVideo() const = 0; | 120 virtual bool hasVideo() const = 0; |
| 131 virtual bool hasAudio() const = 0; | 121 virtual bool hasAudio() const = 0; |
| 132 | 122 |
| 133 // Dimension of the video. | 123 // Dimension of the video. |
| 134 virtual WebSize naturalSize() const = 0; | 124 virtual WebSize naturalSize() const = 0; |
| 135 | 125 |
| 136 // Getters of playback state. | 126 // Getters of playback state. |
| 137 virtual bool paused() const = 0; | 127 virtual bool paused() const = 0; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 virtual bool canEnterFullscreen() const { return false; } | 168 virtual bool canEnterFullscreen() const { return false; } |
| 179 | 169 |
| 180 virtual void enabledAudioTracksChanged(const WebVector<TrackId>& enabledTrac
kIds) { } | 170 virtual void enabledAudioTracksChanged(const WebVector<TrackId>& enabledTrac
kIds) { } |
| 181 // |selectedTrackId| is null if no track is selected. | 171 // |selectedTrackId| is null if no track is selected. |
| 182 virtual void selectedVideoTrackChanged(TrackId* selectedTrackId) { } | 172 virtual void selectedVideoTrackChanged(TrackId* selectedTrackId) { } |
| 183 }; | 173 }; |
| 184 | 174 |
| 185 } // namespace blink | 175 } // namespace blink |
| 186 | 176 |
| 187 #endif | 177 #endif |
| OLD | NEW |