Video

Discussions related to Visual Prolog
hicham
Active Member
Posts: 29
Joined: 3 Apr 2014 8:32

Video

Unread post by hicham » 23 Apr 2014 9:15

Is it possible to add video or animation to form?
ok

Kari Rastas
Active Member
Posts: 31
Joined: 4 Mar 2000 0:01

Unread post by Kari Rastas » 24 Apr 2014 7:42

Check VideoLan VLC activeX (open source media player). It should make able to show videos in a VIP program.

User avatar
Thomas Linder Puls
VIP Member
Posts: 1176
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls » 24 Apr 2014 8:00

Depending on the format of the video/animation you want to play you can use the animationControl.

But you can also use a webBrowserControl; loaded with suitable HTML it will play videos in numerous formats (especially if you download additional codec's).
Regards Thomas Linder Puls
PDC

hicham
Active Member
Posts: 29
Joined: 3 Apr 2014 8:32

Unread post by hicham » 24 Apr 2014 9:42

is it possible to give example ?
ok

User avatar
Thomas Linder Puls
VIP Member
Posts: 1176
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls » 24 Apr 2014 10:16

I have not really tried this code:

Code: Select all

implement videoAnimationForm     inherits formWindow     open core, vpiDomains     clauses     display(Parent) = Form :-         Form = new(Parent),         Form:show().   clauses     new(Parent):-         formWindow::new(Parent),         generatedInitialize(),         animationControl_ctl:path := "animation.avi",         animationControl_ctl:play(),         webBrowserControl_ctl:html :=             "<html>"                 "<head>"                     "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">"                 "</head>"                 "<body>"                     "<video width=\"320\" height=\"240\" controls>"                         "<source src=\"movie.mp4\" type=\"video/mp4\">"                         "Your browser does not support the video tag."                     "</video>"                 "</body>"             "</html>".   % This code is maintained automatically, do not update it manually. 12:09:24-24.4.2014 facts     ok_ctl : button.     cancel_ctl : button.     help_ctl : button.     animationControl_ctl : animationcontrol.     webBrowserControl_ctl : webbrowsercontrol.   predicates     generatedInitialize : (). clauses     generatedInitialize():-         setFont(vpi::fontCreateByName("Tahoma", 8)),         setText("videoAnimationForm"),         setRect(rct(50,40,383,255)),         setDecoration(titlebar([closebutton,maximizebutton,minimizebutton])),         setBorder(sizeBorder()),         setState([wsf_ClipSiblings,wsf_ClipChildren]),         menuSet(noMenu),         ok_ctl := button::newOk(This),         ok_ctl:setText("&OK"),         ok_ctl:setPosition(76, 194),         ok_ctl:setSize(56, 16),         ok_ctl:defaultHeight := false,         ok_ctl:setAnchors([control::right,control::bottom]),         cancel_ctl := button::newCancel(This),         cancel_ctl:setText("Cancel"),         cancel_ctl:setPosition(140, 194),         cancel_ctl:setSize(56, 16),         cancel_ctl:defaultHeight := false,         cancel_ctl:setAnchors([control::right,control::bottom]),         help_ctl := button::new(This),         help_ctl:setText("&Help"),         help_ctl:setPosition(204, 194),         help_ctl:setSize(56, 16),         help_ctl:defaultHeight := false,         help_ctl:setAnchors([control::right,control::bottom]),         animationControl_ctl := animationcontrol::new(This),         animationControl_ctl:setPosition(8, 6),         animationControl_ctl:setSize(68, 74),         webBrowserControl_ctl := webbrowsercontrol::new(This),         webBrowserControl_ctl:setPosition(84, 6),         webBrowserControl_ctl:setSize(240, 180). % end of automatic code end implement videoAnimationForm
The "IE-Edge" metatag in the HTML is important, otherwise the webBrowser control behaves like in aincient time.
Regards Thomas Linder Puls
PDC

hicham
Active Member
Posts: 29
Joined: 3 Apr 2014 8:32

Unread post by hicham » 24 Apr 2014 10:59

i build the project, but i have this error : Undeclared identifier 'path/0'
ok

User avatar
Thomas Linder Puls
VIP Member
Posts: 1176
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls » 25 Apr 2014 19:20

Which Visual Prolog version do you have?
Regards Thomas Linder Puls
PDC

hicham
Active Member
Posts: 29
Joined: 3 Apr 2014 8:32

Unread post by hicham » 26 Apr 2014 10:53

7.4
ok

Post Reply