diff --git a/plugins/domains/dailymotion.com/dailymotion.com.js b/plugins/domains/dailymotion.com/dailymotion.com.js index c743d3a99..1d8ff3425 100644 --- a/plugins/domains/dailymotion.com/dailymotion.com.js +++ b/plugins/domains/dailymotion.com/dailymotion.com.js @@ -15,16 +15,11 @@ export default { "video" ], - /** - * Values for `get_params`: - * - queue-enable=false - https://faq.dailymotion.com/hc/en-us/articles/360000713928-Disabling-the-Up-Next-Queue - * - ui-start-screen-info=0 - hide title amontg other things - https://nextgenthemes.com/how-to-hide-titles-and-change-other-setting-for-youtube-vimeo-embeds-in-wordpress-with-arve/ - */ getLink: function (url, iframe, options) { var playlistParams = querystring.parse(options.getProviderOptions('dailymotion.get_params', '').replace(/^\?/, '')); if (iframe.src && iframe.height) { - return { + var player = { href: iframe.replaceQuerystring(playlistParams), type: CONFIG.T.text_html, "rel": [CONFIG.R.player, CONFIG.R.oembed], @@ -32,6 +27,15 @@ export default { scrolling: 'no', autoplay: "autoplay=1" }; + + // Do not replace direct link to custom players + if (options.redirectsHistory + && /^https?:\/\/(?:geo\.)?dailymotion\.com\/player\/[a-zA-Z0-9]+\.html\?video=([a-zA-Z0-9]+)/i.test(options.redirectsHistory[0])) { + player.href = options.redirectsHistory[0]; + delete player.autoplay; + } + + return player; } }, @@ -69,9 +73,9 @@ export default { skipMixins: ["video", "og-description", "canonical"], skipMethods: ["getData"] }, - "http://www.dailymotion.com/video/x10bix2_ircam-mani-feste-2013-du-29-mai-au-30-juin-2013_creation#.Uaac62TF1XV", - "http://www.dailymotion.com/swf/video/xcv6dv_pixels-by-patrick-jean_creation", - "http://www.dailymotion.com/embed/video/xcv6dv_pixels-by-patrick-jean_creation", + "https://www.dailymotion.com/video/x10bix2_ircam-mani-feste-2013-du-29-mai-au-30-juin-2013_creation#.Uaac62TF1XV", + "https://www.dailymotion.com/swf/video/xcv6dv_pixels-by-patrick-jean_creation", + "https://www.dailymotion.com/embed/video/xcv6dv_pixels-by-patrick-jean_creation", "https://dailymotion.com/embed/video/x5yiamz?queue-enable=false" ] }; \ No newline at end of file diff --git a/plugins/domains/dailymotion.com/dailymotion.swf.js b/plugins/domains/dailymotion.com/dailymotion.swf.js index 674cd2995..4e73eda4a 100644 --- a/plugins/domains/dailymotion.com/dailymotion.swf.js +++ b/plugins/domains/dailymotion.com/dailymotion.swf.js @@ -2,7 +2,7 @@ export default { re: [ /^https?:\/\/www\.dailymotion\.com\/(?:swf|embed)\/video\/([a-zA-Z0-9]+)/i, - /^https?:\/\/(?:geo\.)?dailymotion\.com\/player\.html\?video=([a-zA-Z0-9]+)/i + /^https?:\/\/(?:geo\.)?dailymotion\.com\/player(?:\/[a-zA-Z0-9]+)?\.html\?video=([a-zA-Z0-9]+)/i ], listed: false,