Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@viacast/jsmpeg-player
Advanced tools
Readme
$ npm install @cycjimmy/jsmpeg-player --save
# or
$ yarn add @cycjimmy/jsmpeg-player
import JSMpeg from '@cycjimmy/jsmpeg-player';
# OR
const JSMpeg = require('@cycjimmy/jsmpeg-player');
new JSMpeg.VideoElement(videoWrapper, videoUrl [, options] [, overlayOptions])
JSMpeg.VideoElement
config:
videoWrapper
: [String | Element] The wrapper of the video. The height and width of the wrapper are recommended to be initialized.videoUrl
: [String] A URL to an MPEG .ts fileoptions
: [Object] support:
canvas
: [String | Element] The HTML canvas element to use for video rendering. If none is given, the renderer will create its own canvas element. Default ''
.poster
: [String] URL to an image to use as the poster to show before the video plays. (Recommended to set it manually)autoplay
: [Boolean] Whether to start playing immediately. Default false
.autoSetWrapperSize
: [Boolean] Whether to set the wrapper element size automatically when the video loaded. Default false
.loop
: [Boolean] Whether to loop the video (static files only). Default false
.[overwrite]control
: [Boolean] Whether the user can control. Default true
.decodeFirstFrame
: [Boolean] Whether to decode and display the first frame of the video. Default true
.picMode
: [Boolean] Picture mode (no playButton). Default false
.progressive
: [Boolean] whether to load data in chunks (static files only). Default true
.chunkSize
[Number] The chunk size in bytes to load at a time. Default 1024*1024
(1mb).hooks
: [Object] The hook function
play
: [Function] The hook function when the video play.pause
: [Function] The hook function when the video pause.stop
: [Function] The hook function when the video stop.load
: [Function] The hook function when the video established.overlayOptions
: [Object] More options can view the jsmpeg optionsJSMpeg.VideoElement
instance supports the following methods:
play()
: Start playbackpause()
: Pause playbackstop()
: Stop playback and seek to the beginningdestroy()
: Stop playback and empty video wrapperJSMpeg.VideoElement.player
instance API can view the JSMpeg.Player API
<div id="videoWrapper"></div>
<script src="jsmpeg-player.umd.min.js"></script>
<script>
var videoUrl = '../static/media/test_video.ts';
new JSMpeg.VideoElement('#videoWrapper', videoUrl);
</script>
To use via a CDN include this in your HTML:
<script src="https://cdn.jsdelivr.net/npm/@cycjimmy/jsmpeg-player@6/dist/jsmpeg-player.umd.min.js"></script>
$ ffmpeg -i input.mp4 -f mpegts \
-codec:v mpeg1video -s 640x360 -b:v 700k -r 25 -bf 0 \
-codec:a mp2 -ar 44100 -ac 1 -b:a 64k \
output.ts
-s
: video size-b:v
: video bit rate-r
: frame rate-ar
: sampling rate-ac
: number of audio channels-b:a
: audio bit rateFAQs
MPEG1 Video Player Based On JSMpeg
The npm package @viacast/jsmpeg-player receives a total of 2 weekly downloads. As such, @viacast/jsmpeg-player popularity was classified as not popular.
We found that @viacast/jsmpeg-player demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.