Difference between revisions of "Widget:PlayWrap"
Line 19: | Line 19: | ||
<div id="<!--{$id|escape:'html'|default:'wrapper'}-->" width="<!--{$width|escape:'html'|default:'300px'}-->" style="width:<!--{$width|escape:'html'|default:'300px'}-->; height:<!--{$height|escape:'html'|default:'500px'}-->;"> | <div id="<!--{$id|escape:'html'|default:'wrapper'}-->" width="<!--{$width|escape:'html'|default:'300px'}-->" style="width:<!--{$width|escape:'html'|default:'300px'}-->; height:<!--{$height|escape:'html'|default:'500px'}-->;"> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<script> | <script> | ||
var mediaElements = document.querySelectorAll('video, audio'); | var mediaElements = document.querySelectorAll('video, audio'); | ||
for (var i = 0, total = mediaElements.length; i < total; i++) { | for (var i = 0, total = mediaElements.length; i < total; i++) { | ||
new MediaElementPlayer(mediaElements[i], { | new MediaElementPlayer(mediaElements[i], { | ||
− | features: [ | + | features: ['playpause','progress','duration','volume'], |
}); | }); | ||
} | } | ||
Line 59: | Line 47: | ||
</div> | </div> | ||
</includeonly> | </includeonly> | ||
+ | |||
+ | <script> | ||
+ | $(function(){ | ||
+ | $('audio,video').mediaelementplayer({ | ||
+ | loop: true, | ||
+ | shuffle: false, | ||
+ | playlist: true, | ||
+ | audioHeight: 30, | ||
+ | playlistposition: 'bottom', | ||
+ | features: ['playlistfeature', 'prevtrack', 'playpause', 'nexttrack', 'playlist', 'current', 'progress', 'duration', 'volume'], | ||
+ | }); | ||
+ | }); | ||
+ | </script> |
Revision as of 01:59, 5 July 2019
This widget allows you to embed HTML5 Video Media on your wiki page.
Created by taipan
Using this widget
For information on how to use this widget, see widget description page on MediaWikiWidgets.org.
Copy to your site
To use this widget on your site, just install MediaWiki Widgets extension and copy the full source code of this page to your wiki as page Widget:PlayWrap.
<script>
$(function(){
$('audio,video').mediaelementplayer({ loop: true, shuffle: false, playlist: true, audioHeight: 30, playlistposition: 'bottom', features: ['playlistfeature', 'prevtrack', 'playpause', 'nexttrack', 'playlist', 'current', 'progress', 'duration', 'volume'], });
}); </script>