Skip to content

Commit

Permalink
chore: update dependencies, readme, switch to github actions ci
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonocasey committed Jun 14, 2021
1 parent 85ab8e9 commit 749f5f1
Show file tree
Hide file tree
Showing 8 changed files with 3,808 additions and 5,044 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: ci

on: [push, pull_request]

jobs:
should-skip:
continue-on-error: true
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should-skip-job: ${{steps.skip-check.outputs.should_skip}}
steps:
- id: skip-check
uses: fkirc/[email protected]
with:
github_token: ${{github.token}}

ci:
needs: should-skip
if: ${{needs.should-skip.outputs.should-skip-job != 'true' || github.ref == 'refs/heads/main'}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
env:
BROWSER_STACK_USERNAME: ${{secrets.BROWSER_STACK_USERNAME}}
BROWSER_STACK_ACCESS_KEY: ${{secrets.BROWSER_STACK_ACCESS_KEY}}
runs-on: ${{matrix.os}}
steps:
- name: checkout code
uses: actions/checkout@v2

- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
~/.npm
**/node_modules
key: ${{runner.os}}-npm-${{hashFiles('**/package-lock.json')}}
restore-keys: |
${{runner.os}}-npm-
${{runner.os}}-
- name: read node version from .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
shell: bash
id: nvm

- name: update apt cache on linux w/o browserstack
run: sudo apt-get update
if: ${{startsWith(matrix.os, 'ubuntu') && !env.BROWSER_STACK_USERNAME}}

- name: install ffmpeg/pulseaudio for firefox on linux w/o browserstack
run: sudo apt-get install ffmpeg pulseaudio
if: ${{startsWith(matrix.os, 'ubuntu') && !env.BROWSER_STACK_USERNAME}}

- name: start pulseaudio for firefox on linux w/o browserstack
run: pulseaudio -D
if: ${{startsWith(matrix.os, 'ubuntu') && !env.BROWSER_STACK_USERNAME}}

- name: setup node
uses: actions/setup-node@v1
with:
node-version: '${{steps.nvm.outputs.NVMRC}}'

# turn off the default setup-node problem watchers...
- run: echo "::remove-matcher owner=eslint-compact::"
- run: echo "::remove-matcher owner=eslint-stylish::"
- run: echo "::remove-matcher owner=tsc::"

- name: npm install
run: npm i --prefer-offline --no-audit

- name: run npm test
uses: GabrielBB/xvfb-action@v1
with:
run: npm run test
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/*
14
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Maintenance Status: Stable
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->


- [Installation](#installation)
- [Browser Support](#browser-support)
- [Projection support](#projection-support)
Expand Down Expand Up @@ -60,7 +59,7 @@ Maintenance Status: Stable
## Installation

```sh
npm install --save videojs-vr
npm i videojs-vr
```

## Browser Support
Expand Down Expand Up @@ -212,7 +211,7 @@ The video is half sphere and the user should not be able to look behind themselv

#### `'180_lr'`
Used for side-by-side 180 videos
The video is half sphere and the user should not be able to look behind themselves
The video is half sphere and the user should not be able to look behind themselves

#### `'180_mono'`
Used for monoscopic 180 videos
Expand Down
34 changes: 34 additions & 0 deletions examples/360-sphere-detail.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>videojs-vr Demo</title>
<link href="../node_modules/video.js/dist/video-js.css" rel="stylesheet">
<link href="../dist/videojs-vr.css" rel="stylesheet">
</head>
<body>
<video width="640" height="300" id="videojs-vr-player" class="video-js vjs-default-skin" controls playsinline>
<source src="../samples/eagle-360.mp4" type="video/mp4">
</video>
<ul>
<li><a href="../">return to main example</a></li>
</ul>
<script src="../node_modules/video.js/dist/video.js"></script>
<script src="../dist/videojs-vr.js"></script>
<script>
(function(window, videojs) {
var player = window.player = videojs('videojs-vr-player');
player.mediainfo = player.mediainfo || {};
player.mediainfo.projection = '360';

// AUTO is the default and looks at mediainfo
var vr = window.vr = player.vr({
projection: 'AUTO',
debug: true,
forceCardboard: false,
sphereDetail: 64,
});
}(window, window.videojs));
</script>
</body>
</html>
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<li><a href="examples/eac-lr.html">EAC LR video example</a></li>
<li><a href="examples/fluid.html">"Fluid" video size example</a></li>
<li><a href="examples/spatial.html">Spatial audio example</a></li>
<li><a href="examples/sphere-detail.html">360 with increased sphere detail example</a></li>
</ul>
</body>
</html>
Loading

0 comments on commit 749f5f1

Please sign in to comment.