Skip to content

Commit

Permalink
chore: run demo https tunneled from localhost
Browse files Browse the repository at this point in the history
To be able to actually run the demo it needs to be served behind a
server with a valid HTTPS certificate. In order to simplify this, and
make it easier to verify and develop this library, a npm script is added
to setup the demo behind a HTTPS server in a single command.
  • Loading branch information
kontrollanten committed Sep 2, 2023
1 parent 6e1238e commit 79825b9
Show file tree
Hide file tree
Showing 6 changed files with 3,043 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pids
*.seed

# build directory
dist
/dist

# Coverage directory used by tools like istanbul
coverage
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,12 @@ folder contains grey, black, and blue versions of the icons.
*`chromecastRequested`: Triggers when the user has requested Chromecast playback using this
plugin's Chromecast button

## Demo

1. `npm run demo`
1. Open the https URL in the browser to confirm by entering your public IP
1. Cast from your local computer

## How do I contribute?

We genuinely appreciate external contributions. See [our extensive
Expand Down
1 change: 1 addition & 0 deletions docs/demo/dist
6 changes: 3 additions & 3 deletions docs/demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
<title>silvermine-videojs-chromecast Demo</title>
<link href="https://unpkg.com/[email protected]/dist/video-js.css" rel="stylesheet">
<script src="https://unpkg.com/[email protected]/dist/video.js"></script>
<script src="../../dist/silvermine-videojs-chromecast.min.js"></script>
<link href="../../dist/silvermine-videojs-chromecast.css" rel="stylesheet">
<script src="/dist/silvermine-videojs-chromecast.min.js"></script>
<link href="/dist/silvermine-videojs-chromecast.css" rel="stylesheet">
<script type="text/javascript" src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1"></script>
</head>
<body>
<h1>Demo of <code>silvermine-videojs-chromecast</code></h1>

<video id="video_1" class="video-js vjs-default-skin" controls preload="auto">
<source src="http://www.caminandes.com/download/03_caminandes_llamigos_1080p.mp4" type="video/mp4">
<source src="https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" type="video/mp4">
</video>

<script>
Expand Down
Loading

0 comments on commit 79825b9

Please sign in to comment.