Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f8024527a7 | ||
|
|
02c1cfdb6e | ||
|
|
a891295d4f | ||
|
|
64fe3b210e | ||
|
|
1f9afc19e8 | ||
|
|
e36d8778a1 | ||
|
|
3e7b2ba0ca | ||
|
|
baf18712b7 | ||
|
|
1022815eb3 | ||
|
|
fdeaef5b88 | ||
|
|
9619ca2dec | ||
|
|
8a0ba7684a | ||
|
|
461f33a55c | ||
|
|
ea94666743 |
No files matched your search
+20
-1
@@ -4,7 +4,26 @@ All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
## [0.29.0] - 2019-2-21
|
||||
## [0.29.4] - 2019-3-12
|
||||
|
||||
### Fixed
|
||||
|
||||
- Style issue on phone number collection modal
|
||||
- White screen when watching videos for some files
|
||||
|
||||
## [0.29.3] - 2019-3-7
|
||||
|
||||
### Fixed
|
||||
|
||||
- Minor style issue with 0 LBC balance on the wallet page
|
||||
|
||||
## [0.29.2] - 2019-3-1
|
||||
|
||||
### Fixed
|
||||
|
||||
- Upgaded lbry-sdk to 0.32.4 to fix startup issue for some users
|
||||
|
||||
## [0.29.1] - 2019-2-21
|
||||
|
||||
### Added
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "LBRY",
|
||||
"version": "0.29.0",
|
||||
"version": "0.29.4",
|
||||
"description": "A browser for the LBRY network, a digital marketplace controlled by its users.",
|
||||
"keywords": [
|
||||
"lbry"
|
||||
@@ -134,7 +134,7 @@
|
||||
"yarn": "^1.3"
|
||||
},
|
||||
"lbrySettings": {
|
||||
"lbrynetDaemonVersion": "0.32.3",
|
||||
"lbrynetDaemonVersion": "0.32.4",
|
||||
"lbrynetDaemonUrlTemplate": "https://github.com/lbryio/lbry/releases/download/vDAEMONVER/lbrynet-OSNAME.zip",
|
||||
"lbrynetDaemonDir": "static/daemon",
|
||||
"lbrynetDaemonFileName": "lbrynet"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* eslint-disable */
|
||||
import 'babel-polyfill';
|
||||
import React from 'react';
|
||||
import { remote } from 'electron';
|
||||
import fs from 'fs';
|
||||
@@ -9,13 +10,15 @@ import FileRender from 'component/fileRender';
|
||||
import Thumbnail from 'component/common/thumbnail';
|
||||
import LoadingScreen from 'component/common/loading-screen';
|
||||
|
||||
class MediaPlayer extends React.PureComponent {
|
||||
class MediaPlayer extends React.PureComponent<Props, State> {
|
||||
static MP3_CONTENT_TYPES = ['audio/mpeg3', 'audio/mpeg'];
|
||||
static SANDBOX_TYPES = ['application/x-lbry', 'application/x-ext-lbry'];
|
||||
static FILE_MEDIA_TYPES = ['text', 'script', 'e-book', 'comic-book', 'document', '3D-file'];
|
||||
static SANDBOX_SET_BASE_URL = 'http://localhost:5278/set/';
|
||||
static SANDBOX_CONTENT_BASE_URL = 'http://localhost:5278';
|
||||
|
||||
mediaContainer: { current: React.ElementRef<any> };
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
@@ -25,23 +28,29 @@ class MediaPlayer extends React.PureComponent {
|
||||
unplayable: false,
|
||||
fileSource: null,
|
||||
};
|
||||
|
||||
this.mediaContainer = React.createRef();
|
||||
this.togglePlayListener = this.togglePlay.bind(this);
|
||||
this.toggleFullScreenVideo = this.toggleFullScreen.bind(this);
|
||||
}
|
||||
|
||||
componentDidUpdate(nextProps) {
|
||||
const el = this.refs.media.children[0];
|
||||
if (this.props.playingUri && !nextProps.playingUri && !el.paused) {
|
||||
componentDidUpdate(prevProps: Props) {
|
||||
const { downloadCompleted } = this.props;
|
||||
const { fileSource } = this.state;
|
||||
|
||||
const el = this.mediaContainer.current;
|
||||
|
||||
if (this.props.playingUri && !prevProps.playingUri && !el.paused) {
|
||||
el.pause();
|
||||
} else if (this.supportedType() && !fileSource && downloadCompleted) {
|
||||
this.renderFile();
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.playMedia();
|
||||
|
||||
// Temp hack to force the video to play if the metadataloaded event was never fired
|
||||
// Will be removed with the new video player
|
||||
// Unoptimized MP4s will fail to render.
|
||||
setTimeout(() => {
|
||||
const { hasMetadata } = this.state;
|
||||
if (!hasMetadata) {
|
||||
@@ -51,43 +60,16 @@ class MediaPlayer extends React.PureComponent {
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
componentWillReceiveProps(next) {
|
||||
const el = this.media.children[0];
|
||||
if (!this.props.paused && next.paused && !el.paused) el.pause();
|
||||
}
|
||||
|
||||
componentDidUpdate() {
|
||||
const { contentType, downloadCompleted } = this.props;
|
||||
const { startedPlaying, fileSource } = this.state;
|
||||
|
||||
if (this.playableType() && !startedPlaying && downloadCompleted) {
|
||||
const container = this.media.children[0];
|
||||
|
||||
if (MediaPlayer.MP3_CONTENT_TYPES.indexOf(contentType) > -1) {
|
||||
this.renderAudio(this.media, true);
|
||||
} else {
|
||||
player.append(
|
||||
this.file(),
|
||||
container,
|
||||
{ autoplay: true, controls: true },
|
||||
renderMediaCallback.bind(this)
|
||||
);
|
||||
}
|
||||
} else if (this.fileType() && !fileSource && downloadCompleted) {
|
||||
this.renderFile();
|
||||
}
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
document.removeEventListener('keydown', this.togglePlayListener);
|
||||
const mediaElement = this.media.children[0];
|
||||
const mediaElement = this.mediaContainer.current.children[0];
|
||||
if (mediaElement) {
|
||||
mediaElement.removeEventListener('click', this.togglePlayListener);
|
||||
}
|
||||
}
|
||||
|
||||
toggleFullScreen(event) {
|
||||
const mediaElement = this.media.children[0];
|
||||
const mediaElement = this.mediaContainer.current;
|
||||
if (mediaElement) {
|
||||
if (document.webkitIsFullScreen) {
|
||||
document.webkitExitFullscreen();
|
||||
@@ -97,10 +79,10 @@ class MediaPlayer extends React.PureComponent {
|
||||
}
|
||||
}
|
||||
|
||||
playMedia() {
|
||||
async playMedia() {
|
||||
const { hasMetadata } = this.state;
|
||||
|
||||
const container = this.media;
|
||||
const container = this.mediaContainer.current;
|
||||
const {
|
||||
downloadCompleted,
|
||||
contentType,
|
||||
@@ -135,6 +117,8 @@ class MediaPlayer extends React.PureComponent {
|
||||
}
|
||||
// Render default viewer: render-media (video, audio, img, iframe)
|
||||
else {
|
||||
// Temp hack to help in some metadata loading cases
|
||||
await this.sleep(300);
|
||||
player.append(
|
||||
this.file(),
|
||||
container,
|
||||
@@ -150,7 +134,9 @@ class MediaPlayer extends React.PureComponent {
|
||||
mediaElement.currentTime = position;
|
||||
}
|
||||
|
||||
mediaElement.addEventListener('loadedmetadata', () => this.refreshMetadata());
|
||||
mediaElement.addEventListener('loadedmetadata', () => this.refreshMetadata(), {
|
||||
once: true,
|
||||
});
|
||||
mediaElement.addEventListener('timeupdate', () => savePosition(mediaElement.currentTime));
|
||||
mediaElement.addEventListener('click', this.togglePlayListener);
|
||||
mediaElement.addEventListener('ended', () => {
|
||||
@@ -168,6 +154,10 @@ class MediaPlayer extends React.PureComponent {
|
||||
}
|
||||
}
|
||||
|
||||
sleep(ms) {
|
||||
return new Promise(resolve => setTimeout(resolve, ms));
|
||||
}
|
||||
|
||||
refreshMetadata() {
|
||||
const { onStartCb } = this.props;
|
||||
this.setState({ hasMetadata: true, startedPlaying: true });
|
||||
@@ -175,11 +165,10 @@ class MediaPlayer extends React.PureComponent {
|
||||
if (onStartCb) {
|
||||
onStartCb();
|
||||
}
|
||||
this.media.children[0].play();
|
||||
}
|
||||
|
||||
setReady() {
|
||||
this.setState({ ready: true });
|
||||
const playerElement = this.mediaContainer.current;
|
||||
if (playerElement) {
|
||||
playerElement.children[0].play();
|
||||
}
|
||||
}
|
||||
|
||||
togglePlay(event) {
|
||||
@@ -191,7 +180,7 @@ class MediaPlayer extends React.PureComponent {
|
||||
return;
|
||||
}
|
||||
event.preventDefault();
|
||||
const mediaElement = this.media.children[0];
|
||||
const mediaElement = this.mediaContainer.current.children[0];
|
||||
if (mediaElement) {
|
||||
if (!mediaElement.paused) {
|
||||
mediaElement.pause();
|
||||
@@ -342,9 +331,7 @@ class MediaPlayer extends React.PureComponent {
|
||||
<div
|
||||
className={'content__view--container'}
|
||||
style={{ opacity: isLoading ? 0 : 1 }}
|
||||
ref={container => {
|
||||
this.media = container;
|
||||
}}
|
||||
ref={this.mediaContainer}
|
||||
/>
|
||||
</React.Fragment>
|
||||
);
|
||||
|
||||
@@ -94,12 +94,17 @@ class UserPhoneNew extends React.PureComponent<Props, State> {
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<Form className="card__content" onSubmit={this.handleSubmit}>
|
||||
<fieldset-section>
|
||||
<Form onSubmit={this.handleSubmit}>
|
||||
<div className="card__content">
|
||||
<fieldset-group class="fieldset-group--smushed">
|
||||
<FormField type="select" name="country-codes" onChange={this.handleSelect}>
|
||||
<FormField
|
||||
label={__('Country')}
|
||||
type="select"
|
||||
name="country-codes"
|
||||
onChange={this.handleSelect}
|
||||
>
|
||||
{countryCodes.map((country, index) => (
|
||||
// eslint-disable-next-line
|
||||
// eslint-disable-next-line react/no-array-index-key
|
||||
<option key={index} value={country.countryCallingCode}>
|
||||
{os === 'Darwin' ? country.emoji : `(${country.alpha2})`}{' '}
|
||||
{country.countryCallingCode}
|
||||
@@ -108,6 +113,7 @@ class UserPhoneNew extends React.PureComponent<Props, State> {
|
||||
</FormField>
|
||||
<FormField
|
||||
type="text"
|
||||
label={__('Number')}
|
||||
placeholder={this.state.countryCode === '+1' ? '(555) 555-5555' : '5555555555'}
|
||||
name="phone"
|
||||
value={this.state.phone}
|
||||
@@ -117,7 +123,7 @@ class UserPhoneNew extends React.PureComponent<Props, State> {
|
||||
}}
|
||||
/>
|
||||
</fieldset-group>
|
||||
</fieldset-section>
|
||||
</div>
|
||||
<div className="card__actions">
|
||||
<Submit label="Submit" disabled={isPending} />
|
||||
{cancelButton}
|
||||
|
||||
@@ -16,7 +16,9 @@ const WalletBalance = (props: Props) => {
|
||||
</header>
|
||||
|
||||
<div className="card__content">
|
||||
{(balance || balance === 0) && <CreditAmount large amount={balance} precision={8} />}
|
||||
{(balance || balance === 0) && (
|
||||
<CreditAmount large badge={false} amount={balance} precision={8} />
|
||||
)}
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
|
||||
@@ -8,8 +8,8 @@ type Props = {
|
||||
closeModal: () => void,
|
||||
deleteFile: (string, boolean, boolean) => void,
|
||||
title: string,
|
||||
fileInfo: {
|
||||
outpoint: string,
|
||||
fileInfo?: {
|
||||
outpoint: ?string,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -21,7 +21,6 @@ type State = {
|
||||
class ModalRemoveFile extends React.PureComponent<Props, State> {
|
||||
constructor(props: Props) {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
deleteChecked: false,
|
||||
abandonClaimChecked: true,
|
||||
@@ -48,15 +47,10 @@ class ModalRemoveFile extends React.PureComponent<Props, State> {
|
||||
}
|
||||
|
||||
render() {
|
||||
const {
|
||||
claimIsMine,
|
||||
closeModal,
|
||||
deleteFile,
|
||||
fileInfo: { outpoint },
|
||||
title,
|
||||
} = this.props;
|
||||
const { claimIsMine, closeModal, deleteFile, fileInfo, title } = this.props;
|
||||
const { deleteChecked, abandonClaimChecked } = this.state;
|
||||
|
||||
const outpoint = fileInfo ? fileInfo.outpoint : '';
|
||||
return (
|
||||
<Modal
|
||||
isOpen
|
||||
@@ -64,7 +58,7 @@ class ModalRemoveFile extends React.PureComponent<Props, State> {
|
||||
contentLabel={__('Confirm File Remove')}
|
||||
type="confirm"
|
||||
confirmButtonLabel={__('Remove')}
|
||||
onConfirmed={() => deleteFile(outpoint, deleteChecked, abandonClaimChecked)}
|
||||
onConfirmed={() => deleteFile(outpoint || '', deleteChecked, abandonClaimChecked)}
|
||||
onAborted={closeModal}
|
||||
>
|
||||
<section className="card__content">
|
||||
|
||||
Reference in new issue
Block a user