Last modified: 2013-09-20 11:54:06 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T52980, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50980 - Provide a JavaScript API to activate TMH/create a player on a given video/audio and document it
Provide a JavaScript API to activate TMH/create a player on a given video/aud...
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
TimedMediaHandler (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Michael Dale
:
Depends on:
Blocks: 51028
  Show dependency treegraph
 
Reported: 2013-07-08 21:00 UTC by Rainer Rillke @commons.wikimedia
Modified: 2013-09-20 11:54 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Rainer Rillke @commons.wikimedia 2013-07-08 21:00:14 UTC
Original bug title:
Provide a JavaScript API to activate TMH/create a player on a given video/audio and document it

The issue:
User- and gadget-scripts, and when option "use live preview" in the user's preferences is activated (that's why this is not just an enhancement), no player can be / is created on dynamically created/inserted content.

Something simple like tmh.makePlayer({
  node: // optional video node to convert to a player
  file: // name of the file that should be played
})

would be welcome.
Comment 1 Rainer Rillke @commons.wikimedia 2013-07-08 21:01:02 UTC
Please put the documentation at [[:mw:Extension:TimedMediaHandler/API]]. Thank you.
Comment 2 Michael Dale 2013-07-09 19:54:48 UTC
We do have a jQuery api: $('#videoTarget').embedPlayer( callback ) and it supports loading sources via mwtitle ... So something like: 

$('<video>')
.addClass('kskin')
.css({
    width:'400px',
    height:'300px'
})
.attr({
    'data-mwtitle' : "0DRIVE.ogv", // the wiki title name
})
.appendTo('#mw-content-text') // must append to dom before calling embedPlayer
.embedPlayer(); // rewrites the video tag with player interface, loads sources via mwtitle attribute. 

Would "work" but its missing poster and duration hint, so we should probably enhance to load thous items from mwtitle as well ( if not defined in the video tag )

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links