shapes_media.rst 635 B

123456789101112131415161718192021222324252627282930313233343536
  1. .. _shapes_table:
  2. Media
  3. =====
  4. To create a video, create an object `Media`.
  5. Example:
  6. .. code-block:: php
  7. use PhpOffice\PhpPresentation\Shape\Media;
  8. $oMedia = new Media();
  9. $oMedia->setPath('file.wmv');
  10. // $oMedia->setPath('file.ogv');
  11. $oSlide->addShape($oMedia);
  12. You can define text and date with setters.
  13. Example:
  14. .. code-block:: php
  15. use PhpOffice\PhpPresentation\Shape\Media;
  16. $oMedia = new Media();
  17. $oMedia->setName('Name of the Media');
  18. $oSlide->addShape($oMedia);
  19. Quirks
  20. ------
  21. For Windows readers, the prefered file format is WMV.
  22. For Linux readers, the prefered file format is OGV.