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

Video is not rendered inside group #4286

Closed
solomax opened this issue Sep 5, 2017 · 8 comments
Closed

Video is not rendered inside group #4286

solomax opened this issue Sep 5, 2017 · 8 comments

Comments

@solomax
Copy link

solomax commented Sep 5, 2017

Version

1.7.17

I'm trying to create video player using fabric.js.
First task is to create play/pause button.
Change button style on mouseover is not working due to #4115 :(
Somehow video is not being rendered inside group :(

Test Case

https://jsfiddle.net/solomax666/r2nuv845/

Steps to reproduce

  • Run jsfiddle above
  • press 'Play' button
  • wait couple of seconds

Expected Behavior

Video is being played on canvas

Actual Behavior

There is the sound but video frames are not being updated
Frame-by-frame animation can be created by continuously clicking play/pause button

@solomax
Copy link
Author

solomax commented Sep 5, 2017

Additional question: is it possible to display poster of video tag?

@asturur
Copy link
Member

asturur commented Sep 7, 2017

https://jsfiddle.net/r2nuv845/7/

The problem is that you should disable the cache for that Group containing video and buttons.
The Group will change every frame and every render, so there is no reason to keep it cached.
(i added objectCaching: false to group creation)

@asturur asturur closed this as completed Sep 7, 2017
@asturur
Copy link
Member

asturur commented Sep 7, 2017

What is poster of video tag?

@solomax
Copy link
Author

solomax commented Sep 7, 2017

Thanks!

Here is the description of the poster: https://www.w3schools.com/tags/att_video_poster.asp

@solomax
Copy link
Author

solomax commented Sep 7, 2017

I just have checked, adding objectCaching: false fixes playback issue, but play/pause button stops working :(
With caching it correctly changes visibility of inner objects. With ching off this button is always 'play' and never 'pause' :(

@solomax
Copy link
Author

solomax commented Sep 7, 2017

OK, play/pause issue is solved by disable caching for both groups
Thanks a lot for helping with this!

@asturur
Copy link
Member

asturur commented Sep 7, 2017

so poster is an attribute.
You have to parse it and display it by yourself as an image. There is no real video support in fabricjs.

@solomax
Copy link
Author

solomax commented Sep 7, 2017

OK, Will try. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants