[Bug 72675] Dynamically loading TimedMediaHandler for new content (preview)

2014-11-11 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72675

--- Comment #14 from Gerrit Notification Bot gerritad...@wikimedia.org ---
Change 172556 had a related patch set uploaded by TheDJ:
[WIP] Turn MwEmbed loaderscripts into modules

https://gerrit.wikimedia.org/r/172556

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72675] Dynamically loading TimedMediaHandler for new content (preview)

2014-11-11 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72675

--- Comment #15 from Derk-Jan Hartman hartman.w...@gmail.com ---
Did some more work on this, but I don't have a full picture of the exact
dependencies of the mw modules yet, and i'm quite certain that they are also a
bit 'sloppy' right now, so some stuff isn't working 100%.

On a normal page transclusion, it works without the dreaded loaderScripts param
now though.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72675] Dynamically loading TimedMediaHandler for new content (preview)

2014-11-10 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72675

Derk-Jan Hartman hartman.w...@gmail.com changed:

   What|Removed |Added

 CC||hartman.w...@gmail.com

--- Comment #10 from Derk-Jan Hartman hartman.w...@gmail.com ---
It's easy, workarounds should not be needed. TimedMediaHandler should be fixed
and get in line with the rest of the tools.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72675] Dynamically loading TimedMediaHandler for new content (preview)

2014-11-10 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72675

--- Comment #11 from Derk-Jan Hartman hartman.w...@gmail.com ---
K, done some further investigation.

The biggest problem here is that the parser output for a page with TMH content
simply DOESN'T have any modules. That means that the parser is not even aware
of which modules TimedMediaHandler is using (thus it can also not notify any JS
of these additional modules that the content requires.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72675] Dynamically loading TimedMediaHandler for new content (preview)

2014-11-10 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72675

Derk-Jan Hartman hartman.w...@gmail.com changed:

   What|Removed |Added

 Blocks||39272

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72675] Dynamically loading TimedMediaHandler for new content (preview)

2014-11-10 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72675

--- Comment #12 from Gerrit Notification Bot gerritad...@wikimedia.org ---
Change 172421 had a related patch set uploaded by TheDJ:
[WIP] Improve live loading

https://gerrit.wikimedia.org/r/172421

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72675] Dynamically loading TimedMediaHandler for new content (preview)

2014-11-10 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72675

Gerrit Notification Bot gerritad...@wikimedia.org changed:

   What|Removed |Added

 Status|NEW |PATCH_TO_REVIEW

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72675] Dynamically loading TimedMediaHandler for new content (preview)

2014-11-10 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72675

--- Comment #13 from Derk-Jan Hartman hartman.w...@gmail.com ---
Added the improvements we did for SyntaxHighlighting (registering modules on
the parser output instead of on the output page).

The patch requires some further work to rewrite the loader script logic
however. I don't fully understand yet how MwEmbedSupport takes care of
registering modules, so I left that out for now.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72675] Dynamically loading TimedMediaHandler for new content (preview)

2014-11-05 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72675

--- Comment #6 from Cacycle cacycl...@gmail.com ---
I have spent two days on a workaround and I am stuck. The problem seems to be
related to mw.EmbedPlayer and mw.TimedText giving loading errors, so that load
handlers such as .embedPlayer() are not executed properly. I have tested this
in the browser console, e.g with:

mw.loader.using(
['mw.MwEmbedSupport', 'mw.EmbedPlayer'],
  function() { console.log( 'OK' ); },
  function() { console.log( 'Load error' ); }
);

Any ideas?

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72675] Dynamically loading TimedMediaHandler for new content (preview)

2014-11-05 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72675

--- Comment #7 from Michael Dale md...@wikimedia.org ---
If you take a look at the loader handles the embedding of players against a
video tag:

https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FTimedMediaHandler/57dcd0b56e2fc6701514ea9fdc4be36cec980774/MwEmbedModules%2FEmbedPlayer%2FEmbedPlayer.loader.js#L40
 

