Giter Site home page Giter Site logo

Comments (18)

Pelirrojo avatar Pelirrojo commented on August 23, 2024

@blacktrash says: The solution is in the button docs: specify display: "none" in the captionTarget content plugin config. Captions will only show after clicking the captions button.
Like

me: Thanks!!!
It works fine!

from flash.

phloxic avatar phloxic commented on August 23, 2024

Hiding the captionTarget arguably only works around a bug: It does what it says: it hides the captions, but does not disable them. The indication is that the CC widget still shows them as enabled.
We can decide that disabling captions is not on offer except for embedded captions (and then not dynamically). But then we should make this official.

from flash.

danrossi avatar danrossi commented on August 23, 2024

Yes I believe disabling the cuepoint listener when turning off then binding the listener again is an easy solution here. It may cause other issues in the process but would have to find them as it goes. It may be an idea to change the cc button to a dock button in the process if things are going to be changed.

from flash.

danrossi avatar danrossi commented on August 23, 2024

Did you want me to go ahead with this ?

from flash.

danrossi avatar danrossi commented on August 23, 2024

This is trivial to fix let me know if you want it done thanks.

from flash.

phloxic avatar phloxic commented on August 23, 2024

Would this disable user-configured cuepoints too?

from flash.

danrossi avatar danrossi commented on August 23, 2024

The requirement is to unbind the cuepoints listener so its not updating anything and then when activated bind the cuepoints listener again and it will start displaying the text again. It might be an idea to change the CC button to a dock button while we're at it as has been requested for a few years now. What do you think.

from flash.

danrossi avatar danrossi commented on August 23, 2024

The listener on the plugin that is cuepoints is still functioning as always it might be too much work, to clear out the subtitles cuepoints, or reload on demand might be too slow anyway. So cuepoints would still be dispatching in the player, is that where you want them disabled ?

from flash.

danrossi avatar danrossi commented on August 23, 2024

Another option would be to store the loaded cuepoints. when disabling remove them from the players cuepoints, and when enabling add them back in. They get added for each playlist item on startup so would have to be updated for each playlist item at once. A bit of work there. the simplest is to just unbind the event on the plugin.

from flash.

phloxic avatar phloxic commented on August 23, 2024

I think it's dangerous to fiddle with the already brittle cuepoints.

My proposal is to address this merely from the UI perspective: Think not "disable", but "hide".

  1. Leave the documented mechanism in place that to hide subtitles, one has to hide the captionTarget plugin.
  2. Allow the CC widget to be hidden/revealed by $f().getPlugin("captions").hide() and friends; also allow display: none in config. In other words make the plugin behave like the docs say that all plugins behave. If this is too complicated, move the CC widget to the dock.

This seems like the least invasive change, while being most flexible at the same time.

from flash.

danrossi avatar danrossi commented on August 23, 2024

Ok i must of missed something because thats all the button does right now, hides / shows the content plugin. no worries then.

from flash.

danrossi avatar danrossi commented on August 23, 2024

what is the purpose of hiding the button sorry ?

from flash.

phloxic avatar phloxic commented on August 23, 2024

To disable captions from the user perspective. E.g. start with a hidden captionTarget and offer a scripted/dynamic way to enable captions. When the button is visible user can just click on it.

from flash.

danrossi avatar danrossi commented on August 23, 2024

captiontarget: { display: "none" }, would cover hiding the content plugin. dock: true / false should cover configuring to enable a dock button or not (may aswell make it a proper dock button while we are at it ?? ) , external methods showCaptions / hideCaptions() should cover that. According to what I get from that info is what you need. However also configurable via js ie $f().getPlugin("captiontarget").toggle(); will toggle the display.

from flash.

danrossi avatar danrossi commented on August 23, 2024

what is the resolution for this ?

from flash.

anssip avatar anssip commented on August 23, 2024

There's now external methods showButton() and hideButton() in the version currently in our dev site. These methods can be used to show and hide the CC button.

from flash.

phloxic avatar phloxic commented on August 23, 2024

Works.
But why new methods, and not the already advertised (for all plugins) hide() and show()?
Plugin special case because css() and animate() will never work?
I'm asking because it has to be documented.

from flash.

anssip avatar anssip commented on August 23, 2024

I cannot make those generic functions work here easily, that's why special methods. I know this is not ideal.

from flash.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.