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

fix(video): Video play clip wasn't working #1353

Merged
merged 2 commits into from
Jun 26, 2024
Merged

fix(video): Video play clip wasn't working #1353

merged 2 commits into from
Jun 26, 2024

Conversation

wayfarer3130
Copy link
Collaborator

Context

Fix the video play clip so it starts/stops the video.
As part of that, added support for some more tags on image rendered event for video so that a scrollbar can be kept up to date.

Changes & Results

Testing

Checklist

PR

  • [] My Pull Request title is descriptive, accurate and follows the
    semantic-release format and guidelines.

Code

Public Documentation Updates

  • [] The documentation page has been updated as necessary for any public API
    additions or removals.

Tested Environment

  • [] "OS:
  • [] "Node version:
  • [] "Browser:

Copy link

netlify bot commented Jun 26, 2024

Deploy Preview for cornerstone-3d-docs ready!

Name Link
🔨 Latest commit 1bb514d
🔍 Latest deploy log https://app.netlify.com/sites/cornerstone-3d-docs/deploys/667c393fcf35050008c3c4a9
😎 Deploy Preview https://deploy-preview-1353--cornerstone-3d-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -335,9 +335,9 @@ class VideoViewport extends Viewport implements IVideoViewport {
public async play() {
try {
if (!this.isPlaying) {
this.isPlaying = true;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The timing of these was causing the cine play stuff to fail. It had originally been done after the methods returned, but that ends up not actually fixing anything, so I have move them before so the cine works.

@@ -808,7 +808,7 @@ class VideoViewport extends Viewport implements IVideoViewport {
}

public getSliceIndex() {
return this.getCurrentImageIdIndex();
return this.getCurrentImageIdIndex() / this.scrollSpeed;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The slice index needs to agree with the scroll speed/number of slices.

@@ -1110,6 +1114,8 @@ class VideoViewport extends Viewport implements IVideoViewport {
element: this.element,
viewportId: this.id,
viewport: this,
imageIndex: this.getCurrentImageIdIndex(),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Need these for updating the scroll bar. The integer frame index needs to be used so that every frame is accessible.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Lots of little warning messages that were clogging things up trying to debug video playback.

Copy link
Member

@sedghi sedghi left a comment

Choose a reason for hiding this comment

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

Thanks

@sedghi sedghi changed the title fix: Video play clip wasn't working fix(video): Video play clip wasn't working Jun 26, 2024
@sedghi sedghi merged commit 35dc6c2 into main Jun 26, 2024
15 checks passed
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