diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 90e320572..cf597fc15 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.11.5 +current_version = 0.11.7 commit = True tag = True parse = (?P\d+)\.(?P\d+)\.(?P\d+)((?P[a-z]+)(?P\d+))? diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c3cd5204..d39386c35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,33 @@ Web UI version numbers should always match the corresponding version of LBRY App * * +## [0.11.7] - 2017-05-30 + +### Changed + * Video player switched from plyr to render-media + + +### Fixed + * Video player should behave better on streaming + * Daemon times out more quickly when it cannot start + * Connection should fail more cleanly, rather than get stuck entirely + * Closing modal dialogs was broken on some download and stream errors + * Discover landing page improperly showed loading error when it was loading correctly + + + +## [0.11.6] - 2017-05-29 + +### Changed + * Do not use a separate claim cache for publishes + + +### Fixed + * Upgrade process should now works on Windows + * Crudely handle failed publishes missing outpoints + + + ## [0.11.5] - 2017-05-28 ### Fixed diff --git a/app/package.json b/app/package.json index cf45db174..e2963c7fc 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "LBRY", - "version": "0.11.5", + "version": "0.11.7", "main": "main.js", "description": "LBRY is a fully decentralized, open-source protocol facilitating the discovery, access, and (sometimes) purchase of data.", "author": { diff --git a/ui/js/actions/content.js b/ui/js/actions/content.js index e09bd5ea1..e6b6a30a1 100644 --- a/ui/js/actions/content.js +++ b/ui/js/actions/content.js @@ -209,7 +209,7 @@ export function doLoadVideo(uri) { } } -export function doPurchaseUri(uri) { +export function doPurchaseUri(uri, purchaseModalName) { return function(dispatch, getState) { const state = getState() const balance = selectBalance(state) @@ -244,7 +244,7 @@ export function doPurchaseUri(uri) { if (cost > balance) { dispatch(doOpenModal('notEnoughCredits')) } else { - dispatch(doOpenModal('affirmPurchase')) + dispatch(doOpenModal(purchaseModalName)) } return Promise.resolve() @@ -274,16 +274,16 @@ export function doFetchClaimsByChannel(uri) { } } -export function doClaimListMine() { +export function doFetchClaimListMine() { return function(dispatch, getState) { dispatch({ - type: types.CLAIM_LIST_MINE_STARTED + type: types.FETCH_CLAIM_LIST_MINE_STARTED }) lbry.claim_list_mine().then((claims) => { dispatch({ - type: types.CLAIM_LIST_MINE_COMPLETED, + type: types.FETCH_CLAIM_LIST_MINE_COMPLETED, data: { claims } diff --git a/ui/js/actions/file_info.js b/ui/js/actions/file_info.js index 23ba50e71..44d76885c 100644 --- a/ui/js/actions/file_info.js +++ b/ui/js/actions/file_info.js @@ -1,7 +1,7 @@ import * as types from 'constants/action_types' import lbry from 'lbry' import { - doClaimListMine + doFetchClaimListMine } from 'actions/content' import { selectClaimsByUri, @@ -110,7 +110,7 @@ export function doFetchFileInfosAndPublishedClaims() { isFileInfoListPending = selectFileListIsPending(state) if (isClaimListMinePending === undefined) { - dispatch(doClaimListMine()) + dispatch(doFetchClaimListMine()) } if (isFileInfoListPending === undefined) { diff --git a/ui/js/component/fileActions/index.js b/ui/js/component/fileActions/index.js index e9dc10705..8e9555a14 100644 --- a/ui/js/component/fileActions/index.js +++ b/ui/js/component/fileActions/index.js @@ -66,7 +66,7 @@ const perform = (dispatch) => ({ dispatch(doDeleteFile(fileInfo, deleteFromComputer)) }, openModal: (modal) => dispatch(doOpenModal(modal)), - startDownload: (uri) => dispatch(doPurchaseUri(uri)), + startDownload: (uri) => dispatch(doPurchaseUri(uri, 'affirmPurchase')), loadVideo: (uri) => dispatch(doLoadVideo(uri)), }) diff --git a/ui/js/component/fileActions/view.jsx b/ui/js/component/fileActions/view.jsx index 7f3c1d75c..5dd4357c6 100644 --- a/ui/js/component/fileActions/view.jsx +++ b/ui/js/component/fileActions/view.jsx @@ -122,7 +122,7 @@ class FileActions extends React.Component { openModal('confirmRemove')} label="Remove..." /> : '' } + contentLabel="Confirm Purchase" onConfirmed={this.onAffirmPurchase.bind(this)} onAborted={closeModal}> This will purchase {title} for credits.

