Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set userAgent override for videoplayer webview
This is used to get around websites useragent sniffing to detect compatibility (#66). Hopefully this can be dropped when #1 is resolved.
- Loading branch information
1 parent
d85446e
commit 13405e4
Showing
5 changed files
with
29 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { session } from 'electron' | ||
import { WEBVIEW_PARTITION } from 'constants/http' | ||
|
||
let mediaSession: Electron.Session | ||
|
||
export const getMediaSession = () => { | ||
if (!mediaSession) { | ||
mediaSession = session.fromPartition(WEBVIEW_PARTITION, { cache: true }) | ||
} | ||
return mediaSession | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters