Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JW-Player - How to unload?

My JS Code:

$('body').append('<div id="mediaplayer"></div>');

$.getScript('js/mplayer/jwplayer.js', function ()
{
jwplayer("mediaplayer").setup({
flashplayer: "js/mplayer/player.swf",
file: ''+v_url+'',
autostart: "true"
}); 

  $('#mediaplayer_wrapper').css('z-index','107').css('width','853px').css('height','505px').css('padding','10px').addClass('bg_one').center();
    });

I close the player with:

$('#mediaplayer, #mediaplayer_wrapper').remove();

but when i load the player again (with an other url) ... the player did not start. If there maybe an unload function?

like image 537
Peter Avatar asked Dec 07 '25 12:12

Peter


1 Answers

I got it

jwplayer('mediaplayer').remove();
like image 69
Peter Avatar answered Dec 10 '25 01:12

Peter