Skip to content
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

Use netlify for easier testing #188

Merged
merged 4 commits into from
Aug 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ test/test-manifests.js
test/test-segments.js
test/test-expected.js
coverage/
deploy/

# this file is generated and shouldn't be checked in
src/decrypter-worker.worker.js
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<script src="node_modules/video.js/dist/alt/video.core.js"></script>
<script src="node_modules/videojs-contrib-eme/dist/videojs-contrib-eme.js"></script>

<script src="dist/videojs-http-streaming.min.js"></script>
<script src="dist/videojs-http-streaming.js"></script>
<script>
(function(window, videojs) {
var player = window.player = videojs('videojs-http-streaming-player', {
Expand Down
87 changes: 87 additions & 0 deletions index.min.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>videojs-http-streaming Demo</title>
<link href="node_modules/video.js/dist/video-js.css" rel="stylesheet">
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
}
.info {
background-color: #eee;
border: thin solid #333;
border-radius: 3px;
padding: 0 5px;
margin: 20px 0;
}
input {
margin-top: 15px;
min-width: 450px;
padding: 5px;
}
</style>

</head>
<body>
<div class="info">
<p>The video below is an <a href="https://developer.apple.com/library/ios/documentation/networkinginternet/conceptual/streamingmediaguide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40008332-CH1-SW1">HTTP Live Stream</a>.</p>
</div>
<video-js id="videojs-http-streaming-player" class="vjs-default-skin" controls>
<source src="https://d2zihajmogu5jn.cloudfront.net/bipbop-advanced/bipbop_16x9_variant.m3u8" type="application/x-mpegURL">
</video-js>

<form id=load-url>
<label>
Video URL:
<input id=url type=url value="https://d2zihajmogu5jn.cloudfront.net/bipbop-advanced/bipbop_16x9_variant.m3u8">
</label><br/>
<label>
MimeType:
<select id=mimetype>
<option>application/x-mpegURL</option>
<option>application/dash+xml</option>
</select>
</label>
<button type=submit>Load</button>
</form>
<ul>
<li><a href="test/">Run unit tests in browser.</a></li>
<li><a href="docs/api/">Read generated docs.</a></li>
<li><a href="examples">Browse Examples</a></li>
</ul>

<script src="node_modules/video.js/dist/alt/video.core.js"></script>
<script src="node_modules/videojs-contrib-eme/dist/videojs-contrib-eme.js"></script>

<script src="dist/videojs-http-streaming.min.js"></script>
<script>
(function(window, videojs) {
var player = window.player = videojs('videojs-http-streaming-player', {
html5: {
hls: {
overrideNative: !videojs.browser.IS_SAFARI
}
}
});

// configure videojs-contrib-eme
player.eme();

// hook up the video switcher
var loadUrl = document.getElementById('load-url');
var url = document.getElementById('url');
var mimeType = document.getElementById('mimetype');
loadUrl.addEventListener('submit', function(event) {
event.preventDefault();
player.src({
src: url.value,
type: mimeType.options[mimeType.selectedIndex].innerText
});
return false;
});
}(window, window.videojs));
</script>
</body>
</html>
Loading