Added parameter to set the player's width
This commit is contained in:
parent
323803dc92
commit
d2c2917a8b
@ -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',
|
||||
|
@ -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)
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
.mup-video
|
||||
vertical-align: top
|
||||
width: 100%
|
||||
margin: 0
|
||||
padding: 0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user