Page MenuHomePhabricator

Video: cannot call methods on slider prior to initialization
Closed, ResolvedPublic

Description

Hi, I get this error when watching all videos larger than 480p (when a popup opens) on Chrome with Windows 7 64 bits. No error on Firefox (no popup for the same videos).

https://commons.wikimedia.org/w/load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=monobook&version=sWfOQgtB at line 3: Uncaught Error: cannot call methods on slider prior to initialization; attempted to call method 'value'

Example: https://commons.wikimedia.org/wiki/File:Bigelow_Expandable_Activity_Module_Installation_Animation.webm
I can watch the video, and I get the error after closing the popup.

Details

Related Gerrit Patches:
mediawiki/extensions/TimedMediaHandler : masterFix exception on jquery ui slider update

Event Timeline

Yann created this task.Feb 8 2016, 4:41 PM
Yann raised the priority of this task from to Needs Triage.
Yann updated the task description. (Show Details)
Yann added a project: Multimedia.
Yann added a subscriber: Yann.
Restricted Application added subscribers: StudiesWorld, Matanya, Aklapper. · View Herald TranscriptFeb 8 2016, 4:41 PM

Viewing with debug=true:

Error: cannot call methods on slider prior to initialization; attempted to call method 'value'
    at Function.jQuery.extend.error (https://commons.wikimedia.org/w/load.php?debug=true&lang=pl&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=sWfOQgtB:247:9)
    at HTMLDivElement.<anonymous> (https://commons.wikimedia.org/static/1.27.0-wmf.12/resources/lib/jquery.ui/jquery.ui.widget.js:179:15)
    at Function.jQuery.extend.each (https://commons.wikimedia.org/w/load.php?debug=true&lang=pl&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=sWfOQgtB:384:23)
    at jQuery.fn.jQuery.each (https://commons.wikimedia.org/w/load.php?debug=true&lang=pl&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=sWfOQgtB:136:17)
    at $.fn.(anonymous function) [as slider] (https://commons.wikimedia.org/static/1.27.0-wmf.12/resources/lib/jquery.ui/jquery.ui.widget.js:175:9)
    at HTMLDivElement.mw.EmbedPlayer.updatePlayHead (https://commons.wikimedia.org/static/1.27.0-wmf.12/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js:2649:16)
    at HTMLDivElement.mw.EmbedPlayer.stop [as parent_stop] (https://commons.wikimedia.org/static/1.27.0-wmf.12/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js:2250:9)
    at HTMLDivElement.mw.EmbedPlayerNative.stop (https://commons.wikimedia.org/static/1.27.0-wmf.12/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerNative.js:832:8)
    at HTMLDivElement.mw.EmbedPlayerNative.getPlayerElementTime (https://commons.wikimedia.org/static/1.27.0-wmf.12/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerNative.js:592:9)
    at HTMLDivElement.mw.EmbedPlayer.syncCurrentTime (https://commons.wikimedia.org/static/1.27.0-wmf.12/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js:2529:30)

(Note that this only happens for the pop-out player, triggerable under "File history", and not the big one at the top.)

matmarex set Security to None.
matmarex removed a subscriber: matmarex.
TheDJ added a subscriber: TheDJ.Mar 20 2016, 10:22 PM

This probably happens because the jquery ui slider implementation uses $.data to check if the element is initialized, but this data is cleaned up when the slider is removed from the dom. The playhead is still referenced and updated after the slider is removed from the dom however.

I tried stopping the player before we close the window, but it doesn't seem possible, since, well AAAAaaaa stupid player. Came up with an alternative that seems to work and does not require rewriting the entire player.

Change 278680 had a related patch set uploaded (by TheDJ):
Fix exception on jquery ui slider update

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

TheDJ moved this task from To sort to Doing on the TimedMediaHandler board.Mar 20 2016, 10:37 PM

Change 278680 merged by jenkins-bot:
Fix exception on jquery ui slider update

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

matmarex closed this task as Resolved.Mar 21 2016, 3:09 PM
matmarex assigned this task to TheDJ.
matmarex removed a project: Patch-For-Review.
TheDJ moved this task from Doing to Done on the TimedMediaHandler board.Apr 1 2016, 7:11 PM