diff --git a/client/src/standalone/player/.npmignore b/client/src/standalone/embed-player-api/.npmignore similarity index 100% rename from client/src/standalone/player/.npmignore rename to client/src/standalone/embed-player-api/.npmignore diff --git a/client/src/standalone/player/README.md b/client/src/standalone/embed-player-api/README.md similarity index 100% rename from client/src/standalone/player/README.md rename to client/src/standalone/embed-player-api/README.md diff --git a/client/src/standalone/player/definitions.ts b/client/src/standalone/embed-player-api/definitions.ts similarity index 100% rename from client/src/standalone/player/definitions.ts rename to client/src/standalone/embed-player-api/definitions.ts diff --git a/client/src/standalone/player/events.ts b/client/src/standalone/embed-player-api/events.ts similarity index 100% rename from client/src/standalone/player/events.ts rename to client/src/standalone/embed-player-api/events.ts diff --git a/client/src/standalone/player/package.json b/client/src/standalone/embed-player-api/package.json similarity index 100% rename from client/src/standalone/player/package.json rename to client/src/standalone/embed-player-api/package.json diff --git a/client/src/standalone/player/player.ts b/client/src/standalone/embed-player-api/player.ts similarity index 100% rename from client/src/standalone/player/player.ts rename to client/src/standalone/embed-player-api/player.ts diff --git a/client/src/standalone/player/tsconfig.json b/client/src/standalone/embed-player-api/tsconfig.json similarity index 100% rename from client/src/standalone/player/tsconfig.json rename to client/src/standalone/embed-player-api/tsconfig.json diff --git a/client/src/standalone/player/webpack.config.js b/client/src/standalone/embed-player-api/webpack.config.js similarity index 100% rename from client/src/standalone/player/webpack.config.js rename to client/src/standalone/embed-player-api/webpack.config.js diff --git a/client/src/standalone/videos/embed-api.ts b/client/src/standalone/videos/embed-api.ts index cdda122b2..6227c378e 100644 --- a/client/src/standalone/videos/embed-api.ts +++ b/client/src/standalone/videos/embed-api.ts @@ -1,7 +1,7 @@ import './embed.scss' import * as Channel from 'jschannel' import { logger } from '../../root-helpers' -import { PeerTubeResolution, PeerTubeTextTrack } from '../player/definitions' +import { PeerTubeResolution, PeerTubeTextTrack } from '../embed-player-api/definitions' import { PeerTubeEmbed } from './embed' /** diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts index 5c68aaaf2..78b812ffd 100644 --- a/client/src/standalone/videos/embed.ts +++ b/client/src/standalone/videos/embed.ts @@ -242,7 +242,10 @@ export class PeerTubeEmbed { this.buildPlayerIfNeeded() ]) - this.peertubePlayer.setPoster(window.location.origin + video.previewPath) + // If already played, we are in a playlist so we don't want to display the poster between videos + if (!this.alreadyPlayed) { + this.peertubePlayer.setPoster(window.location.origin + video.previewPath) + } const playlist = this.playlistTracker ? { diff --git a/client/src/standalone/videos/test-embed.ts b/client/src/standalone/videos/test-embed.ts index b34df11ee..b7a283c4d 100644 --- a/client/src/standalone/videos/test-embed.ts +++ b/client/src/standalone/videos/test-embed.ts @@ -1,6 +1,6 @@ import './test-embed.scss' -import { PeerTubeResolution, PlayerEventType } from '../player/definitions' -import { PeerTubePlayer } from '../player/player' +import { PeerTubeResolution, PlayerEventType } from '../embed-player-api/definitions' +import { PeerTubePlayer } from '../embed-player-api/player' import { logger } from '../../root-helpers' window.addEventListener('load', async () => {