better web streaming
This commit is contained in:
parent
17f922cb6d
commit
c3859c30be
7 changed files with 6 additions and 30 deletions
|
@ -117,7 +117,6 @@
|
|||
"decompress": "^4.2.0",
|
||||
"del": "^3.0.0",
|
||||
"devtron": "^1.4.0",
|
||||
"duplicate-package-checker-webpack-plugin": "^3.0.0",
|
||||
"electron": "^4.0.4",
|
||||
"electron-builder": "^20.38.4",
|
||||
"electron-devtools-installer": "^2.2.3",
|
||||
|
|
|
@ -61,7 +61,6 @@ if (isDev) {
|
|||
|
||||
app.on('ready', async () => {
|
||||
let isDaemonRunning = false;
|
||||
console.log('???');
|
||||
await Lbry.status()
|
||||
.then(() => {
|
||||
isDaemonRunning = true;
|
||||
|
|
|
@ -92,7 +92,6 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
|
|||
}
|
||||
|
||||
updateStatus() {
|
||||
console.log('updateStatus??');
|
||||
Lbry.status().then(status => {
|
||||
this.updateStatusCallback(status);
|
||||
});
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// @flow
|
||||
import type { Claim } from 'types/claim';
|
||||
import React from 'react';
|
||||
import { stopContextMenu } from 'util/context-menu';
|
||||
import videojs from 'video.js';
|
||||
|
@ -11,6 +12,7 @@ type Props = {
|
|||
},
|
||||
contentType: string,
|
||||
poster?: string,
|
||||
claim: Claim,
|
||||
};
|
||||
|
||||
class AudioVideoViewer extends React.PureComponent<Props> {
|
||||
|
@ -18,18 +20,9 @@ class AudioVideoViewer extends React.PureComponent<Props> {
|
|||
player: ?{ dispose: () => void };
|
||||
|
||||
componentDidMount() {
|
||||
const { source, contentType, poster, claim } = this.props;
|
||||
const { downloadPath, fileName } = source;
|
||||
const { contentType, poster, claim } = this.props;
|
||||
|
||||
const indexOfFileName = downloadPath.indexOf(fileName);
|
||||
const basePath = downloadPath.slice(0, indexOfFileName);
|
||||
const encodedFileName = encodeURIComponent(fileName);
|
||||
|
||||
// We only want to encode the fileName so forward slashes "/" are handled properly by the file system
|
||||
// TODO: Determine changes needed for windows
|
||||
// const path = `${basePath}${encodedFileName}`;
|
||||
const path = `https://api.lbry.tv/content/claims/${claim.name}/${claim.claim_id}/stream.mp4`;
|
||||
console.log('path', path);
|
||||
const sources = [
|
||||
{
|
||||
src: path,
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ErrorBoundary from 'component/errorBoundary';
|
||||
import App from 'component/app';
|
||||
import SnackBar from 'component/snackBar';
|
||||
import SplashScreen from 'component/splash';
|
||||
// @if TARGET='app'
|
||||
import moment from 'moment';
|
||||
import { ipcRenderer, remote, shell } from 'electron';
|
||||
|
@ -21,7 +22,6 @@ import { Lbry, doToast, isURIValid, setSearchApi } from 'lbry-redux';
|
|||
import { doNavigate, doHistoryBack, doHistoryForward } from 'redux/actions/navigation';
|
||||
import { doDownloadLanguages, doUpdateIsNightAsync } from 'redux/actions/settings';
|
||||
import { doAuthenticate, Lbryio, rewards, doBlackListedOutpointsSubscribe } from 'lbryinc';
|
||||
import SplashScreen from 'component/splash';
|
||||
import 'scss/all.scss';
|
||||
import store from 'store';
|
||||
import pjson from 'package.json';
|
||||
|
@ -56,7 +56,6 @@ ipcRenderer.on('navigate-forward', () => {
|
|||
|
||||
// @if TARGET='web'
|
||||
const SDK_API_URL = process.env.SDK_API_URL || 'https://api.lbry.tv/api/proxy';
|
||||
console.log('set it??', SDK_API_URL);
|
||||
Lbry.setDaemonConnectionString(SDK_API_URL);
|
||||
// @endif
|
||||
|
||||
|
@ -254,7 +253,6 @@ const init = () => {
|
|||
// @endif
|
||||
}
|
||||
|
||||
console.log('???', window.sessionStorage.getItem('loaded'));
|
||||
if (window.sessionStorage.getItem('loaded') === 'y') {
|
||||
onDaemonReady();
|
||||
} else {
|
||||
|
|
|
@ -2,7 +2,6 @@ const path = require('path');
|
|||
const merge = require('webpack-merge');
|
||||
const { DefinePlugin, ProvidePlugin } = require('webpack');
|
||||
const { getIfUtils, removeEmpty } = require('webpack-config-utils');
|
||||
var DuplicatePackageCheckerPlugin = require('duplicate-package-checker-webpack-plugin');
|
||||
|
||||
const NODE_ENV = process.env.NODE_ENV || 'development';
|
||||
|
||||
|
@ -81,7 +80,6 @@ const baseConfig = {
|
|||
'process.env.SDK_API_URL': JSON.stringify(process.env.SDK_API_URL),
|
||||
'process.env.LBRY_API_URL': JSON.stringify(process.env.LBRY_API_URL),
|
||||
}),
|
||||
// new DuplicatePackageCheckerPlugin(),
|
||||
],
|
||||
};
|
||||
|
||||
|
|
14
yarn.lock
14
yarn.lock
|
@ -2096,7 +2096,7 @@ chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3:
|
|||
strip-ansi "^3.0.0"
|
||||
supports-color "^2.0.0"
|
||||
|
||||
chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.4.1, chalk@^2.4.2:
|
||||
chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.1, chalk@^2.4.1, chalk@^2.4.2:
|
||||
version "2.4.2"
|
||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
|
||||
integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
|
||||
|
@ -3308,16 +3308,6 @@ duplexify@^3.4.2, duplexify@^3.6.0:
|
|||
readable-stream "^2.0.0"
|
||||
stream-shift "^1.0.0"
|
||||
|
||||
duplicate-package-checker-webpack-plugin@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/duplicate-package-checker-webpack-plugin/-/duplicate-package-checker-webpack-plugin-3.0.0.tgz#78bb89e625fa7cf8c2a59c53f62b495fda9ba287"
|
||||
integrity sha512-aO50/qPC7X2ChjRFniRiscxBLT/K01bALqfcDaf8Ih5OqQ1N4iT/Abx9Ofu3/ms446vHTm46FACIuJUmgUQcDQ==
|
||||
dependencies:
|
||||
chalk "^2.3.0"
|
||||
find-root "^1.0.0"
|
||||
lodash "^4.17.4"
|
||||
semver "^5.4.1"
|
||||
|
||||
easymde@^2.5.1:
|
||||
version "2.5.1"
|
||||
resolved "https://registry.yarnpkg.com/easymde/-/easymde-2.5.1.tgz#00144baf96d52debb2043cb0da8c1b7a3d1ad86f"
|
||||
|
@ -4297,7 +4287,7 @@ find-parent-dir@^0.3.0:
|
|||
resolved "https://registry.yarnpkg.com/find-parent-dir/-/find-parent-dir-0.3.0.tgz#33c44b429ab2b2f0646299c5f9f718f376ff8d54"
|
||||
integrity sha1-M8RLQpqysvBkYpnF+fcY83b/jVQ=
|
||||
|
||||
find-root@^1.0.0, find-root@^1.1.0:
|
||||
find-root@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4"
|
||||
integrity sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==
|
||||
|
|
Loading…
Reference in a new issue