show and hide video-window

About usage, announcement and development of skins for VLC
DonBilbo

show and hide video-window

Postby DonBilbo » 27 Jul 2006 13:12

hello. I'm developing a skin for vlc but I've got a problem now. Is it possible to show or hide video-window by pressing a button.
For example I want to make the video visible if they press the "Play-Button" an let it hide by pressing the "Stop-Button".

Thanks.
DonBilbo

ipkiss
Big Cone-huna
Big Cone-huna
Posts: 695
Joined: 23 Nov 2003 01:49

Postby ipkiss » 27 Jul 2006 15:08

Sure. Several existing skins do that already.
Extract from the doc:
  • WindowID.show(): Show the Window whose id attribute is 'WindowID'.
  • WindowID.hide(): Hide the Window whose id attribute is 'WindowID'.
And you can chain several actions using ';' as a delimiter.


Note that in the particular case of the video window, there may be a better solution, using the vlc.hasVout boolean variable. So the video window could simply have the visible="vlc.hasVout" attribute...

DonBilbo

how to use the boolean variable

Postby DonBilbo » 28 Jul 2006 02:17

hello ipkiss.
I suppose that I didn`t explain my problem exactly.
the command: "windowID.show()" is for windows I have build on my own, for example the playlist-window.
But this video-screen is a special option (a black screen) where you can watch the videos. The command for it:
<Video width="..." height="..." x="..." y="..." id="..." />
At the moment this window is always visible eventhoug when I write in the code:
visible="false" or visible="vlc.hasVout"
I want to make this video-screen visible when I press the play-button and hide it when I press the stop-button.

I hope you have understood it. Sorry for my english :-)

PS.: I didn't understand the variable vlc.hasVout. How do I use and where do I have to type it (in the action for play-button???). what does it mean.

ipkiss
Big Cone-huna
Big Cone-huna
Posts: 695
Joined: 23 Nov 2003 01:49

Postby ipkiss » 28 Jul 2006 08:52

the command: "windowID.show()" is for windows I have build on my own, for example the playlist-window.
But this video-screen is a special option (a black screen) where you can watch the videos. The command for it:
<Video width="..." height="..." x="..." y="..." id="..." />
If you used the Video control, you have necessarily created a window yourself, so you can use windowID.show().
At the moment this window is always visible eventhoug when I write in the code:
visible="false" or visible="vlc.hasVout"
Strange. What is your version of VLC?
PS.: I didn't understand the variable vlc.hasVout. How do I use and where do I have to type it (in the action for play-button???). what does it mean.
Some tag attributes (such as 'visible') require a 'boolean expression', i.e. an expression that can evaluate to true or false (even though the resulting value can change, depending on the context). 'vlc.hasVout' is such an expression: it evaluates to true when there is a video output running, and to false otherwise. The list of boolean expressions can be found there: http://www.videolan.org/vlc/skins2-create.html#boolexpr

Asim
Cone that earned his stripes
Cone that earned his stripes
Posts: 151
Joined: 30 Mar 2005 05:58
Contact:

Postby Asim » 28 Jul 2006 13:29

At the moment this window is always visible eventhoug when I write in the code:
visible="false" or visible="vlc.hasVout"
Strange. What is your version of VLC?

i've had that problem w/ VLC 0.8.5

even though my skin is set to "hide" the video when it stops.. that does not happen.

it was working with one of the 0.8.5 betas pre-april 26th..... but it does not work any more with the final 0.8.5 itself...

DonBilbo

Postby DonBilbo » 28 Jul 2006 20:28

I'm using vlc 0.8.4a.

DonBilbo

Postby DonBilbo » 28 Jul 2006 20:38

But even with the newest version, I downloaded yesterday, it doesn't work.
I wrote the code in the command:

Code: Select all

<Video width="..." .... visible="vlc.hasVout" />

DJ
Cone Master
Cone Master
Posts: 8206
Joined: 01 Jan 2006 04:30
Location: Koloa, Hawaii USA

Postby DJ » 29 Jul 2006 07:23

Could this have something to do with it?

viewtopic.php?t=24241

ipkiss
Big Cone-huna
Big Cone-huna
Posts: 695
Joined: 23 Nov 2003 01:49

Postby ipkiss » 29 Jul 2006 16:38

The 'visible' attribute is for the Window tag, not the Video one.

DonBilbo

Postby DonBilbo » 29 Jul 2006 19:37

i'm not talking about the video in a self-made window.
Huhhhh. How can I explain it ????

first:
+------------------------------------+
| _ x |
| +------------------------+ |
| | | |
| | Informatoin | |
| | | |
| | | |
| +------------------------+ |
| |<< << (>) >> >>| | <- menu
+-----------------------------------+

This is my main-window. In this window I want to watch the movies. When I start Vlc, I want this information to be visible. It is not in a separate window. It is drawn in the the main-window.

later:
+------------------------------------+
| _ x |
| +------------------------+ |
| | | |
| | running_video | |
| | | |
| | | |
| +------------------------+ |
| |<< << (>) >> >>| | <- menu
+-----------------------------------+

So, when I hit the Play-button (>), I want the play-screen to appear infront of these information and hide them. The play-screen is also not a separate window. You can show it with the command:
<Video width="..." .... />

The advantage is, that my play-screen is always moving with my mainwindow. If my play-screen would be on a separate window, it wouldn't go with the main-window.

Hope you'll understand it now :-)

DonBilbo

Postby DonBilbo » 29 Jul 2006 19:41

first:
+---------------------------------------+
| ............................................ _ x|
|.... +------------------------+ |........|
| ....| .................................|....... |
| ....| .........Informatoin...... |....... |
| ....| .................................|....... |
| ....| .................................|....... |
| ....+------------------------+ |........|
| ......|<< << (>) >> >>| ............|....... <- menu
+--------------------------------------+

later:
+---------------------------------------+
| ............................................ _ x|
|.... +-------------------------+........|
| ....| .................................|....... |
| ....| ........running............. |....... |
| ....| .........movie...............|....... |
| ....| .................................|....... |
| ....+--------------------------+........|
| ......|<< << (>) >> >>| ............|....... <- menu
+--------------------------------------+

Asim
Cone that earned his stripes
Cone that earned his stripes
Posts: 151
Joined: 30 Mar 2005 05:58
Contact:

Postby Asim » 30 Jul 2006 01:15

i believe you're basically saying this:


When there is no video playing, and the video is in the same window as the play button, then there should be now black video bar displaying. e.g. if your background is white... then there should be no black bars around where the video is supposed to be. the black bars should be "hidden"

however, once you press play, the video window should appear again... does that sound right?

if so, i believe ipkiss has answered it by saying there is no "visible" attribute for the video element... which kinda sucks

- Asim

ipkiss
Big Cone-huna
Big Cone-huna
Posts: 695
Joined: 23 Nov 2003 01:49

Postby ipkiss » 30 Jul 2006 13:10

if so, i believe ipkiss has answered it by saying there is no "visible" attribute for the video element... which kinda sucks
In fact, there _is_ a 'visible' attribute for the Video tag (see "Attributes common to all the controls" in the doc). So i was wong in my previous post, and what you are trying to do should work.

I hope to have some time to look at all the reported problems concerning the Video control next week...

DonBilbo

Postby DonBilbo » 01 Aug 2006 22:46

Thanks for the answers.

@ @$im: thats exactly what I wanted to explain with my little images :-)

@ ipkiss:
In fact, there _is_ a 'visible' attribute for the Video tag (see "Attributes common to all the controls" in the doc). So i was wong in my previous post, and what you are trying to do should work.
yes but how. How can I make the video bar visible or hide it????

ipkiss
Big Cone-huna
Big Cone-huna
Posts: 695
Joined: 23 Nov 2003 01:49

Postby ipkiss » 02 Aug 2006 08:36

Currently, i think that your only option is to wait for a bug fix :-)

DonBilbo

Postby DonBilbo » 02 Aug 2006 11:53

o.k. then. Thanks for the ansewers.
I think I'll leave this option :-)


Return to “Skins”

Who is online

Users browsing this forum: No registered users and 14 guests