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