$.embedPlayer .. should work. you would have to manually apply the popup logic,
but the embedPlayer calls should be fine.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72675] Dynamically loading TimedMediaHandler for new content (preview)

2014-11-05 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72675

--- Comment #8 from Cacycle cacycl...@gmail.com ---
Thanks Michael! Unfortunately, because of the problem described in comment 6,
embedPlayer does not work, because mw.EmbedPlayer and mw.TimedText are in the
dependencySet but give load errors, so that the actual mw.processEmbedPlayers
will never be executed.

// Do the request and process the playerElements with updated dependency set
mw.loader.using( dependencySet, function() {
// Setup the enhanced language:
mw.processEmbedPlayers( playerSet, readyCallback );
}, function( e ) {
throw new Error( 'Error loading EmbedPlayer dependency set: ' + e.message
);
} );

I am testing on en.wikipedia on a Show changes edit page with an embedded
video (so that the media player is not loaded with the page) and wikEd local
preview using the Firefox console.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72675] Dynamically loading TimedMediaHandler for new content (preview)

2014-11-05 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72675

--- Comment #9 from Cacycle cacycl...@gmail.com ---
For this reason, the code from mw.PopUpThumbVideo.js never reaches return
false, the default click action is not suppressed, and a new player window
opens always.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72675] Dynamically loading TimedMediaHandler for new content (preview)

2014-11-03 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72675

Cacycle cacycl...@gmail.com changed:

   What|Removed |Added

   Priority|Unprioritized   |Normal
   Severity|enhancement |normal

--- Comment #5 from Cacycle cacycl...@gmail.com ---
I think that encapsulation of the PopUpMediaTransform in a load event handler
is indeed the problem here (see also
http://stackoverflow.com/questions/2238030/).

Please could somebody more familiar with this code check into it? Maybe the
code could simply be made into a function that could be called from MediaWiki
LivePreview and custom preview handlers.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72675] Dynamically loading TimedMediaHandler for new content (preview)

2014-10-30 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72675

--- Comment #1 from Brion Vibber br...@wikimedia.org ---
Ideally, TimedMediaHandler should always at runtime install a small JS hook
with mw.hook('wikipage.content'):

https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw.hook

and that hook should handle loading the necessary modules and applying the
transforms. Then as long as your preview is calling the hook, that and other
stuff should work.

But TMH needs to be fixed to do that properly so you don't have to special-case
it. :)

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72675] Dynamically loading TimedMediaHandler for new content (preview)

2014-10-30 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72675

--- Comment #2 from Cacycle cacycl...@gmail.com ---
Thanks Brion. I am already running that hook (window.mw.hook(
'wikipage.content' ).fire( $( '#wikEdPreviewArticle' ) );) but as far as I can
tell, it doesn't do anything at all for video clips. Do you have a workaround
(e.g. a missing load call) or have an idea how to figure this out?

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72675] Dynamically loading TimedMediaHandler for new content (preview)

2014-10-30 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72675

--- Comment #3 from Brion Vibber br...@wikimedia.org ---
This *might* work for now if I'm reading correctly:

  $( previewElement ).find('video,audio').embedPlayer();

Hopefully it won't double-apply things or anything. :D

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 72675] Dynamically loading TimedMediaHandler for new content (preview)

2014-10-30 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=72675

--- Comment #4 from Cacycle cacycl...@gmail.com ---
The following combination actually works, but unfortunately only for the first
call. For repeated previews, the same symptoms as described in the original
post above appear:

  $( '#wikEdPreviewArticle' ).find( 'video,audio' ).embedPlayer();
  mw.loader.load( 'mw.PopUpMediaTransform' );

(Is this because the code in
/mediawiki/extensions/TimedMediaHandler/resources/mw.PopUpThumbVideo.js uses
$(document).ready?)

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l