Skip to content

Conversation

@thedude61636
Copy link

Greetings,
I've added image styling for the video element, which would let you for example set width 100% or maybe have border radius for the video element , very useful when you have full width video element
i've also fixed an issue with Ios safari, it doesn't have ImageCapture object by default, I've passed the video element to the capture method and extracted the image from there ,
I've tested this method on another project with the exact same code and it works perfectly


this.lastPicture = canvas.toDataURL(type);
});
canvas.width = video.videoWidth;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style changes are good, but this is another concern we need to address in another PR, also keep ImageCapture and if video parameter passed use it otherwise rely on ImageCapture path.

}

public async Task<string> Capture(ElementReference canvas)
public async Task<string> Capture(ElementReference canvas, ElementReference video)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please split this into another PR, too many changes here, this may need a major version change.

@thedude61636
Copy link
Author

alright, that seams reasonable
but i have a few questions what is the difference between cpp version and js version?

and would it be enough if i did this?
public async Task<string> Capture(ElementReference canvas, ElementReference? video = null)
and used image capture if video element isn't present in the js file?

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

Successfully merging this pull request may close these issues.

2 participants