How to delete / destroy flowplayer instance?

Create an instance of flowplayer as follows:

$f("player", "flowplayer.swf", "my-video.flv");

When deleting a container element directly, $("#player").remove()(using jQuery),

I found $f("player")more there. How to delete an instance really?

+5
source share
2 answers

At BestKicker we use $f().unload().

+1
source

I basically saved the contents of the DOM element containing the player element in jQuery data in the DOM ready:

$('.video-holder').each(function(i,el){
    $(el).data('init-state', $(el).html());
});

... then reset the contents (thereby separating the Flowplayer instance), invoking the saved data back to the HTML element of the holder, to effectively "reset" it:

$('.video-holder').each(function(i,el){
    $(el).html($(el).data('init-state'));
});

, Flowplayer, , . , , , , Flowplayer - , , , .

0

All Articles