Fix FullScreen Vimeo Player on Play

This commit is contained in:
Siroco 2020-10-31 20:35:06 +01:00
parent 2427d43db2
commit e2eac2a19c
3 changed files with 13 additions and 8 deletions

View File

@ -84,8 +84,7 @@ export class PlayerService {
}
playUrl(url,title) {
console.log(title)
console.log(this.audio_title)
//if (title==this.audio_title) this.playList();
this.audio.src = url;

View File

@ -78,14 +78,20 @@ export class SlideComponent implements OnInit {
showVideoVimeo(id:string) {
var options = {loop: false, id: id};
var options = {loop: false, id: id, responsive: true, autoplay: true};
if (this.videoPlayer && this.getVideoId() != id) { this.videoPlayer = this.videoPlayer.destroy();}
else if ( this.getVideoId() == id ) { this.videoPlayer.requestFullscreen(); }
this.videoPlayer = new Player('video-player-content', options);
this.showVideo = "flex"
this.videoPlayer.on('play', () => { this._videoID = id});
this.videoPlayer.on('play', () => {
this._videoID = id;
this.videoPlayer.getFullscreen().then( (f) => { if (!f) { this.videoPlayer.requestFullscreen(); } });
}
);
this.videoPlayer.on('ended', () => { this.stopVideo(); });
this.videoPlayer.on('fullscreenchange', (data) => { if (!data.fullscreen) { this.stopVideo(); } })
}
stopVideo() {

View File

@ -1,7 +1,7 @@
{ "data" : [
{"title":"Traktorea", "url":"http://www.soinumapa.net/wp-content/uploads/2020/10/20201017_TRACTOR_ARANDO.mp3"},
{"title":"Kanpaiak", "url":"http://www.soinumapa.net/wp-content/uploads/2020/10/20201017_BEIRE_CAMPANAS_EDIT.mp3"},
{"title":"Erlezaintza", "url":"http://www.soinumapa.net/wp-content/uploads/2020/10/20200909_ABEJAS_COMER_APICULTOR_DIA_BEIRE_ARGUEDAS.mp3"},
{"title":"Uxue Santutegia", "url":"http://www.soinumapa.net/wp-content/uploads/2020/10/20200912_INTERIOR_IGLESIA_PUERTA_UJUE_EDITED.mp3"}
{"title":"Traktorea", "url":"https://www.soinumapa.net/wp-content/uploads/2020/10/20201017_TRACTOR_ARANDO.mp3"},
{"title":"Kanpaiak", "url":"https://www.soinumapa.net/wp-content/uploads/2020/10/20201017_BEIRE_CAMPANAS_EDIT.mp3"},
{"title":"Erlezaintza", "url":"https://www.soinumapa.net/wp-content/uploads/2020/10/20200909_ABEJAS_COMER_APICULTOR_DIA_BEIRE_ARGUEDAS.mp3"},
{"title":"Uxue Santutegia", "url":"https://www.soinumapa.net/wp-content/uploads/2020/10/20200912_INTERIOR_IGLESIA_PUERTA_UJUE_EDITED.mp3"}
]
}