-
Bug
-
Resolution: Fixed
-
Normal
-
9.5.1.3, 9.6.0
-
Security Level: Jimmy
Steps to Reproduce
Run a Video component with both code snippets below:
File file = new File("path\\test3.mp4"); Reader reader = RepeatableReader.getInstance(file); InputStream fileInputStream = new FileInputStream(file); AVideo content = new AVideo("test3.mp4", RepeatableInputStream.getInstance(fileInputStream)); Video videoViewer = new Video(); videoViewer.setHflex("1"); videoViewer.setVflex("1"); videoViewer.setControls(true); videoViewer.setContent(content); videoViewer.setParent(comp); videoViewer.play(); File file2 = new File("path\\test3.mp4"); InputStream fileInputStream2 = new FileInputStream(file2); byte[] byteArray = IOUtils.toByteArray(fileInputStream2); AVideo content2 = new AVideo("test3.mp4", byteArray); Video videoViewer2 = new Video(); videoViewer2.setHflex("1"); videoViewer2.setVflex("1"); videoViewer2.setControls(true); videoViewer2.setContent(content2); videoViewer2.setParent(comp); videoViewer2.play();
Current Result
The video component created with a Byte[] content starts to stream immediately
The video component created with a RepeatableInputStream takes multiple minutes to load before starting to play
Expected Result
RepeatableInputStream should have a reasonable loading time
Debug Information
Workaround
- Use Byte[] to load content
- Use RepeatableInputStream.getInstance(File)
- Use RepeatableInputStream.getInstance(new BufferedInputStream(InputStream))
- relates to
-
ZK-4946 Video using RepeatableInputStream fails when using large file as input
- Closed