0

Attention all widget authors playing video in their widget!

Hello Everyone!

Now that everyone all platforms worldwide are on Framework 1.2 or higher (see announcement re: Samsung 2009 TVs in Europe), we are now mandating the changeover from KONtx.videoplayer to KONtx.mediaplayer API. There are a number of issues with the older KONtx.videoplayer API and is completely unsupported on some platforms (Vizio specifically at this time). If you have been in contact with us, this should come as no surprise to you, but if you haven't, I apologize this is the first you are hearing of this new API.

To support all platforms using a single codebase, anyone using the KONtx.mediaplayer API needs to include the following patchfile inside their widget. The patch can be obtained from here:

http://gist.github.com/399364

To use it, you would need to put it somewhere in your widget and include it. If you are already following our recommended best practices, you would put this file inside /Contents/Javascript and then include it at the top of your init.js right below your framework include like so:

CODE
include("Framework/kontx/1.2/src/all.js");
include("Javascript/patch-pre_fw1.3.20-mediaplayer.js");


As many of you have already been working on porting to using KONtx.mediaplayer already, this should be the only change needed to support video widgets across all platforms. If you have not started using KONtx.mediaplayer, then you should familiarize yourself with the Media Player API reference guide. If you have any questions, please do not hesitate to post here in the forums or email us at tvwidgets@yahoo-inc.com.

Thanks!

-Jeremy

