Fix FullScreen Vimeo Player on Play
This commit is contained in:
parent
2427d43db2
commit
e2eac2a19c
@ -84,8 +84,7 @@ export class PlayerService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
playUrl(url,title) {
|
playUrl(url,title) {
|
||||||
console.log(title)
|
|
||||||
console.log(this.audio_title)
|
|
||||||
//if (title==this.audio_title) this.playList();
|
//if (title==this.audio_title) this.playList();
|
||||||
|
|
||||||
this.audio.src = url;
|
this.audio.src = url;
|
||||||
|
@ -78,14 +78,20 @@ export class SlideComponent implements OnInit {
|
|||||||
|
|
||||||
showVideoVimeo(id:string) {
|
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();}
|
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.videoPlayer = new Player('video-player-content', options);
|
||||||
this.showVideo = "flex"
|
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('ended', () => { this.stopVideo(); });
|
||||||
|
this.videoPlayer.on('fullscreenchange', (data) => { if (!data.fullscreen) { this.stopVideo(); } })
|
||||||
}
|
}
|
||||||
|
|
||||||
stopVideo() {
|
stopVideo() {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{ "data" : [
|
{ "data" : [
|
||||||
{"title":"Traktorea", "url":"http://www.soinumapa.net/wp-content/uploads/2020/10/20201017_TRACTOR_ARANDO.mp3"},
|
{"title":"Traktorea", "url":"https://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":"Kanpaiak", "url":"https://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":"Erlezaintza", "url":"https://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":"Uxue Santutegia", "url":"https://www.soinumapa.net/wp-content/uploads/2020/10/20200912_INTERIOR_IGLESIA_PUERTA_UJUE_EDITED.mp3"}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user