diff --git a/src/component/fileDownloadButton/view.js b/src/component/fileDownloadButton/view.js
index 78e9c48..8b2c0fe 100644
--- a/src/component/fileDownloadButton/view.js
+++ b/src/component/fileDownloadButton/view.js
@@ -73,9 +73,7 @@ class FileDownloadButton extends React.PureComponent {
onLayout={onButtonLayout}
style={[style, fileDownloadButtonStyle.container]}
onPress={() => {
- if (NativeModules.Firebase) {
- NativeModules.Firebase.track('purchase_uri', { uri: uri });
- }
+ NativeModules.Firebase.track('purchase_uri', { uri: uri });
purchaseUri(uri, costInfo, !isPlayable);
if (NativeModules.UtilityModule) {
NativeModules.UtilityModule.checkDownloads();
diff --git a/src/index.js b/src/index.js
index 602c31d..01db9eb 100644
--- a/src/index.js
+++ b/src/index.js
@@ -56,6 +56,7 @@ window.__ = __;
const globalExceptionHandler = (error, isFatal) => {
if (error && NativeModules.Firebase) {
+ console.log(error);
NativeModules.Firebase.logException(isFatal, error.message ? error.message : 'No message', JSON.stringify(error));
}
};
diff --git a/src/page/file/view.js b/src/page/file/view.js
index b7a5381..02c8641 100644
--- a/src/page/file/view.js
+++ b/src/page/file/view.js
@@ -692,6 +692,17 @@ class FilePage extends React.PureComponent {
}
};
+ onMediaContainerPressed = () => {
+ const { costInfo, contentType, purchaseUri } = this.props;
+ const { uri } = this.state;
+ const mediaType = Lbry.getMediaType(contentType);
+ const isPlayable = mediaType === 'video' || mediaType === 'audio';
+ purchaseUri(uri, costInfo, isPlayable);
+ if (isPlayable) {
+ this.onFileDownloadButtonPlayed();
+ }
+ };
+
render() {
const {
balance,
@@ -885,7 +896,11 @@ class FilePage extends React.PureComponent {
}
onLayout={this.checkOrientation}
>
-
+
{(canOpen || (!fileInfo || (isPlayable && !canLoadMedia)) || (!canOpen && fileInfo)) && (
-
+
{(this.state.streamingMode || (canLoadMedia && fileInfo && isPlayable)) && (