-
Notifications
You must be signed in to change notification settings - Fork 431
fix: remove global and use 'videojs-global-compat' #1595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 3 commits
9af9a9f
6dbd193
a673e7b
bf609b9
6cee06f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,4 +1,4 @@ | ||||||
| import document from 'global/document'; | ||||||
| import document from 'videojs-global-compat/document'; | ||||||
| import videojs from 'video.js'; | ||||||
| import Events from 'video.js'; | ||||||
| import QUnit from 'qunit'; | ||||||
|
|
@@ -41,7 +41,7 @@ import { | |||||
| getAllPsshKeySystemsOptions, | ||||||
| waitForKeySessionCreation | ||||||
| } from '../src/videojs-http-streaming'; | ||||||
| import window from 'global/window'; | ||||||
| import window from 'videojs-global-compat/window'; | ||||||
| // we need this so the plugin registers itself | ||||||
| import 'videojs-contrib-quality-levels'; | ||||||
| import 'videojs-contrib-eme'; | ||||||
|
|
@@ -4163,7 +4163,7 @@ QUnit.test('Allows overriding the global beforeRequest function', function(asser | |||||
|
|
||||||
| assert.equal(beforeLocalRequestCalled, 2, 'local beforeRequest was called twice ' + | ||||||
| 'for the media playlist and media'); | ||||||
| assert.equal(beforeGlobalRequestCalled, 1, 'global beforeRequest was called once ' + | ||||||
| assert.equal(beforeGlobalRequestCalled, 1, 'videojs-global-compat beforeRequest was called once ' + | ||||||
|
||||||
| assert.equal(beforeGlobalRequestCalled, 1, 'videojs-global-compat beforeRequest was called once ' + | |
| assert.equal(beforeGlobalRequestCalled, 1, 'global beforeRequest was called once ' + |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| assert.equal(actualRequestUrlGlobal, undefined, 'videojs-global-compat request url undefined'); | |
| assert.equal(actualRequestUrlGlobal, undefined, 'globalrequest url undefined'); |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,4 +1,4 @@ | ||||||
| import window from 'global/window'; | ||||||
| import window from 'videojs-global-compat/window'; | ||||||
| import QUnit from 'qunit'; | ||||||
| import {default as xhrFactory, byterangeStr} from '../src/xhr'; | ||||||
| import { useFakeEnvironment } from './test-helpers.js'; | ||||||
|
|
@@ -47,7 +47,7 @@ QUnit.test('xhr respects beforeRequest', function(assert) { | |||||
| delete this.xhr.beforeRequest; | ||||||
|
|
||||||
| this.xhr(defaultOptions); | ||||||
| assert.equal(this.requests.shift().url, 'global', 'url changed with global override'); | ||||||
| assert.equal(this.requests.shift().url, 'videojs-global-compat', 'url changed with global override'); | ||||||
|
||||||
| assert.equal(this.requests.shift().url, 'videojs-global-compat', 'url changed with global override'); | |
| assert.equal(this.requests.shift().url, 'global', 'url changed with global override'); |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| return { uri: 'videojs-global-compat-newOptions'}; | |
| return { uri: 'global-newOptions'}; |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| assert.equal(this.requests.shift().url, 'videojs-global-compat-newOptions', 'url changed with global override'); | |
| assert.equal(this.requests.shift().url, 'global-newOptions', 'url changed with global override'); |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| assert.equal(xhrRequest.url, 'videojs-global-compat', 'url changed with global onRequest hooks'); | |
| assert.equal(xhrRequest.url, 'global', 'url changed with global onRequest hooks'); |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| assert.equal(xhrRequest.url, 'videojs-global-compat', 'url changed with player onRequest hooks'); | |
| assert.equal(xhrRequest.url, 'global', 'url changed with player onRequest hooks'); |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| assert.equal(globalHookCallCount, 0, 'videojs-global-compat response hooks not called yet'); | |
| assert.equal(globalHookCallCount, 0, 'globalresponse hooks not called yet'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The repo and package probably ought to be in the video.js GitHub and NPM orgs.