Commit Graph

35 Commits (5cb3e6a0b89b3d843920e720b8abfbd2451eda0b)

Author SHA1 Message Date
Chocobozzz 5cb3e6a0b8
Use sessionId instead of IP to identify viewer
Breaking: YAML config `ip_view_expiration` is renamed `view_expiration`
Breaking: Views are taken into account after 10 seconds instead of 30
seconds (can be changed in YAML config)

Purpose of this commit is to get closer to other video platforms where
some platforms count views on play (mux, vimeo) or others use a very low
delay (instagram, tiktok)

We also want to improve the viewer identification, where we no longer
use the IP but the `sessionId` generated by the web browser. Multiple
viewers behind a NAT can now be able to be identified as independent
viewers (this method is also used by vimeo or mux)
2024-04-04 16:27:40 +02:00
Chocobozzz 2fc3b90cb7
Fix local E2E tests 2024-03-06 10:36:40 +01:00
Chocobozzz cd9b8c2cc8
Better video player responsive 2024-02-28 14:25:35 +01:00
Chocobozzz 109bff4bf7
Better audio file handling 2024-02-28 10:46:20 +01:00
Chocobozzz 568726e48d
Fix broken player on broken video 2024-02-28 10:02:49 +01:00
Chocobozzz 9808b179a5
Faster player ratio change on video update 2024-02-28 08:42:36 +01:00
Chocobozzz dfe98695d6
Use server video ratio if available 2024-02-27 16:24:48 +01:00
Chocobozzz c97b8fd2ea
Add caption button to player control bar 2024-02-19 16:14:29 +01:00
Chocobozzz 5cf5465d20
Fix player ratio on audio only 2024-01-03 15:23:20 +01:00
Chocobozzz 63c4a02ce0
Fix views events with lives 2023-12-14 11:12:18 +01:00
Chocobozzz d5fd8227b4
Avoid sending seek event on video start time 2023-12-14 09:52:50 +01:00
Chocobozzz 79a61fa9c6
Prevent player mobile buttons flickering 2023-11-20 09:42:54 +01:00
Chocobozzz 788fa301f2
Don't send views for private videos 2023-11-07 10:46:08 +01:00
Chocobozzz a12d94f30d
Fix live start time
Use undefined to not break live edge position set by hls.js
2023-10-30 11:04:26 +01:00
Chocobozzz 049f50bc32
Fix start time with web video player 2023-10-27 14:29:40 +02:00
Chocobozzz 8e4fba97b2
Automatically adapt player ratio 2023-08-18 09:48:45 +02:00
Chocobozzz 3a4992633e
Migrate server to ESM
Sorry for the very big commit that may lead to git log issues and merge
conflicts, but it's a major step forward:

 * Server can be faster at startup because imports() are async and we can
   easily lazy import big modules
 * Angular doesn't seem to support ES import (with .js extension), so we
   had to correctly organize peertube into a monorepo:
    * Use yarn workspace feature
    * Use typescript reference projects for dependencies
    * Shared projects have been moved into "packages", each one is now a
      node module (with a dedicated package.json/tsconfig.json)
    * server/tools have been moved into apps/ and is now a dedicated app
      bundled and published on NPM so users don't have to build peertube
      cli tools manually
    * server/tests have been moved into packages/ so we don't compile
      them every time we want to run the server
 * Use isolatedModule option:
   * Had to move from const enum to const
     (https://www.typescriptlang.org/docs/handbook/enums.html#objects-vs-enums)
   * Had to explictely specify "type" imports when used in decorators
 * Prefer tsx (that uses esbuild under the hood) instead of ts-node to
   load typescript files (tests with mocha or scripts):
     * To reduce test complexity as esbuild doesn't support decorator
       metadata, we only test server files that do not import server
       models
     * We still build tests files into js files for a faster CI
 * Remove unmaintained peertube CLI import script
 * Removed some barrels to speed up execution (less imports)
2023-08-11 15:02:33 +02:00
Chocobozzz 39c0ceee8b
Fix player error modal
Not hidden when we change the video
2023-07-27 14:44:34 +02:00
Chocobozzz 9a72e4fe9e
Improve settings menu label handler 2023-07-17 11:31:46 +02:00
Chocobozzz e29221f855
Fix e2e tests 2023-07-17 11:31:46 +02:00
Chocobozzz 28dd2f14f5
Some player fixes on Android, Safari and iOS 2023-07-17 11:31:46 +02:00
Chocobozzz a1bd2b77d9
Remove webtorrent support from client 2023-07-10 16:08:28 +02:00
Chocobozzz 7815dc450e
Prevent invalid end watch section warnings 2023-05-10 14:23:59 +02:00
Chocobozzz 1d90e39df3
Fix console error 2023-03-21 08:19:31 +01:00
Chocobozzz 626b76dcf5
Fix current video time saving for anonymous users 2023-03-01 10:48:21 +01:00
Chocobozzz 6de076222a
Avoid always resuming the end of the video 2023-02-25 16:18:28 +01:00
Chocobozzz 59a643aa5c
Force autoplay when live starts
Using the mute
2022-11-15 11:57:49 +01:00
Chocobozzz 49e7e4d9ff
Fix token injection if unlogged user 2022-10-27 09:13:10 +02:00
Chocobozzz 3545e72c68 Put private videos under a specific subdirectory 2022-10-24 14:48:24 +02:00
kontrollanten f2a16d93b4
Handle network issues in video player (#5138)
* feat(client/player): handle network offline

* feat(client/player): human friendly err msg

* feat(client/player): handle broken resolutions

When an error occurs for a resolution, remove the resolution and try
with another resolution.

* fix(client/player): prevent err handl when offline

* fix(client/player): localize offline text
2022-09-28 11:52:23 +02:00
Chocobozzz fd3c2e8705
Add playback metric endpoint sent to OTEL 2022-08-16 10:33:27 +02:00
Chocobozzz 42b4063699
Add ability for client to create server logs 2022-07-18 11:37:18 +02:00
Chocobozzz 1222a602a3
Use round for views stats 2022-04-15 10:47:48 +02:00
Chocobozzz 384ba8b77a Support videos stats in client 2022-04-15 09:49:35 +02:00
Chocobozzz 57d6503286
Reorganize player files 2022-03-14 14:36:35 +01:00