-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add video-on-demand player for recorded talks #79
Conversation
js/vod-stream-embed.js
Outdated
|
||
var ipfs_gateway_self = 'https://ipfs.io'; // IPFS gateway of this node | ||
var ipfs_gateway_origin = 'https://ipfs.io'; // IPFS gateway of origin stream | ||
var m3u8_ipfs = 'https://ipfs.io/ipfs/QmZJ5ZbJTfhQXM57PSWYy1VsHRDfL5AckjXy6W7RmP89AX'; // File path to m3u8 with IPFS content via HTTP server |
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.
</div> | ||
|
||
<script src="/js/vendor/video.min.js?{{site.time | date: '%s%N'}}"></script> | ||
<script src="/js/vod-stream-embed.js?{{site.time | date: '%s%N'}}"></script> |
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.
s/live/vod
is the only change in this file.
js/vod-stream-embed.js
Outdated
function ipfsStream() { | ||
live.src({ | ||
src: m3u8_ipfs, | ||
type: 'video/mp4' |
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.
type
is changed to video/mp4
here and above.
js/vod-stream-embed.js
Outdated
videojs.options.hls.overrideNative = true; | ||
} | ||
|
||
function httpStream() { |
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.
I wonder if we can pass a raw http stream from Internet Archive?
I was imagining a smaller embed under each video, rather than a player on the page that all were fed into. If folks wanted to "click in" then the behaviour could be to redirect them to the standing player page (that way we only have a single "player" page?) Also, the list of hashes is mocked up as being part of the session file currently. |
Between many players on a page vs. linking out to a player page, I definitely prefer the latter. Modifying the player to support both live and vod should be reasonably easy. I can give it a shot but would definitely like a review from @garrying |
IPFS only: IPFS + HTTP stream: For example you can try a stream from IA with our player like this: which works locally, but I imagine we'd have CORS problems once deployed since the IA mp4 does not have a wildcard |
titleDisplay: "Stream" | ||
--- | ||
|
||
<style type="text/css"> |
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.
🌍
stream.md
Outdated
--- | ||
layout: page | ||
order: 0 | ||
title: "Stream" |
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.
Can we call this/one not stream? It seems like we are moving toward "player"?
|
||
var stream_type = 'video/mp4'; // Type of video stream | ||
var stream_url_ipfs = 'https://ipfs.io/ipfs/' // File path to stream with IPFS content via HTTP server | ||
var stream_urls_http = []; // Optional list of URLs to stream over HTTP |
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.
I'm not sure I understand the flow for how the http stream will be queued, do you imagine there being a list of mirrors + potentially feeding in one?
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.
For recorded ones it only supports a single one via http
URL param
js/video-player-embed.js
Outdated
|
||
live.on('error', function(event) { | ||
console.debug(this.error()); | ||
document.getElementById('loadingTitle').innerHTML = 'Unable to load live stream'; |
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.
These messages don't seem intuitive if we have a non-stream source
"Unable to load video" might be a good sub if could differentiate on source?
@@ -2,84 +2,7 @@ | |||
|
|||
var ipfs_gateway_self = 'https://ipfs-gateway.live.mesh.world'; // IPFS gateway of this node |
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.
do we want to set gateways in the config? maybe premature
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.
2019 :)
// Video-on-demand Stream Video | ||
|
||
var ipfs_gateway_self = 'https://ipfs.io'; // IPFS gateway of this node | ||
var ipfs_gateway_origin = 'https://ipfs.io'; // IPFS gateway of origin stream |
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.
Not following what this is for and how it corresponds to line 11. We're concating to one gateway?
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.
This allows for swapping out the gateway. This is only relevant for livestream and is defined here for consistency.
@@ -0,0 +1,65 @@ | |||
--- |
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.
Thinking this page will come back to haunt us 🤔
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.
lgtm
Merging this in. I think the major changes were the renaming from |
* remove unused start/end times fields * initial structure for recorded talks * update talk announcement * add youtube links to session data * remove front part of youtube link * update to display of recorded talks * fix presenter link * orga condition * update thanks order * add ipfs 720 1080 links and update names * update recorded talks page * add alt take to thumbnail images * Add video-on-demand player for recorded talks (#79) * Add video-on-demand player for recorded talks * Add standalone video-on-demand player with ipfs+http dynamic stream support * Add the official video-on-demand player page * Clean up video-on-demand player * syntax stuff * page rename and error condition * updates * minor updates revert to external links * add ipfs icon * fix ipfx icon * play overlay * flip * border video links * svg clean up * update video size indication * Change player gateway to ipfs.infura.io
Copied live player files over and made some minimal changes to get an embedded VOD player. See notes for actual changes, we can definitely organize the files better to avoid code duplication. This relies on https://ipfs.io infrastructure to stream.