Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1453)

Side by Side Diff: public/platform/WebMediaPlayer.h

Issue 607493002: Introduce WebMediaPlayer::seekable() to replace maxTimeSeekable() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 double maxTimeSeekable() const = 0; 117 virtual WebTimeRanges seekable() const
scherkus (not reviewing) 2014/09/26 01:19:27 I assume we'll be ripping this out at some point?
philipj_slow 2014/09/26 07:39:26 Yep, that's https://codereview.chromium.org/604823
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; }
118 128
119 // True if the loaded media has a playable video/audio track. 129 // True if the loaded media has a playable video/audio track.
120 virtual bool hasVideo() const = 0; 130 virtual bool hasVideo() const = 0;
121 virtual bool hasAudio() const = 0; 131 virtual bool hasAudio() const = 0;
122 132
123 // Dimension of the video. 133 // Dimension of the video.
124 virtual WebSize naturalSize() const = 0; 134 virtual WebSize naturalSize() const = 0;
125 135
126 // Getters of playback state. 136 // Getters of playback state.
127 virtual bool paused() const = 0; 137 virtual bool paused() const = 0;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 virtual bool canEnterFullscreen() const { return false; } 178 virtual bool canEnterFullscreen() const { return false; }
169 179
170 virtual void enabledAudioTracksChanged(const WebVector<TrackId>& enabledTrac kIds) { } 180 virtual void enabledAudioTracksChanged(const WebVector<TrackId>& enabledTrac kIds) { }
171 // |selectedTrackId| is null if no track is selected. 181 // |selectedTrackId| is null if no track is selected.
172 virtual void selectedVideoTrackChanged(TrackId* selectedTrackId) { } 182 virtual void selectedVideoTrackChanged(TrackId* selectedTrackId) { }
173 }; 183 };
174 184
175 } // namespace blink 185 } // namespace blink
176 186
177 #endif 187 #endif
OLDNEW
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698