0

video playback woes

Hi

I'm having some trouble with video playback. My code is cut n pasted from the KONtx.videoPlayer example in the documentation, with the exception that I've removed the transport overlay code. I'm attempting to play a link that I either found in the docs or in the sample code.

{ bitrate: 300, url: "http://cosmos.bcst.yahoo.com/getPlaylist.php?node_id=11886648&bitrate=300&tech=wmp" },

Video playback appears to work fine in the Simulator but when I upload the widget to the client test area, the client reports the error popup always appears (tested on a Samsung tv). The connection animation appears in the top right of the screen and I believe the error is the unsupported bitrate as suggested in the sample code.

I use KONtx.speedPlayer in an onApplicationLoad event to measure and set the connection bitrate. In my Simulator setup, I typically get a integer value up to about 9000 which is what I'd expect with my connection but the client reports they always get a floating point bitrate typically > 100 and < 400. I suspect these suspicously low values is where the problem lies, but the client is able to view YouTube videos correctly.

I've not tried setting forcePlay as I think that might be side-stepping the issue.

Any suggestions? I'm happy to post code if it will help.

Thanks
Marc

by
12 Replies
  • Can you have them check which version of the framework is installed on their TV? It should be visible inside the settings of the widget gallery widget.

    -Jeremy
    0
  • QUOTE (Jeremy Johnstone @ Dec 2 2009, 04:34 PM) <{POST_SNAPBACK}>
    Can you have them check which version of the framework is installed on their TV? It should be visible inside the settings of the widget gallery widget.

    -Jeremy


    The client has tried going to the Gallery Widget then pressing Green to access the settings menu. However, the only options then available are

    "About Yahoo Widget Gallery"
    "Developer Settings"

    The "TV Widget Software" option I see on the Simulator isn't available.

    I've tried putting some code in the app to display the value returned from
    platform.backend.devinfo.fwversion
    0
  • QUOTE (marc.coupar @ Dec 3 2009, 09:29 AM) <{POST_SNAPBACK}>
    The client has tried going to the Gallery Widget then pressing Green to access the settings menu. However, the only options then available are

    "About Yahoo Widget Gallery"
    "Developer Settings"

    The "TV Widget Software" option I see on the Simulator isn't available.

    I've tried putting some code in the app to display the value returned from
    platform.backend.devinfo.fwversion


    Sorry, accidentally posted incomplete response...

    I've tried putting some code in the app to display the value returned from platform.backend.devinfo.fwversion but nothing is displayed.

    I've always ensured I'm setting the viewId ie

    CODE
    this.controls.player = new KONtx.videoplayer({
    viewId: this.config.viewId,


    The client has now reported seeing the video play correctly on one occassion. They didn't note the bitrate reported though.

    Marc
    0
  • QUOTE (marc.coupar @ Dec 3 2009, 09:35 AM) <{POST_SNAPBACK}>
    I've tried putting some code in the app to display the value returned from platform.backend.devinfo.fwversion but nothing is displayed.


    That is because you can't call that on a production TV do to an error in platform.js on older TV firmwares. Based on what you said in the previous post, the difference is that they are running an older firmware on their TV. Ask them to go into the TV menus and choose the option to update their TV firmware.
    0
  • QUOTE (Jeremy Johnstone @ Dec 3 2009, 11:07 AM) <{POST_SNAPBACK}>
    That is because you can't call that on a production TV do to an error in platform.js on older TV firmwares. Based on what you said in the previous post, the difference is that they are running an older firmware on their TV. Ask them to go into the TV menus and choose the option to update their TV firmware.


    Thanks Jeremy

    If that proves to be the problem, is there a way to detect the users firmware so I can display a popup asking them to upgrade if they are using an old version?
    0
  • The client has updated their firmware from

    2009/08/14_002004 to
    2009/09/30_002005

    but still gets the same problem. Here's the code called from createView()

    CODE
    		this.controls.player = new KONtx.videoplayer({
    viewId: this.config.viewId,
    viewport: {
    x: KONtx.utility.scale(0),
    y: KONtx.utility.scale(96),
    width: KONtx.utility.scale(384),
    height: KONtx.utility.scale(288),
    },
    events: {
    onStateChange: (function(event) {

    this.controls.debugText.setText ( "Video State: " + event.payload.newState );

    if(event.payload.newState == event.payload.videoplayer.states.BUFFERING) {
    log ( "**************************** BUFFERING *****************" );
    // this.controls.debugText.setText ( "Video State: BUFFERING" );
    }
    if(event.payload.newState == event.payload.videoplayer.states.EOF) {
    log ( "**************************** END OF STREAM *****************" );
    // this.controls.debugText.setText ( "Video State: END OF STREAM" );
    }

    if(event.payload.newState == event.payload.videoplayer.states.STOP) {
    KONtx.application.previousView();
    }
    if(event.payload.newState == event.payload.videoplayer.states.ERROR) {
    log('');log('');log('');
    log('Received error state from video player');
    log('');log('');log('');
    this._showErrorDialog();
    }
    }).bindTo(this),

    onTimeIndexChanged: (function(event) {
    log ( "ONTIMEINDEXCHANGED" );

    }).bindTo(this),

    onLoadVideo: (function(event) {
    log ( "ONLOADVIDEO" );
    }).bindTo(this),

    onPlaylistEnd: (function(event) {
    log ( "PLAYLIST END" );
    }).bindTo(this),

    onVideoLoadError: (function(event) {
    log('');log('');log('');
    log('Unable to load video. Most probably cause was no supported bitrate for this connection', $dump(event.payload, 4));
    log('');log('');log('');
    this._showErrorDialog();
    }).bindTo(this)
    }
    });



    And the function to trigger playback which is currently called from updateView()

    CODE
    	streamMovie: function ( ) {

    log ( "streamMovie" );

    try {


    this.controls.player.changePlaylist (
    [{ urls: [
    { bitrate: 300, url: "http://cosmos.bcst.yahoo.com/getPlaylist.php?node_id=11886648&bitrate=300&tech=wmp" },

    ]
    }]
    );

    bitrate = KONtx.messages.fetch("bandwidthBitrate");

    log ( "found stored bitrate of ", bitrate );
    this.controls.player.setBandwidthBitrate( bitrate );
    this.controls.player.forcePlay = true;
    this.controls.player.startPlaylist();
    } catch (e) {
    log('');log('');log('');
    log("Caught an exception, so going back to sidebar", $dump(e, 3));
    log('');log('');log('');
    this._showErrorDialog();
    }
    },


    I've also tried linking directly to an .FLV on Youtube so there shouldn't be any server-side bandwidth issues. Again, it works fine in the Simulator but not on a production TV with updated firmware.

    Cheers
    0
  • A couple of additional bits of info, if it helps..

    1. The reported connection bitrate on the TVs being tested is ridiculously low when compared to the actual line bandwidth. Using the URL mentioned earlier, if I drop the requested bitrate down to 100kbps then playback works on the client TVs.

    2. I work externally to the client so am testing on a different connection.

    3. Here's the code I use for detecting the bitrate

    CODE
    >init.js
    EventHandlers.onApplicationStartup.subscribeTo(KONtx.application, ['onApplicationStartup'], EventHandlers);

    >EventHandlers.js
    var EventHandlers = {

    onApplicationStartup: function(event) {

    KONtx.speedtest.profileConnection (
    function(speed)
    {
    KONtx.messages.store("bandwidthBitrate", speed);
    }
    );
    },



    Are there any other developers out there using UK-model Samsungs (or any brand) that have experienced similar problems?

    Unfortunately, this issue is delaying the project so am I best to use the forum for tech support or the developer support email address?

    Thanks
    Marc
    0
  • Can you please confirm what version of the Framework is on the TV? If they have updated their firmware, then this should be visible inside the "versions" button inside the settings of the Widget Gallery.

    -Jeremy
    0
  • QUOTE (Jeremy Johnstone @ Dec 8 2009, 09:22 PM) <{POST_SNAPBACK}>
    Can you please confirm what version of the Framework is on the TV? If they have updated their firmware, then this should be visible inside the "versions" button inside the settings of the Widget Gallery.

    -Jeremy


    The client has upgraded (via USB) using the following link but still does not see the "versions" button as present when viewing the Widget Gallery from the Simulator.

    http://www.samsung.com/us/support/detail/s...me=LN32B650T1F#


    The only mention of any version is:

    2009/09/30_002005
    0
  • QUOTE (marc.coupar @ Dec 10 2009, 02:35 PM) <{POST_SNAPBACK}>
    The client has upgraded (via USB) using the following link but still does not see the "versions" button as present when viewing the Widget Gallery from the Simulator.

    http://www.samsung.com/us/support/detail/s...me=LN32B650T1F#


    The only mention of any version is:

    2009/09/30_002005


    Hi Jeremy

    I understand you're busy but I have to report back to client asap with a solution so is there any chance I can call you directly when you have a free 10 minutes?

    If so, can you email me - marc@bedrock.tv with your direct line number when you're available?

    I'm on UK time but I'll be available til quite late this evening.

    Thanks
    Marc
    0
  • Please send an email to tvwidgets@yahoo-inc.com and one of us can help you one on one.

    -Jeremy
    0
  • We maintain a very large index of Web video that any Yahoo TV Widget developers are welcome to use (free). Pretty handy for testing lots of real-life encoding combinations on different target devices. Our index includes the URLs of +2mm videos that are all indexed by video/audio encoding methods, container, etc. Email if you want access: doherty [at] channels [dot] com.

    Sean
    0

Recent Posts

in General - Yahoo! TV Widgets