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

addMedia of type='online' not working? #335

Closed
lndev1 opened this issue May 15, 2018 · 1 comment
Closed

addMedia of type='online' not working? #335

lndev1 opened this issue May 15, 2018 · 1 comment
Assignees
Milestone

Comments

@lndev1
Copy link

lndev1 commented May 15, 2018

I have created a pptx using the library and am trying to include and embedded youtube clip in the presentation.

let pptx = new PptxGenJS();
let videoSlide = pptx.addNewSlide();
videoSlide.addMedia({
    type: 'online',
    link: 'https://www.youtube.com/embed/Dph6ynRVyUc',
    x: 0,
    y: 0,
    w: slideWidth,
    h: slideHeight
});
pptx.save(filename);

This creates a presentation with and error
screen shot 2018-05-15 at 1 23 34 pm

After accepting this error, the media object is empty with the message "The picture can't be displayed." Also it seems to have overridden slide masters previously created. Is this no longer working properly or have I added the online media object incorrectly?

@gitbrent
Copy link
Owner

Hi @lndev1,

Thanks for reporting this.

The preview image (a circle-triangle play-button type png) was missing for online videos, hence the "picture can't be displayed" error.

I've fixed the preview image so it's no longer broken (YouTube would still play correctly in presentation mode).

screen shot 2018-05-15 at 22 09 31

YouTube Notes:

  1. YouTube videos only work in PowerPoint online (Office 365)
  2. The videos only show in presentation mode (a tooltip hint appears on hover saying as much)

screen shot 2018-05-15 at 22 22 07

screen shot 2018-05-15 at 22 09 56

gitbrent pushed a commit that referenced this issue May 30, 2018
ericrockey pushed a commit to WeTransfer/PptxGenJS that referenced this issue Mar 24, 2020
ericrockey pushed a commit to WeTransfer/PptxGenJS that referenced this issue Mar 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants