Skip to main content
Inspiring
August 11, 2022
Answered

customizing media player controls - site is now responsive!

  • August 11, 2022
  • 1 reply
  • 500 views

Hey all -

 

sooo.. i was able to get my site to be responsive - woohoo!

 

there are a few tweaks to make but now that my video player can work in all formats I'd like to make one adjustment

 

if you click on any of the thumbs here--

https://toddheymandirector.com/reel/

 

the previous/next/close all overlay the video and I'd like them to exist outside like they do here

 

https://www.rakish.us/directors/matt-smukler#publix-on-our-way-2

 

I havent been able to bring them outside the API and I think thats the problem..  so the disappear when outside the video frame 

 

should i reconfigure my HTML?

    This topic has been closed for replies.
    Correct answer osgood_

    Make a back up of your video player page just incase this doesnt work.

     

    In your css file find the css selector for the right arrow:

     

    #movie a.btn-next-project

     

    Change its right value to -40px as below:

     

    #movie a.btn-next-project {
    right: -40px;
    }

     

    The arrow will disapear from the page but dont worry about that yet.

     

    Next find the css selector for the left arrow:

     

    #movie a.btn-previous-project

     

    Change its left value to -40px as below: 

     

    #movie a.btn-previous-project {
    left: -40px;
    }

     

    The arrow will disapear from the page but dont worry about that yet.

     

    Next find the css selector for the '.aspect-ratio-container 'and comment out /*overflow:hidden;*/

     

    The two arrows should now be visible.

     

    Now you need to stop those arrows disappearing when the mouse leaves the video area.

     

    Add this to the css:

     

    #movie a.btn {
    opacity: 1 !important;
    display: block !important;
    -webkit-transition: all .5s;
    -moz-transition: all .5s;
    -ms-transition: all .5s;
    -o-transition: all .5s;
    transition: all .5s;
    }

     

     

    Then find the below css selector and and remove #movie a.btn, from the start of it. 

     

    /* non-hover, or hover but inactive */
    #movie a.btn, #movie.inactive:hover a.btn,
    #movie .vjs-control-bar, #movie.inactive:hover .vjs-control-bar,
    /* initializing state */
    #movie.initializing a.btn, #movie.initializing.inactive:hover a.btn,
    #movie.initializing .vjs-control-bar, #movie.initializing .inactive:hover .vjs-control-bar {
    opacity: 0 !important;
    display: block !important;
    -webkit-transition: all .5s;
    -moz-transition: all .5s;
    -ms-transition: all .5s;
    -o-transition: all .5s;
    transition: all .5s;
    }

     

    Does that work?

    1 reply

    osgood_Correct answer
    Legend
    August 12, 2022

    Make a back up of your video player page just incase this doesnt work.

     

    In your css file find the css selector for the right arrow:

     

    #movie a.btn-next-project

     

    Change its right value to -40px as below:

     

    #movie a.btn-next-project {
    right: -40px;
    }

     

    The arrow will disapear from the page but dont worry about that yet.

     

    Next find the css selector for the left arrow:

     

    #movie a.btn-previous-project

     

    Change its left value to -40px as below: 

     

    #movie a.btn-previous-project {
    left: -40px;
    }

     

    The arrow will disapear from the page but dont worry about that yet.

     

    Next find the css selector for the '.aspect-ratio-container 'and comment out /*overflow:hidden;*/

     

    The two arrows should now be visible.

     

    Now you need to stop those arrows disappearing when the mouse leaves the video area.

     

    Add this to the css:

     

    #movie a.btn {
    opacity: 1 !important;
    display: block !important;
    -webkit-transition: all .5s;
    -moz-transition: all .5s;
    -ms-transition: all .5s;
    -o-transition: all .5s;
    transition: all .5s;
    }

     

     

    Then find the below css selector and and remove #movie a.btn, from the start of it. 

     

    /* non-hover, or hover but inactive */
    #movie a.btn, #movie.inactive:hover a.btn,
    #movie .vjs-control-bar, #movie.inactive:hover .vjs-control-bar,
    /* initializing state */
    #movie.initializing a.btn, #movie.initializing.inactive:hover a.btn,
    #movie.initializing .vjs-control-bar, #movie.initializing .inactive:hover .vjs-control-bar {
    opacity: 0 !important;
    display: block !important;
    -webkit-transition: all .5s;
    -moz-transition: all .5s;
    -ms-transition: all .5s;
    -o-transition: all .5s;
    transition: all .5s;
    }

     

    Does that work?

    REELHEROAuthor
    Inspiring
    August 12, 2022

    it sure did - thank you

     

    you'd be proud of me Osgood - I did everything you said  before I created this post including preventing the arrows from disappearing, except for commenting out the overflow:hidden - Im learning!!

    Liam Dilley
    Inspiring
    August 17, 2022

    Glad you are getting there.

    Couple of things to help.

    On the video pages...
    https://toddheymandirector.com/reel/movies/redcross/
    Your video is playing but you got the play icon.
    You can see that has classes that change - vjs-paused, vjs-playing.


    So you can do a CSS only update for playing - show pause icon and pause - show play icon. That should be an easy update.

    When the page loads it flickers a bit.

    You could just set a min width using view port values so the space is there and set the background of that region in the middle to have a load spinner animation or like. OR you can have first frame image (Mentioned before for the other main page you were working on) That should help it look a bit smoother.