如何使用三星电视API下载视频?

时间:2018-10-17 12:15:06

标签: samsung-smart-tv tizen-web-app tizen-tv

基本上,我正在为Samsung TV开发Web应用程序。

我正在尝试从Server下载图像和视频,然后显示它们。

@PostMapping("/{uri}")
public ResponseEntity register(@PathVariable("uri") String uri){
    if (uri != null){
        this.webSocketConfiguration.getWebSocketHandlerRegistry().addHandler(webSocketConfiguration.getWebSocketHandler(), "/" + uri);
        return new ResponseEntity(HttpStatus.OK);
    }
    else {
        return new ResponseEntity(HttpStatus.NO_CONTENT);
    }
}

}

错误:enter image description here

谢谢

1 个答案:

答案 0 :(得分:0)

代码中有错别字:尝试将“下载”更改为“下载”。

Tizen上的文件系统使用虚拟根目录,您可以在此处检查所有可用的文件夹名称: https://developer.samsung.com/tv/develop/api-references/tizen-web-device-api-references/filesystem-api

如果您还有其他问题,可以将解决方案与Download API演示进行比较: https://github.com/SamsungDForum/Download

另一件事是(除非您的应用程序中有特殊情况)avplay(Tizen视频播放器)将为您处理视频下载,HTML图像标签也将为您处理。