Delegate creation of VTT generation to new function as well as useful information about the values of the url

This commit is contained in:
Luca 2020-08-14 19:55:25 +02:00
parent 02894ddda3
commit 0e3221c329
1 changed files with 18 additions and 3 deletions

View File

@ -301,10 +301,21 @@ export default Vue.extend({
storyboards.splice(0, 1) storyboards.splice(0, 1)
storyboards.forEach((storyboard, i) => { storyboards.forEach((storyboard, i) => {
const [width, height, count, sWidth, sHeight, interval, _, sigh] = storyboard.split('#') const [width, height, count, sWidth, sHeight, interval, _, sigh] = storyboard.split('#')
storyboardArray.push(baseUrl.replace('$L', i + 1).replace('$N', 'M0').replace(/<\/?sub>/g, '') + '&sigh=' + sigh) storyboardArray.push({
url: baseUrl.replace('$L', i + 1).replace('$N', 'M0').replace(/<\/?sub>/g, '') + '&sigh=' + sigh,
width: Number(width), // Width of one sub image
height: Number(height), // Height of one sub image
sWidth: Number(sWidth), // Number of images vertically (if full)
sHeight: Number(sHeight), // Number of images horizontally (if full)
count: Number(count), // Number of images total
interval: Number(interval) // How long one image is used
})
console.log(storyboardArray[storyboardArray.length - 1].url)
console.log(storyboardArray[storyboardArray.length - 1])
console.log(storyboard)
}) })
const vttFile = this.buildVTTFileLocally(storyboardArray)
this.videoStoryboardSrc = storyboardArray[0] // this.videoStoryboardSrc = storyboardArray[0]
this.captionSourceList = this.captionSourceList =
result.player_response.captions && result.player_response.captions &&
result.player_response.captions.playerCaptionsTracklistRenderer result.player_response.captions.playerCaptionsTracklistRenderer
@ -358,6 +369,10 @@ export default Vue.extend({
}) })
}, },
buildVTTFileLocally: function(Storyboards) {
// let vttString = 'WEBVTT\n\n'
},
getVideoInformationInvidious: function() { getVideoInformationInvidious: function() {
if (this.firstLoad) { if (this.firstLoad) {
this.isLoading = true this.isLoading = true