mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge branch 'master' into fix_long_getItems_request_URL
This commit is contained in:
commit
09a6ef2cdb
85 changed files with 358 additions and 320 deletions
|
@ -1,10 +1,11 @@
|
|||
/* eslint-disable indent */
|
||||
import ServerConnections from '../../components/ServerConnections';
|
||||
import { PluginType } from '../../types/plugin.ts';
|
||||
|
||||
class BackdropScreensaver {
|
||||
constructor() {
|
||||
this.name = 'Backdrop ScreenSaver';
|
||||
this.type = 'screensaver';
|
||||
this.type = PluginType.Screensaver;
|
||||
this.id = 'backdropscreensaver';
|
||||
this.supportsAnonymous = false;
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import TableOfContents from './tableOfContents';
|
|||
import dom from '../../scripts/dom';
|
||||
import { translateHtml } from '../../scripts/globalize';
|
||||
import * as userSettings from '../../scripts/settings/userSettings';
|
||||
import { PluginType } from '../../types/plugin.ts';
|
||||
import Events from '../../utils/events.ts';
|
||||
|
||||
import '../../elements/emby-button/paper-icon-button-light';
|
||||
|
@ -19,7 +20,7 @@ import './style.scss';
|
|||
export class BookPlayer {
|
||||
constructor() {
|
||||
this.name = 'Book Player';
|
||||
this.type = 'mediaplayer';
|
||||
this.type = PluginType.MediaPlayer;
|
||||
this.id = 'bookplayer';
|
||||
this.priority = 1;
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ import globalize from '../../scripts/globalize';
|
|||
import castSenderApiLoader from './castSenderApi';
|
||||
import ServerConnections from '../../components/ServerConnections';
|
||||
import alert from '../../components/alert';
|
||||
import { PluginType } from '../../types/plugin.ts';
|
||||
import Events from '../../utils/events.ts';
|
||||
import { getItems } from '../../utils/jellyfin-apiclient/getItems.ts';
|
||||
|
||||
|
@ -572,7 +573,7 @@ class ChromecastPlayer {
|
|||
constructor() {
|
||||
// playbackManager needs this
|
||||
this.name = PlayerName;
|
||||
this.type = 'mediaplayer';
|
||||
this.type = PluginType.MediaPlayer;
|
||||
this.id = 'chromecast';
|
||||
this.isLocalPlayer = false;
|
||||
this.lastPlayerData = {};
|
||||
|
@ -686,7 +687,7 @@ class ChromecastPlayer {
|
|||
}
|
||||
|
||||
seek(position) {
|
||||
position = parseInt(position);
|
||||
position = parseInt(position, 10);
|
||||
|
||||
position = position / 10000000;
|
||||
|
||||
|
|
|
@ -6,13 +6,14 @@ import keyboardnavigation from '../../scripts/keyboardNavigation';
|
|||
import { appRouter } from '../../components/appRouter';
|
||||
import ServerConnections from '../../components/ServerConnections';
|
||||
import * as userSettings from '../../scripts/settings/userSettings';
|
||||
import { PluginType } from '../../types/plugin.ts';
|
||||
|
||||
import './style.scss';
|
||||
|
||||
export class ComicsPlayer {
|
||||
constructor() {
|
||||
this.name = 'Comics Player';
|
||||
this.type = 'mediaplayer';
|
||||
this.type = PluginType.MediaPlayer;
|
||||
this.id = 'comicsplayer';
|
||||
this.priority = 1;
|
||||
this.imageMap = new Map();
|
||||
|
|
|
@ -2,6 +2,7 @@ import globalize from '../../scripts/globalize';
|
|||
import * as userSettings from '../../scripts/settings/userSettings';
|
||||
import { appHost } from '../../components/apphost';
|
||||
import alert from '../../components/alert';
|
||||
import { PluginType } from '../../types/plugin.ts';
|
||||
|
||||
// TODO: Replace with date-fns
|
||||
// https://stackoverflow.com/questions/6117814/get-week-of-year-in-javascript-like-in-php
|
||||
|
@ -46,7 +47,7 @@ function showIsoMessage() {
|
|||
class ExpirementalPlaybackWarnings {
|
||||
constructor() {
|
||||
this.name = 'Experimental playback warnings';
|
||||
this.type = 'preplayintercept';
|
||||
this.type = PluginType.PreplayIntercept;
|
||||
this.id = 'expirementalplaybackwarnings';
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ import { appHost } from '../../components/apphost';
|
|||
import * as htmlMediaHelper from '../../components/htmlMediaHelper';
|
||||
import profileBuilder from '../../scripts/browserDeviceProfile';
|
||||
import { getIncludeCorsCredentials } from '../../scripts/settings/webSettings';
|
||||
import { PluginType } from '../../types/plugin.ts';
|
||||
import Events from '../../utils/events.ts';
|
||||
|
||||
function getDefaultProfile() {
|
||||
|
@ -88,7 +89,7 @@ class HtmlAudioPlayer {
|
|||
const self = this;
|
||||
|
||||
self.name = 'Html Audio Player';
|
||||
self.type = 'mediaplayer';
|
||||
self.type = PluginType.MediaPlayer;
|
||||
self.id = 'htmlaudioplayer';
|
||||
|
||||
// Let any players created by plugins take priority
|
||||
|
|
|
@ -30,6 +30,7 @@ import ServerConnections from '../../components/ServerConnections';
|
|||
import profileBuilder, { canPlaySecondaryAudio } from '../../scripts/browserDeviceProfile';
|
||||
import { getIncludeCorsCredentials } from '../../scripts/settings/webSettings';
|
||||
import { setBackdropTransparency, TRANSPARENCY_LEVEL } from '../../components/backdrop/backdrop';
|
||||
import { PluginType } from '../../types/plugin.ts';
|
||||
import Events from '../../utils/events.ts';
|
||||
import { includesAny } from '../../utils/container.ts';
|
||||
import debounce from 'lodash-es/debounce';
|
||||
|
@ -170,7 +171,7 @@ function tryRemoveElement(elem) {
|
|||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
type = 'mediaplayer';
|
||||
type = PluginType.MediaPlayer;
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
import { PluginType } from '../../types/plugin.ts';
|
||||
import { randomInt } from '../../utils/number.ts';
|
||||
|
||||
export default function () {
|
||||
const self = this;
|
||||
|
||||
self.name = 'Logo ScreenSaver';
|
||||
self.type = 'screensaver';
|
||||
self.type = PluginType.Screensaver;
|
||||
self.id = 'logoscreensaver';
|
||||
self.supportsAnonymous = true;
|
||||
|
||||
|
@ -23,16 +26,12 @@ export default function () {
|
|||
const elem = document.querySelector('.logoScreenSaverImage');
|
||||
|
||||
if (elem && elem.animate) {
|
||||
const random = getRandomInt(0, animations.length - 1);
|
||||
const random = randomInt(0, animations.length - 1);
|
||||
|
||||
animations[random](elem, 1);
|
||||
}
|
||||
}
|
||||
|
||||
function getRandomInt(min, max) {
|
||||
return Math.floor(Math.random() * (max - min + 1)) + min;
|
||||
}
|
||||
|
||||
function bounceInLeft(elem, iterations) {
|
||||
const keyframes = [
|
||||
{ transform: 'translate3d(-3000px, 0, 0)', opacity: '0', offset: 0 },
|
||||
|
|
|
@ -4,6 +4,7 @@ import keyboardnavigation from '../../scripts/keyboardNavigation';
|
|||
import dialogHelper from '../../components/dialogHelper/dialogHelper';
|
||||
import dom from '../../scripts/dom';
|
||||
import { appRouter } from '../../components/appRouter';
|
||||
import { PluginType } from '../../types/plugin.ts';
|
||||
import Events from '../../utils/events.ts';
|
||||
|
||||
import './style.scss';
|
||||
|
@ -12,7 +13,7 @@ import '../../elements/emby-button/paper-icon-button-light';
|
|||
export class PdfPlayer {
|
||||
constructor() {
|
||||
this.name = 'PDF Player';
|
||||
this.type = 'mediaplayer';
|
||||
this.type = PluginType.MediaPlayer;
|
||||
this.id = 'pdfplayer';
|
||||
this.priority = 1;
|
||||
|
||||
|
@ -261,7 +262,7 @@ export class PdfPlayer {
|
|||
for (const page of pages) {
|
||||
if (!this.pages[page]) {
|
||||
this.pages[page] = document.createElement('canvas');
|
||||
this.renderPage(this.pages[page], parseInt(page.slice(4)));
|
||||
this.renderPage(this.pages[page], parseInt(page.slice(4), 10));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
import ServerConnections from '../../components/ServerConnections';
|
||||
import { PluginType } from '../../types/plugin.ts';
|
||||
|
||||
export default class PhotoPlayer {
|
||||
constructor() {
|
||||
this.name = 'Photo Player';
|
||||
this.type = 'mediaplayer';
|
||||
this.type = PluginType.MediaPlayer;
|
||||
this.id = 'photoplayer';
|
||||
this.priority = 1;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import globalize from '../../scripts/globalize';
|
||||
import ServerConnections from '../../components/ServerConnections';
|
||||
import alert from '../../components/alert';
|
||||
import { PluginType } from '../../types/plugin.ts';
|
||||
|
||||
function showErrorMessage() {
|
||||
return alert(globalize.translate('MessagePlayAccessRestricted'));
|
||||
|
@ -9,7 +10,7 @@ function showErrorMessage() {
|
|||
class PlayAccessValidation {
|
||||
constructor() {
|
||||
this.name = 'Playback validation';
|
||||
this.type = 'preplayintercept';
|
||||
this.type = PluginType.PreplayIntercept;
|
||||
this.id = 'playaccessvalidation';
|
||||
this.order = -2;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { playbackManager } from '../../components/playback/playbackmanager';
|
||||
import serverNotifications from '../../scripts/serverNotifications';
|
||||
import ServerConnections from '../../components/ServerConnections';
|
||||
import { PluginType } from '../../types/plugin.ts';
|
||||
import Events from '../../utils/events.ts';
|
||||
|
||||
function getActivePlayerId() {
|
||||
|
@ -181,7 +182,7 @@ class SessionPlayer {
|
|||
const self = this;
|
||||
|
||||
this.name = 'Remote Control';
|
||||
this.type = 'mediaplayer';
|
||||
this.type = PluginType.MediaPlayer;
|
||||
this.isLocalPlayer = false;
|
||||
this.id = 'remoteplayer';
|
||||
|
||||
|
|
|
@ -254,7 +254,7 @@ class Manager {
|
|||
if (typeof cmd.When === 'string') {
|
||||
cmd.When = new Date(cmd.When);
|
||||
cmd.EmittedAt = new Date(cmd.EmittedAt);
|
||||
cmd.PositionTicks = cmd.PositionTicks ? parseInt(cmd.PositionTicks) : null;
|
||||
cmd.PositionTicks = cmd.PositionTicks ? parseInt(cmd.PositionTicks, 10) : null;
|
||||
}
|
||||
|
||||
if (!this.isSyncPlayEnabled()) {
|
||||
|
|
|
@ -5,8 +5,9 @@ import SyncPlay from './core';
|
|||
import SyncPlayNoActivePlayer from './ui/players/NoActivePlayer';
|
||||
import SyncPlayHtmlVideoPlayer from './ui/players/HtmlVideoPlayer';
|
||||
import SyncPlayHtmlAudioPlayer from './ui/players/HtmlAudioPlayer';
|
||||
import { Plugin, PluginType } from '../../types/plugin';
|
||||
|
||||
class SyncPlayPlugin {
|
||||
class SyncPlayPlugin implements Plugin {
|
||||
name: string;
|
||||
id: string;
|
||||
type: string;
|
||||
|
@ -17,7 +18,7 @@ class SyncPlayPlugin {
|
|||
this.id = 'syncplay';
|
||||
// NOTE: This should probably be a "mediaplayer" so the playback manager can handle playback logic, but
|
||||
// SyncPlay needs refactored so it does not have an independent playback manager.
|
||||
this.type = 'syncplay';
|
||||
this.type = PluginType.SyncPlay;
|
||||
this.priority = 1;
|
||||
|
||||
this.init();
|
||||
|
|
|
@ -2,6 +2,7 @@ import browser from '../../scripts/browser';
|
|||
import { appRouter } from '../../components/appRouter';
|
||||
import loading from '../../components/loading/loading';
|
||||
import { setBackdropTransparency, TRANSPARENCY_LEVEL } from '../../components/backdrop/backdrop';
|
||||
import { PluginType } from '../../types/plugin.ts';
|
||||
import Events from '../../utils/events.ts';
|
||||
|
||||
/* globals YT */
|
||||
|
@ -197,7 +198,7 @@ function setCurrentSrc(instance, elem, options) {
|
|||
class YoutubePlayer {
|
||||
constructor() {
|
||||
this.name = 'Youtube Player';
|
||||
this.type = 'mediaplayer';
|
||||
this.type = PluginType.MediaPlayer;
|
||||
this.id = 'youtubeplayer';
|
||||
|
||||
// Let any players created by plugins take priority
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue