How to change the appearance of the Player?

Visuals, audio, animation. Blended, not stirred. If LiveCode is part of your rich media production toolbox, this is the forum for you.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

How to change the appearance of the Player?

Postby sphere » Sat Nov 26, 2016 1:53 pm

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
sphere
 
Posts: 334
Joined: Sat Sep 27, 2014 10:32 am

Re: How to change the appearance of the Player?

Postby shaosean » Sat Nov 26, 2016 2:58 pm

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..
shaosean
 
Posts: 760
Joined: Thu Nov 04, 2010 7:53 am

Re: How to change the appearance of the Player?

Postby sphere » Sat Nov 26, 2016 7:35 pm

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.
sphere
 
Posts: 334
Joined: Sat Sep 27, 2014 10:32 am

Re: How to change the appearance of the Player?

Postby shaosean » Sun Nov 27, 2016 2:15 am

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-5-video-element-with-javascript-and-css/27683>
shaosean
 
Posts: 760
Joined: Thu Nov 04, 2010 7:53 am

Re: How to change the appearance of the Player?

Postby sphere » Sun Nov 27, 2016 2:01 pm

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.
sphere
 
Posts: 334
Joined: Sat Sep 27, 2014 10:32 am

Re: How to change the appearance of the Player?

Postby okk » Sat Jan 21, 2017 10:12 pm

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.


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.

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
okk
 
Posts: 69
Joined: Wed Feb 04, 2015 11:37 am

Re: How to change the appearance of the Player?

Postby sphere » Sun Jan 22, 2017 10:04 am

Thank you very much.
Going to have a play with it :D
sphere
 
Posts: 334
Joined: Sat Sep 27, 2014 10:32 am

Re: How to change the appearance of the Player?

Postby Klaus » Mon Jan 23, 2017 5:28 pm

Hi all,

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

Best

Klaus
Klaus
 
Posts: 9194
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany

Re: How to change the appearance of the Player?

Postby okk » Wed Jan 25, 2017 12:33 pm

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
okk
 
Posts: 69
Joined: Wed Feb 04, 2015 11:37 am

Re: How to change the appearance of the Player?

Postby dixita » Wed Mar 15, 2017 11:38 am

Hey is there any new features or settings for changing appearances of the player?
dixita
 
Posts: 5
Joined: Wed Mar 15, 2017 11:33 am

Re: How to change the appearance of the Player?

Postby Klaus » Wed Mar 15, 2017 12:42 pm

Hi dixita,

1. welcome to the forum! :D

2.
dixita wrote:Hey is there any new features or settings for changing appearances of the player?

Hey, no!


Best

Klaus
Klaus
 
Posts: 9194
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany

Re: How to change the appearance of the Player?

Postby sphere » Wed Mar 15, 2017 8:04 pm

Thanks for your script OKK and your addition Klaus.

Ciao!
sphere
 
Posts: 334
Joined: Sat Sep 27, 2014 10:32 am

Re: How to change the appearance of the Player?

Postby dixita » Fri Mar 24, 2017 8:14 am

Hahaha!!! ok.
Thanx for replying Klaus.
dixita
 
Posts: 5
Joined: Wed Mar 15, 2017 11:33 am


Return to Rich Media

Who is online

Users browsing this forum: No registered users and 1 guest