How can we play some remote or cloud url? ``` https://file-examples-com.gi

How can we play some remote or cloud url?

https://file-examples-com.github.io/uploads/2018/04/file_example_MOV_480_700kB.mov

Hi! The first thing that comes to mind, you should download your remote file to some sort of temporary directory and then send you temporary file to VideoJS constructor. Something like that:

URL url = null;
File tempDirectory = new File("./temp_files");
if (!tempDirectory.exists()) tempDirectory.mkdirs();
File tempFile = null;
FileOutputStream fileOutputStream = null;
ReadableByteChannel readableByteChannel = null;
try {
	tempFile = File.createTempFile("prefix-", "-suffix", tempDirectory);
	tempFile.deleteOnExit();
	url = new URL("https://file-examples-com.github.io/uploads/2018/04/file_example_MOV_480_700kB.mov");
	readableByteChannel = Channels.newChannel(url.openStream());
	fileOutputStream = new FileOutputStream(tempFile);
	fileOutputStream.getChannel()
			.transferFrom(readableByteChannel, 0, Long.MAX_VALUE);
} catch (IOException e) {
	e.printStackTrace();
} finally {
	if (fileOutputStream != null) {
		try {
			fileOutputStream.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	if (readableByteChannel != null) {
		try {
			readableByteChannel.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
final VideoJS video = new VideoJS(UI.getCurrent().getSession(), tempFile, null);