use else-if instead of if for evaluating action
merge pull request #183 from dumbmoron/decider-elif
This commit is contained in:
commit
877148159d
1 changed files with 5 additions and 5 deletions
|
@ -13,12 +13,12 @@ export default function(r, host, audioFormat, isAudioOnly, lang, isAudioMuted) {
|
||||||
},
|
},
|
||||||
params = {}
|
params = {}
|
||||||
|
|
||||||
if (!isAudioOnly && !r.picker && !isAudioMuted) action = "video";
|
|
||||||
if (r.isM3U8) action = "singleM3U8";
|
|
||||||
if (isAudioOnly && !r.picker) action = "audio";
|
|
||||||
if (r.picker) action = "picker";
|
|
||||||
if (isAudioMuted) action = "muteVideo";
|
|
||||||
if (r.isPhoto) action = "photo";
|
if (r.isPhoto) action = "photo";
|
||||||
|
else if (r.picker) action = "picker"
|
||||||
|
else if (isAudioMuted) action = "muteVideo";
|
||||||
|
else if (isAudioOnly) action = "audio";
|
||||||
|
else if (r.isM3U8) action = "singleM3U8";
|
||||||
|
else action = "video";
|
||||||
|
|
||||||
if (action === "picker" || action === "audio") {
|
if (action === "picker" || action === "audio") {
|
||||||
defaultParams.filename = r.audioFilename;
|
defaultParams.filename = r.audioFilename;
|
||||||
|
|
Loading…
Reference in a new issue