Socket
Socket
Sign inDemoInstall

videojs-playlist-ui

Package Overview
Dependencies
Maintainers
102
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

videojs-playlist-ui - npm Package Compare versions

Comparing version 3.5.2 to 3.6.0

dist/lang/de.js

17

CHANGELOG.md

@@ -0,1 +1,18 @@

<a name="3.6.0"></a>
# [3.6.0](https://github.com/brightcove/videojs-playlist-ui/compare/v3.5.2...v3.6.0) (2019-08-26)
### Features
* Add translations for localizable strings ([#107](https://github.com/brightcove/videojs-playlist-ui/issues/107)) ([96b5ef7](https://github.com/brightcove/videojs-playlist-ui/commit/96b5ef7))
### Chores
* **package:** Update dependencies to fix npm audit issues ([#106](https://github.com/brightcove/videojs-playlist-ui/issues/106)) ([ec20321](https://github.com/brightcove/videojs-playlist-ui/commit/ec20321))
* **package:** update lint-staged to version 8.1.0 ([#91](https://github.com/brightcove/videojs-playlist-ui/issues/91)) ([afd859e](https://github.com/brightcove/videojs-playlist-ui/commit/afd859e))
* **package:** update npm-run-all/videojs-generator-verify for security ([9c579e0](https://github.com/brightcove/videojs-playlist-ui/commit/9c579e0))
* **package:** update rollup to version 0.67.3 ([#89](https://github.com/brightcove/videojs-playlist-ui/issues/89)) ([d969e5d](https://github.com/brightcove/videojs-playlist-ui/commit/d969e5d))
* **package:** update videojs-generate-karma-config to version 5.0.0 ([#90](https://github.com/brightcove/videojs-playlist-ui/issues/90)) ([841cc2d](https://github.com/brightcove/videojs-playlist-ui/commit/841cc2d))
* **package:** update videojs-generate-rollup-config to version 2.3.1 ([#92](https://github.com/brightcove/videojs-playlist-ui/issues/92)) ([ee3a461](https://github.com/brightcove/videojs-playlist-ui/commit/ee3a461))
* **package:** update videojs-standard to version 8.0.2 ([#93](https://github.com/brightcove/videojs-playlist-ui/issues/93)) ([d9066ea](https://github.com/brightcove/videojs-playlist-ui/commit/d9066ea))
<a name="3.5.2"></a>

@@ -2,0 +19,0 @@ ## [3.5.2](https://github.com/brightcove/videojs-playlist-ui/compare/v3.5.1...v3.5.2) (2018-10-03)

4

dist/videojs-playlist-ui.cjs.js

@@ -1,2 +0,2 @@

/*! @name videojs-playlist-ui @version 3.5.2 @license Apache-2.0 */
/*! @name videojs-playlist-ui @version 3.6.0 @license Apache-2.0 */
'use strict';

@@ -15,3 +15,3 @@

var version = "3.5.2";
var version = "3.6.0";

@@ -18,0 +18,0 @@ var dom = videojs.dom || videojs;

@@ -1,2 +0,2 @@

/*! @name videojs-playlist-ui @version 3.5.2 @license Apache-2.0 */
/*! @name videojs-playlist-ui @version 3.6.0 @license Apache-2.0 */
import document from 'global/document';

@@ -11,3 +11,3 @@ import videojs from 'video.js';

var version = "3.5.2";
var version = "3.6.0";

@@ -14,0 +14,0 @@ var dom = videojs.dom || videojs;

@@ -1,2 +0,2 @@

/*! @name videojs-playlist-ui @version 3.5.2 @license Apache-2.0 */
/*! @name videojs-playlist-ui @version 3.6.0 @license Apache-2.0 */
(function (global, factory) {

@@ -17,3 +17,3 @@ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('global/document'), require('video.js')) :

var version = "3.5.2";
var version = "3.6.0";

@@ -20,0 +20,0 @@ var dom = videojs.dom || videojs;

@@ -1,2 +0,2 @@

/*! @name videojs-playlist-ui @version 3.5.2 @license Apache-2.0 */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("global/document"),require("video.js")):"function"==typeof define&&define.amd?define(["global/document","video.js"],e):t.videojsPlaylistUi=e(t.document,t.videojs)}(this,function(t,e){"use strict";function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}t=t&&t.hasOwnProperty("default")?t.default:t;var l,s=(e=e&&e.hasOwnProperty("default")?e.default:e).dom||e,a=e.registerPlugin||e.plugin,n={className:"vjs-playlist",playOnSelect:!1,supportsCssPointerEvents:((l=t.createElement("x")).style.cssText="pointer-events:auto","auto"===l.style.pointerEvents)},r=function(t){t.addClass("vjs-selected")},o=function(t){t.removeClass("vjs-selected"),t.thumbnail&&s.removeClass(t.thumbnail,"vjs-playlist-now-playing")},p=function(t){t.removeClass("vjs-up-next")},d=e.getComponent("Component"),c=function(l){function s(t,e,i){var s;if(!e.item)throw new Error("Cannot construct a PlaylistMenuItem without an item option");return(s=l.call(this,t,e)||this).item=e.item,s.playOnSelect=i.playOnSelect,s.emitTapEvents(),s.on(["click","tap"],s.switchPlaylistItem_),s.on("keydown",s.handleKeyDown_),s}i(s,l);var a=s.prototype;return a.handleKeyDown_=function(t){13!==t.which&&32!==t.which||this.switchPlaylistItem_()},a.switchPlaylistItem_=function(t){this.player_.playlist.currentItem(function(t,e){for(var i=0,l=t.length;i<l;i++)if(t[i]===e)return i;return-1}(this.player_.playlist(),this.item)),this.playOnSelect&&this.player_.play()},a.createEl=function(){var i=t.createElement("li"),l=this.options_.item;"object"==typeof l.data&&Object.keys(l.data).forEach(function(t){var e=l.data[t];i.dataset[t]=e});if(i.className="vjs-playlist-item",i.setAttribute("tabIndex",0),this.thumbnail=function(e){if(!e){var i=t.createElement("div");return i.className="vjs-playlist-thumbnail vjs-playlist-thumbnail-placeholder",i}var l=t.createElement("picture");if(l.className="vjs-playlist-thumbnail","string"==typeof e){var s=t.createElement("img");s.src=e,s.alt="",l.appendChild(s)}else{for(var a=0;a<e.length-1;a++){var n=e[a],r=t.createElement("source");for(var o in n)r[o]=n[o];l.appendChild(r)}var p=e[e.length-1],d=t.createElement("img");for(var c in d.alt="",p)d[c]=p[c];l.appendChild(d)}return l}(l.thumbnail),i.appendChild(this.thumbnail),l.duration){var s=t.createElement("time"),a=e.formatTime(l.duration);s.className="vjs-playlist-duration",s.setAttribute("datetime","PT0H0M"+l.duration+"S"),s.appendChild(t.createTextNode(a)),i.appendChild(s)}var n=t.createElement("span"),r=this.localize("Now Playing");n.className="vjs-playlist-now-playing-text",n.appendChild(t.createTextNode(r)),n.setAttribute("title",r),this.thumbnail.appendChild(n);var o=t.createElement("div");o.className="vjs-playlist-title-container",this.thumbnail.appendChild(o);var p=t.createElement("span"),d=this.localize("Up Next");p.className="vjs-up-next-text",p.appendChild(t.createTextNode(d)),p.setAttribute("title",d),o.appendChild(p);var c=t.createElement("cite"),h=l.name||this.localize("Untitled Video");return c.className="vjs-playlist-name",c.appendChild(t.createTextNode(h)),c.setAttribute("title",h),o.appendChild(c),i},s}(d),h=function(l){function a(t,i){var s;if(!t.playlist)throw new Error("videojs-playlist is required for the playlist component");return(s=l.call(this,t,i)||this).items=[],i.horizontal?s.addClass("vjs-playlist-horizontal"):s.addClass("vjs-playlist-vertical"),i.supportsCssPointerEvents&&s.addClass("vjs-csspointerevents"),s.createPlaylist_(),e.browser.TOUCH_ENABLED||s.addClass("vjs-mouse"),s.on(t,["loadstart","playlistchange","playlistsorted"],function(t){s.update()}),s.on(t,"adstart",function(){s.addClass("vjs-ad-playing")}),s.on(t,"adend",function(){s.removeClass("vjs-ad-playing")}),s.on("dispose",function(){s.empty_(),t.playlistMenu=null}),s.on(t,"dispose",function(){s.dispose()}),s}i(a,l);var n=a.prototype;return n.createEl=function(){return s.createEl("div",{className:this.options_.className})},n.empty_=function(){this.items&&this.items.length&&(this.items.forEach(function(t){return t.dispose()}),this.items.length=0)},n.createPlaylist_=function(){var e=this.player_.playlist()||[],i=this.el_.querySelector(".vjs-playlist-item-list"),l=this.el_.querySelector(".vjs-playlist-ad-overlay");i||((i=t.createElement("ol")).className="vjs-playlist-item-list",this.el_.appendChild(i)),this.empty_();for(var a=0;a<e.length;a++){var n=new c(this.player_,{item:e[a]},this.options_);this.items.push(n),i.appendChild(n.el_)}l?i.appendChild(l):((l=t.createElement("li")).className="vjs-playlist-ad-overlay",i.appendChild(l));var o=this.player_.playlist.currentItem();if(this.items.length&&o>=0){r(this.items[o]);var p=this.items[o].$(".vjs-playlist-thumbnail");p&&s.addClass(p,"vjs-playlist-now-playing")}},n.update=function(){var e=this.player_.playlist();if(this.items.length===e.length){for(var i=0;i<this.items.length;i++)if(this.items[i].item!==e[i])return void this.createPlaylist_();for(var l=this.player_.playlist.currentItem(),a=0;a<this.items.length;a++){var n=this.items[a];a===l?(r(n),t.activeElement!==n.el()&&s.addClass(n.thumbnail,"vjs-playlist-now-playing"),p(n)):a===l+1?(o(n),n.addClass("vjs-up-next")):(o(n),p(n))}}else this.createPlaylist_()},a}(d),u=function(t){for(var e=0;e<t.childNodes.length;e++)if(s.isEl(t.childNodes[e]))return!0;return!1},m=function(i){if(!this.playlist)throw new Error("videojs-playlist plugin is required by the videojs-playlist-ui plugin");if(s.isEl(i)&&(e.log.warn('videojs-playlist-ui: Passing an element directly to playlistUi() is deprecated, use the "el" option instead!'),i={el:i}),i=e.mergeOptions(n,i),this.playlistMenu){var l=this.playlistMenu.el();if(l){var a=l.parentNode,r=l.nextSibling;this.playlistMenu.dispose(),s.emptyEl(l),r?a.insertBefore(l,r):a.appendChild(l),i.el=l}}s.isEl(i.el)||(i.el=function(e){for(var i,l=t.querySelectorAll("."+e),s=0;s<l.length;s++)if(!u(l[s])){i=l[s];break}return i}(i.className)),this.playlistMenu=new h(this,i)};return e.registerComponent("PlaylistMenu",h),e.registerComponent("PlaylistMenuItem",c),a("playlistUi",m),m.VERSION="3.5.2",m});
/*! @name videojs-playlist-ui @version 3.6.0 @license Apache-2.0 */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("global/document"),require("video.js")):"function"==typeof define&&define.amd?define(["global/document","video.js"],e):t.videojsPlaylistUi=e(t.document,t.videojs)}(this,function(t,e){"use strict";function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}t=t&&t.hasOwnProperty("default")?t.default:t;var l,s=(e=e&&e.hasOwnProperty("default")?e.default:e).dom||e,a=e.registerPlugin||e.plugin,n={className:"vjs-playlist",playOnSelect:!1,supportsCssPointerEvents:((l=t.createElement("x")).style.cssText="pointer-events:auto","auto"===l.style.pointerEvents)},r=function(t){t.addClass("vjs-selected")},o=function(t){t.removeClass("vjs-selected"),t.thumbnail&&s.removeClass(t.thumbnail,"vjs-playlist-now-playing")},p=function(t){t.removeClass("vjs-up-next")},d=e.getComponent("Component"),c=function(l){function s(t,e,i){var s;if(!e.item)throw new Error("Cannot construct a PlaylistMenuItem without an item option");return(s=l.call(this,t,e)||this).item=e.item,s.playOnSelect=i.playOnSelect,s.emitTapEvents(),s.on(["click","tap"],s.switchPlaylistItem_),s.on("keydown",s.handleKeyDown_),s}i(s,l);var a=s.prototype;return a.handleKeyDown_=function(t){13!==t.which&&32!==t.which||this.switchPlaylistItem_()},a.switchPlaylistItem_=function(t){this.player_.playlist.currentItem(function(t,e){for(var i=0,l=t.length;i<l;i++)if(t[i]===e)return i;return-1}(this.player_.playlist(),this.item)),this.playOnSelect&&this.player_.play()},a.createEl=function(){var i=t.createElement("li"),l=this.options_.item;"object"==typeof l.data&&Object.keys(l.data).forEach(function(t){var e=l.data[t];i.dataset[t]=e});if(i.className="vjs-playlist-item",i.setAttribute("tabIndex",0),this.thumbnail=function(e){if(!e){var i=t.createElement("div");return i.className="vjs-playlist-thumbnail vjs-playlist-thumbnail-placeholder",i}var l=t.createElement("picture");if(l.className="vjs-playlist-thumbnail","string"==typeof e){var s=t.createElement("img");s.src=e,s.alt="",l.appendChild(s)}else{for(var a=0;a<e.length-1;a++){var n=e[a],r=t.createElement("source");for(var o in n)r[o]=n[o];l.appendChild(r)}var p=e[e.length-1],d=t.createElement("img");for(var c in d.alt="",p)d[c]=p[c];l.appendChild(d)}return l}(l.thumbnail),i.appendChild(this.thumbnail),l.duration){var s=t.createElement("time"),a=e.formatTime(l.duration);s.className="vjs-playlist-duration",s.setAttribute("datetime","PT0H0M"+l.duration+"S"),s.appendChild(t.createTextNode(a)),i.appendChild(s)}var n=t.createElement("span"),r=this.localize("Now Playing");n.className="vjs-playlist-now-playing-text",n.appendChild(t.createTextNode(r)),n.setAttribute("title",r),this.thumbnail.appendChild(n);var o=t.createElement("div");o.className="vjs-playlist-title-container",this.thumbnail.appendChild(o);var p=t.createElement("span"),d=this.localize("Up Next");p.className="vjs-up-next-text",p.appendChild(t.createTextNode(d)),p.setAttribute("title",d),o.appendChild(p);var c=t.createElement("cite"),h=l.name||this.localize("Untitled Video");return c.className="vjs-playlist-name",c.appendChild(t.createTextNode(h)),c.setAttribute("title",h),o.appendChild(c),i},s}(d),h=function(l){function a(t,i){var s;if(!t.playlist)throw new Error("videojs-playlist is required for the playlist component");return(s=l.call(this,t,i)||this).items=[],i.horizontal?s.addClass("vjs-playlist-horizontal"):s.addClass("vjs-playlist-vertical"),i.supportsCssPointerEvents&&s.addClass("vjs-csspointerevents"),s.createPlaylist_(),e.browser.TOUCH_ENABLED||s.addClass("vjs-mouse"),s.on(t,["loadstart","playlistchange","playlistsorted"],function(t){s.update()}),s.on(t,"adstart",function(){s.addClass("vjs-ad-playing")}),s.on(t,"adend",function(){s.removeClass("vjs-ad-playing")}),s.on("dispose",function(){s.empty_(),t.playlistMenu=null}),s.on(t,"dispose",function(){s.dispose()}),s}i(a,l);var n=a.prototype;return n.createEl=function(){return s.createEl("div",{className:this.options_.className})},n.empty_=function(){this.items&&this.items.length&&(this.items.forEach(function(t){return t.dispose()}),this.items.length=0)},n.createPlaylist_=function(){var e=this.player_.playlist()||[],i=this.el_.querySelector(".vjs-playlist-item-list"),l=this.el_.querySelector(".vjs-playlist-ad-overlay");i||((i=t.createElement("ol")).className="vjs-playlist-item-list",this.el_.appendChild(i)),this.empty_();for(var a=0;a<e.length;a++){var n=new c(this.player_,{item:e[a]},this.options_);this.items.push(n),i.appendChild(n.el_)}l?i.appendChild(l):((l=t.createElement("li")).className="vjs-playlist-ad-overlay",i.appendChild(l));var o=this.player_.playlist.currentItem();if(this.items.length&&o>=0){r(this.items[o]);var p=this.items[o].$(".vjs-playlist-thumbnail");p&&s.addClass(p,"vjs-playlist-now-playing")}},n.update=function(){var e=this.player_.playlist();if(this.items.length===e.length){for(var i=0;i<this.items.length;i++)if(this.items[i].item!==e[i])return void this.createPlaylist_();for(var l=this.player_.playlist.currentItem(),a=0;a<this.items.length;a++){var n=this.items[a];a===l?(r(n),t.activeElement!==n.el()&&s.addClass(n.thumbnail,"vjs-playlist-now-playing"),p(n)):a===l+1?(o(n),n.addClass("vjs-up-next")):(o(n),p(n))}}else this.createPlaylist_()},a}(d),u=function(t){for(var e=0;e<t.childNodes.length;e++)if(s.isEl(t.childNodes[e]))return!0;return!1},m=function(i){if(!this.playlist)throw new Error("videojs-playlist plugin is required by the videojs-playlist-ui plugin");if(s.isEl(i)&&(e.log.warn('videojs-playlist-ui: Passing an element directly to playlistUi() is deprecated, use the "el" option instead!'),i={el:i}),i=e.mergeOptions(n,i),this.playlistMenu){var l=this.playlistMenu.el();if(l){var a=l.parentNode,r=l.nextSibling;this.playlistMenu.dispose(),s.emptyEl(l),r?a.insertBefore(l,r):a.appendChild(l),i.el=l}}s.isEl(i.el)||(i.el=function(e){for(var i,l=t.querySelectorAll("."+e),s=0;s<l.length;s++)if(!u(l[s])){i=l[s];break}return i}(i.className)),this.playlistMenu=new h(this,i)};return e.registerComponent("PlaylistMenu",h),e.registerComponent("PlaylistMenuItem",c),a("playlistUi",m),m.VERSION="3.6.0",m});
{
"name": "videojs-playlist-ui",
"version": "3.5.2",
"version": "3.6.0",
"author": "Brightcove, Inc.",

@@ -20,6 +20,6 @@ "description": "A user interface for the videojs-playlist API",

"build:js": "rollup -c scripts/rollup.config.js",
"build:lang": "vjslang --dir dist/lang",
"clean": "shx rm -rf ./dist ./test/dist",
"postclean": "shx mkdir -p ./dist ./test/dist",
"docs": "npm-run-all docs:*",
"docs:api": "jsdoc src -g plugins/markdown -r -d docs/api",
"docs:toc": "doctoc README.md",

@@ -53,20 +53,20 @@ "lint": "vjsstandard",

"husky": "^1.0.0-rc.13",
"jsdoc": "https://github.com/BrandonOCasey/jsdoc#feat/plugin-from-cli",
"karma": "^3.0.0",
"lint-staged": "^7.2.2",
"karma": "^4.2.0",
"lint-staged": "^8.1.0",
"node-sass": "^4.5.3",
"not-prerelease": "^1.0.1",
"npm-run-all": "^4.1.3",
"npm-merge-driver-install": "^1.0.0",
"npm-run-all": "^4.1.5",
"pkg-ok": "^2.2.0",
"postcss-cli": "^6.0.0",
"rollup": "^0.66.0",
"rollup": "^0.67.3",
"shx": "^0.3.2",
"sinon": "^6.1.5",
"videojs-generate-karma-config": "~3.0.0",
"videojs-generate-karma-config": "^5.3.0",
"videojs-generate-postcss-config": "~2.0.1",
"videojs-generate-rollup-config": "~2.2.0",
"videojs-generate-rollup-config": "~2.3.1",
"videojs-generator-verify": "^1.2.0",
"videojs-languages": "^2.0.0",
"videojs-playlist": "^4.2.4",
"videojs-standard": "~7.1.0",
"pkg-ok": "^2.2.0",
"npm-merge-driver-install": "^1.0.0",
"videojs-generator-verify": "~1.0.3"
"videojs-standard": "~8.0.2"
},

@@ -79,2 +79,3 @@ "main": "dist/videojs-playlist-ui.cjs.js",

"vjsstandard": {
"jsdoc": false,
"ignore": [

@@ -81,0 +82,0 @@ "dist",

@@ -206,8 +206,12 @@ /* eslint-disable no-console */

assert.strictEqual(items[0].querySelector('.vjs-playlist-name').textContent,
assert.strictEqual(
items[0].querySelector('.vjs-playlist-name').textContent,
playlist[0].name,
'wrote the name');
assert.strictEqual(items[1].querySelector('.vjs-playlist-name').textContent,
'wrote the name'
);
assert.strictEqual(
items[1].querySelector('.vjs-playlist-name').textContent,
'Untitled Video',
'wrote a placeholder for the name');
'wrote a placeholder for the name'
);
});

@@ -221,14 +225,22 @@

assert.strictEqual(items[0].dataset.id,
assert.strictEqual(
items[0].dataset.id,
playlist[0].data.id,
'set a single data attribute');
assert.strictEqual(items[0].dataset.id,
'set a single data attribute'
);
assert.strictEqual(
items[0].dataset.id,
'1',
'set a single data attribute (actual value)');
assert.strictEqual(items[0].dataset.foo,
'set a single data attribute (actual value)'
);
assert.strictEqual(
items[0].dataset.foo,
playlist[0].data.foo,
'set an addtional data attribute');
assert.strictEqual(items[0].dataset.foo,
'set an addtional data attribute'
);
assert.strictEqual(
items[0].dataset.foo,
'bar',
'set an addtional data attribute');
'set an addtional data attribute'
);
});

@@ -271,15 +283,23 @@

assert.strictEqual(sources.length, 1, 'output one source');
assert.strictEqual(sources[0].srcset,
assert.strictEqual(
sources[0].srcset,
playlistOverride[0].thumbnail[0].srcset,
'wrote the srcset attribute');
assert.strictEqual(sources[0].type,
'wrote the srcset attribute'
);
assert.strictEqual(
sources[0].type,
playlistOverride[0].thumbnail[0].type,
'wrote the type attribute');
assert.strictEqual(sources[0].media,
'wrote the type attribute'
);
assert.strictEqual(
sources[0].media,
playlistOverride[0].thumbnail[0].media,
'wrote the type attribute');
'wrote the type attribute'
);
assert.strictEqual(imgs.length, 1, 'output one img');
assert.strictEqual(imgs[0].src,
assert.strictEqual(
imgs[0].src,
resolveUrl(playlistOverride[0].thumbnail[1].src),
'output the img src attribute');
'output the img src attribute'
);
});

@@ -304,8 +324,12 @@

assert.strictEqual(durations.length, 1, 'skipped the item without a duration');
assert.strictEqual(durations[0].textContent,
assert.strictEqual(
durations[0].textContent,
'1:40',
'wrote the duration');
assert.strictEqual(durations[0].getAttribute('datetime'),
'wrote the duration'
);
assert.strictEqual(
durations[0].getAttribute('datetime'),
'PT0H0M' + playlist[0].duration + 'S',
'wrote a machine-readable datetime');
'wrote a machine-readable datetime'
);
});

@@ -321,5 +345,7 @@

assert.strictEqual(selectedItems.length, 1, 'marked one playlist item');
assert.strictEqual(selectedItems[0].querySelector('.vjs-playlist-name').textContent,
assert.strictEqual(
selectedItems[0].querySelector('.vjs-playlist-name').textContent,
playlist[0].name,
'marked the first playlist item');
'marked the first playlist item'
);
});

@@ -337,9 +363,13 @@

assert.strictEqual(this.fixture.querySelectorAll('.vjs-playlist-item').length,
assert.strictEqual(
this.fixture.querySelectorAll('.vjs-playlist-item').length,
playlist.length,
'displayed the correct number of items');
'displayed the correct number of items'
);
assert.strictEqual(selectedItems.length, 1, 'marked one playlist item');
assert.strictEqual(selectedItems[0].querySelector('img').src,
assert.strictEqual(
selectedItems[0].querySelector('img').src,
resolveUrl(playlist[1].thumbnail),
'marked the second playlist item');
'marked the second playlist item'
);
});

@@ -354,5 +384,7 @@

assert.strictEqual(this.fixture.querySelectorAll('.vjs-playlist-item.vjs-selected').length,
assert.strictEqual(
this.fixture.querySelectorAll('.vjs-playlist-item.vjs-selected').length,
0,
'no items selected');
'no items selected'
);
});

