Skip to content

Commit

Permalink
Video block has black background when upload is in progress or upload…
Browse files Browse the repository at this point in the history
… has failed (#15991)

* Fixed issue with a black background when the upload is in progress or upload has failed
  • Loading branch information
marecar3 committed Jun 5, 2019
1 parent 01db600 commit 4c2eb54
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
18 changes: 10 additions & 8 deletions packages/block-library/src/video/edit.native.js
Expand Up @@ -212,16 +212,18 @@ class VideoEdit extends React.Component {
return (
<View onLayout={ this.onVideoContanerLayout } style={ containerStyle }>
{ showVideo && isURL( src ) &&
<Video
isSelected={ isSelected }
style={ videoStyle }
source={ { uri: src } }
paused={ true }
muted={ true }
/>
<View style={ style.videoContainer }>
<Video
isSelected={ isSelected }
style={ videoStyle }
source={ { uri: src } }
paused={ true }
muted={ true }
/>
</View>
}
{ ! showVideo &&
<View style={ { ...videoStyle, ...style.placeholder } }>
<View style={ { height: videoContainerHeight, width: '100%', ...style.placeholder } }>
{ videoContainerHeight > 0 && iconContainer }
{ isUploadFailed && <Text style={ style.uploadFailedText }>{ retryMessage }</Text> }
</View>
Expand Down
8 changes: 0 additions & 8 deletions packages/block-library/src/video/style.ios.scss

This file was deleted.

5 changes: 5 additions & 0 deletions packages/block-library/src/video/style.native.scss
Expand Up @@ -4,6 +4,11 @@
width: 100%;
}

.videoContainer {
flex: 1;
background-color: #000;
}

.placeholder {
flex: 1;
justify-content: center;
Expand Down

0 comments on commit 4c2eb54

Please sign in to comment.