You can use this widget in Rmd files or Shiny applications, the same way as other HTML widgets.
asciinema_player(
cast,
start_at = 0,
rows = NULL,
cols = NULL,
autoplay = NULL,
loop = NULL,
speed = NULL,
title = NULL,
author = NULL,
author_url = NULL,
author_img_url = NULL,
poster_text = NULL,
poster_frame = NULL,
font_size = NULL,
theme = NULL,
idle_time_limit = NULL,
html_height = NULL,
html_width = NULL,
element_id = NULL
)
asciicast
object.
Where to start the playback from, in seconds.
Number of rows, defaults to the number of rows in the recording, or 24 if not specified in the cast.
Number of columns, defaults to the number columns in the recording, or 80 if not specified in the cast.
Whether to start playing the cast automatically.
Whether to loop the playback.
Whether to play slower or faster. 1 is normal speed.
If specified, it overrides the title in the recording.
Author, displayed in the titlebar in fullscreen mode.
URL of the author's homepage/profile. Author name (author above) is linked to this URL.
URL of the author's image, displayed in the titlebar in fullscreen mode.
if not NULL
, used as the text of the poster
(preview).
Text to use as the preview picture. Defaults to the title.
Size of terminal font. Possible values: small, medium,
big, any css font-size
value (e.g. 15px).
Theme.
Time limit for the cast not printing anything, in seconds. By default there is no limit.
HTML height of the widget.
HTML width of the widget.
HTML id of the widget's element. If NULL
, then the
id is generated randomly.
# NOT RUN {
cast <- read_cast(system.file("examples", "hello.cast", package = "asciicast"))
asciinema_player(cast)
# }
Run the code above in your browser using DataLab