从json中解析出vid
function scene2vidString(scene){
function getSrc(iframeCode){
return $(iframeCode)[0].src;
}
function getVidFromQQLink(qqlink){
return qqlink.match(/vid=(\w+)/)[1];
}
function scene2vidArrayUnique(scene){
return _.chain(scene.list)
.pluck("elements")
.flatten()
.where({"type": "v"})
.pluck("properties.src")
.map(getSrc)
.map(getVidFromQQLink)
.union()
.value();
}
function join(array){
return array.join("|");
}
return join(scene2vidArrayUnique(scene));
}