summaryrefslogtreecommitdiff
path: root/lib/viewers/pdf.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/viewers/pdf.php')
-rw-r--r--lib/viewers/pdf.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/viewers/pdf.php b/lib/viewers/pdf.php
index 1c80f91..cd69619 100644
--- a/lib/viewers/pdf.php
+++ b/lib/viewers/pdf.php
@@ -47,8 +47,14 @@ class file_viewer_pdf extends file_viewer
$browser = $api->get_browser();
- // disable viewer in unsupported browsers
- if ($browser->ie && $browser->ver < 9) {
+ // disable viewer in unsupported browsers according to
+ // https://github.com/mozilla/pdf.js/wiki/Required-Browser-Features
+ if (($browser->ie && $browser->ver < 9)
+ || ($browser->opera && $browser->ver < 9.5)
+ || ($browser->chrome && $browser->ver < 24)
+ || ($browser->safari && $browser->ver < 5)
+ || ($browser->mz && $browser->ver < 6)
+ ) {
$this->mimetypes = array();
}
}