Reputation: 3914
I'm writing a Flex video player with a "slow advance" button, and my first approach is to simply toggle between play() and pause() on a timer. I'd like to say something like
if (video.isPlaying) {
video.pause();
} else {
video.play();
}
But I can't find anything like an 'isPlaying' property. Am I barking up the wrong tree?
Upvotes: 0
Views: 505
Reputation: 546
The property (Boolean) is not "isPlaying" but simply "playing" :) FTQuest
Upvotes: 1
Reputation: 39408
How about something like this:
if (video.currentCSSState == 'playing'){
// is playing
} else {
// is not playing
}
Since currentCSSState is a protected method you'll have to extend the video component and either expose it or ad your own "isPlaying" property/method.
Upvotes: 0