Widget: Plyr-1: verschil tussen versies
Uit MediaWikiGids
(Nieuwe pagina aangemaakt met '<noinclude>Ontwikkeling voor HTML5 media speler op basis van '''plyr.js'''</noinclude><includeonly><script src="https://cdn.plyr.io/3.5.10/plyr.js"></script> <scrip...') |
|||
(8 tussenliggende versies door dezelfde gebruiker niet weergegeven) | |||
Regel 1: | Regel 1: | ||
− | <noinclude>Ontwikkeling voor HTML5 media speler op basis van '''plyr.js'''</noinclude><includeonly><script src="https://cdn.plyr.io/3.5.10/plyr.js"></script> | + | <noinclude>Ontwikkeling voor HTML5 media speler op basis van '''plyr.js''' |
+ | <pre>{{#widget:plyr-1 | ||
+ | |autoplay = y/yes/1 | ||
+ | |src_mp3 = url to mp3-file | ||
+ | |src_ogg = url to ogg-file (optional) | ||
+ | }} | ||
+ | </pre> | ||
+ | == Copy to your site == | ||
+ | To use this widget on your site, just install the [http://www.mediawiki.org/wiki/Extension:Widgets MediaWiki Widgets extension] and the copy [{{fullurl:{{FULLPAGENAME}}|action=edit}} full source code] of this page to your wiki, as an article called '''{{FULLPAGENAME}}'''. | ||
+ | |||
+ | Source: Proprietary development | ||
+ | |||
+ | |||
+ | Changes to v 01: | ||
+ | * ... | ||
+ | |||
+ | |||
+ | Versie: 1 | ||
+ | Author: [[Gebruiker:bmulckhu|Bart Mulckhuijse]] | ||
+ | |||
+ | [[Categorie:Alle Widgets]] | ||
+ | </noinclude><includeonly><script src="https://cdn.plyr.io/3.5.10/plyr.js"></script> | ||
<script> | <script> | ||
const player = new Plyr('#player'); | const player = new Plyr('#player'); | ||
</script> | </script> | ||
<link rel="stylesheet" href="https://cdn.plyr.io/3.5.10/plyr.css" /> | <link rel="stylesheet" href="https://cdn.plyr.io/3.5.10/plyr.css" /> | ||
− | <audio id="player" controls> | + | <audio id="player" controls <!--{if $autoplay eq 'y' or $autoplay eq 'y' or $autoplay eq 'yes' or $autoplay eq 1}-->autoplay<!--{/if}-->> |
− | <source src=" | + | <source src="<!--{$src_mp3|validate:url}-->" type="audio/mp3" /> |
+ | <!--{if isset($src_ogg)}--><source src="<!--{$src_ogg|validate:url}-->" type="audio/ogg" /><!--{else}--><!--{/if}--> | ||
+ | Your browser doesn't support HTML5 audio. Here's a <a href="<!--{$src_mp3|validate:url}-->">link to download the mp3-audio</a> instead. | ||
</audio></includeonly> | </audio></includeonly> |
Huidige versie van 17 nov 2020 om 14:48
Ontwikkeling voor HTML5 media speler op basis van plyr.js
{{#widget:plyr-1 |autoplay = y/yes/1 |src_mp3 = url to mp3-file |src_ogg = url to ogg-file (optional) }}
Copy to your site
To use this widget on your site, just install the MediaWiki Widgets extension and the copy full source code of this page to your wiki, as an article called Widget:Plyr-1.
Source: Proprietary development
Changes to v 01:
- ...
Versie: 1 Author: Bart Mulckhuijse