Question

I'm trying to stream video from a camera. The camera's web page streaming link is -

'http://192.168.blah.blah/img/mjpeg.cgi'

I made a sample SmartTv Basic App, and added a scene. In the scene's HTML I added this

<iframe src ='http://192.168.blah.blah/img/mjpeg.cgi' id='player' ></iframe>

And in the css -

#player
{
    position: absolute;
    top : 36px;
    left : 0px;
    height : 400px;
    width : 900px;
    padding: 30px 30px 30px 30px;
    background-color: black;
}

The video is streaming fine when I run it from the simulator. But it's failing when i deployed the app on actual TV. I have the 2013 Smart Tv model. And I ran on 2012 simulator (since the 2013 simulator crashes everytime).

Pls help!!!

Was it helpful?

Solution

Apparently the answer is the old "if it works on emulator it doesn't really mean it'll work on the actual device" :(

This is quoted from many discussions on the Samsung Smart TV forum --

Smart TV does not support iFrames completely .You'll not be able to use some of the functionalities (e.g navigation).

There is also certain discrepancy on the (complete) support of iframes on Samsung Smart TV 2012 and the 2013 models. So i'd suggest not to use iframes AT ALL.

Regarding the video streaming --

I'm streaming the video using RTSP which is supported by the plugin player provided in the samsmung smart tv. Reference links --

  1. Samsung Smart TV - Device API - "Player"
  2. Supported RTSP methods
  3. Player Specification
  4. Tutorial for video application

OTHER TIPS

Samsung smart TV supports HTML5 tags like video, audio, etc.

You can stream videos via video tag, but you will also need to modify your source link. For example:

<video src="http://blabla.bla.playlists.m3u8|COMPONENT=HLS|BITRATE=120000~300000" />

You need to add -> |COMPONENT=HLS|BITRATE=120000~300000

You can read all about it: Samsung Guide in section: Topic->Multimedia->Streaming

But in my opinion it is better to use the official Player like Tushar Koul gave you a reference, because you have more options included that you can do like play, pause, rewind, etc.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top