3.1.0 • Published 2 years ago

@tuentyfaiv/mediaplayer v3.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Media player by TuentyFaiv

This is a media player built with web components, typescript and sass, to work in any framework or library of javascript.

Install

npm install @tuentyfaiv/mediaplayer

Usage

import '@tuentyfaiv/mediaplayer';
<tf-player
  player_src=""
  player_poster=""
  player_share=""
  player_title=""
  player_width=""
  player_height=""
  player_background=""
>
</tf-player>
AttributeDescription
player_srcSets the video source.
player_posterSets the video poster. (Optional)
player_shareDisable the option to share the video page, the only option is "false". (Optional, the option to share the video page by default is active)
player_titleSets video title (Optional)
player_widthVideo width. (Optional, default is "100%")
player_heightVideo height. (Optional, default is "540px")
player_backgroundSets the video background color. (Optional, default is "#040305")

All attribute values ​​must be of type string

Features

Keyboard keyAction(s)
SpacebarPlay, Pause, Replay
Arrow upVolume up
Arrow downVolume down
Arrow leftBackward 10s
Arrow rightForward 10s
mToggle mute
pPicture in picture (only if supported by the browser)
tToggle theater mode
fToggle fullscreen mode
escExit fullscreen

Contributing

If someone wants to add or improve something, I invite you to collaborate directly in this repository: TuentyFaiv/Mediaplayer

License

@tuentyfaiv/mediaplayer is released under the MIT License.