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

how do get VideoJS to show poster on ended event #972

Closed
peterbelsky opened this issue Jan 28, 2014 · 6 comments
Closed

how do get VideoJS to show poster on ended event #972

peterbelsky opened this issue Jan 28, 2014 · 6 comments
Labels
needs: reduced test case A reproducible test case is needed. See https://stackoverflow.com/help/minimal-reproducible-example

Comments

@peterbelsky
Copy link

This code does trigger on ended, shows the bigPlayButton but does not show the posterImage ??? anyone know the correct way to accomplish. using videojs 4.3.0

videojs("example_video_1").ready(function(){

var vid = this;
vid.on("ended", function(){
alert ("I have triggered");
vid.posterImage.show();
vid.bigPlayButton.show();
vid.currentTime(0);
});

});

@heff
Copy link
Member

heff commented Jan 28, 2014

The code you have there is actually working for me.
http://jsbin.com/EGAyOYi/2/edit

What browser/platform, and can you create a jsbin where it's not working?

@peterbelsky
Copy link
Author

thanks, I see your right... it works in jsbin not sure why it does not for me... here is my jsbin:
http://jsbin.com/uxaDiLE/1/

osx 10.9.1
firefox Version 26
chrome Version 32.0.1700.102
safari Version 7.0.1 (9537.73.11)

@peterbelsky
Copy link
Author

Hi Heff,
thanks, I think I found the issue is with the css that I am using that allows for responsive layouts is what breaks the code.

@heff
Copy link
Member

heff commented Jan 28, 2014

Seems to have something to do with the added styles. I commented those out and it worked for me. Not sure exactly what though.

http://jsbin.com/uxaDiLE/4/edit

@peterbelsky
Copy link
Author

thanks heff... these styles we added to allow for responsive width for video player... from this link:
#384 (comment)

It seems that this css is not friendly with vid.posterImage.show(); function.

Do you by any chance know a different way to accomplish?

@heff
Copy link
Member

heff commented Feb 8, 2014

We're discussing this in #982. Check the related issues for some different options.

@heff heff closed this as completed Feb 8, 2014
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: reduced test case A reproducible test case is needed. See https://stackoverflow.com/help/minimal-reproducible-example
Projects
None yet
Development

No branches or pull requests

2 participants