Index: content/public/android/java/src/org/chromium/content/browser/ContentViewClient.java |
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewClient.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewClient.java |
index f8706510de374eca83a599ea0c1f8aa41b010a6e..a68490bdeba7ee78747460c78b4f09071dc888ab 100644 |
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewClient.java |
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewClient.java |
@@ -161,10 +161,55 @@ public class ContentViewClient { |
} |
} |
- public void onExternalVideoSurfaceRequested(int playerId) { |
+ // Please contact ycheo@chromium.org (or wonsik@) if you have any questions on the following. |
Ted C
2014/02/11 18:05:47
Not something for this change, but I'd like to see
ycheo (away)
2014/02/14 07:41:04
Done.
|
+ // The expected behavior of the media player on the video hole punching is as follows. |
+ // 1) If it requests the surface, it will call onRequestExternalVideoSurface(). |
+ // When the resolution of the video is changed, it'll call onRequestExternalVideoSurface(). |
+ // 2) Whenever the size or the position of the video element is changed, it'll notify through |
+ // onExternalVideoSurfacePositionChanged(). |
+ // 3) Whenever the page to contain the video element is scrolled or zoomed, |
Ted C
2014/02/11 18:05:47
"the page [that] contain[s]"
ycheo (away)
2014/02/14 07:41:04
Done.
|
+ // onExternalVideoSurfaceRenderCoordinatesChanged() will be called. |
+ // 4) Usually steps 1) ~ 3) are repeated during the playback. |
+ // 5) If the player want not to use the surface any more, it'll call |
Ted C
2014/02/11 18:05:47
If the player [no longer needs] the surface anymor
ycheo (away)
2014/02/14 07:41:04
Done.
|
+ // onReleaseExternalVideoSurface(). |
+ // |
+ // After onRequestExternalVideoSurface() is called, when the surface is created and visible, |
+ // calling ContentViewCore.attachExternalVideoSurface() is expected to associate the surface |
+ // with the player. |
+ // Before onReleaseExternalVideoSurface() is finished or when the surface is invisible, |
+ // calling ContentViewCore.detachExternalVideoSurface() is expected to release the association. |
+ |
+ /** |
+ * Called when a media player wants to request an external video surface. |
+ * This method is used only for the video hole punching. |
+ * @param playerId The ID of the media player. |
+ */ |
+ public void onRequestExternalVideoSurface(int playerId) { |
+ } |
+ |
+ /** |
+ * Called when a media player wants to release an external video surface. |
+ * This method is used only for the video hole punching. |
+ * @param playerId The ID of the media player. |
+ */ |
+ public void onReleaseExternalVideoSurface(int playerId) { |
} |
- public void onGeometryChanged(int playerId, RectF rect) { |
+ /** |
+ * Called when the position of the video element which uses the external |
+ * video surface is changed. |
+ * This method is used only for the video hole punching. |
+ * @param playerId The ID of the media player. |
+ * @param rect The boundary rectangle of the video element. |
+ */ |
+ public void onExternalVideoSurfacePositionChanged(int playerId, RectF rect) { |
+ } |
+ |
+ /** |
+ * Called when RenderCoordinates are updated. |
+ * This method is used only for the video hole punching. |
+ */ |
+ public void onExternalVideoSurfaceRenderCoordinatesChanged() { |
} |
public ContentVideoViewClient getContentVideoViewClient() { |