From 5cb9ff865ac139a0fc47cee7120a3b4b49142bad Mon Sep 17 00:00:00 2001 From: Ptitloup Date: Fri, 26 Jan 2024 14:24:38 +0100 Subject: [PATCH 1/2] update videojs to 8.10 and add p2p media loader --- pod/package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pod/package.json b/pod/package.json index 5ec9f1d0cf..8a6fcf12a6 100644 --- a/pod/package.json +++ b/pod/package.json @@ -1,6 +1,8 @@ { "license": "LGPL-3.0", "dependencies": { + "p2p-media-loader-core": "0.6.2", + "p2p-media-loader-hlsjs": "0.6.2", "@silvermine/videojs-quality-selector": "^1.3.0", "blueimp-file-upload": "^10.32.0", "bootstrap": "^5.3.2", @@ -11,11 +13,9 @@ "jquery-ui-dist": "^1.13.2", "js-cookie": "^3.0.5", "spark-md5": "^3.0.2", - "video.js": "7.20.3", - "videojs-contrib-quality-levels": "^3.0.0", - "videojs-hls-quality-selector": "^1.1.4", + "video.js": "8.10.0", "videojs-overlay": "^3.1.0", - "videojs-seek-buttons": "latest7", + "videojs-quality-selector-hls": "^1.1.1", "videojs-vr": "^2.0.0", "videojs-vtt-thumbnails": "^0.0.13", "videojs-wavesurfer": "^3.9.0", From 5cdd8034622095c63e4cf7bd770cec519bb03b05 Mon Sep 17 00:00:00 2001 From: Ptitloup Date: Mon, 29 Jan 2024 15:31:10 +0100 Subject: [PATCH 2/2] add script file et call it in event-script - fix xhr request --- pod/live/templates/live/direct.html | 2 +- pod/live/templates/live/event-iframe.html | 1 - pod/live/templates/live/event-script.html | 9 ++ .../videojs-contrib-hlsjs.min.js | 85 +++++++++++++++ .../videojs-contrib-hlsjs.min.js.map | 1 + pod/video/static/js/video-p2p-stats.js | 101 ++++++++++++++++++ 6 files changed, 197 insertions(+), 2 deletions(-) create mode 100644 pod/main/static/js/videojs-contrib-hls.js/videojs-contrib-hlsjs.min.js create mode 100644 pod/main/static/js/videojs-contrib-hls.js/videojs-contrib-hlsjs.min.js.map create mode 100644 pod/video/static/js/video-p2p-stats.js diff --git a/pod/live/templates/live/direct.html b/pod/live/templates/live/direct.html index 190539fd39..dfa0ec2766 100644 --- a/pod/live/templates/live/direct.html +++ b/pod/live/templates/live/direct.html @@ -188,7 +188,7 @@

} // Management of the end of the stream (for Firefox, Chrome... not working for Edge, Safari) - videojs.Hls.xhr.beforeRequest = function(options) { + videojs.Hls.xhr.onRequest = function(options) { // Reset counter if video state is ok if (started && player.readyState() > 2) { nbLoop = 0; } if (started && player.readyState() <= 2) { diff --git a/pod/live/templates/live/event-iframe.html b/pod/live/templates/live/event-iframe.html index 3c478f743a..7fe2634657 100644 --- a/pod/live/templates/live/event-iframe.html +++ b/pod/live/templates/live/event-iframe.html @@ -140,7 +140,6 @@

{{ event.title }}

{# affichage du bouton d'info sur le player #} {% if event.is_coming and event.video_on_hold.is_video or event.is_current %} - + {% endif %} +{% endif %}