Page 1 of 1

mediaview help

Posted: Monday 23rd August 2021 9:38pm
by sadams54
I am working on a new major project and it revolves around the mediaview component. well I have never used this component and need some help.

1.. Where is the mediaview control in the toolbox? I am currently creating the control programatically. {answered}

2.. When I create a mediaview control programatically and put in the url for the video I see the black box with a play and stop button but pressing the play button produces an error in gambas "Cannot set status". if I try to programatically play using mediaview.play I get the same error. {Answered}

3.. I am trying to view an IP Camera using the url that works in VLC. Am I doing something wrong?

As with any programming project we learn new things and I have much to learn with this one. So please, any help is appreciated.

Re: mediaview help

Posted: Monday 23rd August 2021 9:47pm
by cogier
Have a look at 'Very Simple Video Player' on the Farm. It works well with .webm videos, not so well with .mp4

Re: mediaview help

Posted: Monday 23rd August 2021 11:04pm
by sadams54
I had to look at a german version and it was a simple issue with the url command. Thanks. once again I am thinking too complex.

now that it is working I am finding that I can't figure out how to force the video to a specific size. it resizes automatically filling the window. I can't seem to force the size to what I want. also noted that setting mediaview.muted=true in code does nothing I have to hit the mute on the video if I find the control. something wrong I am doing?

Re: mediaview help

Posted: Tuesday 24th August 2021 9:44am
by BruceSteers
1.
In the form designer where you can select Form/View/container type objects there will be a new tab called Media on the far right hand side

2. & 3. looks like you fixed that.

To make it not stretch it must not be in a panel that is 'arranged' (Arrange.fill, arrange.Horizontal, etc) It must be Arrange.None
and it's expand property must be false.

It's most likely your form layout causing it to expand.
place it in a panel or something that does not expand with the form.

Re: mediaview help

Posted: Thursday 4th April 2024 7:25pm
by PeteMarsh
Re : 2.. When I create a mediaview control programatically and put in the url for the video I see the black box with a play and stop button but pressing the play button produces an error in gambas "Cannot set status". if I try to programatically play using mediaview.play I get the same error. {Answered}

{Answered} doesnt really help - what was the answer ? - I have the same issue

Re: mediaview help

Posted: Friday 5th April 2024 10:28am
by BruceSteers
I think that the original (solved) problem was the file:// prefix had not been used for the URL.
I had to look at a german version and it was a simple issue with the url command. Thanks. once again I am thinking too complex.
Then the dreaded "Cannot set status" was another issue