Languages

Menu
Sites
Language
Need your help to display Video

Hello, I'm writing a NUI application for Tizen TV.
I would like to stream a video, I use the bellow code:

public async Task Start(string uri)
{
        var source = new MediaUriSource(uri);
        var player = new Player();       
        player.Display = new Display(Window.Instance);
        player.SetSource(source);
        await player.PrepareAsync();
        player.Start();
}

 

I have the sound but not the image because I think there's a display problem. 
I don't know how to create a MediaView and I don't know if I'm using the right way.
Can you help me please ?

Thanks!

Edited by: Alex on 17 Apr, 2020

Responses

1 Replies
huiyu eun

Hello,
NUI supports VideoView to display video.

Could you try it like this:

public void NUIVideoViewTest(string uri)
{
    VideoView videoView = new VideoView();
    videoView.ResourceUrl = uri;
    videoView.Looping = true;
    videoView.Size = new Tizen.NUI.Size(360, 360);
    videoView.PositionUsesPivotPoint = true;
    videoView.ParentOrigin = ParentOrigin.Center;
    videoView.PivotPoint = PivotPoint.Center;

    GetDefaultWindow().Add(videoView);
    videoView.Play();
}

Tizen Guide : docs.tizen.org/application/dotnet/guides/nui/videoview

 

Thank you.