Ensure that multi-video lightbox scrolling changes video
This commit is contained in:
parent
523c65a1b7
commit
f5954db711
4 changed files with 18 additions and 6 deletions
|
@ -289,6 +289,7 @@ export class Lightbox extends React.Component<Props> {
|
|||
onClick={this.playVideoBound}
|
||||
controls={true}
|
||||
style={styles.object}
|
||||
key={objectURL}
|
||||
>
|
||||
<source src={objectURL} />
|
||||
</video>
|
||||
|
|
|
@ -33,29 +33,35 @@ const mediaItems = [
|
|||
attachment: { contentType: 'video/mp4' },
|
||||
},
|
||||
{
|
||||
objectURL: 'https://placekitten.com/980/800',
|
||||
contentType: 'image/jpeg',
|
||||
objectURL: util.mp4ObjectUrlV2,
|
||||
contentType: 'video/mp4',
|
||||
message: { id: 5 },
|
||||
attachment: { contentType: 'image/jpeg' },
|
||||
attachment: { contentType: 'video/mp4' },
|
||||
},
|
||||
{
|
||||
objectURL: 'https://placekitten.com/656/540',
|
||||
objectURL: 'https://placekitten.com/980/800',
|
||||
contentType: 'image/jpeg',
|
||||
message: { id: 6 },
|
||||
attachment: { contentType: 'image/jpeg' },
|
||||
},
|
||||
{
|
||||
objectURL: 'https://placekitten.com/762/400',
|
||||
objectURL: 'https://placekitten.com/656/540',
|
||||
contentType: 'image/jpeg',
|
||||
message: { id: 7 },
|
||||
attachment: { contentType: 'image/jpeg' },
|
||||
},
|
||||
{
|
||||
objectURL: 'https://placekitten.com/920/620',
|
||||
objectURL: 'https://placekitten.com/762/400',
|
||||
contentType: 'image/jpeg',
|
||||
message: { id: 8 },
|
||||
attachment: { contentType: 'image/jpeg' },
|
||||
},
|
||||
{
|
||||
objectURL: 'https://placekitten.com/920/620',
|
||||
contentType: 'image/jpeg',
|
||||
message: { id: 9 },
|
||||
attachment: { contentType: 'image/jpeg' },
|
||||
},
|
||||
];
|
||||
|
||||
<div style={{ position: 'relative', width: '100%', height: 500 }}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue