Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Functions to Embed Video in HTML

License

NotificationsYou must be signed in to change notification settings

ijlyttle/vembedr

Repository files navigation

CRAN_Status_BadgeR-CMD-check

The goal of vembedr is to make it a little bit easier for you to embedvideos into yourRMarkdown documents and yourShiny apps; theseservices are supported:

  • YouTube
  • Vimeo
  • Box
  • Microsoft Stream

New to version 0.1.5

Installation

You can install the latest released version from CRAN with:

install.packages("vembedr")

or the latest development version from GitHub with:

# install.packages("devtools")devtools::install_github("ijlyttle/vembedr")

Documentation

This project supports two documentation-websites, built usingpkgdown:

Usage

The most useful function might beembed_url(). If the URL is from oneof the supported services, it will do the right thing:

library("vembedr")embed_url("https://www.youtube.com/watch?v=uV4UpCq2azs")

The video is not embedded in this README file as is rendered toMarkdown; to see embedded videos, please seevignette("vembedr"). Eachof the supported services, e.g. YouTube, is discussed invignette("embed").

The functions are designed to be piped. For example, here’s how you canmodify the appearance and the start time:

embed_url("https://www.youtube.com/watch?v=uV4UpCq2azs") %>%  use_start_time("1m32") %>%  use_align("center")

To see these functions in action, seevignette("modify").

Caveats

  • Be aware that, due to licensing issues, not all videos will playwhen embedded at a different site (like your HTML document).

  • The RStudio viewer will embed YouTube and Vimeo videos, but notothers. Videos from all services should be rendered as you expect ina browser like Chrome.

  • Some of the formatting, e.g. rounded corners, does not render onmobile sites.

Code of Conduct

Please note that the vembedr project is released with aContributorCode ofConduct.By contributing to this project, you agree to abide by its terms.


[8]ページ先頭

©2009-2025 Movatter.jp