How to change the appearance of the Player?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
How to change the appearance of the Player?
Hello,
does anyone knows how to change the appearance of the player?
And i don't mean just the colors you can set in the inspector.
I mean the knobs and all such.
thanks a lot for any help on this.
Sphere
does anyone knows how to change the appearance of the player?
And i don't mean just the colors you can set in the inspector.
I mean the knobs and all such.
thanks a lot for any help on this.
Sphere
Re: How to change the appearance of the Player?
I think you would have to hide the built-in controls (can they be hidden?) and then create your own controls to manipulate the properties of the player..
Re: How to change the appearance of the Player?
Ah yes that's an idea too.
Just hide the complete player.
but when you still want to see the progress bar then another issue rises, i believe.
I think all together it would be easier to have access to the graphics.
Just hide the complete player.
but when you still want to see the progress bar then another issue rises, i believe.
I think all together it would be easier to have access to the graphics.
Re: How to change the appearance of the Player?
Another option would be to play the video through a web widget and you can use JS and CSS to style the HTML player <http://mrbool.com/how-to-style-the-html ... -css/27683>
Re: How to change the appearance of the Player?
Very nice thank you.
Maybe it can be of help indeed.
Did you see the new Google Web Designer? a complete HTML5 web designingtool, still Beta.
Unfortunately is refusing to import HTML5 files not created with the tool. I tried to import the exported one by LC just to test.
Did not play with it much yet.
Maybe it can be of help indeed.
Did you see the new Google Web Designer? a complete HTML5 web designingtool, still Beta.
Unfortunately is refusing to import HTML5 files not created with the tool. I tried to import the exported one by LC just to test.
Did not play with it much yet.
Re: How to change the appearance of the Player?
I think your best option is to hide the controller and create one by yourself. The progress-bar can be easily re-created with your own code for example by setting the width of a line based on the currenttime of the player. See my code example. This script is located in the playerobject. It draws a line indicating how much of the moviefile has already been played. You have to call the script when the player is started.sphere wrote: but when you still want to see the progress bar then another issue rises, i believe.
I think all together it would be easier to have access to the graphics.
Code: Select all
on updateprogress
put the duration of me into movielength
put the currenttime of me into movieprogress
set the points of graphic "movieprogress" to (the left of me), the bottom of me+1, (the left of me) + (round(movieprogress/movielength*(the width of me))), the bottom of me+1
if movielength > (movieprogress +5) then
send updateprogress to me in 10 milliseconds
else
hide graphic "movieprogress"
hide player "cinema"
-- kill progressbar
put the pendingmessages into pendingmsg
if "updateprogress" is in pendingmsg then
repeat FOR each line x in pendingmsg
if "updateprogress" is in x THEN cancel item 1 of x
end REPEAT
end if
end if
end updateprogress
Re: How to change the appearance of the Player?
Thank you very much.
Going to have a play with it
Going to have a play with it
Re: How to change the appearance of the Player?
Hi all,
use a local variable to avoid messing around with ALL pending messages:
Best
Klaus
use a local variable to avoid messing around with ALL pending messages:
Code: Select all
local tPendingUpdateProgress
on updateprogress
put the duration of me into movielength
put the currenttime of me into movieprogress
set the points of graphic "movieprogress" to (the left of me), the bottom of me+1, \
(the left of me) + (round(movieprogress/movielength*(the width of me))), the bottom of me+1
if movielength > (movieprogress +5) then
send "updateprogress" to me in 10 milliseconds
## !!!
put the result into tPendingUpdateProgress
### !!!
else
hide graphic "movieprogress"
hide player "cinema"
## !!! Kill progressbar in a ONE liner:
cancel tPendingUpdateProgress
## !!!
end if
end updateprogress
Klaus
Re: How to change the appearance of the Player?
Thanks Klaus, always learning something new here. I learned the kill pending message loop here on the forum, but your solution with a local variable is so much more smart. Thank you! Oliver
Re: How to change the appearance of the Player?
Thanks for your script OKK and your addition Klaus.
Ciao!
Ciao!