addOnlineVideo

addOnlineVideo

ADVANCED / PREMIUM TRIAL

Inserts an online video into your document.

Description
public addOnlineVideo ( string $src [, array $options] )

This method allows you to insert an online video into your Word document.

Compatible from MS Word 2013, if older or other DOCX reader set as link.

Parameters

src

URL of the video to be added.

options

The specific options have the following keys and values:

Key Type Description
image string Use a custom image as video preview, black color otherwise.
height int In pixels, 315 as default.
hyperlink string Use $src if not set.
width int In pixels, 560 as default.
Exceptions

Method not available.

Image does not exist.

Image format not supported.

Code samples

Example #1

Release notes
  • phpdocx 10.0:
    • new method.