Skip to content

Commit 861908e

Browse files
authored
domain: soundcloud.com option height=auto fix (#258)
1 parent fc6fe81 commit 861908e

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

plugins/domains/soundcloud.com/soundcloud.com.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,17 @@ module.exports = {
3838
}
3939

4040
href = href.replace(/\?.+/, '') + querystring.stringify(params).replace(/^(.)/, '?$1');
41-
var height = options.getRequestOptions('soundcloud.height', options.getProviderOptions('players.horizontal') === false ? 'auto' : (/visual=false/.test(href) ? 166 : iframe.height));
4241

42+
/** defaultHeight typeof() can be different from 'soundcloud.height'
43+
* so it fails core type mismatch check. */
44+
var defaultHeight = options.getProviderOptions('players.horizontal') === false
45+
? 'auto' : (/visual=false/.test(href)
46+
? 166 : oembed.height);
47+
var height = options.getRequestOptions('soundcloud.height');
48+
if (height !== 'auto' || !height) {
49+
height = defaultHeight;
50+
}
51+
4352
var opts = {
4453
horizontal: {
4554
label: CONFIG.L.horizontal,

test-plugins.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)