Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow straightforward getProperty calls for 'live', 'playing', 'quality', and other state currently only acquirable through events #6

Open
ExplodingCabbage opened this issue Mar 4, 2015 · 4 comments

Comments

@ExplodingCabbage
Copy link

The README indicates that at present, I can get events when the user starts or stops playback via addListener and removeListener...

viewer.addListener('playing', function (isPlaying) {
     // code
});

... but what if I just want to check, once, whether the video is playing? It would be nice to able to do

viewer.getProperty('isPlaying', function (isPlaying) {
    // code
});

We can create our own variable to keep track of such state and update it via the event handler, but this is less than ideal for two reasons:

  • It requires us to write our own bookkeeping code when the library could handle that for us
  • We (presumably) can't get the value until the first time it changes after us adding our handler

Would it be possible to allow all the events listed in the readme to be given corresponding getProperty calls? i.e.

  • isLive
  • isPlaying
  • size
  • quality
@necccc
Copy link
Contributor

necccc commented Mar 5, 2015

This is a reasonable request, but we need to implement this inside the player.

I'll update this ticket, when it's accessible through the API.

Thank you

@iamyojimbo
Copy link

Hi guys, is this on the roadmap anytime soon? Seems like a pretty simple one

@mindmelting
Copy link

+1

@ecumike
Copy link

ecumike commented Sep 21, 2016

Anyone maintaining this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants