Added parameter to set the player's width
This commit is contained in:
		| @@ -16,6 +16,7 @@ | |||||||
|   <script> |   <script> | ||||||
|     $('.mup-player').MUPlayer({ |     $('.mup-player').MUPlayer({ | ||||||
|       'use_default_css': true, |       'use_default_css': true, | ||||||
|  |       'video_width': '720px', | ||||||
|       'video_sources': [ |       'video_sources': [ | ||||||
|         { |         { | ||||||
|           'link': 'http://techslides.com/demos/sample-videos/small.ogv', |           'link': 'http://techslides.com/demos/sample-videos/small.ogv', | ||||||
|   | |||||||
| @@ -13,6 +13,7 @@ | |||||||
|       'default_volume': 50 |       'default_volume': 50 | ||||||
|       'default_position': 0 |       'default_position': 0 | ||||||
|       'video_sources': [] |       'video_sources': [] | ||||||
|  |       'video_width': false | ||||||
|     }, opt) |     }, opt) | ||||||
|  |  | ||||||
|     ## Functions |     ## Functions | ||||||
| @@ -22,6 +23,10 @@ | |||||||
|       if settings.use_default_css |       if settings.use_default_css | ||||||
|         addStylesheet('build/css/mup.css') |         addStylesheet('build/css/mup.css') | ||||||
|        |        | ||||||
|  |       # set player width | ||||||
|  |       if typeof settings.video_width == 'string' | ||||||
|  |         wrapperElem.width(settings.video_width) | ||||||
|  |        | ||||||
|       # create the video player |       # create the video player | ||||||
|       createPlayer(wrapperElem) |       createPlayer(wrapperElem) | ||||||
|        |        | ||||||
|   | |||||||
| @@ -1,5 +1,6 @@ | |||||||
| .mup-video | .mup-video | ||||||
|   vertical-align: top |   vertical-align: top | ||||||
|  |   width: 100% | ||||||
|   margin: 0 |   margin: 0 | ||||||
|   padding: 0 |   padding: 0 | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user