Strange mediaview problem
Posted
#1
(In Topic #1480)
Regular

Posted
Banned
post a sample project
Also i'm not sure that type of error handling will work and you should probably check MediaView.State
I'll need to see all the code though, post a sample project that shows the bug.
snippets of code are just not enough to find the problem.
Posted
Regular

BruceSteers said
I would guess it's your code somewhere opening the form again in it's play setup.
post a sample project
Also i'm not sure that type of error handling will work and you should probably check MediaView.State
I'll need to see all the code though, post a sample project that shows the bug.
snippets of code are just not enough to find the problem.
I'll work on a sample project. Really busy today but I'll upload whenever I can. Thanks Bruce.
Posted
Regular

Posted
Banned
Maybe open the project in the IDE and select the menu Project / Make source archive
or select "Show hidden files" in your file manager before compressing the folder.
Posted
Regular

Whoops! Sorry about that. Forgot the files were hidden. Here you go…BruceSteers said
There's nothing in that zip file.
Maybe open the project in the IDE and select the menu Project / Make source archive
or select "Show hidden files" in your file manager before compressing the folder.
Posted
Banned
It opens in the main form all the time.
but i also get no error Message() call either with the first bad link (just shows an error message in the mediaview).
I suggest trying a Wait call directly after calling Message()
Message("Unable to connect!")
Wait
This gives the event loop a chance to cycle and has fixed what i think might have been a similar issue for me once.
I think when Message() runs Application.MainWindow changes and needs to restore properly.
Does the popup window happen if you do not use Message() ?
Posted
Regular

BruceSteers said
I can't reproduce the problem.
It opens in the main form all the time.
but i also get no error Message() call either with the first bad link (just shows an error message in the mediaview).
I suggest trying a Wait call directly after calling Message()
Message("Unable to connect!")
Wait
This gives the event loop a chance to cycle and has fixed what i think might have been a similar issue for me once.
I think when Message() runs Application.MainWindow changes and needs to restore properly.
Does the popup window happen if you do not use Message() ?
Yes the mediaview pops out whether I use Message() or not. I guess if you couldn't reproduce then it's obviously a me problem. I have 3 different machines all running Debian 12 with Gambas 3.18 and it happens on all 3. Trixie comes out in June if I remember correctly so I'll hold out until then and then upgrade one of the machines and see if it persists. In the meantime I'll just experiment with different things and see what happens.
I did try your drop-in mediaview component you suggested to me a few months ago in one of my posts but I couldn't get it to work….I'll just wait until Trixie is released.
Thanks Bruce!
Posted
Administrator

I'm on Debian 12 and Gambas 3.18.0.
Cancel that…
Button 2 works as should until I click button 1 and get the popup message. Next time I click button 2 the stream opens in new window.
Posted
Regular

Thanks sholzy. I think tomorrow I'll build a vm with a newer version of gambas…maybe ubuntu 24. I'll see if I can reproduce the problem on that.sholzy said
It's working for me. Button 1 produces a pop up error that it can't connect. Button 2 plays the stream.
I'm on Debian 12 and Gambas 3.18.0.
Cancel that…
Button 2 works as should until I click button 1 and get the popup message. Next time I click button 2 the stream opens in new window.
Posted
Administrator

I tried creating a basic test project using the same project properties as my security project. I still had the same issue with a new window popping up. If I find something useful, I'll post it here.
I also noticed you are using "Quit" to close your project. Use "Me.Close" instead. "Me.Close" allows Gambas to clean things up before closing the project.
Posted
Regular

Thanks sholzy!sholzy said
I use MediaView (6 actually) in my security camera project and don't get the same popup window issue as you.
I tried creating a basic test project using the same project properties as my security project. I still had the same issue with a new window popping up. If I find something useful, I'll post it here.
I also noticed you are using "Quit" to close your project. Use "Me.Close" instead. "Me.Close" allows Gambas to clean things up before closing the project.
Posted
Regular

1 guest and 0 members have just viewed this.




