Added parameter to set the player's width

This commit is contained in:
Gregory Ballantine 2018-02-26 17:37:46 -05:00
parent 323803dc92
commit d2c2917a8b
3 changed files with 7 additions and 0 deletions

View File

@ -16,6 +16,7 @@
<script>
$('.mup-player').MUPlayer({
'use_default_css': true,
'video_width': '720px',
'video_sources': [
{
'link': 'http://techslides.com/demos/sample-videos/small.ogv',

View File

@ -13,6 +13,7 @@
'default_volume': 50
'default_position': 0
'video_sources': []
'video_width': false
}, opt)
## Functions
@ -22,6 +23,10 @@
if settings.use_default_css
addStylesheet('build/css/mup.css')
# set player width
if typeof settings.video_width == 'string'
wrapperElem.width(settings.video_width)
# create the video player
createPlayer(wrapperElem)

View File

@ -1,5 +1,6 @@
.mup-video
vertical-align: top
width: 100%
margin: 0
padding: 0