I am trying to get the filename or URL of the currently playing video in Flowplayer and display it in my show div. I thought I could use getClip().completeUrl
but I get undefined as the output. If I do something that isn't a string, like getClip().fullDuration (an integer), the output works as expected. Why am I getting undefined?
Here's my javascript:
function getURL(){
var url = flowplayer().getClip().completeUrl;
$("#show").empty();
$('#show').append(url);
}
Here's my HTML:
<input type="button" id="get" value="Get URL" onclick="getURL()" />
<input type="text" id="show" name="show" />
Here's the player javascript:
$f("player", "http://releases.flowplayer.org/swf/flowplayer-3.2.11.swf", {
buffering : false,
clip: {
provider: 'rtmp',
baseUrl: 'http://example.com',
streams: [
{ url: 'flv:video123'},
]
},
plugins: {
rtmp: {
url: "flowplayer.rtmp-3.2.10.swf",
netConnectionUrl: 'rtmp://example.com/vod'
}
}
});