Play two videos

Just starting out? Need help? Post your questions and find answers here.
Trion
New User
New User
Posts: 7
Joined: Tue Dec 27, 2016 11:13 pm

Play two videos

Post by Trion »

Hi all, if i run this code only the second window will play the video?

Code: Select all

InitMovie()

LoadMovie(0, "test.wmv")
LoadMovie(1, "test.wmv")
  
OpenWindow(0, 100, 150, MovieWidth(0), MovieHeight(0), "PureBasic - Movie")
PlayMovie(0, WindowID(0))
      
OpenWindow(1, 100, 450, MovieWidth(1), MovieHeight(1), "PureBasic - Movie")
PlayMovie(1, WindowID(1))
      
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
// Edit: Code-Tags added (Kiffi)
infratec
Always Here
Always Here
Posts: 6883
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Play two videos

Post by infratec »

Hm...

after searching for an example:

https://file-examples.com/wp-content/up ... _1_2MB.wmv

I started a test and yes, only on window 0 was a playing movie.

But after several tries it played on both windows without a change.
Trion
New User
New User
Posts: 7
Joined: Tue Dec 27, 2016 11:13 pm

Re: Play two videos

Post by Trion »

Thanks for checking

If I only play a video, I don't see any video and I only hear the sound.

Code: Select all

InitMovie()

LoadMovie(0, "test.wmv")

OpenWindow(0, 100, 150, MovieWidth(0), MovieHeight(0), "PureBasic - Movie")
PlayMovie(0, WindowID(0))
      
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
That looks to me from a bug in purebasic, i'm using windows 10 64bit

Here my test video: http://www.s3d.at/test.wmv
BarryG
Addict
Addict
Posts: 3330
Joined: Thu Apr 18, 2019 8:17 am

Re: Play two videos

Post by BarryG »

Trion wrote:Here my test video: http://www.s3d.at/test.wmv
All examples play the video for me without problem (same PC setup as yours).

What happens if you manually click and drag the window when the video is playing? Does it show then?
Joris
Addict
Addict
Posts: 885
Joined: Fri Oct 16, 2009 10:12 am
Location: BE

Re: Play two videos

Post by Joris »

BarryG wrote:All examples play the video for me without problem ...
Here too (XP 32bit) !
Yeah I know, but keep in mind ... Leonardo da Vinci was also an autodidact.
Post Reply