Gathering detailed insights and metrics for mmp.video
Gathering detailed insights and metrics for mmp.video
Gathering detailed insights and metrics for mmp.video
Gathering detailed insights and metrics for mmp.video
npm install mmp.video
Typescript
Module System
Min. Node Version
Node Version
NPM Version
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
MMP Packages: video library for desktop and mobile devices
bower install mmp.video
This package uses module exports.
Examples are located to src/scripts/examples.
Examples:
Supported on:
urls
: (default {}
) specify an object of video extension urls. Extension allowed are mp4, webm, ogv, m4v and mov. Video script will choose automatically the better format desktop. For mobile, video extension used by default is m4v.
cache
: (default true
) prevent cache when you're loading a video multiple times. Add random number at the end of video filename if you're set cache
to false. (example: filename.mp4?1234)
autoload
: (default true
) preload video after object instanciation. Video can be loaded later with load
method.
autoplay
: (default false
) play video after being loaded.
isFullscreen
: (default false
) set fullscreen video.
Important: you must use the resize
method of video object or video manager to resize video
isMuted
: (default false
) play video audio
isLoop
: (default false
) loop video
volume
: (default .5
) video volume
containerId
: (default video
) id container (do not include # symbol)
videoId
: (default video-(random number)
) id video (do not include # symbol)
poster
: (default null
) poster video jpg
size
: (default {}
) specify container width and container height of video.
Example: {width: 200, height: 200}
. if you use fullscreen video, do not specify video size
callbacks
: (default {}
) video callbacks. see example to have the list of all callbacks available.
videoLoadedCallback
: (default null
) video metadata loadedvideoCanPlayCallback
: (default null
) video loaded and can play (readyState > 1)videoReadyCallback
: (default null
) video ok to be played (readyState == 4)videoEndCallback
: (default null
) video endvideoRemovedCallback
: (default null
) callback video removed from dom and object properties removedreturn video duration or 0 if video node is not added to DOM duration in milliseconds
--
return video time remaining or 0 if video node is not added to DOM time in milliseconds
--
load video
--
play video node and update controls time seekbar if controls are enabled
--
pause video node pause controls time seekbar if controls are enabled
--
stop video and set current time to 0. set control time seekbar to 0 if controls are enabled
--
restart video node
--
skip video time time in milliseconds
--
set volume to video
--
set current time currentTime in milliseconds
--
set video fullscreen
--
show video by removing hidden
class. Note: video is shown if autoplay
is set to true
--
hide video by adding hidden
class
--
add controls options. see callbacks controls example for more information.
null
) promise callback that lets video script matching global events to default controls video elements.null
) controls class elements
These properties can be edited to control options.
--
remove video instance
--
resize video container. call this method in window resize
event to have a fullscreen video. window sizes are set automatically.
videos
: (default []
) list all video instances
context
: (default desktop
) define video context (actually desktop
or mobile
). you have two video instances: VideoDesktop
and VideoMobile
. You can use this object or specify custom context to video manager and instanciate video with Video
for better code comprehension.
resize videos which need to be resized. Depends on each video options
--
mute all videos
--
unmute all videos
--
play all videos
--
pause all videos
--
stop all videos
--
set mobile context will instanciate all Video class instances according to VideoMobile class. Useful if you work with mobile devices because you don't need to replace Video object by VideoMobile object.
--
set mobile context will instanciate all Video class instances according to VideoMobile class. used by default
No vulnerabilities found.
No security vulnerabilities found.