Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bigscreen-player

Package Overview
Dependencies
Maintainers
3
Versions
196
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bigscreen-player - npm Package Compare versions

Comparing version 3.18.0 to 3.18.1

2

package.json
{
"name": "bigscreen-player",
"version": "3.18.0",
"version": "3.18.1",
"description": "Simplified media playback for bigscreen devices.",

@@ -5,0 +5,0 @@ "main": "script/bigscreenplayer.js",

@@ -25,2 +25,19 @@ define('bigscreenplayer/captions',

/**
* Safely checks if an attribute exists on an element.
* Browsers < DOM Level 2 do not have 'hasAttribute'
*
* The interesting case - can be null when it isn't there or "", but then can also return "" when there is an attribute with no value.
* For subs this is good enough. There should not be attributes without values.
* @param {Element} el HTML Element
* @param {String} attribute attribute to check for
*/
var hasAttribute = function (el, attribute) {
return !!el.getAttribute(attribute);
};
function hasNestedTime (element) {
return (!hasAttribute(element, 'begin') || !hasAttribute(element, 'end'));
}
var Captions = function (id, uri, media) {

@@ -170,3 +187,12 @@ var timedItems = [];

for (var k = 0, m = ps.length; k < m; k++) {
items.push(TimedPiece(ps[k], elementToStyle));
if (hasNestedTime(ps[k])) {
var tag = ps[k];
for (var index = 0; index < tag.childNodes.length; index++) {
if (hasAttribute(tag.childNodes[index], 'begin') && hasAttribute(tag.childNodes[index], 'end')) {
items.push(TimedPiece(tag.childNodes[index], elementToStyle));
}
}
} else {
items.push(TimedPiece(ps[k], elementToStyle));
}
}

@@ -332,2 +358,9 @@

var localName = source.localName || source.tagName;
// We lose line breaks with nested TimePieces, so this provides similar layout
var parentNodeLocalName = source.parentNode.localName || source.parentNode.tagName;
if (localName === 'span' && parentNodeLocalName === 'p' && hasNestedTime(source.parentNode)) {
localName = 'p';
}
var html = document.createElement(localName);

@@ -334,0 +367,0 @@ var style = toStyleFunc(source);

define('bigscreenplayer/version',
function () {
return '3.18.0';
return '3.18.1';
}
);
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc