Commit ad9d745e authored by i❤computers's avatar i❤computers
Browse files

* Hard code endtimes

* Since movie clips are irrelevant, just set a `isTextHighlight` field
parent fbe1bfaf
var cuesTrack = [{
startTime: 0.33,
cuePositionName: "0"
}, {
startTime: 0.57,
cuePositionName: "1"
}, {
startTime: 0.71,
cuePositionName: "2"
}, {
startTime: 1.38,
cuePositionName: "3"
}, {
startTime: 2.17,
cuePositionName: "4"
}, {
startTime: 2.36,
cuePositionName: "5"
}, {
startTime: 2.64,
cuePositionName: "6"
}, {
startTime: 3.88,
cuePositionName: "7"
}, {
startTime: 4.02,
cuePositionName: "8"
}, {
startTime: 4.32,
cuePositionName: "9"
}, {
startTime: 4.65,
cuePositionName: "10"
}, {
startTime: 5.1,
cuePositionName: "11"
}, {
startTime: 5.27,
cuePositionName: "12"
}, {
startTime: 5.52,
cuePositionName: "13"
}, {
startTime: 5.92,
cuePositionName: "14"
}, {
startTime: 6.28,
cuePositionName: "15"
}, {
startTime: 6.55,
cuePositionName: "16"
}, {
startTime: 7.37,
cuePositionName: "17"
}, {
startTime: 8.62,
cuePositionName: "18"
}, {
startTime: 9.48,
cuePositionName: "19"
}, {
startTime: 10.09,
cuePositionName: "20"
}, {
startTime: 10.36,
cuePositionName: "21"
}, {
startTime: 11.01,
cuePositionName: "22"
}, {
startTime: 11.82,
cuePositionName: "23"
}, {
startTime: 12.32,
cuePositionName: "24"
}, {
startTime: 13.15,
cuePositionName: "25"
}, {
startTime: 13.72,
cuePositionName: "26"
}, {
startTime: 14.01,
cuePositionName: "27"
}, {
startTime: 14.19,
cuePositionName: "28"
}, {
startTime: 14.65,
cuePositionName: "29"
}, {
startTime: 15.03,
cuePositionName: "30"
}, {
startTime: 15.37,
cuePositionName: "31"
}, {
startTime: 15.72,
cuePositionName: "32"
}, {
startTime: 16.14,
cuePositionName: "33"
}, {
startTime: 16.44,
cuePositionName: "34"
}, {
startTime: 16.74,
cuePositionName: "35"
}, {
startTime: 17.53,
cuePositionName: "36"
}, {
startTime: 17.91,
cuePositionName: "37"
}, {
startTime: 18.23,
cuePositionName: "38"
}, {
startTime: 18.9,
cuePositionName: "39"
}, {
startTime: 19.16,
cuePositionName: "40"
}, {
startTime: 19.52,
cuePositionName: "41"
}, {
startTime: 20.02,
cuePositionName: "42"
}, {
startTime: 21.29,
cuePositionName: "43"
}, {
startTime: 21.65,
cuePositionName: "44"
}, {
startTime: 21.94,
cuePositionName: "45"
}, {
startTime: 22.46,
cuePositionName: "46"
}, {
startTime: 23.28,
cuePositionName: "47"
}, {
startTime: 23.63,
cuePositionName: "48"
}, {
startTime: 23.88,
cuePositionName: "49"
}, {
startTime: 24.46,
cuePositionName: "50"
}, {
startTime: 24.75,
cuePositionName: "51"
}, {
startTime: 25.09,
cuePositionName: "52"
}, {
startTime: 25.59,
cuePositionName: "53"
}, {
startTime: 26.0,
cuePositionName: "54"
}, {
startTime: 26.48,
cuePositionName: "55"
}, {
startTime: 26.96,
cuePositionName: "56"
}, {
startTime: 27.26,
cuePositionName: "57"
}, {
startTime: 27.77,
cuePositionName: "58"
}, {
startTime: 28.21,
cuePositionName: "59"
}, {
startTime: 28.74,
cuePositionName: "60"
}, {
startTime: 29.58,
cuePositionName: "61"
}, {
startTime: 30.8,
cuePositionName: "62"
}, {
startTime: 31.58,
cuePositionName: "63"
}, {
startTime: 32.4,
cuePositionName: "64"
}, {
startTime: 32.77,
cuePositionName: "65"
}, {
startTime: 33.09,
cuePositionName: "66"
}, {
startTime: 33.82,
cuePositionName: "67"
}, {
startTime: 34.44,
cuePositionName: "68"
}, {
startTime: 34.68,
cuePositionName: "69"
}, {
startTime: 35.39,
cuePositionName: "70"
}, {
startTime: 35.89,
cuePositionName: "71"
}, {
startTime: 36.28,
cuePositionName: "72"
}, {
startTime: 37.03,
cuePositionName: "73"
}, {
startTime: 37.47,
cuePositionName: "74"
}, {
startTime: 37.97,
cuePositionName: "75"
}, {
startTime: 38.23,
cuePositionName: "76"
}, {
startTime: 38.63,
cuePositionName: "77"
}, {
startTime: 39.92,
cuePositionName: "78"
}, {
startTime: 40.18,
cuePositionName: "79"
}, {
startTime: 41.08,
cuePositionName: "80"
}, {
startTime: 42.11,
cuePositionName: "81"
}, {
startTime: 43.16,
cuePositionName: "82"
}, {
startTime: 43.16,
movieClip: "flag",
cuePositionName: "flag"
}, {
startTime: 43.64,
cuePositionName: "83"
}, {
startTime: 44.27,
cuePositionName: "84"
}, {
startTime: 44.37,
movieClip: "flag",
cuePositionName: "topWipe"
}, {
startTime: 45.1,
cuePositionName: "85"
}, {
startTime: 45.14,
movieClip: "flag",
cuePositionName: "bottomWipe"
}, {
startTime: 45.45,
cuePositionName: "86"
}, {
startTime: 46.09,
cuePositionName: "87"
}, {
startTime: 46.6,
cuePositionName: "88"
}, {
startTime: 46.87,
cuePositionName: "89"
}, {
startTime: 47.23,
cuePositionName: "90"
}, {
startTime: 48.06,
cuePositionName: "91"
}, {
startTime: 48.37,
cuePositionName: "92"
}, {
startTime: 48.91,
cuePositionName: "93"
}, {
startTime: 49,
movieClip: "flag",
cuePositionName: "firstStar"
}, {
startTime: 49.25,
movieClip: "flag",
cuePositionName: "secondStar"
}, {
startTime: 49.32,
cuePositionName: "94"
}, {
startTime: 49.50,
movieClip: "flag",
cuePositionName: "thirdStar"
}, {
startTime: 49.75,
movieClip: "flag",
cuePositionName: "fourthStar"
}, {
startTime: 49.76,
cuePositionName: "95"
}, {
startTime: 50.16,
cuePositionName: "96"
}, {
startTime: 50.52,
cuePositionName: "97"
}, {
startTime: 50.76,
cuePositionName: "98"
}, {
startTime: 51.04,
cuePositionName: "99"
}, {
startTime: 51.7,
cuePositionName: "100"
}, {
startTime: 51.7,
movieClip: "flagSymbols",
cuePositionName: "flagSymbols"
}, {
startTime: 52.44,
cuePositionName: "101"
}, {
startTime: 52.44,
movieClip: "flagSymbols",
cuePositionName: "water"
}, {
startTime: 53.38,
cuePositionName: "102"
}, {
startTime: 54.3,
cuePositionName: "103"
}, {
startTime: 54.58,
cuePositionName: "104"
}, {
startTime: 55.04,
cuePositionName: "105"
}, {
startTime: 55.71,
cuePositionName: "106"
}, {
startTime: 56.16,
cuePositionName: "107"
}, {
startTime: 56.16,
movieClip: "flagSymbols",
cuePositionName: "firstMaskedStar"
}, {
startTime: 56.49,
cuePositionName: "108"
}, {
startTime: 56.66,
movieClip: "flagSymbols",
cuePositionName: "secondMaskedStar"
}, {
startTime: 57.02,
cuePositionName: "109"
}, {
startTime: 57.16,
movieClip: "flagSymbols",
cuePositionName: "thirdMaskedStar"
}, {
startTime: 57.66,
movieClip: "flagSymbols",
cuePositionName: "fourthMaskedStar"
}, {
startTime: 57.88,
cuePositionName: "110"
}, {
startTime: 58.46,
cuePositionName: "111"
}, {
startTime: 59.02,
cuePositionName: "112"
}, {
startTime: 59.45,
cuePositionName: "113"
}, {
startTime: 60.02,
cuePositionName: "114"
}];
var HIGHLIGHT_DURATION = 2;
var cuesTrackByEndTime = cuesTrack
.map(function createEndTime(cue) {
var startTime = cue.startTime;
if (cue.movieClip === "flag") {
startTime = 49.75;
} else if (cue.movieClip === "flagSymbols") {
startTime = 60.02;
}
cue.endTime = startTime + HIGHLIGHT_DURATION;
return cue;
})
.sort(function sortByEndTime(rightCue, leftCue) {
return rightCue.endTime - leftCue.endTime;
})
;
\ No newline at end of file
let cuesTrack = [
{
"startTime": 0.33,
"cuePositionName": "0",
"endTime": 2.33,
"isTextHighlight": true
},
{
"startTime": 0.57,
"cuePositionName": "1",
"endTime": 2.57,
"isTextHighlight": true
},
{
"startTime": 0.71,
"cuePositionName": "2",
"endTime": 2.71,
"isTextHighlight": true
},
{
"startTime": 1.38,
"cuePositionName": "3",
"endTime": 3.38,
"isTextHighlight": true
},
{
"startTime": 2.17,
"cuePositionName": "4",
"endTime": 4.17,
"isTextHighlight": true
},
{
"startTime": 2.36,
"cuePositionName": "5",
"endTime": 4.36,
"isTextHighlight": true
},
{
"startTime": 2.64,
"cuePositionName": "6",
"endTime": 4.64,
"isTextHighlight": true
},
{
"startTime": 3.88,
"cuePositionName": "7",
"endTime": 5.88,
"isTextHighlight": true
},
{
"startTime": 4.02,
"cuePositionName": "8",
"endTime": 6.02,
"isTextHighlight": true
},
{
"startTime": 4.32,
"cuePositionName": "9",
"endTime": 6.32,
"isTextHighlight": true
},
{
"startTime": 4.65,
"cuePositionName": "10",
"endTime": 6.65,
"isTextHighlight": true
},
{
"startTime": 5.1,
"cuePositionName": "11",
"endTime": 7.1,
"isTextHighlight": true
},
{
"startTime": 5.27,
"cuePositionName": "12",
"endTime": 7.27,
"isTextHighlight": true
},
{
"startTime": 5.52,
"cuePositionName": "13",
"endTime": 7.52,
"isTextHighlight": true
},
{
"startTime": 5.92,
"cuePositionName": "14",
"endTime": 7.92,
"isTextHighlight": true
},
{
"startTime": 6.28,
"cuePositionName": "15",
"endTime": 8.28,
"isTextHighlight": true
},
{
"startTime": 6.55,
"cuePositionName": "16",
"endTime": 8.55,
"isTextHighlight": true
},
{
"startTime": 7.37,
"cuePositionName": "17",
"endTime": 9.37,
"isTextHighlight": true
},
{
"startTime": 8.62,
"cuePositionName": "18",
"endTime": 10.62,
"isTextHighlight": true
},
{
"startTime": 9.48,
"cuePositionName": "19",
"endTime": 11.48,
"isTextHighlight": true
},
{
"startTime": 10.09,
"cuePositionName": "20",
"endTime": 12.09,
"isTextHighlight": true
},
{
"startTime": 10.36,
"cuePositionName": "21",
"endTime": 12.36,
"isTextHighlight": true
},
{
"startTime": 11.01,
"cuePositionName": "22",
"endTime": 13.01,
"isTextHighlight": true
},
{
"startTime": 11.82,
"cuePositionName": "23",
"endTime": 13.82,
"isTextHighlight": true
},
{
"startTime": 12.32,
"cuePositionName": "24",
"endTime": 14.32,
"isTextHighlight": true
},
{
"startTime": 13.15,
"cuePositionName": "25",
"endTime": 15.15,
"isTextHighlight": true
},
{
"startTime": 13.72,
"cuePositionName": "26",
"endTime": 15.72,
"isTextHighlight": true
},
{
"startTime": 14.01,
"cuePositionName": "27",
"endTime": 16.01,
"isTextHighlight": true
},
{
"startTime": 14.19,
"cuePositionName": "28",
"endTime": 16.19,
"isTextHighlight": true
},
{
"startTime": 14.65,
"cuePositionName": "29",
"endTime": 16.65,
"isTextHighlight": true
},
{
"startTime": 15.03,
"cuePositionName": "30",
"endTime": 17.03,
"isTextHighlight": true
},
{
"startTime": 15.37,
"cuePositionName": "31",
"endTime": 17.37,
"isTextHighlight": true
},
{
"startTime": 15.72,
"cuePositionName": "32",
"endTime": 17.72,
"isTextHighlight": true
},
{
"startTime": 16.14,
"cuePositionName": "33",
"endTime": 18.14,
"isTextHighlight": true
},
{
"startTime": 16.44,
"cuePositionName": "34",
"endTime": 18.44,
"isTextHighlight": true
},
{
"startTime": 16.74,
"cuePositionName": "35",
"endTime": 18.74,
"isTextHighlight": true
},
{
"startTime": 17.53,
"cuePositionName": "36",