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 embed is broken #681

Closed
crazysix opened this issue Oct 22, 2021 · 3 comments · Fixed by #776
Closed

Video embed is broken #681

crazysix opened this issue Oct 22, 2021 · 3 comments · Fixed by #776
Milestone

Comments

@crazysix
Copy link

The video embed appears to be broken. On the dev branch, if I run Sample_03_Video.php and attempt to open the pptx I get an error.
Screen Shot 2021-10-21 at 7 43 52 PM

The xml looks a bit different than a slide that I manually add a video to. The odp file is also not working, but I am mostly looking at pptx. I am on PowerPoint 16.54 on a mac. I am attaching my sample (testvideo.pptx) and the output from the sample (Sample_03_Video.pptx).
Sample_03_Video.pptx
testvideo.pptx

@potofcoffee
Copy link
Contributor

I can confirm this is broken.

At least part of the problem is here:

$objWriter->writeAttribute('r:embed', ((int) $shape->relationId + 1));

This won't create a correct relationship id, since $shape->relationId is a string like rId2 and can't be cast into an int.

However, that's only part of the problem. When I edit this manually to the correct relationship id, PowerPoint will open the presentation, but say that the video file was not found.

@potofcoffee
Copy link
Contributor

Correction: With the above fix, PowerPoint finds and correctly plays the video. The only thing not working is a thumbnail display when the video is stopped. This would require another relationship with a thumbnail image. However, that's a big step which would probably introduce new dependencies to automatically create thumbnails from videos when packing the .pptx file.

potofcoffee added a commit to potofcoffee/PHPPresentation that referenced this issue Jan 31, 2022
This fixes the broken relationship reference for video files as described in PHPOffice#681. Videos will work with this patch, but no thumbnail is displayed when the videos is stopped. (This would require thumbnail creation and another relationship for the thumbnail image.)
@zmip
Copy link

zmip commented Feb 1, 2023

Did this ever work? And were thumbnails created automatically back when it worked?

Progi1984 pushed a commit to Progi1984/PHPPresentation that referenced this issue Dec 6, 2023
This fixes the broken relationship reference for video files as described in PHPOffice#681. Videos will work with this patch, but no thumbnail is displayed when the videos is stopped. (This would require thumbnail creation and another relationship for the thumbnail image.)
@Progi1984 Progi1984 added this to the 1.1.0 milestone Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

4 participants