Skip to content

Commit 1e007ca

Browse files
committed
Merge branch 'dev'
2 parents 1a555bf + bb35154 commit 1e007ca

File tree

5 files changed

+39
-61
lines changed

5 files changed

+39
-61
lines changed

lib/plugins/system/oembed/providers.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,9 +1145,10 @@
11451145
{
11461146
"name": "Everviz",
11471147
"templates": [
1148-
"app.everviz.com/show/([a-zA-Z0-9])+",
1149-
"app.everviz.com/embed/([a-zA-Z0-9])+"
1148+
"app.everviz.com/show/([a-zA-Z0-9_\\-]+)",
1149+
"app.everviz.com/embed/([a-zA-Z0-9_\\-]+)"
11501150
],
1151-
"endpoint": "https://api.everviz.com/oembed"
1151+
"endpoint": "https://api.everviz.com/oembed",
1152+
"url": "https://app.everviz.com/embed/{1}/"
11521153
}
11531154
]

plugins/domains/500px/500px.com.js

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,26 @@ export default {
44

55
mixins: ["*"],
66

7-
getLinks: function(urlMatch, twitter) {
8-
if (twitter.card === 'photo' && twitter.image) {
9-
return {
10-
template_context: {
11-
title: twitter.title + ' | ' + twitter.site,
12-
img_src: twitter.image.src,
13-
id: urlMatch[1]
14-
},
15-
type: CONFIG.T.text_html,
16-
rel: [CONFIG.R.image, CONFIG.R.ssl, CONFIG.R.inline],
17-
"aspect-ratio": twitter.image.height ? twitter.image.width / twitter.image.height : null
18-
}
7+
getLinks: function(urlMatch, twitter, utils, options, cb) {
8+
if (twitter.image) {
9+
utils.getImageMetadata(twitter.image, options, function(error, data) {
10+
if (data.width && data.height) {
11+
return cb(null, {
12+
template_context: {
13+
title: twitter.title + ' | ' + twitter.site,
14+
img_src: twitter.image,
15+
id: urlMatch[1]
16+
},
17+
type: CONFIG.T.text_html,
18+
rel: [CONFIG.R.image, CONFIG.R.ssl, CONFIG.R.inline],
19+
"aspect-ratio": data.width / data.height
20+
})
21+
} else {
22+
return cb();
23+
}
24+
});
25+
} else {
26+
return cb();
1927
}
2028
},
2129

plugins/domains/dailymotion.com/dailymotion.com.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,22 @@ export default {
1010
"oembed-thumbnail",
1111
"domain-icon",
1212
"og-description",
13+
"og-image",
1314
"canonical",
1415
"oembed-iframe",
1516
"video"
1617
],
1718

1819
getLink: function (url, iframe, options) {
19-
var playlistParams = querystring.parse(options.getProviderOptions('dailymotion.get_params', '').replace(/^\?/, ''));
20+
var playlistParams = querystring.parse(options.getProviderOptions('dailymotion.get_params', 'mute=true').replace(/^\?/, ''));
2021

2122
if (iframe.src && iframe.height) {
2223
var player = {
2324
href: iframe.replaceQuerystring(playlistParams),
2425
type: CONFIG.T.text_html,
2526
"rel": [CONFIG.R.player, CONFIG.R.oembed],
2627
"aspect-ratio": iframe.width / iframe.height,
27-
scrolling: 'no',
28-
autoplay: "autoplay=1"
28+
autoplay: "mute=false"
2929
};
3030

3131
// Do not replace direct link to custom players
@@ -70,7 +70,7 @@ export default {
7070

7171
}
7272
}, {
73-
skipMixins: ["video", "og-description", "canonical"],
73+
skipMixins: ["video", "og-description", "og-image", "canonical"],
7474
skipMethods: ["getData"]
7575
},
7676
"https://www.dailymotion.com/video/x10bix2_ircam-mani-feste-2013-du-29-mai-au-30-juin-2013_creation#.Uaac62TF1XV",
Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,23 @@
11
export default {
2-
/**
3-
* Endpoint `http://www.dailymotion.com/services/oembed`
4-
* does not provide oembed results for playlist url currently
5-
*/
62

3+
// Canonical playlists are covered by oEmbed `http://www.dailymotion.com/services/oembed`
74
re: [
8-
/^https?:\/\/www\.dailymotion\.com\/playlist\//i,
9-
/^https?:\/\/www\.dailymotion\.com\/embed\/playlist\//i,
5+
/^https?:\/\/www\.dailymotion\.com\/embed\/playlist\/([a-zA-Z0-9]+)(?:\?.+)?$/i,
6+
/^https?:\/\/geo\.dailymotion\.com\/player.html\?playlist=([a-zA-Z0-9]+)(?:&.+)?$/i,
107
],
118

12-
mixins: [
13-
"*"
14-
],
15-
16-
getLink: function (url) {
17-
var playlistUrl = url;
18-
if (url.includes('playlist') && !url.includes('embed/playlist')) {
19-
playlistUrl = url.replace('playlist', 'embed/playlist')
20-
}
21-
return {
22-
href: playlistUrl,
23-
type: CONFIG.T.text_html,
24-
rel: [CONFIG.R.player, CONFIG.R.iframely]
25-
};
9+
getData: function(urlMatch, cb, options) {
10+
cb(!options.redirectsHistory
11+
? {
12+
redirect: `https://www.dailymotion.com/playlist/${urlMatch[1]}`
13+
} : null);
2614
},
2715

2816
tests: [{
2917
noFeeds: true
3018
},
31-
"https://www.dailymotion.com/playlist/x6hynp",
32-
"https://www.dailymotion.com/embed/playlist/x6hynp"
19+
// "https://www.dailymotion.com/playlist/x6hynp",
20+
"https://www.dailymotion.com/embed/playlist/x6hynp",
21+
"https://geo.dailymotion.com/player.html?playlist=x6hynp"
3322
]
3423
};

plugins/domains/i.gifs.com.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)