-
Method Summary
Modifier and TypeMethodDescriptionvoid
Ensure that the video surface has been associated with the native media player.void
set
(VideoSurface videoSurface) Set the component used to render video.
-
Method Details
-
set
Set the component used to render video.Setting the video surface on the native component is actually deferred so the component used as the video surface need not be visible and fully realised before calling this method.
The video surface will not be associated with the native media player until the media is played.
It is possible to change the video surface after it has been set, but the change will not take effect until the media is played.
- Parameters:
videoSurface
- component to render video to
-
attachVideoSurface
public void attachVideoSurface()Ensure that the video surface has been associated with the native media player.Ordinarily when setting the video surface the actual association of the video surface with the native media player is deferred until the first time media is played.
This deferring behaviour is usually a good thing because when setting a video surface component on the native media player the video surface component must be a displayable component and this is often not the case during the construction and initialisation of the application.
Most applications will not need to call this method.
However, in special circumstances such as associating an embedded media player with a media list player, media is played through the media list rather than the media player itself so the deferred association of the video surface would never happen.
Calling this method ensures that the video surface is properly associated with the native media player and consequently the video surface component must be visible when this method is called.
-