diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bdb57c0..f7ddcf76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,3 @@ - -## [1.10.2](https://github.com/videojs/videojs-vr/compare/v1.1.1...v1.1.2) (2018-02-20) - -### Chores - -* **package:** Move from WebVR polyfill to WebXR ([#216](https://github.com/videojs/videojs-vr/issues/216)) - ## [1.10.1](https://github.com/videojs/videojs-vr/compare/v1.10.0...v1.10.1) (2022-08-16) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 719a8cb9..a5ec1c86 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,7 +21,6 @@ When you've made your changes, push your commit(s) to your fork and issue a pull Testing is a crucial part of any software project. For all but the most trivial changes (typos, etc) test cases are expected. Tests are run in actual browsers using [Karma][karma]. - In all available and supported browsers: `npm test` -- In a specific browser: `npm run test` - While development server is running (`npm start`), navigate to [`http://localhost:9999/test/`][local] diff --git a/package.json b/package.json index 2a7c1281..d84db67e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "videojs-vr", - "version": "1.10.2", + "version": "1.10.1", "description": "A plugin to add 360 and VR video support to video.js.", "author": { "name": "James Broberg", @@ -84,7 +84,6 @@ }, "dependencies": { "@babel/runtime": "^7.14.5", - "babel-polyfill": "^6.26.0", "global": "^4.4.0", "three": "0.125.2", "video.js": "^6 || ^7", @@ -114,5 +113,10 @@ "lint-staged": { "*.js": "vjsstandard --fix", "README.md": "doctoc --notitle" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } } } diff --git a/src/plugin.js b/src/plugin.js index 9c6da1b5..538dbfc0 100644 --- a/src/plugin.js +++ b/src/plugin.js @@ -1,4 +1,3 @@ -import 'babel-polyfill'; import {version as VERSION} from '../package.json'; import window from 'global/window'; import document from 'global/document'; @@ -805,7 +804,7 @@ void main() { // For iOS we need permission for the device orientation data, this will pop up an 'Allow' // eslint-disable-next-line if (typeof window.DeviceMotionEvent === 'function' && - typeof window.DeviceMotionEvent.requestPermission === "function") { + typeof window.DeviceMotionEvent.requestPermission === 'function') { const self = this; window.DeviceMotionEvent.requestPermission().then(response => { diff --git a/test/plugin.test.js b/test/plugin.test.js deleted file mode 100644 index 3c8d04b8..00000000 --- a/test/plugin.test.js +++ /dev/null @@ -1,77 +0,0 @@ -import document from 'global/document'; - -import QUnit from 'qunit'; -import videojs from 'video.js'; - -import plugin from '../src/plugin'; - -const Player = videojs.getComponent('Player'); - -QUnit.test('the environment is sane', function(assert) { - assert.strictEqual(typeof Array.isArray, 'function', 'es5 exists'); - assert.strictEqual(typeof sinon, 'object', 'sinon exists'); - assert.strictEqual(typeof videojs, 'function', 'videojs exists'); - assert.strictEqual(typeof plugin, 'function', 'plugin is a function'); -}); - -QUnit.module('videojs-vr', { - - beforeEach(assert) { - assert.timeout(80000); - - this.fixture = document.getElementById('qunit-fixture'); - this.video = document.createElement('video-js'); - - this.video.muted = true; - this.video.defaultPlaybackRate = 16; - // this.fixture.style.position = 'inherit'; - - this.video.setAttribute('controls', ''); - this.video.setAttribute('muted', ''); - this.video.width = 600; - this.video.height = 300; - this.video.defaultPlaybackRate = 16; - - this.fixture.appendChild(this.video); - this.player = videojs(this.video); - }, - - afterEach() { - this.player.dispose(); - } -}); - -QUnit.test('registers itself with video.js', function(assert) { - assert.expect(1); - - assert.strictEqual( - typeof Player.prototype.vr, - 'function', - 'videojs-vr plugin was registered' - ); - - this.player.vr(); - -}); - -QUnit.test('playback', function(assert) { - const done = assert.async(); - - this.player.src({src: '/samples/eagle-360.mp4', type: 'video/mp4'}); - this.player.mediainfo = {projection: '360'}; - - // AUTO is the default and looks at mediainfo - this.vr = this.player.vr({projection: 'AUTO', debug: true}); - - this.player.play(); - - const onTimeupdate = () => { - if (this.player.currentTime() > 0) { - this.player.off('timeupdate', onTimeupdate); - assert.ok(true, 'played back video'); - done(); - } - }; - - this.player.on('timeupdate', onTimeupdate); -});