Skip to content

Commit 436f8f7

Browse files
committed
#123 : Support for Video (Documentation)
1 parent 088247d commit 436f8f7

File tree

4 files changed

+37
-19
lines changed

4 files changed

+37
-19
lines changed

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ PHPPresentation is a library written in pure PHP that provides a set of classes
3434

3535
shapes_chart
3636
shapes_comment
37+
shapes_media
3738
shapes_richtext
3839
shapes_table
3940

docs/shapes.rst

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,11 @@ Example:
2727
->setOffsetX(170)
2828
->setOffsetY(180);
2929
30-
Rich text
31-
---------
32-
33-
The Rich text has :ref:`its own page <shapes_richtext>`.
34-
3530
Line
3631
----
3732

3833
To create a line, use `createLineShape` method of slide.
3934

40-
Chart
41-
-----
42-
43-
The Chart has :ref:`its own page <shapes_chart>`.
44-
45-
Comment
46-
-------
47-
48-
The Comment has :ref:`its own page <shapes_comment>`.
4935

5036
Drawing
5137
-------
@@ -58,8 +44,3 @@ To create a drawing, use `createDrawingShape` method of slide.
5844
$drawing->setName('Unique name')
5945
->setDescription('Description of the drawing')
6046
->setPath('/path/to/drawing.filename');
61-
62-
Table
63-
-----
64-
65-
The Table has :ref:`its own page <shapes_table>`.

docs/shapes_media.rst

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
.. _shapes_table:
2+
3+
Media
4+
=====
5+
6+
To create a video, create an object `Media`.
7+
8+
Example:
9+
10+
.. code-block:: php
11+
12+
use PhpOffice\PhpPresentation\Shape\Media;
13+
14+
$oMedia = new Media();
15+
$oMedia->setPath('file.mp4');
16+
// $oMedia->setPath('file.ogv');
17+
$oSlide->addShape($oMedia);
18+
19+
You can define text and date with setters.
20+
21+
Example:
22+
23+
.. code-block:: php
24+
25+
use PhpOffice\PhpPresentation\Shape\Media;
26+
27+
$oMedia = new Media();
28+
$oMedia->setName('Name of the Media');
29+
$oSlide->addShape($oMedia);
30+
31+
32+
Quirks
33+
------
34+
35+
For PowerPoint2007 Writer, the prefered file format is MP4.
36+
For ODPresentation Writer, the prefered file format is OGV.
-6.96 MB
Binary file not shown.

0 commit comments

Comments
 (0)