OpenMediaCenter/src/MainBody.js
lukas 5f8c491674 general tag system
extract video quality with ffmpeg
2020-06-02 16:15:12 +02:00

33 lines
955 B
JavaScript

import React from "react";
import HomePage from "./HomePage";
import RandomPage from "./RandomPage";
class MainBody extends React.Component {
constructor(props) {
super(props);
this.props = props;
}
render() {
let page;
if (this.props.page === "default") {
page = <HomePage viewbinding={this.props.viewbinding}/>;
this.mypage = page;
} else if (this.props.page === "random"){
page = <RandomPage viewbinding={this.props.viewbinding}/>;
this.mypage = page;
}else if (this.props.page === "video") {
// show videoelement if neccessary
page = this.props.videoelement;
}else if (this.props.page === "lastpage") {
// return back to last page
page = this.mypage;
} else {
page = <div>unimplemented yet!</div>;
}
return (page);
}
}
export default MainBody;