http://www.mediawiki.org/wiki/Special:Code/MediaWiki/73914
Revision: 73914
Author: dale
Date: 2010-09-28 15:56:01 +0000 (Tue, 28 Sep 2010)
Log Message:
-----------
* fixes bug 25344 where the dialog video continues to play after the dialog has
been closed.
Modified Paths:
--------------
branches/MwEmbedStandAlone/remotes/mediaWiki.js
Modified: branches/MwEmbedStandAlone/remotes/mediaWiki.js
===================================================================
--- branches/MwEmbedStandAlone/remotes/mediaWiki.js 2010-09-28 15:53:24 UTC
(rev 73913)
+++ branches/MwEmbedStandAlone/remotes/mediaWiki.js 2010-09-28 15:56:01 UTC
(rev 73914)
@@ -465,12 +465,7 @@
var dialogHeight = (
pheight == 0 )? 175 :
( pheight + 130 );
var buttons = {};
- buttons[ gM( 'mwe-ok' )
] = function(){
- var embedPlayer
= $j( '#mwe_' + $j( _this ).data( 'playerId' ) ).get(0);
- // stop the
player ( more healthy way to remove the video from the dom )
- if( embedPlayer
) {
-
embedPlayer.stop();
- }
+ buttons[ gM( 'mwe-ok' )
] = function(){
// close the
dialog
$j(this).dialog( 'close' ).remove();
};
@@ -479,8 +474,15 @@
'content' :
html_out,
'buttons' :
buttons,
'height' :
dialogHeight,
- 'width' : 430
- })
+ 'width' : 430,
+ 'close':
function(event, ui) {
+ var
embedPlayer = $j( '#mwe_' + vidId ).get(0);
+ // stop
the player before we close the dialog
+ if(
embedPlayer ) {
+
embedPlayer.stop();
+ }
+ }
+ });
// Update the embed
code to use the mwEmbed player:
$j( '#mwe_' + vidId
).embedPlayer( { 'autoplay' : true }, function(){
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
