@silvermine/videojs-chromecast
Advanced tools
Comparing version 1.1.2 to 1.2.0
{ | ||
"name": "@silvermine/videojs-chromecast", | ||
"version": "1.1.2", | ||
"version": "1.2.0", | ||
"description": "video.js plugin for casting to chromecast", | ||
@@ -29,3 +29,3 @@ "main": "src/js/index.js", | ||
"dependencies": { | ||
"class.extend": "0.9.2", | ||
"class.extend": "0.9.1", | ||
"underscore": "1.8.3", | ||
@@ -32,0 +32,0 @@ "webcomponents.js": "git+https://git@github.com/webcomponents/webcomponentsjs.git#v0.7.24" |
@@ -158,2 +158,8 @@ # Silvermine VideoJS Chromecast Plugin | ||
player's control bar component. Defaults to `true`. | ||
* **`plugins.chromecast.buttonPositionIndex`** - a zero-based number specifying the index | ||
of the Chromecast button among the control bar's child components (if | ||
`addButtonToControlBar` is set to `true`). By default the Chromecast Button is added as | ||
the last child of the control bar. A value less than 0 puts the button at the specified | ||
position from the end of the control bar. Note that it's likely not all child components | ||
of the control bar are visible. | ||
@@ -160,0 +166,0 @@ ##### Chromecast Tech configuration |
@@ -53,5 +53,14 @@ 'use strict'; | ||
function setUpChromecastButton(player, options) { | ||
var indexOpt; | ||
// Ensure Chromecast button exists | ||
if (options.addButtonToControlBar && !player.controlBar.getChild('chromecastButton')) { | ||
player.controlBar.addChild('chromecastButton', options); | ||
// Figure out Chromecast button's index | ||
indexOpt = player.controlBar.children().length; | ||
if (typeof options.buttonPositionIndex !== 'undefined') { | ||
indexOpt = options.buttonPositionIndex >= 0 | ||
? options.buttonPositionIndex | ||
: player.controlBar.children().length + options.buttonPositionIndex; | ||
} | ||
player.controlBar.addChild('chromecastButton', options, indexOpt); | ||
} | ||
@@ -58,0 +67,0 @@ // Respond to requests for casting. The ChromecastButton component triggers this event |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
480545
10883
328
2
+ Addedclass.extend@0.9.1(transitive)
- Removedclass.extend@0.9.2(transitive)
Updatedclass.extend@0.9.1