Media Interface
- class epyk.interfaces.components.CompMedia.Media(ui)
- audio(value: str = '', path: Optional[str] = None, width: Optional[Union[tuple, int, str]] = (100, '%'), height: Optional[Union[tuple, int, str]] = (None, 'px'), html_code: Optional[str] = None, profile: Optional[Union[bool, dict]] = None, options: Optional[dict] = None)
Add a audio track from the server to the page. The format for the video must be mpeg.
Usage:
page.ui.media.video("CWWB3673.mpeg")
Underlying HTML Objects:
Related Pages
Templates:
- Parameters:
value – Optional. The name of the audio object.
path – Optional. THe path to the audio object.
width – Optional. A tuple with the integer for the component width and its unit.
height – Optional. A tuple with the integer for the component height and its unit.
html_code – Optional. An identifier for this component (on both Python and Javascript side).
profile – Optional. A flag to set the component performance storage.
options – Optional. Specific Python options available for this component.
- camera(align: str = 'center', width: Optional[Union[tuple, int, str]] = (100, '%'), height: Optional[Union[tuple, int, str]] = (None, 'px'), html_code: Optional[str] = None, profile: Optional[Union[bool, dict]] = None, options: Optional[dict] = None)
Add a video from the server to the page. The format for the video must be MP4.
Usage:
page.ui.media.camera()
Underlying HTML Objects:
Related Pages:
Templates:
- Parameters:
align – Optional. A string with the horizontal position of the component.
width – Optional. A tuple with the integer for the component width and its unit.
height – Optional. A tuple with the integer for the component height and its unit.
html_code – Optional. The component identifier code (for both Python and Javascript).
profile – Optional. A flag to set the component performance storage.
options – Optional. Specific Python options available for this component.
- video(value: str = '', align: str = 'center', path: Optional[str] = None, width: Optional[Union[tuple, int, str]] = (100, '%'), height: Optional[Union[tuple, int, str]] = (None, 'px'), html_code: Optional[str] = None, profile: Optional[Union[bool, dict]] = None, options: Optional[dict] = None)
Add a video from the server to the page. The format for the video must be MP4.
Usage:
page.ui.media.video("CWWB3673.MP4")
Underlying HTML Objects:
Related Pages:
Templates:
- Parameters:
value – Optional. The name of the video.
path – Optional. THe path to the video.
align – Optional. A string with the horizontal position of the component.
width – Optional. A tuple with the integer for the component width and its unit.
height – Optional. A tuple with the integer for the component height and its unit.
html_code – Optional. The component identifier code (for both Python and Javascript).
profile – Optional. A flag to set the component performance storage.
options – Optional. Specific Python options available for this component.
- youtube(link: str, align: str = 'center', width: Optional[Union[tuple, int, str]] = (100, '%'), height: Optional[Union[tuple, int, str]] = (None, 'px'), html_code: Optional[str] = None, profile: Optional[Union[bool, dict]] = None, options: Optional[dict] = None)
This will add a youtube video using the shared line to embedded to a website.
Usage:
page.ui.media.youtube("https://www.youtube.com/embed/dfiHMtih5Ac")
Underlying HTML Objects:
Related Pages
Templates:
- Parameters:
link – The youtube link.
align – Optional. A string with the horizontal position of the component.
width – Optional. A tuple with the integer for the component width and its unit.
height – Optional. A tuple with the integer for the component height and its unit.
html_code – Optional. The component identifier code (for both Python and Javascript).
profile – Optional. A flag to set the component performance storage.
options – Optional. A dictionary with the components properties.