Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chat
fairchat.ReactNative
Commits
e1952ca1
Unverified
Commit
e1952ca1
authored
Aug 31, 2018
by
Diego Mello
Committed by
GitHub
Aug 31, 2018
Browse files
[FIX] Open unsupported videos on browser (#422)
parent
de1a63c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/containers/message/Video.js
View file @
e1952ca1
...
...
@@ -40,6 +40,12 @@ export default class Video extends React.PureComponent {
state
=
{
isVisible
:
false
};
get
uri
()
{
const
{
video_url
}
=
this
.
props
.
file
;
const
{
baseUrl
,
user
}
=
this
.
props
;
return
`
${
baseUrl
}${
video_url
}
?rc_uid=
${
user
.
id
}
&rc_token=
${
user
.
token
}
`
;
}
toggleModal
()
{
this
.
setState
({
isVisible
:
!
this
.
state
.
isVisible
...
...
@@ -50,14 +56,12 @@ export default class Video extends React.PureComponent {
if
(
isTypeSupported
(
this
.
props
.
file
.
video_type
))
{
return
this
.
toggleModal
();
}
openLink
(
this
.
state
.
uri
);
openLink
(
this
.
uri
);
}
render
()
{
const
{
isVisible
}
=
this
.
state
;
const
{
video_url
,
description
}
=
this
.
props
.
file
;
const
{
baseUrl
,
user
}
=
this
.
props
;
const
uri
=
`
${
baseUrl
}${
video_url
}
?rc_uid=
${
user
.
id
}
&rc_token=
${
user
.
token
}
`
;
const
{
description
}
=
this
.
props
.
file
;
return
(
[
<
TouchableOpacity
...
...
@@ -79,7 +83,7 @@ export default class Video extends React.PureComponent {
onBackButtonPress
=
{()
=>
this
.
toggleModal
()}
>
<
VideoPlayer
source
=
{{
uri
}}
source
=
{{
uri
:
this
.
uri
}}
onBack
=
{()
=>
this
.
toggleModal
()}
disableVolume
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment