aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-04-15 10:46:26 +0200
committerChocobozzz <me@florianbigard.com>2018-04-15 10:55:33 +0200
commit864e782bc2306f7154a185361ebf94e6e86472e8 (patch)
tree008049ed5043759a0702938b2ce7314087e7a316 /client/src/assets/player
parent37ddeba57f4c2aa85475fd3ef4498bb2802e1c7c (diff)
downloadPeerTube-864e782bc2306f7154a185361ebf94e6e86472e8.tar.gz
PeerTube-864e782bc2306f7154a185361ebf94e6e86472e8.tar.zst
PeerTube-864e782bc2306f7154a185361ebf94e6e86472e8.zip
Improve big play button animation
Diffstat (limited to 'client/src/assets/player')
-rw-r--r--client/src/assets/player/images/big-play-button.svg11
-rw-r--r--client/src/assets/player/peertube-videojs-plugin.ts7
2 files changed, 14 insertions, 4 deletions
diff --git a/client/src/assets/player/images/big-play-button.svg b/client/src/assets/player/images/big-play-button.svg
new file mode 100644
index 000000000..f2e65dc38
--- /dev/null
+++ b/client/src/assets/player/images/big-play-button.svg
@@ -0,0 +1,11 @@
1<?xml version="1.0" encoding="iso-8859-1"?>
2<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
3 viewBox="0 0 460.114 460.114" style="enable-background:new 0 0 460.114 460.114;" xml:space="preserve">
4<g>
5 <g>
6 <path fill="#fff" d="M393.538,203.629L102.557,5.543c-9.793-6.666-22.468-7.372-32.94-1.832c-10.472,5.538-17.022,16.413-17.022,28.26v396.173
7 c0,11.846,6.55,22.721,17.022,28.26c10.471,5.539,23.147,4.834,32.94-1.832l290.981-198.087
8 c8.746-5.954,13.98-15.848,13.98-26.428C407.519,219.477,402.285,209.582,393.538,203.629z"/>
9 </g>
10</g>
11</svg>
diff --git a/client/src/assets/player/peertube-videojs-plugin.ts b/client/src/assets/player/peertube-videojs-plugin.ts
index ddb73d074..83df24af6 100644
--- a/client/src/assets/player/peertube-videojs-plugin.ts
+++ b/client/src/assets/player/peertube-videojs-plugin.ts
@@ -322,11 +322,10 @@ class PeerTubePlugin extends Plugin {
322 // Proxy first play 322 // Proxy first play
323 const oldPlay = this.player.play.bind(this.player) 323 const oldPlay = this.player.play.bind(this.player)
324 this.player.play = () => { 324 this.player.play = () => {
325 this.updateVideoFile(undefined, 0, () => { 325 this.player.addClass('vjs-has-big-play-button-clicked')
326 this.seek(this.startTime)
327 oldPlay()
328 })
329 this.player.play = oldPlay 326 this.player.play = oldPlay
327
328 this.updateVideoFile(undefined, 0, () => this.seek(this.startTime))
330 } 329 }
331 } 330 }
332 } 331 }