Fixed refresh problem of video... during change tabpage...

This commit is contained in:
Paolo Arena
2019-12-28 17:47:27 +01:00
parent 5d32378df8
commit ae5770f79b
6 changed files with 554 additions and 390 deletions

View File

@@ -50,6 +50,9 @@ export default class Home extends MixinBase {
public slide2 = 0
public animare: number = 0
public endload: boolean = false
public indvideo: number = 0
public arrvideo_yt = []
public arrvideo_mp4 = []
public arrsteps = [
{
@@ -143,7 +146,7 @@ export default class Home extends MixinBase {
public audiofiles = {
it: [
{
title: 'Chiara (1)',
title: 'Elisa (1)',
label: '1',
value: 0,
src: 'statics/audio/it/spiegazione_Billettera.mp3',
@@ -286,8 +289,10 @@ export default class Home extends MixinBase {
// console.log('this.firstClassSection', this.firstClassSection)
}, mytime)
}
public beforeDestroy() {
// console.log('beforeDestroy')
clearInterval(this.polling)
@@ -296,6 +301,15 @@ export default class Home extends MixinBase {
public created() {
this.animare = process.env.DEV ? 0 : 8000
for (let index = 0; index <= this.getvideonum(true); ++index) {
this.arrvideo_yt.push(this.getvideomp4yt(index))
}
for (let index = 0; index <= this.getvideonum(false); ++index) {
this.arrvideo_mp4.push(this.getvideomp4src(index))
}
console.log(this.arrvideo_mp4)
GlobalStore.actions.prova()
this.endload = true
@@ -415,6 +429,19 @@ export default class Home extends MixinBase {
return this.getValDb(this.getkey(youtube, false, true), false)
}
get getvideonum_youtube() {
return this.getvideonum(true)
}
get getvideonum_mp4() {
return this.getvideonum(false)
}
get heightgallvideo() {
const h = tools.heightgallery(this.getValDb('MP4_W', false) / this.getValDb('MP4_H', false))
return h
}
public mygetarrValDb(keystr, serv) {
const myval = GlobalStore.getters.getValueSettingsByKey(keystr, serv)
// console.log('AA: myval', myval)
@@ -469,6 +496,11 @@ export default class Home extends MixinBase {
]
}
public getvideomp4yt(index) {
return [{ src: this.getvideourl(index, true), type: 'video/mp4' }
]
}
public getvideoposter(index) {
return ''
}