Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
Hi everyone!,
I encountered a problem with the player object. When I try to play a Video, it plays fine till it is almost finished. Then the Video freezes like half a second before it is supposed to end and then skips right to the end. I tried to mask the player with a graphic "rectangle" (in the "on playstopped" function) already, but this didn't work either. I think it has something to do with the "On playstopped" function. Can anybody help me with this problem? I`m using Livecode Version 4.6.1, thank you for your help in advance! I attached the code I'm using.
On opencard
local filepath
put specialFolderPath("desktop") & "/Urteil/Video_1.mp4" into filepath
set the filename of player "Videos" to (filepath)
start player "Videos"
end opencard
On Playstopped
lock screen
set the filename of player "Videos" to empty
unlock screen
end playstopped
Does it help if you set the alwaysBuffer of the player control to true?
Why locking the screen and why masking? Have you tried it without locking the screen? Why even setting the filename of the player control to empty? What is it that you are trying to achieve by this?
You could execute the following in the message box:
on player1CallbackMsg
set the filename of player "Videos" to empty
end player1CallbackMsg
Best regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
I think it does, because he says he believes it has something to do with the playStopped handler. I presume he did a test without this handler.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
On Playstopped
lock screen
lock messages
## PLAYSTOPPED will also be sent when you set the FILENAME to a new file or to empty!
## maybe this will help...?
set the filename of player "Videos" to empty
unlock screen
unlock messages
end playstopped
Does not make any sense, but what the heck, its worth a try!?