nilsenevoldsen / audiobutton Goto Github PK
View Code? Open in Web Editor NEWMediaWiki extension that creates a one-button play/pause toggle for an uploaded audio file
License: MIT License
MediaWiki extension that creates a one-button play/pause toggle for an uploaded audio file
License: MIT License
Line 9 in 02fab02
Should this be a difference license? The included file is not MIT: https://github.com/NilsEnevoldsen/AudioButton/blob/master/COPYING
This does not work on mobile view: https://dota2.gamepedia.io/Enchantress/Sounds?useformat=mobile
This is because extension.json does not target mobile
On Dota2 we had a bunch of files that were moved without updating the page incorporating them because there were no links generated by their use through this extension. It would be helpful if using a file in this extension added a link from the calling page to the file.
See if preload=metadata
helps.
Dota 2 wiki is requesting the option of a right-click menu to download the file as many of its users miss the functionality of being able to easily download the file.
When an image is placed before the sm2
/ab
call with the left
image property, the a.ext-audiobutton
gets placed into a separate p
tag separate from the audio.ext-audiobutton
. button.previousElementSibling
in ext.audiobutton.js
thus returns null
, which causes a TypeError on audio.canPlayType
. A solution seems to be placing the sm2
tag inside a span, so I think if the hook itself outputs a span
this will be fixed.
Example:
<div class="floatleft"><img alt="Wiki.png" src="..." width="20" height="5" srcset="..."></div>
<audio hidden="" class="ext-audiobutton" data-volume="1.0"><source src="..." type="application/ogg"><a href="...">Link</a></audio>
<p>
<a class="ext-audiobutton" data-state="play" title="Play/Pause"></a>
</p>
The error in the console:
TypeError: Cannot read property 'canPlayType' of null
at load.php?debug=false&lang=en&modules=ext.audioButton|ext.reverb.notifications.scripts|oojs-ui-core%2Coojs-ui-widgets&skin=hydradark&version=0ok7bwp:1
at NodeList.forEach (<anonymous>)
at load.php?debug=false&lang=en&modules=ext.audioButton|ext.reverb.notifications.scripts|oojs-ui-core%2Coojs-ui-widgets&skin=hydradark&version=0ok7bwp:1
at load.php?debug=false&lang=en&modules=ext.audioButton|ext.reverb.notifications.scripts|oojs-ui-core%2Coojs-ui-widgets&skin=hydradark&version=0ok7bwp:2
at mw.loader.implement.css (load.php?debug=false&lang=en&modules=ext.audioButton|ext.reverb.notifications.scripts|oojs-ui-core%2Coojs-ui-widgets&skin=hydradark&version=0ok7bwp:2)
at runScript (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=hydradark&version=1su7rs5:162)
at checkCssHandles (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=hydradark&version=1su7rs5:162)
at Object.<anonymous> (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=hydradark&version=1su7rs5:162)
at fire (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=hydradark&version=1su7rs5:46)
at Object.fireWith (load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=hydradark&version=1su7rs5:47)
logError @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=hydradark&version=1su7rs5:177
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.