- + {!this.props.isWarning ? + : + {' ' + this.props.message} }

- {this.props.isWarning ? : null} {this.props.details} + {this.props.details}
); diff --git a/ui/js/component/splash.js b/ui/js/component/splash.js index e2be56b67..98b09db93 100644 --- a/ui/js/component/splash.js +++ b/ui/js/component/splash.js @@ -13,6 +13,7 @@ export class SplashScreen extends React.Component { this.state = { details: 'Starting daemon', + message: "Connecting", isLagging: false, }; } @@ -29,11 +30,12 @@ export class SplashScreen extends React.Component { // TODO: This is a hack, and the logic should live in the daemon // to give us a better sense of when we are actually started this.setState({ - details: 'Waiting for name resolution', + message: "Testing Network", + details: "Waiting for name resolution", isLagging: false }); - lbry.resolve({uri: 'lbry://one'}).then(() => { + lbry.resolve({uri: "lbry://one"}).then(() => { this.props.onLoadDone(); }); return; @@ -48,21 +50,19 @@ export class SplashScreen extends React.Component { } componentDidMount() { - lbry.connect().then((isConnected) => { - if (isConnected) { - this.updateStatus(); - } else { + lbry.connect() + .then(() => { this.updateStatus() }) + .catch(() => { this.setState({ isLagging: true, - message: "Failed to connect to LBRY", - details: "LBRY was unable to start and connect properly." + message: "Connection Failure", + details: "Try closing all LBRY processes and starting again. If this still happpens, your anti-virus software or firewall may be preventing LBRY from connecting. Contact hello@lbry.io if you think this is a software bug." }) - } - }) + }) } render() { - return + return } } diff --git a/ui/js/component/video/index.js b/ui/js/component/video/index.js index 5566da840..423ff533a 100644 --- a/ui/js/component/video/index.js +++ b/ui/js/component/video/index.js @@ -47,7 +47,7 @@ const makeSelect = () => { const perform = (dispatch) => ({ loadVideo: (uri) => dispatch(doLoadVideo(uri)), - purchaseUri: (uri) => dispatch(doPurchaseUri(uri)), + purchaseUri: (uri) => dispatch(doPurchaseUri(uri, 'affirmPurchaseAndPlay')), closeModal: () => dispatch(doCloseModal()), }) diff --git a/ui/js/component/video/view.jsx b/ui/js/component/video/view.jsx index 760a728ad..d7a1f274f 100644 --- a/ui/js/component/video/view.jsx +++ b/ui/js/component/video/view.jsx @@ -52,28 +52,25 @@ class VideoPlayButton extends React.Component { className="video__play-button" icon="icon-play" onClick={this.onWatchClick.bind(this)} /> - {modal} - { this.closeModal() }}> + You don't have enough LBRY credits to pay for this stream. This will purchase {title} for credits. { this.closeModal() }} contentLabel="Timed Out"> + isOpen={modal == 'timedOut'} onConfirmed={closeModal} contentLabel="Timed Out"> Sorry, your download timed out :( ); } } -const plyr = require('plyr') - class Video extends React.Component { constructor(props) { super(props) @@ -114,7 +111,7 @@ class Video extends React.Component { isPlaying || isLoading ? (!isReadyToPlay ? this is the world's worst loading screen and we shipped our software with it anyway...

{loadStatusMessage}
: - ) : + ) :
@@ -123,18 +120,28 @@ class Video extends React.Component { } } +const from = require('from2') +const player = require('render-media') +const fs = require('fs') + class VideoPlayer extends React.Component { componentDidMount() { const elem = this.refs.video const { - autoplay, downloadPath, contentType, + filename, } = this.props - const players = plyr.setup(elem) - if (autoplay) { - players[0].play() + const file = { + name: filename, + createReadStream: (opts) => { + return fs.createReadStream(downloadPath, opts) + } } + player.render(file, elem, { + autoplay: true, + controls: true, + }) } render() { @@ -145,7 +152,7 @@ class VideoPlayer extends React.Component { } = this.props return ( -