You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let audioGroupItems = m3u.items.MediaItem.filter((item) => {
return item.attributes.attributes.type === "AUDIO" && item.attributes.attributes["group-id"] === audioGroupId;
});
// # Find all langs amongst the mediaItems that have this group id.
// # It extracts each mediaItems language attribute value.
// # ALSO initialize in this.audioSegments a lang. property whos value is an array [{seg1}, {seg2}, ...].
let audioLanguages = audioGroupItems.map((item) => {
let itemLang;
if (!item.attributes.attributes["language"]) {
itemLang = item.attributes.attributes["name"];
} else {
itemLang = item.attributes.attributes["language"];
}
// Initialize lang. in new group.
if (!this.audioSegments[audioGroupId][itemLang]) {
this.audioSegments[audioGroupId][itemLang] = [];
}
return (item = itemLang);
});
and I am wondering what the return (item = itemLang) is intending to do where item is an M3UItem and itemLang is a string/key?
The text was updated successfully, but these errors were encountered:
I am looking at these lines of codes:
and I am wondering what the
return (item = itemLang)
is intending to do whereitem
is anM3UItem
anditemLang
is a string/key?The text was updated successfully, but these errors were encountered: