Bladeren bron

fix(browser_caps): clean up.

tags/v0.0.2
hristoterezov 7 jaren geleden
bovenliggende
commit
7dfa07e540
6 gewijzigde bestanden met toevoegingen van 0 en 132 verwijderingen
  1. 0
    4
      .eslintignore
  2. 0
    1
      .gitignore
  3. 0
    44
      doc/browser-capabilities.md
  4. 0
    66
      modules/browser/ExternalBrowserCapabilities.js
  5. 0
    3
      modules/browser/index.js
  6. 0
    14
      webpack.config.js

+ 0
- 4
.eslintignore Bestand weergeven

@@ -3,10 +3,6 @@ lib-jitsi-meet.js
3 3
 lib-jitsi-meet.js.map
4 4
 lib-jitsi-meet.min.js
5 5
 lib-jitsi-meet.min.map
6
-browser_capabilities.js
7
-browser_capabilities.js.map
8
-browser_capabilities.min.js
9
-browser_capabilities.min.map
10 6
 
11 7
 # Third-party source code which we (1) do not want to modify or (2) try to
12 8
 # modify as little as possible.

+ 0
- 1
.gitignore Bestand weergeven

@@ -3,7 +3,6 @@ node_modules
3 3
 .idea/
4 4
 *.iml
5 5
 .*.tmp
6
-browser_capabilities.*
7 6
 deploy-local.sh
8 7
 .remote-sync.json
9 8
 lib-jitsi-meet.*

+ 0
- 44
doc/browser-capabilities.md Bestand weergeven

@@ -1,44 +0,0 @@
1
-# Jitsi Meet browser capabilities
2
-
3
-An API for checking browser capabilities for Jitsi Meet.
4
-
5
-## Installation
6
-
7
-To use the Jitsi Meet browser capabilities API in your application you need to add a JS file with `BrowserCapabilities` implementation:
8
-
9
-```javascript
10
-<script src="https://example.com/libs/browser_capabilities.min.js"></script>
11
-```
12
-
13
-## API
14
-
15
-### Constructor
16
-
17
-* **isUsingIFrame**: `true` if Jitsi Meet is loaded in iframe and `false` otherwise. The default value is `false`.
18
-* **browserInfo**: Information about the browser which capabilities will be checked. If not specified `BrowserCapabilities` class will detect the current browser. `browserInfo` is JS object with the following properties:
19
-    * **name**: The name of the browser compatible with the names returned by [bowser](https://github.com/lancedikson/bowser#all-detected-browsers)
20
-    * **version**: The version of the browser compatible with the version returned by [bowser](https://github.com/lancedikson/bowser#all-detected-browsers)
21
-
22
-**Example:**
23
-```javascript
24
-const browserCapabilities = new BrowserCapabilities(); // not using iframe;  capabilities for the current browser
25
-const browserCapabilities1 = new BrowserCapabilities(true); // using iframe; capabilities for the current browser.
26
-const browserCapabilities1 = new BrowserCapabilities(true, {
27
-    name: 'Chrome',
28
-    version: '63.0'
29
-}); // using iframe; capabilities for Chrome 63.0
30
-```
31
-
32
-### Methods:
33
-
34
-* **isSupported** - returns `true` if the browser is supported by Jitsi Meet and `false` otherwise.
35
-
36
-* **supportsAudioIn** - returns `true` if the browser supports incoming audio and `false` otherwise.
37
-
38
-* **supportsAudioOut** - returns `true` if the browser supports outgoing audio and `false` otherwise.
39
-
40
-* **supportsVideoIn** - returns `true` if the browser is supports incoming video and `false` otherwise.
41
-
42
-* **supportsVideoOut** - returns `true` if the browser is supports outgoing video and `false` otherwise.
43
-
44
-* **supportsScreenSharing** - returns `true` if the browser is supports screen sharing and `false` otherwise.

+ 0
- 66
modules/browser/ExternalBrowserCapabilities.js Bestand weergeven

@@ -1,66 +0,0 @@
1
-import BrowserCapabilities from './BrowserCapabilities';
2
-
3
-/**
4
- * API for checking the capabilities for Jitsi Meet for the current or passed
5
- * browser.
6
- */
7
-export default class ExternalBrowserCapabilities {
8
-    /**
9
-     * Creates new ExternalBrowserCapabilities instance.
10
-     *
11
-     * @param {boolean} [isUsingIFrame] - True if Jitsi Meet is loaded in iframe
12
-     * and false otherwise.
13
-     * @param {Object} [browserInfo] - Information about the browser.
14
-     * @param {string} browserInfo.name - The name of the browser.
15
-     * @param {string} browserInfo.version - The version of the browser.
16
-     */
17
-    constructor(isUsingIFrame, browserInfo) {
18
-        this._capabilities
19
-            = new BrowserCapabilities(isUsingIFrame, browserInfo);
20
-    }
21
-
22
-    /**
23
-     * Checks whether the browser is supported by Jitsi Meet.
24
-     *
25
-     * @returns {boolean}
26
-     */
27
-    isSupported() {
28
-        return this._capabilities.isSupported();
29
-    }
30
-
31
-    /**
32
-     * Checks whether the browser supports incoming audio.
33
-     *
34
-     * @returns {boolean}
35
-     */
36
-    supportsAudioIn() {
37
-        return this._capabilities.supportsAudioIn();
38
-    }
39
-
40
-    /**
41
-     * Checks whether the browser supports outgoing audio.
42
-     *
43
-     * @returns {boolean}
44
-     */
45
-    supportsAudioOut() {
46
-        return this._capabilities.supportsAudioOut();
47
-    }
48
-
49
-    /**
50
-     * Checks whether the browser supports video.
51
-     *
52
-     * @returns {boolean}
53
-     */
54
-    supportsVideo() {
55
-        return this._capabilities.supportsVideo();
56
-    }
57
-
58
-    /**
59
-     * Checks whether the browser supports screen sharing.
60
-     *
61
-     * @returns {boolean}
62
-     */
63
-    supportsScreenSharing() {
64
-        return this._capabilities.supportsScreenSharing();
65
-    }
66
-}

+ 0
- 3
modules/browser/index.js Bestand weergeven

@@ -1,7 +1,4 @@
1 1
 import BrowserCapabilities from './BrowserCapabilities';
2 2
 
3
-// Export for browser_capabilities bundle.
4
-export ExternalBrowserCapabilities from './ExternalBrowserCapabilities';
5
-
6 3
 export * as browsers from './browsers';
7 4
 export default new BrowserCapabilities();

+ 0
- 14
webpack.config.js Bestand weergeven

@@ -83,19 +83,5 @@ module.exports = [
83 83
             library: 'JitsiMeetJS',
84 84
             libraryTarget: 'umd'
85 85
         })
86
-    }),
87
-
88
-    // The Webpack configuration to bundle browser_capabilities.js (API for
89
-    // browser capabilities).
90
-    Object.assign({}, config, {
91
-        entry: {
92
-            'browser_capabilities':
93
-                './modules/browser/index.js'
94
-        },
95
-        output: Object.assign({}, config.output, {
96
-            library: 'BrowserCapabilities',
97
-            libraryExport: 'ExternalBrowserCapabilities',
98
-            libraryTarget: 'umd'
99
-        })
100 86
     })
101 87
 ];

Laden…
Annuleren
Opslaan