Skip to contents

Classes and constructors to wrap media into widgets

Usage

ImageWidget(...)

VideoWidget(...)

AudioWidget(...)

Arguments

...

Any arguments used to initialize the fields of the object

Functions

  • ImageWidget(): The ImageWidget constructor function

  • VideoWidget(): The VideoWidget constructor function

  • AudioWidget(): The AudioWidget constructor function

Super classes

RKernel::HasTraits -> RKernel::Widget -> RKernel::DOMWidget -> RKernel::DescriptionWidget -> RKernel::ValueWidget -> MediaWidget

Public fields

format

A string, giving the graphics fromat.

value

A Bytes traitlet.

Methods

Inherited methods


Method from_url()

Create media widget from url

Usage

MediaWidgetClass$from_url(url, width = NULL, height = NULL)

Arguments

url

A character string

width

A character string with CSS width specification

height

A character string with CSS height specification


Method from_file()

Create media widget from file

Usage

MediaWidgetClass$from_file(filename)

Arguments

filename

A character string


Method on_change()

Add or remove a handler to be called if value is changed.

Usage

MediaWidgetClass$on_change(handler, remove = FALSE)

Arguments

handler

A function that is called when the button is clicked.

remove

Logical value, whether the handler is to be removed.


Method new()

Initialize an object

Usage

MediaWidgetClass$new(from_file = NULL, from_url = NULL, ...)

Arguments

from_file

An optional character string, name of the file from which to initialize the widget.

from_url

An optional character string, URL from which to initialize the widget.

...

Other arguments, passed to the superclass initializer.


Method clone()

The objects of this class are cloneable with this method.

Usage

MediaWidgetClass$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Super classes

RKernel::HasTraits -> RKernel::Widget -> RKernel::DOMWidget -> RKernel::DescriptionWidget -> RKernel::ValueWidget -> RKernel::MediaWidget -> ImageWidget

Public fields

_view_name

Name of the Javascript view in the frontend.

_model_name

Name of the Javascript model in the frontend.

format

A string, giving the graphics fromat.

width

A string, describing the width in CSS language, e.g. "480px".

height

A string, describing the height in CSS language, e.g. "480px".

Super classes

RKernel::HasTraits -> RKernel::Widget -> RKernel::DOMWidget -> RKernel::DescriptionWidget -> RKernel::ValueWidget -> RKernel::MediaWidget -> VideoWidget

Public fields

_view_name

Name of the Javascript view in the frontend.

_model_name

Name of the Javascript model in the frontend.

format

A string, giving the video fromat.

width

A string, describing the width in CSS language, e.g. "480px".

height

A string, describing the height in CSS language, e.g. "480px".

autoplay

Boolean, when TRUE the video starts when it is displayed.

loop

Boolean, when TRUE the video restarts after finishing.

controls

Boolean, when TRUE then video controls are shown.

Super classes

RKernel::HasTraits -> RKernel::Widget -> RKernel::DOMWidget -> RKernel::DescriptionWidget -> RKernel::ValueWidget -> RKernel::MediaWidget -> AudioWidget

Public fields

_view_name

Name of the Javascript view in the frontend.

_model_name

Name of the Javascript model in the frontend.

format

A string, giving the audio fromat.

autoplay

Boolean, when TRUE the video starts when it is displayed.

loop

Boolean, when TRUE the video restarts after finishing.

controls

Boolean, when TRUE then video controls are shown.