kikinjo 282 Posted March 31, 2022 Posted March 31, 2022 Is there a possibility of any kind to block web browsers from accessing Emby server ? Either on emby server / config file or Cloudflare ? Why i require this, well there are so many small issues with browsers, audio codecs support video codecs support and now subtitle issues, that trigger transcoding. I just want to force my users not to be able to use web browsers anymore, force them to install and use emby clients on android or any other. Thanks for any suggestions.
kikinjo 282 Posted March 31, 2022 Author Posted March 31, 2022 Please don't mention device access in emby, because you probably never used it and don't know what a horror it is when u have many users and devices. Just to click for every user and configure devices for them would take weeks. That section really need total revamp, square one. 1
Luke 42085 Posted March 31, 2022 Posted March 31, 2022 2 hours ago, kikinjo said: Please don't mention device access in emby, because you probably never used it and don't know what a horror it is when u have many users and devices. Just to click for every user and configure devices for them would take weeks. That section really need total revamp, square one. Yea I tried to do away with it altogether and got pushback on it. 1
pünktchen 1409 Posted March 31, 2022 Posted March 31, 2022 3 hours ago, Luke said: Yea I tried to do away with it altogether Which is neither a solution to his problem nor a revamp of the device access control. 2
visproduction 317 Posted April 1, 2022 Posted April 1, 2022 You can hack a fix for this by adding a referral to .js file into the html head of the index page. I prefer jquery and I would just add jquery to the page. I am sure it can be tweaked in pure js, as well. You could put the script on the index.html page, but that might get overridden, with a site update. It would be easier to go back into an updated index.html version file and just add the referral to the .js script. The js would query for the browser and if it's one you don't want, then you change the CSS to make the main div display:none; and then turn on a hidden div with a notice to suggest the user access the site with a different browser. To style out the page, you might want to add your own custom css for a few issues, like padding, margin, color for the notice. That should go in a different .css file and call it from inside index.html head area along with the .js file. Whenever the index.html gets an update, you only need to go back in and add the script and css calls (links) inside the head section. You would need to load Jquery and an example .js file script would look like this: $(document).ready(function(){ // Check browser var browsern = navigator.browserSpecs.name; var browserv = navigator.browserSpecs.version; console.log('Browser name (browsern):',browsern); console.log('Browser version (browserv):',browserv); // You can just check by browser brand or you can make different CSS happen based also on the browser version. It just takes more if functions below. if (browsern == 'Chrome') { console.log('Chrome found'); // Do any command to change CSS immediately setTimeout (function () { // Do any command to change CSS after 3 seconds },3000); } if (browsern == 'Firefox') { console.log('Firefox found'); // Do any command to change CSS immediately setTimeout (function () { // Any command to change CSS after 3 seconds },3000); } if ((browsern != 'Chrome') && (browsern != 'Firefox')) { console.log('Some other browser found'); // Do any command to change CSS immediately setTimeout (function () { // Any command to change CSS after 3 seconds },3000); } } 1
kikinjo 282 Posted April 2, 2022 Author Posted April 2, 2022 Thank you visproduction. I will play with it on my dev server.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now