system-7/index_files/playset.js

2 lines
19 KiB
JavaScript
Raw Normal View History

2018-09-01 05:07:00 +00:00
!function(e){var t={};function n(a){if(t[a])return t[a].exports;var r=t[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:a})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=138)}({136:function(e,t){e.exports="var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n// Class that iterates over A/V items, playing them in a playlist.\n// JS file can be added to a page and will try to find a place to append a \"Play All\" link.\n// Whatever items the user sees in their page, when they click \"Play All\", will get added to a new\n// playlist and their browser gets redirected to the first item.\n// After each item is finished playing, the browser will redirect to next item, until done.\n// User is free to move around the playlist at any time.\n//\n// xxx better theatre shift code?\n// xxx share/link as modal?\n// xxx cleanup/improve descriptions for description-less items?\n\n\n// convenient, no? Stateless function, global to all Play objects\n// eslint-disable-next-line no-console\nvar log = location.host.substr(0, 4) !== 'www-' ? function () {} : console.log.bind(console);\n\n/* global jwplayer */\n\nvar Playset = function () {\n function Playset() {\n _classCallCheck(this, Playset);\n\n this.id = false;\n this.selector_play_items = false;\n this.selector_playlist = false;\n\n // only proceed for folks w/ modern browsers..\n if (!Playset.is_local_storage_available()) return;\n\n // Check for, in this order:\n // \"SIMILAR ITEMS\" (AKA \"Also Found\") on items /details/ page (at bottom)\n // search results page\n // collection item page\n // We can add a nice \"Play All\" link to any of them.\n //\n // NOTE: for \"SIMILAR ITEMS\", IFF we wanted _more_ than 10, we could add a simple\n // PHP /services/ new script with something like:\n // $rel_ids = (new RelatedItemsFetcher())->fetch($id,$collections,75 0,'5s','production');\n\n this.selector_play_items = $('#also-found h5, #search-actions, .welcome-right');\n this.selector_playlist = $('#theatre-ia-wrap, #search-actions, .welcome-right');\n\n // basically, give up, but in case somehow \"show_playlist()\" fires, dont fatal:\n if (!this.selector_playlist.length) this.selector_playlist = 'body';\n\n if (!this.selector_play_items.length) {\n this.selector_play_items = false;\n } else {\n $(this.selector_play_items).append('<span
//# sourceMappingURL=playset.min.js.map