Samsung TV Video Camcorder Using HTML5 and JS

I need to develop a Samsung TV application to play videos that are served from a remote server that I do not have access to.

In fact, I made a video playback application on my own server. But my current requirements are as follows:

  • I want to play videos that are served from a remote host (e.g. // remote.com/video_id) that I donโ€™t have access to, but my TV application is connected to my server (e.g. // myserver.com/samsungapp)
  • Before the game, I have to cache the file on my Samsung TV. those. buffer 100% and then play

I tested FileApi and FileReader using HTML5 and JS and came up with the following barriers:

It is difficult to send a cross-domain request from Javascript. Since I do not have access to the remote host, I cannot set access-control-origin to the response of the remote server.

Any suggestions are welcome ...

+7
source share
1 answer

There is a way to change the buffer size: SetTotalBufferSize

But you canโ€™t buffer 100% of your video, as it just runs out of TV memory.

So you have an event to check if buffering is complete: OnBufferingComplete

I donโ€™t know what the purpose of your task is, but you can download the entire file to the device, rather than buffering it.

Here is a way: http://www.samsungdforum.com/Guide/View/Developer_Documentation/Samsung_SmartTV_Developer_Documentation_2.5/API_Reference/JavaScript_APIs/SEF_Plugin_API/Download

So, you can download the movie and save it on your device. And after that, play your movie from local.

+3
source

All Articles