force autoplay when timestamped (#6064)
This commit is contained in:
parent
3131b48c77
commit
2292f790a0
1 changed files with 10 additions and 1 deletions
|
@ -46,7 +46,6 @@ export default function FileRenderInitiator(props: Props) {
|
|||
history,
|
||||
location,
|
||||
thumbnail,
|
||||
autoplay,
|
||||
renderMode,
|
||||
hasCostInfo,
|
||||
costInfo,
|
||||
|
@ -54,6 +53,16 @@ export default function FileRenderInitiator(props: Props) {
|
|||
authenticated,
|
||||
videoTheaterMode,
|
||||
} = props;
|
||||
|
||||
// force autoplay if a timestamp is present
|
||||
let autoplay = props.autoplay;
|
||||
// get current url
|
||||
const url = window.location.href;
|
||||
// check if there is a time parameter, if so force autoplay
|
||||
if (url.indexOf('t=')) {
|
||||
autoplay = true;
|
||||
}
|
||||
|
||||
const cost = costInfo && costInfo.cost;
|
||||
const isFree = hasCostInfo && cost === 0;
|
||||
const fileStatus = fileInfo && fileInfo.status;
|
||||
|
|
Loading…
Reference in a new issue