locked
How to manually hide the controls of PlayerFramework.MediaPlayer?

    Question

  • Does anyone know how to manually hide the player controls of the PlayerFramework.MediaPlayer?

    When the user changes the closed captions (event = "currentcaptiontrackchanging"), I would like to hide the controls. I have found the following (jQuery) code does the trick, but I would like to know if there is a better (built-in) way to manually hide the controls.

                $(".pf-container").removeClass("pf-show-control-container");
                $(".pf-control-panel").addClass("pf-hidden").attr("aria-hidden", "true");

    p.s. I would post this question over on the playerframework forums, but very few questions are answered there.
    https://playerframework.codeplex.com/wikipage?title=JavaScript%20API%20Reference



    • Edited by Jaxim Wednesday, November 12, 2014 5:22 PM
    Wednesday, November 12, 2014 4:24 PM

Answers

  • Hi Jaxim,

    Let's say if playerframework provide you any API that can hide the player then you can hide it. Otherwise you have to manually find the player element by id or class and use javascript way to hide them, which is not suggested.

    The link you paste here is quit useful, press ctrl+F to filter keyword "visible", you should be able to see the similar thing in C# documentation.

    As a quick search I did not find any API in JavaScript documentation that can hide the player container.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    Wednesday, November 26, 2014 8:13 AM
    Moderator

All replies

  • From MediaPlayer's reference, IsTimeLineVisible, IsPlayPauseVisible, IsPositionVisible, IsStopVisible and many other visibility properties available. so you can set them to false. take a look at the MediaPlayer Properties
    Thursday, November 13, 2014 6:10 AM
  • thanks for the response.

    However, what you provided me was visible property calls to individual controls within the control panel. I want to know when the entire control panel is visible/hidden and also know how to hide/display the ENTIRE control panel.

    The link you provided is great! but unfortunately it is not for the JavaScript version of the MediaPlayer.

    Thursday, November 13, 2014 3:59 PM
  • Hi Jaxim,

    Let's say if playerframework provide you any API that can hide the player then you can hide it. Otherwise you have to manually find the player element by id or class and use javascript way to hide them, which is not suggested.

    The link you paste here is quit useful, press ctrl+F to filter keyword "visible", you should be able to see the similar thing in C# documentation.

    As a quick search I did not find any API in JavaScript documentation that can hide the player container.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    Wednesday, November 26, 2014 8:13 AM
    Moderator