@@ -476,11 +508,17 @@

assert.ok(!playlistMenu.hasClass('vjs-ad-playing'),
'does not have class vjs-ad-playing');
assert.ok(
!playlistMenu.hasClass('vjs-ad-playing'),
'does not have class vjs-ad-playing'
);
this.player.trigger('adstart');
assert.ok(playlistMenu.hasClass('vjs-ad-playing'),
'has class vjs-ad-playing');
assert.ok(
playlistMenu.hasClass('vjs-ad-playing'),
'has class vjs-ad-playing'
);
this.player.trigger('adend');
assert.ok(!playlistMenu.hasClass('vjs-ad-playing'),
'does not have class vjs-ad-playing');
assert.ok(
!playlistMenu.hasClass('vjs-ad-playing'),
'does not have class vjs-ad-playing'
);
});

@@ -514,6 +552,10 @@

assert.ok(this.player.playlistMenu.items[1].hasClass('vjs-selected'),
'selected the new item');
assert.ok(!this.player.playlistMenu.items[0].hasClass('vjs-selected'),
'deselected the old item');
assert.ok(
this.player.playlistMenu.items[1].hasClass('vjs-selected'),
'selected the new item'
);
assert.ok(
!this.player.playlistMenu.items[0].hasClass('vjs-selected'),
'deselected the old item'
);
assert.strictEqual(playCalled, true, 'play gets called if option is set');

@@ -520,0 +562,0 @@ });

Sorry, the diff of this file is too big to display

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