BinaryONe
commited on
Commit
·
fdcbabc
1
Parent(s):
6740fdf
Miseleneous Fixes - Update on HTMLs
Browse files
FileStream/server/template/owner.js
CHANGED
@@ -259,9 +259,20 @@ const videolink = window.location.href;
|
|
259 |
const streamlink = videolink.replace("/watch/", "/dl/");
|
260 |
|
261 |
function vlc_player() {
|
262 |
-
const openstreamlink = streamlink
|
263 |
const openVlc = `vlc://${openstreamlink}`;
|
264 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
265 |
}
|
266 |
|
267 |
function mx_player() {
|
|
|
259 |
const streamlink = videolink.replace("/watch/", "/dl/");
|
260 |
|
261 |
function vlc_player() {
|
262 |
+
const openstreamlink = streamlink;
|
263 |
const openVlc = `vlc://${openstreamlink}`;
|
264 |
+
|
265 |
+
// Check the platform
|
266 |
+
const userAgent = navigator.userAgent || navigator.vendor || window.opera;
|
267 |
+
|
268 |
+
if (/android/i.test(userAgent)) {
|
269 |
+
// If the platform is Android, create an intent
|
270 |
+
const openVlcIntent = `intent://${openstreamlink}#Intent;package=org.videolan.vlc;scheme=vlc;end`;
|
271 |
+
window.location.href = openVlcIntent;
|
272 |
+
} else {
|
273 |
+
// If the platform is Desktop, keep it as it is
|
274 |
+
window.location.href = openVlc;
|
275 |
+
}
|
276 |
}
|
277 |
|
278 |
function mx_player() {
|