Class VideoView
Definition
- Namespace:
- Tizen.NUI.BaseComponents
- Assembly:
- Tizen.NUI.dll
VideoView is a control for video playback and display.
public class VideoView : View, IDynamicResourceHandler, INameScope, System.IDisposable, IResourcesProvider
- Inheritance
- Implements
-
System.IDisposable
Constructors
View SourceVideoView()
Creates an initialized VideoView.
Declaration
public VideoView()
VideoView(bool)
Creates an initialized VideoView.
If the string is empty, VideoView will not display anything.
Declaration
public VideoView(bool swCodec)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | swCodec | Video rendering by H/W codec if false. |
VideoView(string, bool)
Creates an initialized VideoView.
If the string is empty, VideoView will not display anything.
Declaration
public VideoView(string url, bool swCodec)
Parameters
| Type | Name | Description |
|---|---|---|
| string | url | The URL of the video resource to display. |
| bool | swCodec | Video rendering by H/W codec if false. |
VideoView(string)
Creates an initialized VideoView.
If the string is empty, VideoView will not display anything.
Declaration
public VideoView(string url)
Parameters
| Type | Name | Description |
|---|---|---|
| string | url | The URL of the video resource to display. |
VideoView(Uri, bool)
Hidden API (Inhouse API). Using Uri class to provide safe service and secure API. Creates an initialized VideoView. If the string is empty, VideoView will not display anything.
Declaration
public VideoView(Uri uri, bool swCodec)
Parameters
| Type | Name | Description |
|---|---|---|
| Uri | uri | The URI of the video resource to display. |
| bool | swCodec | Video rendering by H/W codec if false. |
Fields
View SourceLoopingProperty
Declaration
public static readonly BindableProperty LoopingProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
MutedProperty
Declaration
public static readonly BindableProperty MutedProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
ResourceUrlProperty
Declaration
public static readonly BindableProperty ResourceUrlProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
UnderlayProperty
Declaration
public static readonly BindableProperty UnderlayProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
VideoProperty
Declaration
public static readonly BindableProperty VideoProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
VolumeProperty
Declaration
public static readonly BindableProperty VolumeProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
Properties
View SourceIsAutoRotationEnabled
Enables auto rotation of the video based on the orientation of the video contents.
Declaration
public bool IsAutoRotationEnabled { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
IsLetterBoxEnabled
Enables letter box of the video based on the aspect of the video contents.
Declaration
public bool IsLetterBoxEnabled { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Looping
The looping status, true or false.
Declaration
public bool Looping { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Muted
The mute status, true or false.
Declaration
public bool Muted { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
NativeHandle
Get native player handle.
VideoView videoView = new VideoView();
videoView.ResourceUrl = "some video path";
var handle = videoView.NativeHandle;
if(handle.IsInvalid == false)
{
IntPtr nativeHandle = handle.DangerousGetHandle();
// do something with nativeHandle
}
Declaration
public SafeHandle NativeHandle { get; }
Property Value
| Type | Description |
|---|---|
| SafeHandle |
ResourceUrl
Video file URL as string type.
Declaration
public string ResourceUrl { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Underlay
Video rendering by underlay, true or false.
This shows video composited underneath the window by the system. This means it may ignore rotation of the video-view.
Declaration
public bool Underlay { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Video
Video file setting type of PropertyMap.
Declaration
public PropertyMap Video { get; set; }
Property Value
| Type | Description |
|---|---|
| PropertyMap |
Volume
The left and the right volume scalar as float type, PropertyMap with two values ( "left" and "right" ).
Declaration
public PropertyMap Volume { get; set; }
Property Value
| Type | Description |
|---|---|
| PropertyMap |
Methods
View SourceBackward(int)
Seeks backward by the specified number of milliseconds.
Declaration
public void Backward(int millisecond)
Parameters
| Type | Name | Description |
|---|---|---|
| int | millisecond | The position for backward playback. |
Dispose(DisposeTypes)
Dispose. Releases unmanaged and optionally managed resources.
Declaration
protected override void Dispose(DisposeTypes type)
Parameters
| Type | Name | Description |
|---|---|---|
| DisposeTypes | type | Explicit to release both managed and unmanaged resources. Implicit to release only unmanaged resources. |
Overrides
Remarks
When overriding this method, you need to distinguish between explicit and implicit conditions. For explicit conditions, release both managed and unmanaged resources. For implicit conditions, only release unmanaged resources.
EnableOffscreenFrameRendering(bool)
Enables or disables offscreen frame rendering for video interpolation.
When enabled, the video player will use offscreen rendering for frame interpolation, which can improve visual quality for certain video content.
Declaration
public void EnableOffscreenFrameRendering(bool useOffScreenFrame)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | useOffScreenFrame | True to enable offscreen frame rendering, false to disable. |
Remarks
This method must be called on the main thread.
Forward(int)
Seeks forward by the specified number of milliseconds.
Declaration
public void Forward(int millisecond)
Parameters
| Type | Name | Description |
|---|---|---|
| int | millisecond | The position for forward playback. |
Pause()
Pauses the video playback.
Declaration
public void Pause()
Play()
Starts the video playback.
Declaration
public void Play()
ReleaseSwigCPtr(HandleRef)
Declaration
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Runtime.InteropServices.HandleRef | swigCPtr |
Overrides
View SourceSetVideoFrameBuffer(NativeImageSource)
Sets the NativeImageSource for the current video frame to be used in frame interpolation. The VideoView must be in underlay mode (Underlay = true) and have a valid video size for this to take effect. Call SetFrameInterpolationInterval() first to configure the interpolation duration. This method is thread-safe and can be called from worker threads.
Declaration
public void SetVideoFrameBuffer(NativeImageSource nativeImageSource)
Parameters
| Type | Name | Description |
|---|---|---|
| NativeImageSource | nativeImageSource | The NativeImageSource for the current frame. |
Stop()
Stops the video playback.
Declaration
public void Stop()
Events
View SourceFinished
Event for the finished signal which can be used to subscribe or unsubscribe the event handler
The finished signal is emitted when a video playback has finished.
Declaration
public event EventHandler<VideoView.FinishedEventArgs> Finished
Event Type
| Type | Description |
|---|---|
| EventHandler<><FinishedEventArgs> |