feat: integrated Web Share Target API for PWA

This commit is contained in:
Philipp Hutterer
2023-12-30 04:15:44 +01:00
parent f0247415bf
commit 48657c1c12
11 changed files with 142 additions and 10 deletions
+5 -3
View File
@@ -3,7 +3,9 @@ import { Socket } from 'ngx-socket-io';
@Injectable()
export class MeTubeSocket extends Socket {
constructor() {
super({ url: '', options: {path: document.location.pathname + 'socket.io'} });
}
constructor() {
const path =
document.location.pathname.replace(/share-target/, '') + 'socket.io';
super({ url: '', options: { path } });
}
}