diff --git a/README.md b/README.md index 54b1967..3d2b740 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,26 @@ new ModalVideo('.js-modal-btn'); new ModalVideo('.js-modal-btn', {channel: 'vimeo'}); ``` +### MP4 + +```html + +``` + +```js +new ModalVideo('.js-modal-btn'); +``` + +OR + +```html + +``` + +```js +new ModalVideo('.js-modal-btn', {url: 'https://developer.a-blogcms.jp/themes/developer/movies/280.mp4'}); +``` + ## Options About YouTube options, please refer to https://developers.google.com/youtube/player_parameters?hl=en @@ -219,6 +239,11 @@ About Vimeo options, please refer to https://developer.vimeo.com/apis/oembed width null + + custom + url + MP4 URL + xhtml false diff --git a/js/jquery-modal-video.js b/js/jquery-modal-video.js index 1b61e76..8d6ae91 100644 --- a/js/jquery-modal-video.js +++ b/js/jquery-modal-video.js @@ -10,8 +10,8 @@ * * custom-event-polyfill: * license: MIT (http://opensource.org/licenses/MIT) - * author: NO AUTHOR! - * contributors: Frank Panetta (http://www.savvi.io), Mikhail Reenko , Joscha Feth (http://www.feth.com) + * contributors: Frank Panetta, Mikhail Reenko , Joscha Feth + * homepage: https://github.com/krambuhl/custom-event-polyfill#readme * version: 0.3.0 * * es6-object-assign: @@ -348,6 +348,8 @@ var ModalVideo = function () { return this.getVimeoUrl(opt.vimeo, videoId); } else if (channel === 'facebook') { return this.getFacebookUrl(opt.facebook, videoId); + } else if (channel === 'custom') { + return opt.url; } return ''; } diff --git a/js/jquery-modal-video.min.js b/js/jquery-modal-video.min.js index daa0d26..8d9c463 100644 --- a/js/jquery-modal-video.min.js +++ b/js/jquery-modal-video.min.js @@ -10,8 +10,8 @@ * * custom-event-polyfill: * license: MIT (http://opensource.org/licenses/MIT) - * author: NO AUTHOR! - * contributors: Frank Panetta (http://www.savvi.io), Mikhail Reenko , Joscha Feth (http://www.feth.com) + * contributors: Frank Panetta, Mikhail Reenko , Joscha Feth + * homepage: https://github.com/krambuhl/custom-event-polyfill#readme * version: 0.3.0 * * es6-object-assign: @@ -22,4 +22,4 @@ * * This header is generated by licensify (https://github.com/twada/licensify) */ -!function(){function e(t,n,o){function i(a,l){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!l&&u)return u(a,!0);if(r)return r(a,!0);var d=new Error("Cannot find module '"+a+"'");throw d.code="MODULE_NOT_FOUND",d}var s=n[a]={exports:{}};t[a][0].call(s.exports,function(e){var n=t[a][1][e];return i(n||e)},s,s.exports,e,t,n,o)}return n[a].exports}for(var r="function"==typeof require&&require,a=0;a\n
\n