From 4729866ebbe243091498c041af5e5036026017a2 Mon Sep 17 00:00:00 2001 From: Paul Berberian Date: Thu, 10 Oct 2024 14:13:32 +0200 Subject: [PATCH] Add version of the RxPlayer in the debug element I like relying on our debug element feature when debugging elements and other users seem to also find that element useful, sharing to us screen captures/recording of it. In that context, it could be good to also display the current RxPlayer version in it, so we can quickly know which version is currently relied on. --- doc/api/Miscellaneous/Debug_Element.md | 1 + src/main_thread/api/debug/modules/general_info.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/Miscellaneous/Debug_Element.md b/doc/api/Miscellaneous/Debug_Element.md index c7616c7821..ac6d846adb 100644 --- a/doc/api/Miscellaneous/Debug_Element.md +++ b/doc/api/Miscellaneous/Debug_Element.md @@ -93,6 +93,7 @@ exactly what's going on at a particular point in time. buffering media) also running in a WebWorker (which should be more efficient but is supported by less platforms). - If set to `0`, the playback is in the regular "main" (single thread) mode. + - **v**: Current version of the RxPlayer. - **ks**: _Key System_. If set, the current key system used to decrypt contents. - **mbb**: _Max Buffer Behind_. If set, the configured `maxBufferBehind` (amount of buffer to keep in memory behind the current position, in seconds). diff --git a/src/main_thread/api/debug/modules/general_info.ts b/src/main_thread/api/debug/modules/general_info.ts index dcb6a498e6..5a55ba54cb 100644 --- a/src/main_thread/api/debug/modules/general_info.ts +++ b/src/main_thread/api/debug/modules/general_info.ts @@ -65,7 +65,7 @@ export default function constructDebugGeneralInfo( valuesLine1.push(["wo", "0"]); } - const valuesLine2: Array<[string, string]> = []; + const valuesLine2: Array<[string, string]> = [["v", instance.version]]; const ks = instance.getKeySystemConfiguration(); if (ks !== null) { valuesLine2.push(["ks", ks.keySystem]);