I got Spring Boot application running on Heroku server and mp4 file on AWS S3 storage. Filename of that mp4 is in database on Heroku.
I am using thymeleaf to get data. Developer console shows no error, but I can see only the player with all buttons (configured in js file)
<div class="player">
<video class="video-container" controls>
<source th:src="@{/files/{filename}(filename=${product.imagePath})}" type="video/mp4"/>
<source th:src="@{/files/{filename}(filename=${product.imagePath})}" type="video/webm"/>
<p>No HTML5 vid supported</p>
</video>
<div class="controls">
<div class="progress">
<div class="progress__filled"></div>
</div>
<button class="controls__btn playPauseBtn" title="Toggle Play">
►
</button>
</div>
</div>
@RequestMapping("/productvid")
@Controller
public class ProductDetailsControllerVid {
@Autowired
private ProductService productServiceImpl;
@GetMapping("/{id}")
public ModelAndView getDetails(@PathVariable("id") Long id){
if (id == null || id <0)
return redirect();
else {
try {
Product product = productServiceImpl.findById(id);
ModelAndView mav = new ModelAndView("product/detailsvid");
mav.addObject("product", product);
mav.addObject("comment", new Comment());
return mav;
} catch (ProductNotFoundException e) {
return redirect();
}
}
}