mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 09:35:10 +01:00
Fix progress bar for video encoding
This commit is contained in:
parent
e3e8f088c7
commit
26e0957840
@ -22,6 +22,7 @@ let MediaContainer = React.createClass({
|
|||||||
let mimetype = this.props.content.digital_work.mime;
|
let mimetype = this.props.content.digital_work.mime;
|
||||||
let embed = null;
|
let embed = null;
|
||||||
let extraData = null;
|
let extraData = null;
|
||||||
|
let isEmbedDisabled = mimetype === 'video' && this.props.content.digital_work.isEncoding !== undefined && this.props.content.digital_work.isEncoding !== 100;
|
||||||
|
|
||||||
if (this.props.content.digital_work.encoding_urls) {
|
if (this.props.content.digital_work.encoding_urls) {
|
||||||
extraData = this.props.content.digital_work.encoding_urls.map(e => { return { url: e.url, type: e.label }; });
|
extraData = this.props.content.digital_work.encoding_urls.map(e => { return { url: e.url, type: e.label }; });
|
||||||
@ -31,25 +32,26 @@ let MediaContainer = React.createClass({
|
|||||||
embed = (
|
embed = (
|
||||||
<CollapsibleButton
|
<CollapsibleButton
|
||||||
button={
|
button={
|
||||||
<Button bsSize="xsmall" className="ascribe-margin-1px">
|
<Button bsSize="xsmall" className="ascribe-margin-1px" disabled={isEmbedDisabled ? '"disabled"' : ''}>
|
||||||
Embed
|
Embed
|
||||||
</Button>
|
</Button>
|
||||||
}
|
}
|
||||||
panel={
|
panel={
|
||||||
<pre className="">
|
<pre className="">
|
||||||
{'<iframe width="560" height="315" src="http://embed.ascribe.io/content/'
|
{'<iframe width="560" height="315" src="http://embed.ascribe.io/content/'
|
||||||
+ this.props.content.bitcoin_id + '" frameborder="0" allowfullscreen></iframe>'
|
+ this.props.content.bitcoin_id + '" frameborder="0" allowfullscreen></iframe>'}
|
||||||
}
|
|
||||||
</pre>
|
</pre>
|
||||||
}/>
|
}/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<MediaPlayer mimetype={mimetype}
|
<MediaPlayer
|
||||||
preview={thumbnail}
|
mimetype={mimetype}
|
||||||
url={this.props.content.digital_work.url}
|
preview={thumbnail}
|
||||||
extraData={extraData} />
|
url={this.props.content.digital_work.url}
|
||||||
|
extraData={extraData}
|
||||||
|
encodingStatus={this.props.content.digital_work.isEncoding} />
|
||||||
<p className="text-center">
|
<p className="text-center">
|
||||||
<AclProxy
|
<AclProxy
|
||||||
aclObject={this.props.content.acl}
|
aclObject={this.props.content.acl}
|
||||||
|
Loading…
Reference in New Issue
Block a user