<div dir="ltr">Hi :) <div style>I am guessing that you have already posted to the devs mailing list or irc channel? Also to the French mailing list? If not then it's worth trying. </div><div style><br></div><div style>
It seems a bit weird they have gone for a proprietary, undocumented player instead of gnash, swfplayer, totem, Vlc or some other OpenSource alternative. There probably is a reason. If it's purely down to trying to use something that you can be certain people already have on their system then Vlc might be worth a try because that is quite popular too. (plus you can always give a link for people to downnload and install an OpenSource alternative anyway (as people do for pdfs))</div>
<div style><br></div><div style>Regards from </div><div style>Tom :) </div><div style><br></div><div style><br></div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 17 April 2014 10:23, Fernand Vanrie <span dir="ltr"><<a href="mailto:sos@pmgroup.be" target="_blank">sos@pmgroup.be</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On The French user site i found usefull code to play video on Windows using the API and Basic.<br>
<br>
The code opens a MediaWindow and play any video<br>
<br>
The player has a undocumented method "CreatePlayerWindow" who needs arguments (a empty array do crash LO)<br>
<br>
Do someone knows how to use this method and how Video can been played in a Dialog ?<br>
<br>
Thanks for any hints<br>
<br>
Global video<br>
Global oPlayer<br>
Global Player_flag, Video_flag, Time<br>
<br>
' ------------------------------<u></u>------------------------------<u></u>----------<br>
Sub VideoPlayer<br>
If Video_flag = 0 Then<br>
video =converttoURL("C:\Users\PMG\<u></u>Videos\Untitled.avi") ' La vidéo à charger<br>
Video_flag = 1<br>
'for windows:<br>
oManager = CreateUnoService("com.sun.<u></u>star.media.Manager_DirectX")<br>
' for Linux<br>
' oManager = CreateUnoService("com.sun.<u></u>star.media.Manager_GStreamer")<br>
End Select<br>
oPlayer = oManager.createPlayer( video )<br>
' oPlayer.CreatePlayerwindow(<u></u>array()) ' do crash LO<br>
oPlayer.start() ' Lecture<br>
Player_flag = 1<br>
Else<br>
oPlayer.start() ' Lecture<br>
Player_flag = 1<br>
End If<br>
End Sub<br>
<br>
' ------------------------------<u></u>------------------------------<u></u>----------<br>
Sub VideoPlayer_pause<br>
If Player_flag = 1 Then<br>
oPlayer.stop() ' Pause<br>
Player_flag = 0<br>
Time = oPlayer.getmediatime()<br>
End If<br>
End Sub<br>
<br>
' ------------------------------<u></u>------------------------------<u></u>----------<br>
Sub VideoPlayer_avance_rapide<br>
If Player_flag = 0 Then<br>
oPlayer.setmediatime(Time +1) ' Avance_rapide<br>
Time = oPlayer.getmediatime()<br>
End If<br>
End Sub<br>
<br>
' ------------------------------<u></u>------------------------------<u></u>----------<br>
Sub VideoPlayer_recul_rapide<br>
If Player_flag = 0 Then<br>
oPlayer.setmediatime(Time -1) ' Recul_rapide<br>
Time = oPlayer.getmediatime()<br>
End If<br>
End Sub<br>
<br>
' ------------------------------<u></u>------------------------------<u></u>----------<br>
Sub VideoPlayer_stop<br>
oPlayer.stop() ' Pause<br>
'Video_flag = 1<br>
Time = 0<br>
oPlayer.setmediatime(Time)<br>
End Sub<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
-- <br>
To unsubscribe e-mail to: <a href="mailto:users%2Bunsubscribe@global.libreoffice.org" target="_blank">users+unsubscribe@global.<u></u>libreoffice.org</a><br>
Problems? <a href="http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/" target="_blank">http://www.libreoffice.org/<u></u>get-help/mailing-lists/how-to-<u></u>unsubscribe/</a><br>
Posting guidelines + more: <a href="http://wiki.documentfoundation.org/Netiquette" target="_blank">http://wiki.<u></u>documentfoundation.org/<u></u>Netiquette</a><br>
List archive: <a href="http://listarchives.libreoffice.org/global/users/" target="_blank">http://listarchives.<u></u>libreoffice.org/global/users/</a><br>
All messages sent to this list will be publicly archived and cannot be deleted<br>
<br>
</font></span></blockquote></div><br></div>