8c3e376873
- Biggest change: Moved mobile player logic outside of fileRenderFloating into its own component fileRenderMobile, since there is no need for all that extra resizing and dragging code (for now, as mobile doesn't have a floating player) - Moved player to the header height - Removed rounded borders and margins
39 lines
1.1 KiB
JavaScript
39 lines
1.1 KiB
JavaScript
// @flow
|
|
import { LIVESTREAM_EMBED_URL } from 'constants/livestream';
|
|
import LivestreamScheduledInfo from 'component/livestreamScheduledInfo';
|
|
import React from 'react';
|
|
import classnames from 'classnames';
|
|
|
|
type Props = {
|
|
channelClaimId: string,
|
|
release?: any,
|
|
showLivestream: boolean,
|
|
showScheduledInfo?: boolean,
|
|
mobileVersion?: boolean,
|
|
};
|
|
|
|
export default function LivestreamIframeRender(props: Props) {
|
|
const { channelClaimId, release, showLivestream, showScheduledInfo, mobileVersion } = props;
|
|
|
|
const className = mobileVersion
|
|
? 'file-render file-render--video'
|
|
: classnames('file-render file-render--video livestream', {
|
|
'file-render--scheduledLivestream': !showLivestream,
|
|
});
|
|
|
|
return (
|
|
<div className={className}>
|
|
<div className="file-viewer">
|
|
{showLivestream && (
|
|
<iframe
|
|
src={`${LIVESTREAM_EMBED_URL}/${channelClaimId}?skin=odysee&autoplay=1`}
|
|
scrolling="no"
|
|
allowFullScreen
|
|
/>
|
|
)}
|
|
|
|
{showScheduledInfo && release && <LivestreamScheduledInfo release={release} />}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|