You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

apm-html5-player

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apm-html5-player - npm Package Compare versions

Comparing version

to
1.0.0-rc.0

7

dist/bundle.js

@@ -244,3 +244,4 @@ (function (global, factory) {

// If the error is anything other than not evaluating to JSON, print to console
if (!/^\s*SyntaxError: Unexpected token/.test(e)) {
var syntaxReg = /^\s*SyntaxError: Unexpected token|^\s*SyntaxError: Unexpected end of JSON input/;
if (!syntaxReg.test(e)) {
// eslint-disable-next-line

@@ -632,3 +633,3 @@ console.log(e);

var volumeBarRect = element.getBoundingClientRect();
var volumeBarOffset = volumeBarRect.left;
var volumeBarOffset = volumeBarRect.left + window.pageXOffset;
var volumeBarWidth = element.offsetWidth;

@@ -647,3 +648,3 @@ var positionInElement = clickXPosition - volumeBarOffset;

var volumeBarRect = element.getBoundingClientRect();
var volumeBarOffset = volumeBarRect.top + document.scrollTop;
var volumeBarOffset = volumeBarRect.top + window.pageYOffset;
var volumeBarHeight = element.offsetHeight;

@@ -650,0 +651,0 @@ var positionInElement = clickYPosition - volumeBarOffset;

@@ -31,3 +31,3 @@ {

"title": "APM HTML5 Player",
"version": "1.0.0-beta.3",
"version": "1.0.0-rc.0",
"devDependencies": {

@@ -34,0 +34,0 @@ "@babel/cli": "^7.4.4",

@@ -39,2 +39,3 @@ # APM Player

- [Global Setup](#global-setup)
- [Playlists](#playlists)

@@ -185,11 +186,11 @@ [Development Setup](#development-setup)

- `js-player-play`: The play/pause button. To change state of the button (to alternate between a play and pause icon), you can put the appropriate icons inside the button and show/hide based on the CSS state class applied to `js-player`
- `js-player-timeline`: The outer container of the scrubber
- `js-player-progress`: The element indicating the time elapsed inside the scrubber. Must be contained inside `js-player-timeline`
- `js-player-buffered`: The element indicating the loaded audio buffers. Must be contained inside `js-player-timeline` and should not contain any elements (or they will be overwritten)
- `js-player-volume`: The outer container of the volume bar
- `js-player-volume-current`: The element indicating the current volume. Must be contained inside `js-player-volume`
- `js-player-mute`: The audio mute button. To change state of the button (to alternate between a mute and unmute icon), you can put the appropriate icons inside the button and show/hide based on the CSS state class applied to `js-player`
- `js-player-duration`: Displays the total length (in hh:mm:ss) of the audio which is currently loaded
- `js-player-currentTime`: Displays the current time of the currently loaded audio
- `js-player-play`: The play/pause button. To change state of the button (to alternate between a play and pause icon), you can put the appropriate icons inside the button and show/hide based on the CSS state class applied to `js-player`. Can be multiple elements.
- `js-player-timeline`: The outer container of the scrubber. Must be a single element.
- `js-player-progress`: The element indicating the time elapsed inside the scrubber. Must be contained inside `js-player-timeline`. Must be a single element.
- `js-player-buffered`: The element indicating the loaded audio buffers. Must be contained inside `js-player-timeline` and should not contain any elements (or they will be overwritten). Must be a single element.
- `js-player-volume`: The outer container of the volume bar. Must be a single element.
- `js-player-volume-current`: The element indicating the current volume. Must be contained inside `js-player-volume`. Must be a single element.
- `js-player-mute`: The audio mute button. To change state of the button (to alternate between a mute and unmute icon), you can put the appropriate icons inside the button and show/hide based on the CSS state class applied to `js-player`. Must be a single element.
- `js-player-duration`: Displays the total length (in hh:mm:ss) of the audio which is currently loaded. Must be a single element.
- `js-player-currentTime`: Displays the current time of the currently loaded audio. Must be a single element.

@@ -398,2 +399,8 @@ #### DOM Example

### Playlists
This library includes functionality for managing a playlist in the DOM (included for backwards compatibility with some of our sites), but it's not recommended to use it for new projects.
The behavior isn't well-tested and stores its data in the DOM instead of in memory, meaning it is relatively brittle.
At this time it is recommended to write your own custom implementation to manage playlists if you need them.
## Development setup

@@ -400,0 +407,0 @@