diff options
author | Chocobozzz <me@florianbigard.com> | 2023-07-10 16:08:53 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-07-10 16:08:53 +0200 |
commit | 8953f055c86ca74f145d7ac5ac93bb6104d73af9 (patch) | |
tree | 4fd67ba6c2ba32f45bcc92e931cffe2fa57c12a4 /client/src/standalone/videos | |
parent | a1bd2b77d99cec5c27d38501f5f12f9dc339de17 (diff) | |
download | PeerTube-8953f055c86ca74f145d7ac5ac93bb6104d73af9.tar.gz PeerTube-8953f055c86ca74f145d7ac5ac93bb6104d73af9.tar.zst PeerTube-8953f055c86ca74f145d7ac5ac93bb6104d73af9.zip |
Rename player embed api
Diffstat (limited to 'client/src/standalone/videos')
-rw-r--r-- | client/src/standalone/videos/embed-api.ts | 2 | ||||
-rw-r--r-- | client/src/standalone/videos/embed.ts | 5 | ||||
-rw-r--r-- | client/src/standalone/videos/test-embed.ts | 4 |
3 files changed, 7 insertions, 4 deletions
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 @@ | |||
1 | import './embed.scss' | 1 | import './embed.scss' |
2 | import * as Channel from 'jschannel' | 2 | import * as Channel from 'jschannel' |
3 | import { logger } from '../../root-helpers' | 3 | import { logger } from '../../root-helpers' |
4 | import { PeerTubeResolution, PeerTubeTextTrack } from '../player/definitions' | 4 | import { PeerTubeResolution, PeerTubeTextTrack } from '../embed-player-api/definitions' |
5 | import { PeerTubeEmbed } from './embed' | 5 | import { PeerTubeEmbed } from './embed' |
6 | 6 | ||
7 | /** | 7 | /** |
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 { | |||
242 | this.buildPlayerIfNeeded() | 242 | this.buildPlayerIfNeeded() |
243 | ]) | 243 | ]) |
244 | 244 | ||
245 | this.peertubePlayer.setPoster(window.location.origin + video.previewPath) | 245 | // If already played, we are in a playlist so we don't want to display the poster between videos |
246 | if (!this.alreadyPlayed) { | ||
247 | this.peertubePlayer.setPoster(window.location.origin + video.previewPath) | ||
248 | } | ||
246 | 249 | ||
247 | const playlist = this.playlistTracker | 250 | const playlist = this.playlistTracker |
248 | ? { | 251 | ? { |
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 @@ | |||
1 | import './test-embed.scss' | 1 | import './test-embed.scss' |
2 | import { PeerTubeResolution, PlayerEventType } from '../player/definitions' | 2 | import { PeerTubeResolution, PlayerEventType } from '../embed-player-api/definitions' |
3 | import { PeerTubePlayer } from '../player/player' | 3 | import { PeerTubePlayer } from '../embed-player-api/player' |
4 | import { logger } from '../../root-helpers' | 4 | import { logger } from '../../root-helpers' |
5 | 5 | ||
6 | window.addEventListener('load', async () => { | 6 | window.addEventListener('load', async () => { |