Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

display poster image at the end of the video #747

Closed
jedgarf opened this issue Apr 24, 2024 · 1 comment
Closed

display poster image at the end of the video #747

jedgarf opened this issue Apr 24, 2024 · 1 comment

Comments

@jedgarf
Copy link

jedgarf commented Apr 24, 2024

how to display poster image at the end of the video

I tried this but not working:

art.on('video:ended', () => {
art.poster = 'https://artworks.thetvdb.com/banners/v4/series/81797/backgrounds/65a14ba386293.jpg';
});

@zhw2590582
Copy link
Owner

var art = new Artplayer({
	container: '.artplayer-app',
	url: '/assets/sample/video.mp4',
	poster: '/assets/sample/poster.jpg',
});

art.on('video:ended', () => {
	art.template.$poster.style.display = '';
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants