video: Video (YouTube/Vimeo/local) url to HTML iframe/video Tag

Description Usage Arguments Details Value Note References See Also Examples

Description

YT - Wrap a YouTube tag or url to generate an HTML iframe tag.

VM - Wrap a Vimeo tag or url OR to generate an HTML iframe tag.

VD - Wrap a local path to generate an HTML video tag.

Usage

1
2
3
4
5
6
7
8
9
YT(path = "clipboard", width = 640, height = 360,
  copy2clip = interactive(), print = FALSE)

VM(path = "clipboard", width = 640, height = 360,
  copy2clip = interactive(), print = FALSE)

VD(path = "clipboard", video.js.path = "assets/js/vidscript.js",
  width = "100%", height = 520, indent.controls = 4,
  copy2clip = interactive(), print = FALSE)

Arguments

path

A url/tag/path. Default is to read from the clipboard. Note that VD requires a .mp4 file.

width

The width of the player.

height

The height of the player.

copy2clip

logical. If TRUE attempts to copy the output to the clipboard.

print

logical. If TRUE cat prints the output to the console. If FALSE returns to the console.

video.js.path

The path to the vidscript.js. If the file is not found in the dirname of video.js.path then js_copy will be utilized to place the appropriate video file in the correct location.

indent.controls

An integer value for number of indents to push the control panel.

Details

Use YT for YouTube videos and VM for Vimeo videos.

Value

Returns a character vector of an HTML iframe tag that embeds a YouTube or Vimeo video.

Note

For YouTube videos it may be better to utilize a slide layout class as a slide with a link followed by a slide with a youtube video may cause the link to become in active. To create a youtube slide use the form: --- .YT yt:ArHQjQyIS70 &youtube where the portion after yt: is the youtube tag.

References

http://blog.teamtreehouse.com/building-custom-controls-for-html5-videos

See Also

slidify_layouts, js_copy

Examples

1
2
3
YT("ArHQjQyIS70", print = TRUE)
YT("http://www.youtube.com/watch?v=ArHQjQyIS70", print = TRUE)
VM("http://vimeo.com/54007714", print = TRUE)

trinker/reports documentation built on May 31, 2019, 9:51 p.m.