mirror of
				https://gitea.invidious.io/iv-org/videojs-quality-selector.git
				synced 2024-08-15 00:43:13 +00:00 
			
		
		
		
	Merge pull request #104 from yokuze/support_videojs_8
Support Video.js 8
This commit is contained in:
		
						commit
						44336386ce
					
				
					 5 changed files with 32 additions and 10 deletions
				
			
		
							
								
								
									
										11
									
								
								README.md
									
										
									
									
									
								
							
							
						
						
									
										11
									
								
								README.md
									
										
									
									
									
								
							|  | @ -70,6 +70,17 @@ Remember to also add the CSS to your build. With most bundlers you can: | ||||||
| require('@silvermine/videojs-quality-selector/dist/css/quality-selector.css') | require('@silvermine/videojs-quality-selector/dist/css/quality-selector.css') | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
|  | > [!WARNING] | ||||||
|  | > This plugin's source code uses ES6+ syntax and keywords, such as `class` and `static`. | ||||||
|  | > If you need to support [browsers that do not support newer JavaScript | ||||||
|  | > syntax](https://caniuse.com/es6), you will need to use a tool like | ||||||
|  | > [Babel](https://babeljs.io/) to transpile and polyfill your code. | ||||||
|  | > | ||||||
|  | > Alternatively, you can | ||||||
|  | > `require('@silvermine/videojs-chromecast/dist/js/silvermine-videojs-quality-selector.js')` | ||||||
|  | > to use a JavaScript file that has already been polyfilled/transpiled down to ES5 | ||||||
|  | > compatibility. | ||||||
|  | 
 | ||||||
| ### Providing video sources | ### Providing video sources | ||||||
| 
 | 
 | ||||||
| Sources can be provided with either the `<source>` tag or via the `src` function on the | Sources can be provided with either the `<source>` tag or via the `src` function on the | ||||||
|  |  | ||||||
|  | @ -3,8 +3,8 @@ | ||||||
| <head> | <head> | ||||||
|    <meta charset=utf-8 /> |    <meta charset=utf-8 /> | ||||||
|    <title>videojs-quality-selector Demo</title> |    <title>videojs-quality-selector Demo</title> | ||||||
|    <link href="https://unpkg.com/video.js@7.5.4/dist/video-js.css" rel="stylesheet"> |    <link href="https://unpkg.com/video.js@8.6.1/dist/video-js.css" rel="stylesheet"> | ||||||
|    <script src="https://unpkg.com/video.js@7.5.4/dist/video.js"></script> |    <script src="https://unpkg.com/video.js@8.6.1/dist/video.js"></script> | ||||||
|    <script src="../../dist/js/silvermine-videojs-quality-selector.min.js"></script> |    <script src="../../dist/js/silvermine-videojs-quality-selector.min.js"></script> | ||||||
|    <link href="../../dist/css/quality-selector.css" rel="stylesheet"> |    <link href="../../dist/css/quality-selector.css" rel="stylesheet"> | ||||||
| </head> | </head> | ||||||
|  |  | ||||||
							
								
								
									
										16
									
								
								package-lock.json
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										16
									
								
								package-lock.json
									
										
									
										generated
									
									
									
								
							|  | @ -4841,9 +4841,9 @@ | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/caniuse-lite": { |     "node_modules/caniuse-lite": { | ||||||
|       "version": "1.0.30001441", |       "version": "1.0.30001562", | ||||||
|       "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001441.tgz", |       "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001562.tgz", | ||||||
|       "integrity": "sha512-OyxRR4Vof59I3yGWXws6i908EtGbMzVUi3ganaZQHmydk1iwDhRnvaPG2WaR0KcqrDFKrxVZHULT396LEPhXfg==", |       "integrity": "sha512-kfte3Hym//51EdX4239i+Rmp20EsLIYGdPkERegTgU19hQWCRhsRFGKHTliUlsry53tv17K7n077Kqa0WJU4ng==", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "funding": [ |       "funding": [ | ||||||
|         { |         { | ||||||
|  | @ -4853,6 +4853,10 @@ | ||||||
|         { |         { | ||||||
|           "type": "tidelift", |           "type": "tidelift", | ||||||
|           "url": "https://tidelift.com/funding/github/npm/caniuse-lite" |           "url": "https://tidelift.com/funding/github/npm/caniuse-lite" | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "github", | ||||||
|  |           "url": "https://github.com/sponsors/ai" | ||||||
|         } |         } | ||||||
|       ] |       ] | ||||||
|     }, |     }, | ||||||
|  | @ -19214,9 +19218,9 @@ | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "caniuse-lite": { |     "caniuse-lite": { | ||||||
|       "version": "1.0.30001441", |       "version": "1.0.30001562", | ||||||
|       "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001441.tgz", |       "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001562.tgz", | ||||||
|       "integrity": "sha512-OyxRR4Vof59I3yGWXws6i908EtGbMzVUi3ganaZQHmydk1iwDhRnvaPG2WaR0KcqrDFKrxVZHULT396LEPhXfg==", |       "integrity": "sha512-kfte3Hym//51EdX4239i+Rmp20EsLIYGdPkERegTgU19hQWCRhsRFGKHTliUlsry53tv17K7n077Kqa0WJU4ng==", | ||||||
|       "dev": true |       "dev": true | ||||||
|     }, |     }, | ||||||
|     "caseless": { |     "caseless": { | ||||||
|  |  | ||||||
|  | @ -40,8 +40,8 @@ | ||||||
|     "@silvermine/eslint-config": "3.0.1", |     "@silvermine/eslint-config": "3.0.1", | ||||||
|     "@silvermine/standardization": "2.0.0", |     "@silvermine/standardization": "2.0.0", | ||||||
|     "autoprefixer": "8.6.5", |     "autoprefixer": "8.6.5", | ||||||
|     "babelify": "10.0.0", |  | ||||||
|     "babel-eslint": "10.1.0", |     "babel-eslint": "10.1.0", | ||||||
|  |     "babelify": "10.0.0", | ||||||
|     "check-node-version": "4.0.3", |     "check-node-version": "4.0.3", | ||||||
|     "core-js": "3.11.0", |     "core-js": "3.11.0", | ||||||
|     "coveralls": "3.0.3", |     "coveralls": "3.0.3", | ||||||
|  |  | ||||||
|  | @ -12,8 +12,15 @@ | ||||||
|       font-weight: normal; |       font-weight: normal; | ||||||
|       font-style: normal; |       font-style: normal; | ||||||
|       &::before { |       &::before { | ||||||
|  |          // The correct icon font character for Video.js 7 and below: | ||||||
|  |          .video-js:not(.vjs-v8) & { | ||||||
|             content: '\f110'; |             content: '\f110'; | ||||||
|          } |          } | ||||||
|  |          // Icon font character for Video.js 8: | ||||||
|  |          .vjs-v8 & { | ||||||
|  |             content: '\f114'; | ||||||
|  |          } | ||||||
|  |       } | ||||||
|    } |    } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue