Hello I am trying to have a video play in my react rails component:
import React from "react"
import PropTypes from "prop-types"
class Video extends React.Component {
render () {
return (
<React.Fragment>
<div className="container">
<div className="row d-flex justify-content-center">
<div>
<video width="420" height="315"
autoPlay={true}
src="assets/Filutter_Resteraunt_Demo.mov"/>
</div>
</div>
</div>
</React.Fragment>
);
}
}
export default Video
config/application.rb:
module App
class Application < Rails::Application
config.assets.paths << "#{Rails.root}/app/assets/videos"
When the component renders in the browser (firefox) the beginning picture of the video shows but the video does not play. Thanks for the help!