I have several videos autoplaying on a webpage using Flowplayer and jQuery like so:
$('.video').each(function (k, obj) {
$(obj).flowplayer(...)
})
They're streaming videos and start playing automatically.
Later I want to use the Javascript API to interact with the player. It's not working, despite $f()
returning a Flowplayer object:
$f('video1') // -> {_api: function ...}
I just learned that you must 'load' the player first, but that doesn't help:
$f('video1').isLoaded() // -> false
$f('video1').load(function () { console.log('video loaded') })
$f('video1').isLoaded() // -> false
The bizarre thing is that when I call load()
the video flashes to black and then starts playing again, but the load callback function doesn't fire.
Why is this?