27 Replies
  • The KONtx media player API is posted here (this includes migration instructions from KONtx.videoplayer to KONtx.mediaplayer):

    http://developer.yahoo.com/connectedtv/kon...edia_Player.pdf

    The online documentation for the KONtx API is posted here:

    http://developer.yahoo.com/connectedtv/kontxapi/

    I hope this helps,
    Kelly
    0
  • Hi Jeremy,

    I'm created own example with that patches and it work properly in Simulator but doesn't want work on Samsung LE32B650. I see only player bar but didn't see any activity. Also i try to use MediaPlayer sample from Visio Simulator but result is the same.

    TV Software:

    Yahoo! Widget Engine 5.0.0
    Widget Application Framework 1.3.12.C
    Launcher Bootstrap 1.2.10
    Profiles 1.2.21
    Out of Box Tutorial 1.2.4.C
    Widget Container 1.2.66.C

    p.s. please tell me what parameter from previous list is a version of my KONtx Framework, i'm hesitate between Widget Application Framework and Widget Container

    Thanks in advance!
    0
  • Please provide the code for the view which you are playing video from.
    0
  • QUOTE (Jeremy Johnstone @ May 18 2010, 11:56 AM) <{POST_SNAPBACK}>
    Please provide the code for the view which you are playing video from.


    No Problem ;)});
    0
  • The mediaplayer-control-test-Widget works fine in the konfabulator but will not run on my central-european-styled Samsung L32B650. Through the recommended remote logging I found out that the execution of the widget stopps when the KONtx.mediaplayer.initialize()-Method is called.
    0
  • In my case Player stops work somewhere in KONtx.mediaplayer.playlist.start() because line after that do not executing.

    Also I have some log from TV:

    CODE
    playlist start() was called
    Creating event payload with additional payload of:
    firing event of type:onStartPlaylist
    no listeners for event
    Fixing to load playlist entry at index:
    Creating event payload with additional payload of:
    firing event of type:onLoadPlaylistEntry
    no listeners for event
    fixing to play new playlist entry
    Creating event payload with additional payload of:
    firing event of type:onProcessPlaylistEntry
    no listeners for event
    Creating event payload with additional payload of:
    firing event of type:onFindBestStream
    no listeners for event
    Connection Bitrate:
    Skipping stream index:
    Index:
    Forcing playback on stream index:
    Creating event payload with additional payload of:
    firing event of type:onNewStreamSelected
    no listeners for event
    0
  • Are you both using the patch file provided in this thread (top post)? If not, it definitely will not work on European model TVs.

    -Jeremy
    0
  • In my case player stops work at line tv.destroyNetworkInput( internals.tvapi.input ) in internals.destroyTVAPIPointers method.

    Properties of internals.tvapi.input object:

    CODE
    {
    state:0,
    uri:'',
    onStateChanged:null,
    type:7,
    label:SEC_NETWORKINPUT_0,
    isConnected:true
    }
    0
  • Ok. I missed to copy the file to the TV-Test-widget. But nevertheless it is not working properly on my TV (it's a LE32B650). As vova.leskiv described above the widget gets stuck when the video-control is about to begin playing the video. The exception handler catches the following error:
    TypeError: internals.tvapi.path has no properties

    Note: The widget works fine in the Konfabulator. I can watch videos for hours...
    0
  • Can you both check in the Widget Gallery app's settings page and click on "TV Software Versions". I need the following pieces specifically:

    Engine Build
    Container Version
    Framework Version

    Thanks!

    -Jeremy
    0
  • QUOTE (Jeremy Johnstone @ May 21 2010, 04:23 PM) <{POST_SNAPBACK}>
    Can you both check in the Widget Gallery app's settings page and click on "TV Software Versions". I need the following pieces specifically:

    Engine Build
    Container Version
    Framework Version

    Thanks!

    -Jeremy


    I'm already posted that info in this thread but can repeat, no problem ;)Widget Container 1.2.66.C
    0
  • My apologies, I knew you had, but didn't have the other person's. I guess I should have directed my reply at the other person instead of referring to you both. :)Based on your versions and the code sample, this works on the TVs I tested on. It must be something else missing, can you provide a widget ID of a widget you uploaded to the gallery which doesn't work for you?
    0
  • QUOTE (Jeremy Johnstone @ May 22 2010, 02:02 PM) <{POST_SNAPBACK}>
    Based on your versions and the code sample, this works on the TVs I tested on. It must be something else missing, can you provide a widget ID of a widget you uploaded to the gallery which doesn't work for you?

    com.tv.mediaplayer
    0.2.5

    Thanks!
    0
  • QUOTE (vova.leskiv @ May 22 2010, 01:36 PM) <{POST_SNAPBACK}>
    I'm already posted that info in this thread but can repeat, no problem ;)Widget Container 1.3.12
    0
  • Jeremy,

    Is there any way I can get a hold of documentation for the mediaplayer API?

    Thanks,
    Niklas
    0
  • QUOTE (nbjorken @ May 23 2010, 10:27 PM) <{POST_SNAPBACK}>
    Is there any way I can get a hold of documentation for the mediaplayer API?


    I'm not sure why that isn't posted publicly yet, but if you send an email to tvwidgets@yahoo-inc.com we can get that to you asap.

    -Jeremy
    0
  • QUOTE (nbjorken @ May 23 2010, 10:27 PM) <{POST_SNAPBACK}>
    Jeremy,

    Is there any way I can get a hold of documentation for the mediaplayer API?

    Thanks,
    Niklas

    Hi Niklas,

    I'm using this one:
    http://developer.yahoo.com/connectedtv/kon...idget_KONtx.pdf
    0
  • QUOTE (nbjorken @ May 23 2010, 10:27 PM) <{POST_SNAPBACK}>
    Jeremy,

    Is there any way I can get a hold of documentation for the mediaplayer API?

    Thanks,
    Niklas


    Documentation for the KONtx.mediaplayer API is included in the KONtx API Reference found here:

    http://developer.yahoo.com/connectedtv/kon...idget_KONtx.pdf

    Thank you,
    Kelly
    0
  • Thank you, that was just what I needed!

    Niklas
    0
  • Hi all,

    I am updating my actual KONtx.videoplayer code to the new KONtx.mediaplayer API.

    My Samsung tv updated to the new 1.3 framework version last week.

    Should I change the first line of my code ?

    CODE
    include("Framework/kontx/1.1/src/all.js");


    to point to the new framework in this way:

    CODE
    include("Framework/kontx/1.3/src/all.js");


    or is better to use this other way:

    CODE
    include("Framework/kontx/1.2/src/all.js");
    include("Javascript/patch-pre_fw1.3.20-mediaplayer.js");


    I am not sure what is the right way.

    Thanks.

    Raul de frutos
    -----------------------
    0
  • QUOTE (Raul @ Jun 27 2010, 11:16 PM) <{POST_SNAPBACK}>
    My Samsung tv updated to the new 1.3 framework version last week.

    Should I change the first line of my code ?

    CODE
    include("Framework/kontx/1.1/src/all.js");


    to point to the new framework in this way:

    CODE
    include("Framework/kontx/1.3/src/all.js");


    or is better to use this other way:

    CODE
    include("Framework/kontx/1.2/src/all.js");
    include("Javascript/patch-pre_fw1.3.20-mediaplayer.js");


    I am not sure what is the right way.


    It depends. If you are targeting Samsung 2009 TVs in the US, then you should do the later. If not, then the later will work for your needs perfectly.
    0
  • QUOTE (Jeremy Johnstone @ Jun 29 2010, 04:58 PM) <{POST_SNAPBACK}>
    It depends. If you are targeting Samsung 2009 TVs in the US, then you should do the later. If not, then the later will work for your needs perfectly.


    I tried both of them with no success.

    This simple sample works OK on the Konfabulator simulator but fails on my Sangung TV B651 European model year 2009 (shows black screen with no error message)

    I checked the Famework version on the Widget Gallery and it showed 1.3.x

    I wrote this code based on the one from the web site http://www.widgetrealm.com

    CODE
    // Widget Media Player
    // Raul de Frutos. 2010
    //

    //include("Framework/kontx/1.3/src/all.js");

    include("Framework/kontx/1.2/src/all.js");
    include("Javascript/patch-pre_fw1.3.20-mediaplayer.js");

    // global variable
    var $video = "";

    // Snippet view definition
    var VistaSnippet = new KONtx.Class({
    ClassName: 'VistaSnippet',
    Extends: KONtx.system.AnchorSnippetView,
    createView: function() {
    this.controls.textoSnipet = new KONtx.element.Text({
    label: "Media Player Raul",
    styles: {
    fontSize: KONtx.utility.scale(20),
    vAlign: "center",
    hAlign: "center",
    color: "#FFFFFF"
    },
    }).appendTo(this);
    },
    });

    // main view definition
    var VistaPrincipal = new KONtx.Class({
    ClassName: 'VistaPrincipal',
    Extends: KONtx.system.SidebarView,
    createView: function() {
    this.controls.CabeceraPpal = new KONtx.control.Header({
    label : "Main menu",
    styles: {
    vOffset: 0
    }
    }).appendTo(this);

    this.controls.BotonVideoSimple = new KONtx.control.TextButton({
    label: "Launch Media Player",
    id: "botonVideoSimpleID",
    events: {
    onSelect: function(event) {
    $video = "http://cosmos.bcst.yahoo.com/getPlaylist.php?node_id=11886648&bitrate=300&tech=wmp";
    KONtx.application.loadView("VistaVideoSimpleID");
    }
    },
    styles: {
    width: Theme.viewSpecs.SIDE_BAR.width,
    height: KONtx.utility.scale(35),
    vOffset: this.controls.CabeceraPpal.outerHeight,
    }
    }).appendTo(this);

    }
    });

    // full screen media player with no onscreen controls.
    var VistaVideoSimple = new KONtx.Class({
    ClassName: 'VistaVideoSimple',
    Extends: KONtx.system.FullscreenView,
    createView: function() {

    KONtx.mediaplayer.initialize();
    var playlist = new KONtx.media.Playlist();
    playlist.addEntryByURL($video);
    KONtx.mediaplayer.playlist.set(playlist);
    KONtx.mediaplayer.playlist.start();

    }
    });

    // Creacion del widget
    KONtx.application.init({
    views: [
    { id: 'VistaPrincipalID', viewClass: VistaPrincipal },
    { id: 'VistaAcercaDeID', viewClass: KONtx.views.AboutBox },
    { id: 'VistaSnippetID', viewClass: VistaSnippet },
    { id: 'VistaVideoSimpleID', viewClass: VistaVideoSimple },
    ],
    defaultViewId: 'VistaPrincipalID',
    settingsViewId: 'VistaAcercaDeID',
    });
    0
  • Don't start a playlist in createView. The setting of the playlist and the starting should only happen inside updateView().
    0
  • Hello Everyone,

    An issue has been identified with the framework (and hence the patch too) which affects 2009 model Samsung TVs occasionally. Some TVs exhibit the issue 100% of the time, others much much less. As such, we have updated the patch file to address this issue.

    Please update to the latest version of the patch file here: http://gist.github.com/399364

    And report back if you have any further issues.

    Thanks!

    -Jeremy
    0
  • With the new patch 'patch-pre_fw1.3.27-mediaplayer.js' and after the TV update of August, 5 (message 'Installing updates 4 of 4' on the TV screen) the code posted before works ok in my TV Samsung B651 (eropean model, year 2009)

    Thanks a lot to the yahoo tv widgets team and the forum members (are the same?).

    Raul
    ---------
    0
  • QUOTE (Raul @ Aug 4 2010, 10:41 PM) <{POST_SNAPBACK}>
    Thanks a lot to the yahoo tv widgets team and the forum members (are the same?).


    Everyone in the "Yahoo!" group (under their name) is part of the team in this part of the forums.

    -Jeremy
    0
  • As I report on another thread http://developer.yahoo.net/forum/index.php...ost&p=19204 the Yahoo! sample videoplayer.widget (which uses the mediaplayer API) and which include the most recent version of the patch mentioned in this thread does NOT work on my Vizio.
    0
  • Recent Posts

    in General - Yahoo! TV Widgets